diff --git a/frontend/src/lib/layout/CommandPalette.svelte b/frontend/src/lib/layout/CommandPalette.svelte index 40ab7088b..01c979536 100644 --- a/frontend/src/lib/layout/CommandPalette.svelte +++ b/frontend/src/lib/layout/CommandPalette.svelte @@ -3,6 +3,7 @@ import { api } from '../api.js'; import { contextCommands } from '../utils/contextCommands.js'; import { currentRoute } from '../router.js'; + import { toExternal } from '../runtime/contextPath.js'; import { permissionStore, workspacesStore, isSystemAdmin, currentWorkspace } from '../stores'; import { moduleSettings } from '../stores/moduleSettings.js'; import { timerStore } from '../stores/timerStore.svelte.js'; @@ -226,6 +227,14 @@ } } + // Rows with a url are real links: modified and middle clicks fall through to + // the browser so the target can open in a new tab. + function handleOptionClick(e, cmd) { + if (cmd.url && (e.metaKey || e.ctrlKey || e.shiftKey || e.altKey || e.button !== 0)) return; + e.preventDefault(); + executeAndClose(cmd); + } + function close() { isOpen = false; open.set(false); @@ -367,11 +376,13 @@ {BUCKET_LABELS[command.bucket] || ''} {/if} -