diff --git a/web/src/lib/components/asset-viewer/asset-viewer.svelte b/web/src/lib/components/asset-viewer/asset-viewer.svelte index cf74b4a79c..9622699342 100644 --- a/web/src/lib/components/asset-viewer/asset-viewer.svelte +++ b/web/src/lib/components/asset-viewer/asset-viewer.svelte @@ -17,6 +17,7 @@ import { assetStore } from '$lib/stores/assets.store'; import { isShowDetail } from '$lib/stores/preferences.store'; import { addAssetsToAlbum, downloadFile } from '$lib/utils/asset-utils'; + import NavigationArea from './navigation-area.svelte'; import { browser } from '$app/environment'; export let asset: AssetResponseDto; @@ -25,8 +26,6 @@ export let sharedLink: SharedLinkResponseDto | undefined = undefined; const dispatch = createEventDispatcher(); - let halfLeftHover = false; - let halfRightHover = false; let appearsInAlbums: AlbumResponseDto[] = []; let isShowAlbumPicker = false; let isShowDeleteConfirmation = false; @@ -251,28 +250,8 @@ {#if showNavigation} - -
{ - halfLeftHover = true; - halfRightHover = false; - }} - on:mouseleave={() => { - halfLeftHover = false; - }} - on:click={navigateAssetBackward} - on:keydown={navigateAssetBackward} - > - +
+
{/if} @@ -304,28 +283,8 @@
{#if showNavigation} - -
{ - halfLeftHover = false; - halfRightHover = true; - }} - on:mouseleave={() => { - halfRightHover = false; - }} - > - +
+
{/if} @@ -379,10 +338,4 @@ #immich-asset-viewer { contain: layout; } - - .navigation-button-hover { - background-color: rgb(107 114 128 / var(--tw-bg-opacity)); - color: rgb(255 255 255 / var(--tw-text-opacity)); - transition: all 150ms; - } diff --git a/web/src/lib/components/asset-viewer/navigation-area.svelte b/web/src/lib/components/asset-viewer/navigation-area.svelte new file mode 100644 index 0000000000..e0656992a8 --- /dev/null +++ b/web/src/lib/components/asset-viewer/navigation-area.svelte @@ -0,0 +1,9 @@ + + + +
+ +