mirror of
https://github.com/immich-app/immich.git
synced 2025-05-31 04:05:39 -04:00
This commit is contained in:
parent
f9db60f25b
commit
3030e74fc3
@ -215,7 +215,10 @@
|
|||||||
viewMode = AlbumPageViewMode.VIEW;
|
viewMode = AlbumPageViewMode.VIEW;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (viewMode === AlbumPageViewMode.SELECT_THUMBNAIL) {
|
||||||
|
viewMode = AlbumPageViewMode.VIEW;
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (viewMode === AlbumPageViewMode.SELECT_ASSETS) {
|
if (viewMode === AlbumPageViewMode.SELECT_ASSETS) {
|
||||||
await handleCloseSelectAssets();
|
await handleCloseSelectAssets();
|
||||||
return;
|
return;
|
||||||
|
@ -28,6 +28,13 @@
|
|||||||
const assetStore = new AssetStore({ isArchived: true });
|
const assetStore = new AssetStore({ isArchived: true });
|
||||||
const assetInteraction = new AssetInteraction();
|
const assetInteraction = new AssetInteraction();
|
||||||
|
|
||||||
|
const handleEscape = () => {
|
||||||
|
if (assetInteraction.selectionActive) {
|
||||||
|
assetInteraction.clearMultiselect();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
onDestroy(() => {
|
onDestroy(() => {
|
||||||
assetStore.destroy();
|
assetStore.destroy();
|
||||||
});
|
});
|
||||||
@ -54,7 +61,13 @@
|
|||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<UserPageLayout hideNavbar={assetInteraction.selectionActive} title={data.meta.title} scrollbar={false}>
|
<UserPageLayout hideNavbar={assetInteraction.selectionActive} title={data.meta.title} scrollbar={false}>
|
||||||
<AssetGrid enableRouting={true} {assetStore} {assetInteraction} removeAction={AssetAction.UNARCHIVE}>
|
<AssetGrid
|
||||||
|
enableRouting={true}
|
||||||
|
{assetStore}
|
||||||
|
{assetInteraction}
|
||||||
|
removeAction={AssetAction.UNARCHIVE}
|
||||||
|
onEscape={handleEscape}
|
||||||
|
>
|
||||||
{#snippet empty()}
|
{#snippet empty()}
|
||||||
<EmptyPlaceholder text={$t('no_archived_assets_message')} />
|
<EmptyPlaceholder text={$t('no_archived_assets_message')} />
|
||||||
{/snippet}
|
{/snippet}
|
||||||
|
@ -32,6 +32,13 @@
|
|||||||
const assetStore = new AssetStore({ isFavorite: true });
|
const assetStore = new AssetStore({ isFavorite: true });
|
||||||
const assetInteraction = new AssetInteraction();
|
const assetInteraction = new AssetInteraction();
|
||||||
|
|
||||||
|
const handleEscape = () => {
|
||||||
|
if (assetInteraction.selectionActive) {
|
||||||
|
assetInteraction.clearMultiselect();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
onDestroy(() => {
|
onDestroy(() => {
|
||||||
assetStore.destroy();
|
assetStore.destroy();
|
||||||
});
|
});
|
||||||
@ -68,7 +75,13 @@
|
|||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<UserPageLayout hideNavbar={assetInteraction.selectionActive} title={data.meta.title} scrollbar={false}>
|
<UserPageLayout hideNavbar={assetInteraction.selectionActive} title={data.meta.title} scrollbar={false}>
|
||||||
<AssetGrid enableRouting={true} {assetStore} {assetInteraction} removeAction={AssetAction.UNFAVORITE}>
|
<AssetGrid
|
||||||
|
enableRouting={true}
|
||||||
|
{assetStore}
|
||||||
|
{assetInteraction}
|
||||||
|
removeAction={AssetAction.UNFAVORITE}
|
||||||
|
onEscape={handleEscape}
|
||||||
|
>
|
||||||
{#snippet empty()}
|
{#snippet empty()}
|
||||||
<EmptyPlaceholder text={$t('no_favorites_message')} />
|
<EmptyPlaceholder text={$t('no_favorites_message')} />
|
||||||
{/snippet}
|
{/snippet}
|
||||||
|
@ -24,6 +24,13 @@
|
|||||||
const assetStore = new AssetStore({ userId: data.partner.id, isArchived: false, withStacked: true });
|
const assetStore = new AssetStore({ userId: data.partner.id, isArchived: false, withStacked: true });
|
||||||
const assetInteraction = new AssetInteraction();
|
const assetInteraction = new AssetInteraction();
|
||||||
|
|
||||||
|
const handleEscape = () => {
|
||||||
|
if (assetInteraction.selectionActive) {
|
||||||
|
assetInteraction.clearMultiselect();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
onDestroy(() => {
|
onDestroy(() => {
|
||||||
assetStore.destroy();
|
assetStore.destroy();
|
||||||
});
|
});
|
||||||
@ -51,5 +58,5 @@
|
|||||||
{/snippet}
|
{/snippet}
|
||||||
</ControlAppBar>
|
</ControlAppBar>
|
||||||
{/if}
|
{/if}
|
||||||
<AssetGrid enableRouting={true} {assetStore} {assetInteraction} />
|
<AssetGrid enableRouting={true} {assetStore} {assetInteraction} onEscape={handleEscape} />
|
||||||
</main>
|
</main>
|
||||||
|
@ -87,6 +87,13 @@
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const handleEscape = () => {
|
||||||
|
if (assetInteraction.selectionActive) {
|
||||||
|
assetInteraction.clearMultiselect();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
onDestroy(() => {
|
onDestroy(() => {
|
||||||
assetStore.destroy();
|
assetStore.destroy();
|
||||||
});
|
});
|
||||||
@ -122,7 +129,7 @@
|
|||||||
</div>
|
</div>
|
||||||
{/snippet}
|
{/snippet}
|
||||||
|
|
||||||
<AssetGrid enableRouting={true} {assetStore} {assetInteraction}>
|
<AssetGrid enableRouting={true} {assetStore} {assetInteraction} onEscape={handleEscape}>
|
||||||
<p class="font-medium text-gray-500/60 dark:text-gray-300/60 p-4">
|
<p class="font-medium text-gray-500/60 dark:text-gray-300/60 p-4">
|
||||||
{$t('trashed_items_will_be_permanently_deleted_after', { values: { days: $serverConfig.trashDays } })}
|
{$t('trashed_items_will_be_permanently_deleted_after', { values: { days: $serverConfig.trashDays } })}
|
||||||
</p>
|
</p>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user