fix: slash command does not work (#207)

This commit is contained in:
lencx
2023-01-15 16:14:37 +08:00
parent 6d950c09e6
commit f0c635bd3b
7 changed files with 184 additions and 166 deletions

View File

@@ -16,9 +16,9 @@ $(async function () {
background: #4a4a4a;
color: white;
font-weight: bold;
padding: 5px 8px;
border-radius: 4px;
font-size: 12px;
padding: 3px 5px;
border-radius: 2px;
font-size: 10px;
cursor: pointer;
}
`;
@@ -31,6 +31,7 @@ $(async function () {
const { computePosition, flip, offset, shift } = window.FloatingUIDOM;
document.body.addEventListener('mousedown', async (e) => {
selectionMenu.style.display = 'none';
if (e.target.id === 'chagpt-selection-menu') {
await invoke('dalle2_window', { query: encodeURIComponent(window.__DALLE2_CONTENT__) });
} else {