feat(palette): add the sidebar Tools + Settings as commands

Generator, Authenticator, TOTP generator, Vault health, Audit log, Import,
Export and Settings are now reachable from Ctrl+K. View-based tools reuse
the sidebar buttons' click handlers so their cache invalidation rides along.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
r-zakarya
2026-07-13 05:22:19 +01:00
parent a090c64081
commit 64a843d23a
+11
View File
@@ -5803,6 +5803,17 @@ function paletteCommands() {
{ id: 'lock', label: 'Lock vault', icon: 'i-lock', run: async () => { closePalette(); if (await confirmDiscardForSessionExit('lock')) lockVault(); } },
{ id: 'logout', label: 'Sign out', icon: 'i-log-out', run: async () => { closePalette(); if (await confirmDiscardForSessionExit('logout')) doLogout(); } },
{ id: 'theme', label: 'Toggle theme', icon: 'i-sun', run: () => { closePalette(); toggleTheme(); } },
// Sidebar Tools — view-based ones go through the sidebar buttons'
// click handlers so their cache invalidation (health/audit) rides along.
{ id: 'gen', label: 'Password generator', icon: 'i-dice', run: () => { closePalette(); openGen('standalone'); } },
{ id: 'authenticator', label: 'Authenticator (2FA codes)', icon: 'i-shield',
run: () => { closePalette(); $('#sidebarAuthenticatorBtn').click(); } },
{ id: 'totp', label: 'TOTP generator', icon: 'i-key', run: () => { closePalette(); openTotpTool(); } },
{ id: 'health', label: 'Vault health', icon: 'i-alert', run: () => { closePalette(); $('#sidebarHealthBtn').click(); } },
{ id: 'audit', label: 'Audit log', icon: 'i-list', run: () => { closePalette(); $('#sidebarAuditBtn').click(); } },
{ id: 'import', label: 'Import vault', icon: 'i-log-in', run: () => { closePalette(); doImport(); } },
{ id: 'export', label: 'Export vault', icon: 'i-log-out',run: () => { closePalette(); doExport(); } },
{ id: 'settings', label: 'Open settings', icon: 'i-settings', run: () => { closePalette(); openSettings(); } },
{ id: 'all', label: 'Show all items', icon: 'i-globe', run: () => { closePalette(); setView('all'); } },
{ id: 'fav', label: 'Show favorites', icon: 'i-star', run: () => { closePalette(); setView('favorites'); } },
{ id: 'notes', label: 'Show notes', icon: 'i-edit', run: () => { closePalette(); setView('notes'); } },