fix(web): keyboard shortcut handling (#7946)

* fix(web): keyboard shortcut handling

* drop executeShortcuts in favor of action

* fix merge

---------

Co-authored-by: Jason Rasmussen <jrasm91@gmail.com>
This commit is contained in:
Michel Heusschen
2024-03-15 00:16:55 +01:00
committed by GitHub
parent 12fb90c232
commit eed8e6b67a
14 changed files with 197 additions and 268 deletions
@@ -1,6 +1,7 @@
<script lang="ts">
import { updateAlbumInfo } from '@immich/sdk';
import { handleError } from '$lib/utils/handle-error';
import { shortcut } from '$lib/utils/shortcut';
export let id: string;
export let albumName: string;
@@ -29,7 +30,7 @@
</script>
<input
on:keydown={(e) => e.key === 'Enter' && e.currentTarget.blur()}
use:shortcut={{ shortcut: { key: 'Enter' }, onShortcut: (e) => e.currentTarget.blur() }}
on:blur={handleUpdateName}
class="w-[99%] mb-2 border-b-2 border-transparent text-6xl text-immich-primary outline-none transition-all dark:text-immich-dark-primary {isOwned
? 'hover:border-gray-400'