mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
fix(web): memory viewer arrow navigation (#19400)
* fix(web): memory viewer jumps down on arrow keys * fix pnpm lockfile --------- Co-authored-by: Jason Rasmussen <jason@rasm.me>
This commit is contained in:
parent
e18e4c5962
commit
027dab1487
3 changed files with 190 additions and 204 deletions
|
|
@ -42,6 +42,7 @@
|
|||
onReload?: (() => void) | undefined;
|
||||
pageHeaderOffset?: number;
|
||||
slidingWindowOffset?: number;
|
||||
arrowNavigation?: boolean;
|
||||
}
|
||||
|
||||
let {
|
||||
|
|
@ -60,6 +61,7 @@
|
|||
onReload = undefined,
|
||||
slidingWindowOffset = 0,
|
||||
pageHeaderOffset = 0,
|
||||
arrowNavigation = true,
|
||||
}: Props = $props();
|
||||
|
||||
let { isViewing: isViewerOpen, asset: viewingAsset, setAssetId } = assetViewingStore;
|
||||
|
|
@ -306,8 +308,12 @@
|
|||
{ shortcut: { key: '?', shift: true }, onShortcut: handleOpenShortcutModal },
|
||||
{ shortcut: { key: '/' }, onShortcut: () => goto(AppRoute.EXPLORE) },
|
||||
{ shortcut: { key: 'A', ctrl: true }, onShortcut: () => selectAllAssets() },
|
||||
{ shortcut: { key: 'ArrowRight' }, preventDefault: false, onShortcut: focusNextAsset },
|
||||
{ shortcut: { key: 'ArrowLeft' }, preventDefault: false, onShortcut: focusPreviousAsset },
|
||||
...(arrowNavigation
|
||||
? [
|
||||
{ shortcut: { key: 'ArrowRight' }, preventDefault: false, onShortcut: focusNextAsset },
|
||||
{ shortcut: { key: 'ArrowLeft' }, preventDefault: false, onShortcut: focusPreviousAsset },
|
||||
]
|
||||
: []),
|
||||
];
|
||||
|
||||
if (assetInteraction.selectionActive) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue