mirror of
https://github.com/immich-app/immich.git
synced 2026-05-18 03:10:24 +03:00
fix(web): prevent interaction with detail panel behind person side panel (#27309)
This commit is contained in:
@@ -37,6 +37,7 @@
|
|||||||
mdiPlus,
|
mdiPlus,
|
||||||
} from '@mdi/js';
|
} from '@mdi/js';
|
||||||
import { DateTime } from 'luxon';
|
import { DateTime } from 'luxon';
|
||||||
|
import { onDestroy } from 'svelte';
|
||||||
import { t } from 'svelte-i18n';
|
import { t } from 'svelte-i18n';
|
||||||
import { slide } from 'svelte/transition';
|
import { slide } from 'svelte/transition';
|
||||||
import ImageThumbnail from '../assets/thumbnail/image-thumbnail.svelte';
|
import ImageThumbnail from '../assets/thumbnail/image-thumbnail.svelte';
|
||||||
@@ -52,7 +53,6 @@
|
|||||||
|
|
||||||
let { asset, currentAlbum = null }: Props = $props();
|
let { asset, currentAlbum = null }: Props = $props();
|
||||||
|
|
||||||
let showEditFaces = $derived(assetViewerManager.isEditFacesPanelOpen);
|
|
||||||
let isOwner = $derived(authManager.authenticated && authManager.user.id === asset.ownerId);
|
let isOwner = $derived(authManager.authenticated && authManager.user.id === asset.ownerId);
|
||||||
let people = $derived(asset.people || []);
|
let people = $derived(asset.people || []);
|
||||||
let unassignedFaces = $derived(asset.unassignedFaces || []);
|
let unassignedFaces = $derived(asset.unassignedFaces || []);
|
||||||
@@ -118,10 +118,15 @@
|
|||||||
// Remove the last part of the path to get the parent path
|
// Remove the last part of the path to get the parent path
|
||||||
return Route.folders({ path: getParentPath(asset.originalPath) });
|
return Route.folders({ path: getParentPath(asset.originalPath) });
|
||||||
};
|
};
|
||||||
|
|
||||||
|
onDestroy(() => {
|
||||||
|
assetViewerManager.closeEditFacesPanel();
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<OnEvents onAlbumAddAssets={() => (albums = refreshAlbums())} />
|
<OnEvents onAlbumAddAssets={() => (albums = refreshAlbums())} />
|
||||||
|
|
||||||
|
{#if !assetViewerManager.isEditFacesPanelOpen}
|
||||||
<section class="relative p-2">
|
<section class="relative p-2">
|
||||||
<div class="flex place-items-center gap-2">
|
<div class="flex place-items-center gap-2">
|
||||||
<IconButton
|
<IconButton
|
||||||
@@ -412,7 +417,7 @@
|
|||||||
zoom={12.5}
|
zoom={12.5}
|
||||||
simplified
|
simplified
|
||||||
useLocationPin
|
useLocationPin
|
||||||
showSimpleControls={!showEditFaces}
|
showSimpleControls={!assetViewerManager.isEditFacesPanelOpen}
|
||||||
onOpenInMapView={() => goto(Route.map({ ...latlng, zoom: 12.5 }))}
|
onOpenInMapView={() => goto(Route.map({ ...latlng, zoom: 12.5 }))}
|
||||||
>
|
>
|
||||||
{#snippet popup({ marker })}
|
{#snippet popup({ marker })}
|
||||||
@@ -489,8 +494,9 @@
|
|||||||
<DetailPanelTags {asset} {isOwner} />
|
<DetailPanelTags {asset} {isOwner} />
|
||||||
</section>
|
</section>
|
||||||
{/if}
|
{/if}
|
||||||
|
{/if}
|
||||||
|
|
||||||
{#if showEditFaces}
|
{#if assetViewerManager.isEditFacesPanelOpen}
|
||||||
<PersonSidePanel
|
<PersonSidePanel
|
||||||
assetId={asset.id}
|
assetId={asset.id}
|
||||||
assetType={asset.type}
|
assetType={asset.type}
|
||||||
|
|||||||
@@ -209,7 +209,6 @@ class AssetViewerManager extends BaseEventManager<Events> {
|
|||||||
this.closeFaceEditMode();
|
this.closeFaceEditMode();
|
||||||
this.closeEditFacesPanel();
|
this.closeEditFacesPanel();
|
||||||
}
|
}
|
||||||
|
|
||||||
setAsset(asset: AssetResponseDto) {
|
setAsset(asset: AssetResponseDto) {
|
||||||
this.#viewingAssetStoreState = asset;
|
this.#viewingAssetStoreState = asset;
|
||||||
this.#viewState = true;
|
this.#viewState = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user