diff --git a/web/src/lib/components/timeline/TimelineAssetViewer.svelte b/web/src/lib/components/timeline/TimelineAssetViewer.svelte
index f61d88c1c4..e26d969858 100644
--- a/web/src/lib/components/timeline/TimelineAssetViewer.svelte
+++ b/web/src/lib/components/timeline/TimelineAssetViewer.svelte
@@ -97,7 +97,6 @@
};
const handleClose = async (asset: { id: string }) => {
- assetViewingStore.showAssetViewer(false);
invisible = true;
$gridScrollTarget = { at: asset.id };
await navigate({ targetRoute: 'current', assetId: null, assetGridRouteSearchParams: $gridScrollTarget });
diff --git a/web/src/lib/components/timeline/actions/TimelineKeyboardActions.svelte b/web/src/lib/components/timeline/actions/TimelineKeyboardActions.svelte
index 6bc9ba3549..77f5300180 100644
--- a/web/src/lib/components/timeline/actions/TimelineKeyboardActions.svelte
+++ b/web/src/lib/components/timeline/actions/TimelineKeyboardActions.svelte
@@ -141,43 +141,41 @@
}
};
- let shortcutList = $derived(
- (() => {
- if (searchStore.isSearchEnabled || $showAssetViewer) {
- return [];
- }
+ const shortcutList = $derived.by(() => {
+ if (searchStore.isSearchEnabled || $showAssetViewer) {
+ return [];
+ }
- const shortcuts: ShortcutOptions[] = [
- { shortcut: { key: '?', shift: true }, onShortcut: handleOpenShortcutModal },
- { shortcut: { key: '/' }, onShortcut: () => goto(Route.explore()) },
- { shortcut: { key: 'A', ctrl: true }, onShortcut: () => selectAllAssets(timelineManager, assetInteraction) },
- { shortcut: { key: 'ArrowRight' }, onShortcut: () => setFocusTo('earlier', 'asset') },
- { shortcut: { key: 'ArrowLeft' }, onShortcut: () => setFocusTo('later', 'asset') },
- { shortcut: { key: 'D' }, onShortcut: () => setFocusTo('earlier', 'day') },
- { shortcut: { key: 'D', shift: true }, onShortcut: () => setFocusTo('later', 'day') },
- { shortcut: { key: 'M' }, onShortcut: () => setFocusTo('earlier', 'month') },
- { shortcut: { key: 'M', shift: true }, onShortcut: () => setFocusTo('later', 'month') },
- { shortcut: { key: 'Y' }, onShortcut: () => setFocusTo('earlier', 'year') },
- { shortcut: { key: 'Y', shift: true }, onShortcut: () => setFocusTo('later', 'year') },
- { shortcut: { key: 'G' }, onShortcut: handleOpenDateModal },
- ];
- if (onEscape) {
- shortcuts.push({ shortcut: { key: 'Escape' }, onShortcut: onEscape });
- }
+ const shortcuts: ShortcutOptions[] = [
+ { shortcut: { key: '?', shift: true }, onShortcut: handleOpenShortcutModal },
+ { shortcut: { key: '/' }, onShortcut: () => goto(Route.explore()) },
+ { shortcut: { key: 'A', ctrl: true }, onShortcut: () => selectAllAssets(timelineManager, assetInteraction) },
+ { shortcut: { key: 'ArrowRight' }, onShortcut: () => setFocusTo('earlier', 'asset') },
+ { shortcut: { key: 'ArrowLeft' }, onShortcut: () => setFocusTo('later', 'asset') },
+ { shortcut: { key: 'D' }, onShortcut: () => setFocusTo('earlier', 'day') },
+ { shortcut: { key: 'D', shift: true }, onShortcut: () => setFocusTo('later', 'day') },
+ { shortcut: { key: 'M' }, onShortcut: () => setFocusTo('earlier', 'month') },
+ { shortcut: { key: 'M', shift: true }, onShortcut: () => setFocusTo('later', 'month') },
+ { shortcut: { key: 'Y' }, onShortcut: () => setFocusTo('earlier', 'year') },
+ { shortcut: { key: 'Y', shift: true }, onShortcut: () => setFocusTo('later', 'year') },
+ { shortcut: { key: 'G' }, onShortcut: handleOpenDateModal },
+ ];
+ if (onEscape) {
+ shortcuts.push({ shortcut: { key: 'Escape' }, onShortcut: onEscape });
+ }
- if (assetInteraction.selectionActive) {
- shortcuts.push(
- { shortcut: { key: 'Delete' }, onShortcut: onDelete },
- { shortcut: { key: 'Delete', shift: true }, onShortcut: () => trashOrDelete(true) },
- { shortcut: { key: 'D', ctrl: true }, onShortcut: () => deselectAllAssets() },
- { shortcut: { key: 's' }, onShortcut: () => onStackAssets() },
- { shortcut: { key: 'a', shift: true }, onShortcut: toggleArchive },
- );
- }
+ if (assetInteraction.selectionActive) {
+ shortcuts.push(
+ { shortcut: { key: 'Delete' }, onShortcut: onDelete },
+ { shortcut: { key: 'Delete', shift: true }, onShortcut: () => trashOrDelete(true) },
+ { shortcut: { key: 'D', ctrl: true }, onShortcut: () => deselectAllAssets() },
+ { shortcut: { key: 's' }, onShortcut: () => onStackAssets() },
+ { shortcut: { key: 'a', shift: true }, onShortcut: toggleArchive },
+ );
+ }
- return shortcuts;
- })(),
- );
+ return shortcuts;
+ });