From 64a843d23ac5d6be242e3053a8b41510434192d2 Mon Sep 17 00:00:00 2001 From: r-zakarya <82443831+r-zakarya@users.noreply.github.com> Date: Mon, 13 Jul 2026 05:22:19 +0100 Subject: [PATCH] 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 --- js/app.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/js/app.js b/js/app.js index 579ee6d..7da1f5c 100644 --- a/js/app.js +++ b/js/app.js @@ -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'); } },