mirror of
https://github.com/immich-app/immich.git
synced 2025-05-24 01:12:58 -04:00
* fix: Change shortcut listeners to document * fix: split into window and document * chore: upgrade ui package
25 lines
686 B
Svelte
25 lines
686 B
Svelte
<script lang="ts">
|
|
import { shortcuts } from '$lib/actions/shortcut';
|
|
import Icon from '$lib/components/elements/icon.svelte';
|
|
import { mdiChevronRight } from '@mdi/js';
|
|
import { t } from 'svelte-i18n';
|
|
import NavigationArea from '../navigation-area.svelte';
|
|
|
|
interface Props {
|
|
onNextAsset: () => void;
|
|
}
|
|
|
|
let { onNextAsset }: Props = $props();
|
|
</script>
|
|
|
|
<svelte:document
|
|
use:shortcuts={[
|
|
{ shortcut: { key: 'ArrowRight' }, onShortcut: onNextAsset },
|
|
{ shortcut: { key: 'd' }, onShortcut: onNextAsset },
|
|
]}
|
|
/>
|
|
|
|
<NavigationArea onClick={onNextAsset} label={$t('view_next_asset')}>
|
|
<Icon path={mdiChevronRight} size="36" ariaHidden />
|
|
</NavigationArea>
|