From a8c8e33c10ba6b3e607beae97418fa31be89381d Mon Sep 17 00:00:00 2001 From: Yonggan Date: Sat, 10 Jun 2023 14:08:12 +0200 Subject: [PATCH] Add select all to archive --- web/src/lib/components/album-page/album-viewer.svelte | 1 - web/src/routes/(user)/archive/+page.svelte | 6 ++++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/web/src/lib/components/album-page/album-viewer.svelte b/web/src/lib/components/album-page/album-viewer.svelte index 5c488429a6..00770a00d7 100644 --- a/web/src/lib/components/album-page/album-viewer.svelte +++ b/web/src/lib/components/album-page/album-viewer.svelte @@ -24,7 +24,6 @@ import Button from '../elements/buttons/button.svelte'; import CircleIconButton from '../elements/buttons/circle-icon-button.svelte'; import DownloadAction from '../photos-page/actions/download-action.svelte'; - import SelectAllAssets from '../photos-page/actions/select-all-assets.svelte'; import RemoveFromAlbum from '../photos-page/actions/remove-from-album.svelte'; import AssetSelectControlBar from '../photos-page/asset-select-control-bar.svelte'; import UserAvatar from '../shared-components/user-avatar.svelte'; diff --git a/web/src/routes/(user)/archive/+page.svelte b/web/src/routes/(user)/archive/+page.svelte index 2617d77bf6..3dda5a3110 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)} /> +