Skip to content

Commit

Permalink
Enable stacking and unstacking inside albums.
Browse files Browse the repository at this point in the history
  • Loading branch information
aminesebastian committed Jan 12, 2025
1 parent 5f7d2d9 commit 4485e3d
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import CreateSharedLink from '$lib/components/photos-page/actions/create-shared-link.svelte';
import DeleteAssets from '$lib/components/photos-page/actions/delete-assets.svelte';
import DownloadAction from '$lib/components/photos-page/actions/download-action.svelte';
import StackAction from '$lib/components/photos-page/actions/stack-action.svelte';
import FavoriteAction from '$lib/components/photos-page/actions/favorite-action.svelte';
import RemoveFromAlbum from '$lib/components/photos-page/actions/remove-from-album.svelte';
import SelectAllAssets from '$lib/components/photos-page/actions/select-all-assets.svelte';
Expand Down Expand Up @@ -425,6 +426,9 @@
handlePromiseError(getNumberOfComments());
}
});
let selectedAssets = $derived(assetInteraction.selectedAssetsArray);
let isAssetStackSelected = $derived(selectedAssets.length === 1 && !!selectedAssets[0].stack);
</script>

<div class="flex overflow-hidden" use:scrollMemoryClearer={{ routeStartsWith: AppRoute.ALBUMS }}>
Expand All @@ -448,6 +452,13 @@
{/if}
<ButtonContextMenu icon={mdiDotsVertical} title={$t('menu')}>
<DownloadAction menuItem filename="{album.albumName}.zip" />
{#if assetInteraction.selectedAssets.size > 1 || isAssetStackSelected}
<StackAction
unstack={isAssetStackSelected}
onStack={(assetIds) => assetStore.removeAssets(assetIds)}
onUnstack={(assets) => assetStore.addAssets(assets)}
/>
{/if}
{#if assetInteraction.isAllUserOwned}
<ChangeDate menuItem />
<ChangeLocation menuItem />
Expand Down

0 comments on commit 4485e3d

Please sign in to comment.