diff --git a/web/src/lib/actions/shortcut.ts b/web/src/lib/actions/shortcut.ts index f7b3009403..0d89a69f65 100644 --- a/web/src/lib/actions/shortcut.ts +++ b/web/src/lib/actions/shortcut.ts @@ -1,5 +1,11 @@ import type { ActionReturn } from 'svelte/action'; +interface ExplainedShortcut { + key: string[]; + action: string; + info?: string; +} + export type Shortcut = { key: string; alt?: boolean; @@ -14,6 +20,7 @@ export type ShortcutOptions = { ignoreInputFields?: boolean; onShortcut: (event: KeyboardEvent & { currentTarget: T }) => unknown; preventDefault?: boolean; + explainedShortcut?: ExplainedShortcut; }; export const shortcutLabel = (shortcut: Shortcut) => { diff --git a/web/src/lib/components/search/SearchKeyboardShortcuts.svelte b/web/src/lib/components/search/SearchKeyboardShortcuts.svelte new file mode 100644 index 0000000000..6b813a222e --- /dev/null +++ b/web/src/lib/components/search/SearchKeyboardShortcuts.svelte @@ -0,0 +1,237 @@ + + + + +{#if isShowDeleteConfirmation} + (isShowDeleteConfirmation = false)} + onConfirm={() => handlePromiseError(trashOrDelete(true))} + /> +{/if} diff --git a/web/src/lib/components/search/SearchResults.svelte b/web/src/lib/components/search/SearchResults.svelte index 3a93d8ba2b..4e13cdf125 100644 --- a/web/src/lib/components/search/SearchResults.svelte +++ b/web/src/lib/components/search/SearchResults.svelte @@ -1,5 +1,6 @@