mirror of
https://github.com/immich-app/immich.git
synced 2025-01-23 20:22:45 +01:00
fix(web): show stack in album
This commit is contained in:
parent
b6cad7715f
commit
6b735e29c6
1 changed files with 7 additions and 9 deletions
|
@ -124,11 +124,11 @@
|
||||||
let assetGridWidth: number;
|
let assetGridWidth: number;
|
||||||
let albumOrder: AssetOrder | undefined = data.album.order;
|
let albumOrder: AssetOrder | undefined = data.album.order;
|
||||||
|
|
||||||
$: assetStore = new AssetStore({ albumId, order: albumOrder });
|
$: assetStore = new AssetStore({ albumId, order: albumOrder, withStacked: true });
|
||||||
const assetInteractionStore = createAssetInteractionStore();
|
const assetInteractionStore = createAssetInteractionStore();
|
||||||
const { isMultiSelectState, selectedAssets } = assetInteractionStore;
|
const { isMultiSelectState, selectedAssets } = assetInteractionStore;
|
||||||
|
|
||||||
$: timelineStore = new AssetStore({ isArchived: false }, albumId);
|
$: timelineStore = new AssetStore({ isArchived: false, withStacked: true }, albumId);
|
||||||
const timelineInteractionStore = createAssetInteractionStore();
|
const timelineInteractionStore = createAssetInteractionStore();
|
||||||
const { selectedAssets: timelineSelected } = timelineInteractionStore;
|
const { selectedAssets: timelineSelected } = timelineInteractionStore;
|
||||||
|
|
||||||
|
@ -298,11 +298,7 @@
|
||||||
await refreshAlbum();
|
await refreshAlbum();
|
||||||
|
|
||||||
timelineInteractionStore.clearMultiselect();
|
timelineInteractionStore.clearMultiselect();
|
||||||
viewMode = ViewMode.VIEW;
|
await setModeToView();
|
||||||
await navigate(
|
|
||||||
{ targetRoute: 'current', assetId: null, assetGridRouteSearchParams: $gridScrollTarget },
|
|
||||||
{ replaceState: true, forceNavigate: true },
|
|
||||||
);
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
handleError(error, $t('errors.error_adding_assets_to_album'));
|
handleError(error, $t('errors.error_adding_assets_to_album'));
|
||||||
}
|
}
|
||||||
|
@ -311,9 +307,9 @@
|
||||||
const setModeToView = async () => {
|
const setModeToView = async () => {
|
||||||
viewMode = ViewMode.VIEW;
|
viewMode = ViewMode.VIEW;
|
||||||
assetStore.destroy();
|
assetStore.destroy();
|
||||||
assetStore = new AssetStore({ albumId, order: albumOrder });
|
assetStore = new AssetStore({ albumId, order: albumOrder, withStacked: true });
|
||||||
timelineStore.destroy();
|
timelineStore.destroy();
|
||||||
timelineStore = new AssetStore({ isArchived: false }, albumId);
|
timelineStore = new AssetStore({ isArchived: false, withStacked: true }, albumId);
|
||||||
await navigate(
|
await navigate(
|
||||||
{ targetRoute: 'current', assetId: null, assetGridRouteSearchParams: { at: oldAt?.at } },
|
{ targetRoute: 'current', assetId: null, assetGridRouteSearchParams: { at: oldAt?.at } },
|
||||||
{ replaceState: true, forceNavigate: true },
|
{ replaceState: true, forceNavigate: true },
|
||||||
|
@ -576,6 +572,7 @@
|
||||||
assetStore={timelineStore}
|
assetStore={timelineStore}
|
||||||
assetInteractionStore={timelineInteractionStore}
|
assetInteractionStore={timelineInteractionStore}
|
||||||
isSelectionMode={true}
|
isSelectionMode={true}
|
||||||
|
withStacked
|
||||||
/>
|
/>
|
||||||
{:else}
|
{:else}
|
||||||
<AssetGrid
|
<AssetGrid
|
||||||
|
@ -589,6 +586,7 @@
|
||||||
showArchiveIcon
|
showArchiveIcon
|
||||||
on:select={({ detail: asset }) => handleUpdateThumbnail(asset.id)}
|
on:select={({ detail: asset }) => handleUpdateThumbnail(asset.id)}
|
||||||
on:escape={handleEscape}
|
on:escape={handleEscape}
|
||||||
|
withStacked
|
||||||
>
|
>
|
||||||
{#if viewMode !== ViewMode.SELECT_THUMBNAIL}
|
{#if viewMode !== ViewMode.SELECT_THUMBNAIL}
|
||||||
<!-- ALBUM TITLE -->
|
<!-- ALBUM TITLE -->
|
||||||
|
|
Loading…
Reference in a new issue