mirror of
https://github.com/immich-app/immich.git
synced 2025-01-01 08:31:59 +00:00
feat(web): persist info panel (#3013)
Signed-off-by: martabal <74269598+martabal@users.noreply.github.com>
This commit is contained in:
parent
1ab05e8de0
commit
fbd98ec0f9
2 changed files with 8 additions and 6 deletions
|
@ -24,6 +24,7 @@
|
|||
import VideoViewer from './video-viewer.svelte';
|
||||
|
||||
import { assetStore } from '$lib/stores/assets.store';
|
||||
import { isShowDetail } from '$lib/stores/preferences.store';
|
||||
import { addAssetsToAlbum, getFilenameExtension } from '$lib/utils/asset-utils';
|
||||
import { browser } from '$app/environment';
|
||||
|
||||
|
@ -35,7 +36,6 @@
|
|||
const dispatch = createEventDispatcher();
|
||||
let halfLeftHover = false;
|
||||
let halfRightHover = false;
|
||||
let isShowDetail = false;
|
||||
let appearsInAlbums: AlbumResponseDto[] = [];
|
||||
let isShowAlbumPicker = false;
|
||||
let addToSharedAlbum = true;
|
||||
|
@ -81,7 +81,7 @@
|
|||
deleteAsset();
|
||||
return;
|
||||
case 'i':
|
||||
isShowDetail = !isShowDetail;
|
||||
$isShowDetail = !$isShowDetail;
|
||||
return;
|
||||
case 'ArrowLeft':
|
||||
navigateAssetBackward();
|
||||
|
@ -93,7 +93,7 @@
|
|||
};
|
||||
|
||||
const handleCloseViewer = () => {
|
||||
isShowDetail = false;
|
||||
$isShowDetail = false;
|
||||
closeViewer();
|
||||
};
|
||||
|
||||
|
@ -112,7 +112,7 @@
|
|||
};
|
||||
|
||||
const showDetailInfoHandler = () => {
|
||||
isShowDetail = !isShowDetail;
|
||||
$isShowDetail = !$isShowDetail;
|
||||
};
|
||||
|
||||
const handleDownload = () => {
|
||||
|
@ -401,7 +401,7 @@
|
|||
</div>
|
||||
{/if}
|
||||
|
||||
{#if isShowDetail}
|
||||
{#if $isShowDetail}
|
||||
<div
|
||||
transition:fly={{ duration: 150 }}
|
||||
id="detail-panel"
|
||||
|
@ -411,7 +411,7 @@
|
|||
<DetailPanel
|
||||
{asset}
|
||||
albums={appearsInAlbums}
|
||||
on:close={() => (isShowDetail = false)}
|
||||
on:close={() => ($isShowDetail = false)}
|
||||
on:close-viewer={handleCloseViewer}
|
||||
on:description-focus-in={disableKeyDownEvent}
|
||||
on:description-focus-out={enableKeyDownEvent}
|
||||
|
|
|
@ -38,6 +38,8 @@ export const mapSettings = persisted<MapSettings>('map-settings', {
|
|||
|
||||
export const videoViewerVolume = persisted<number>('video-viewer-volume', 1, {});
|
||||
|
||||
export const isShowDetail = persisted<boolean>('info-opened', false, {});
|
||||
|
||||
export interface AlbumViewSettings {
|
||||
sortBy: string;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue