mirror of
https://github.com/KevinMidboe/immich.git
synced 2025-12-08 20:29:05 +00:00
feat(web): Add select all button to all views (#2714)
* Add select all to photos * Add selection of favorites * Add select all button to albums * Add select all to archive * Add select all to search * try to fix identation * Revert "try to fix identation" This reverts commit 40c727b74a9300caed892a61b8703be2ef3a6a26. * try to fix identation * try to fix identation * try to fix identation * try to fix identation * fix bucketposition * Run prettier --------- Co-authored-by: Yonggan <yonggan@obco.pro>
This commit is contained in:
@@ -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);
|
||||
};
|
||||
</script>
|
||||
|
||||
{#if isMultiSelectionMode}
|
||||
<AssetSelectControlBar assets={selectedAssets} clearSelect={() => (selectedAssets = new Set())}>
|
||||
<CreateSharedLink />
|
||||
<CircleIconButton title="Select all" logo={SelectAll} on:click={handleSelectAll} />
|
||||
<AssetSelectContextMenu icon={Plus} title="Add">
|
||||
<AddToAlbum />
|
||||
<AddToAlbum shared />
|
||||
|
||||
Reference in New Issue
Block a user