diff --git a/web/src/lib/components/album-page/album-viewer.svelte b/web/src/lib/components/album-page/album-viewer.svelte index 1eae441ca8..4dccbf02ea 100644 --- a/web/src/lib/components/album-page/album-viewer.svelte +++ b/web/src/lib/components/album-page/album-viewer.svelte @@ -33,6 +33,7 @@ import CreateSharedLinkModal from '../shared-components/create-share-link-modal/create-shared-link-modal.svelte'; import GalleryViewer from '../shared-components/gallery-viewer/gallery-viewer.svelte'; import ImmichLogo from '../shared-components/immich-logo.svelte'; + import SelectAll from 'svelte-material-icons/SelectAll.svelte'; import { NotificationType, notificationController @@ -332,6 +333,10 @@ isShowShareUserSelection = false; isShowShareLinkModal = true; }; + + const handleSelectAll = () => { + multiSelectAsset = new Set(album.assets); + };
@@ -341,6 +346,7 @@ assets={multiSelectAsset} clearSelect={() => (multiSelectAsset = new Set())} > + {#if isOwned} diff --git a/web/src/lib/components/photos-page/actions/select-all-assets.svelte b/web/src/lib/components/photos-page/actions/select-all-assets.svelte new file mode 100644 index 0000000000..31e6c3ee32 --- /dev/null +++ b/web/src/lib/components/photos-page/actions/select-all-assets.svelte @@ -0,0 +1,41 @@ + + +{#if selecting} + +{/if} +{#if !selecting} + +{/if} diff --git a/web/src/routes/(user)/archive/+page.svelte b/web/src/routes/(user)/archive/+page.svelte index 2617d77bf6..c582493554 100644 --- a/web/src/routes/(user)/archive/+page.svelte +++ b/web/src/routes/(user)/archive/+page.svelte @@ -10,6 +10,7 @@ import AssetSelectControlBar from '$lib/components/photos-page/asset-select-control-bar.svelte'; import EmptyPlaceholder from '$lib/components/shared-components/empty-placeholder.svelte'; import GalleryViewer from '$lib/components/shared-components/gallery-viewer/gallery-viewer.svelte'; + import SelectAll from 'svelte-material-icons/SelectAll.svelte'; import { archivedAsset } from '$lib/stores/archived-asset.store'; import { handleError } from '$lib/utils/handle-error'; import { api, AssetResponseDto } from '@api'; @@ -17,6 +18,7 @@ import DotsVertical from 'svelte-material-icons/DotsVertical.svelte'; import Plus from 'svelte-material-icons/Plus.svelte'; import type { PageData } from './$types'; + import CircleIconButton from '$lib/components/elements/buttons/circle-icon-button.svelte'; export let data: PageData; @@ -39,6 +41,9 @@ const onAssetDelete = (assetId: string) => { $archivedAsset = $archivedAsset.filter((a) => a.id !== assetId); }; + const handleSelectAll = () => { + selectedAssets = new Set($archivedAsset); + }; @@ -57,6 +62,7 @@ clearSelect={() => (selectedAssets = new Set())} > onAssetDelete(asset.id)} /> + diff --git a/web/src/routes/(user)/favorites/+page.svelte b/web/src/routes/(user)/favorites/+page.svelte index 8efeb1b866..56149c7791 100644 --- a/web/src/routes/(user)/favorites/+page.svelte +++ b/web/src/routes/(user)/favorites/+page.svelte @@ -17,6 +17,8 @@ import Plus from 'svelte-material-icons/Plus.svelte'; import Error from '../../+error.svelte'; import type { PageData } from './$types'; + import CircleIconButton from '$lib/components/elements/buttons/circle-icon-button.svelte'; + import SelectAll from 'svelte-material-icons/SelectAll.svelte'; let favorites: AssetResponseDto[] = []; let selectedAssets: Set = new Set(); @@ -38,6 +40,10 @@ } }); + const handleSelectAll = () => { + selectedAssets = new Set(favorites); + }; + const onAssetDelete = (assetId: string) => { favorites = favorites.filter((a) => a.id !== assetId); }; @@ -48,6 +54,7 @@ (selectedAssets = new Set())}> onAssetDelete(asset.id)} /> + diff --git a/web/src/routes/(user)/people/[personId]/+page.svelte b/web/src/routes/(user)/people/[personId]/+page.svelte index eb98a56906..a1c24b713a 100644 --- a/web/src/routes/(user)/people/[personId]/+page.svelte +++ b/web/src/routes/(user)/people/[personId]/+page.svelte @@ -20,6 +20,8 @@ import DotsVertical from 'svelte-material-icons/DotsVertical.svelte'; import Plus from 'svelte-material-icons/Plus.svelte'; import type { PageData } from './$types'; + import CircleIconButton from '$lib/components/elements/buttons/circle-icon-button.svelte'; + import SelectAll from 'svelte-material-icons/SelectAll.svelte'; export let data: PageData; @@ -50,11 +52,15 @@ const onAssetDelete = (assetId: string) => { data.assets = data.assets.filter((asset: AssetResponseDto) => asset.id !== assetId); }; + const handleSelectAll = () => { + selectedAssets = new Set(data.assets); + }; {#if isMultiSelectionMode} (selectedAssets = new Set())}> + diff --git a/web/src/routes/(user)/photos/+page.svelte b/web/src/routes/(user)/photos/+page.svelte index 91d521a96a..304dfd3976 100644 --- a/web/src/routes/(user)/photos/+page.svelte +++ b/web/src/routes/(user)/photos/+page.svelte @@ -6,6 +6,7 @@ import DeleteAssets from '$lib/components/photos-page/actions/delete-assets.svelte'; import DownloadAction from '$lib/components/photos-page/actions/download-action.svelte'; import FavoriteAction from '$lib/components/photos-page/actions/favorite-action.svelte'; + import SelectAllAssets from '$lib/components/photos-page/actions/select-all-assets.svelte'; import AssetGrid from '$lib/components/photos-page/asset-grid.svelte'; import AssetSelectContextMenu from '$lib/components/photos-page/asset-select-context-menu.svelte'; import AssetSelectControlBar from '$lib/components/photos-page/asset-select-control-bar.svelte'; @@ -37,6 +38,7 @@ clearSelect={assetInteractionStore.clearMultiselect} > + diff --git a/web/src/routes/(user)/search/+page.svelte b/web/src/routes/(user)/search/+page.svelte index f4230b8c06..0a7b699bfc 100644 --- a/web/src/routes/(user)/search/+page.svelte +++ b/web/src/routes/(user)/search/+page.svelte @@ -18,6 +18,8 @@ import ImageOffOutline from 'svelte-material-icons/ImageOffOutline.svelte'; import Plus from 'svelte-material-icons/Plus.svelte'; import type { PageData } from './$types'; + import SelectAll from 'svelte-material-icons/SelectAll.svelte'; + import CircleIconButton from '$lib/components/elements/buttons/circle-icon-button.svelte'; export let data: PageData; @@ -44,12 +46,16 @@ const onAssetDelete = (assetId: string) => { searchResultAssets = searchResultAssets.filter((a: AssetResponseDto) => a.id !== assetId); }; + const handleSelectAll = () => { + selectedAssets = new Set(searchResultAssets); + };
{#if isMultiSelectionMode} (selectedAssets = new Set())}> +