Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
import { shortcut } from '$lib/actions/shortcut';
import { shortcuts } from '$lib/actions/shortcut';
import { editManager, EditToolType } from '$lib/managers/edit/edit-manager.svelte';
import { websocketEvents } from '$lib/stores/websocket';
import { getAssetEdits, type AssetResponseDto } from '@immich/sdk';
Expand Down Expand Up @@ -47,7 +47,12 @@
let { asset = $bindable(), onClose }: Props = $props();
</script>

<svelte:document use:shortcut={{ shortcut: { key: 'Escape' }, onShortcut: onClose }} />
<svelte:document
use:shortcuts={[
{ shortcut: { key: 'Escape' }, onShortcut: onClose },
{ shortcut: { key: 'Enter' }, onShortcut: applyEdits },
]}
/>

<section class="relative flex flex-col h-full p-2 dark:bg-immich-dark-bg dark:text-immich-dark-fg dark pt-3">
<HStack class="justify-between me-4">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<script lang="ts">
import { shortcuts } from '$lib/actions/shortcut';
import { transformManager } from '$lib/managers/edit/transform-manager.svelte';
import { Button, HStack, IconButton } from '@immich/ui';
import { mdiFlipHorizontal, mdiFlipVertical, mdiRotateLeft, mdiRotateRight } from '@mdi/js';
Expand Down Expand Up @@ -68,6 +69,13 @@
}
</script>

<svelte:document
use:shortcuts={[
{ shortcut: { key: ']' }, onShortcut: () => rotateImage(90) },
{ shortcut: { key: '[' }, onShortcut: () => rotateImage(-90) },
]}
/>

<div class="mt-3 px-4">
<div class="flex h-10 w-full items-center justify-between text-sm mt-2">
<h2>{$t('editor_orientation')}</h2>
Expand Down
1 change: 1 addition & 0 deletions web/src/lib/services/asset.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ export const getAssetActions = ($t: MessageFormatter, asset: AssetResponseDto) =
!asset.originalPath.toLowerCase().endsWith('.gif') &&
!asset.originalPath.toLowerCase().endsWith('.svg'),
onAction: () => assetViewerManager.openEditor(),
shortcuts: [{ key: 'e' }],
};

const RefreshFacesJob: ActionItem = {
Expand Down
Loading