helper Open message

This commit is contained in:
FTCHD
2026-02-24 13:44:09 +03:00
parent ed92c22c26
commit 55e229f432
+30
View File
@@ -32,6 +32,36 @@ async function buildMenu() {
id: 'open', id: 'open',
text: 'Open', text: 'Open',
action: async () => { action: async () => {
if (usePersistedStore.getState().acknowledgements.includes('openShortcut')) {
await invoke('show_toolbar')
return
}
const result = await message(
`You can also open the Toolbar using the default shortcut ${platform() === 'macos' ? 'Command + Shift + /' : 'Control + Shift + /'}.`,
{
title: 'Did you know?',
kind: 'info',
buttons: {
ok: 'Good to know',
},
}
)
if (result !== 'Good to know' && result !== 'Ok') {
return
}
usePersistedStore.setState((prev) => {
if (prev.acknowledgements.includes('openShortcut')) {
return prev
}
return {
acknowledgements: [...prev.acknowledgements, 'openShortcut'],
}
})
await invoke('show_toolbar') await invoke('show_toolbar')
}, },
}) })