diff --git a/web/src/lib/actions/gridKeyNav.ts b/web/src/lib/actions/gridKeyNav.ts index 984ad7d..9614c80 100644 --- a/web/src/lib/actions/gridKeyNav.ts +++ b/web/src/lib/actions/gridKeyNav.ts @@ -10,6 +10,7 @@ import { removeFromHeap, type PpAlbum } from '$lib/services/photoprism'; +import { acceptDateAndKeep } from '$lib/services/photoActions'; import { queryClient } from '$lib/queryClient'; import { filters } from '$lib/stores/filters.svelte'; import { @@ -498,6 +499,30 @@ export function gridKeyNav(node: HTMLElement, params: GridKeyNavParams = {}) { if (meta) { e.preventDefault(); for (const id of selection.order) selection.ids.add(id); + return; + } + if (shift) return; + // Bare `a` on the EXIF Stripped review tab fires the same + // "Accept date & Keep" flow the bar button uses. Scoped to + // that tab so the key stays free everywhere else (where a + // path-derived date wouldn't make sense as a one-shot + // shortcut). Reads location directly because actions sit + // outside the component tree where `$app/state` is + // idiomatic — same approach used by `filters.section` + // elsewhere in this file. + if ( + filters.section === 'review' && + new URL(window.location.href).searchParams.get('tab') === 'stripped_exif' + ) { + e.preventDefault(); + const ids = cullTargets(); + if (ids.length === 0) { + toast.message('Nothing to keep', { + description: 'Click a photo or select some first' + }); + return; + } + void acceptDateAndKeep(ids); } return; case 'x': diff --git a/web/src/lib/components/sidebar/RightSidebar.svelte b/web/src/lib/components/sidebar/RightSidebar.svelte index 31ea364..b7dfa93 100644 --- a/web/src/lib/components/sidebar/RightSidebar.svelte +++ b/web/src/lib/components/sidebar/RightSidebar.svelte @@ -6,6 +6,7 @@ PUT (Details fields need the full body). -->