mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
Merge asset viewer components into asset-grid-asset-viewer
• Rename asset-viewer-actions.svelte to asset-grid-asset-viewer.svelte • Move AssetViewer rendering from asset-viewer-and-actions into asset-grid-asset-viewer • Remove asset-viewer-and-actions.svelte intermediate wrapper • Remove unused isShowDeleteConfirmation prop
This commit is contained in:
parent
14954c669b
commit
76efc48b1b
2 changed files with 191 additions and 12 deletions
|
|
@ -4,7 +4,7 @@
|
|||
import { resizeObserver, type OnResizeCallback } from '$lib/actions/resize-observer';
|
||||
import AssetDateGroupSelectionAware from '$lib/components/photos-page/asset-date-group-selection-aware.svelte';
|
||||
import AssetGridActions from '$lib/components/photos-page/asset-grid-actions.svelte';
|
||||
import AssetViewerAndActions from '$lib/components/photos-page/asset-viewer-and-actions.svelte';
|
||||
import AssetGridAssetViewer from '$lib/components/photos-page/asset-grid-asset-viewer.svelte';
|
||||
import Skeleton from '$lib/components/photos-page/skeleton.svelte';
|
||||
import { AssetAction } from '$lib/constants';
|
||||
import type { DayGroup } from '$lib/managers/timeline-manager/day-group.svelte';
|
||||
|
|
@ -93,10 +93,6 @@
|
|||
|
||||
let scrubberWidth = $state(0);
|
||||
|
||||
// 60 is the bottom spacer element at 60px
|
||||
let bottomSectionHeight = 60;
|
||||
let leadout = $state(false);
|
||||
|
||||
const maxMd = $derived(mobileDevice.maxMd);
|
||||
const usingMobileDevice = $derived(mobileDevice.pointerCoarse);
|
||||
const isEmpty = $derived(timelineManager.isInitialized && timelineManager.months.length === 0);
|
||||
|
|
@ -273,10 +269,6 @@
|
|||
disposeHmr();
|
||||
};
|
||||
});
|
||||
|
||||
let onDateGroupSelect = <({ title, assets }: { title: string; assets: TimelineAsset[] }) => void>$state();
|
||||
let onSelectAssets = <(asset: TimelineAsset) => Promise<void>>$state();
|
||||
let onSelectAssetCandidates = <(asset: TimelineAsset | null) => void>$state();
|
||||
</script>
|
||||
|
||||
<AssetGridActions {scrollToAsset} {timelineManager} {assetInteraction} bind:isShowDeleteConfirmation {onEscape}
|
||||
|
|
@ -369,7 +361,7 @@
|
|||
|
||||
<Portal target="body">
|
||||
{#if $showAssetViewer}
|
||||
<AssetViewerAndActions
|
||||
<AssetGridAssetViewer
|
||||
bind:showSkeleton
|
||||
{timelineManager}
|
||||
{removeAction}
|
||||
|
|
@ -377,8 +369,7 @@
|
|||
{isShared}
|
||||
{album}
|
||||
{person}
|
||||
{isShowDeleteConfirmation}
|
||||
></AssetViewerAndActions>
|
||||
/>
|
||||
{/if}
|
||||
</Portal>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue