mirror of
https://github.com/immich-app/immich.git
synced 2025-03-01 15:11:21 +01:00
Add select all to archive
This commit is contained in:
parent
25a0a62f6a
commit
a8c8e33c10
2 changed files with 6 additions and 1 deletions
|
@ -24,7 +24,6 @@
|
||||||
import Button from '../elements/buttons/button.svelte';
|
import Button from '../elements/buttons/button.svelte';
|
||||||
import CircleIconButton from '../elements/buttons/circle-icon-button.svelte';
|
import CircleIconButton from '../elements/buttons/circle-icon-button.svelte';
|
||||||
import DownloadAction from '../photos-page/actions/download-action.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 RemoveFromAlbum from '../photos-page/actions/remove-from-album.svelte';
|
||||||
import AssetSelectControlBar from '../photos-page/asset-select-control-bar.svelte';
|
import AssetSelectControlBar from '../photos-page/asset-select-control-bar.svelte';
|
||||||
import UserAvatar from '../shared-components/user-avatar.svelte';
|
import UserAvatar from '../shared-components/user-avatar.svelte';
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
import AssetSelectControlBar from '$lib/components/photos-page/asset-select-control-bar.svelte';
|
import AssetSelectControlBar from '$lib/components/photos-page/asset-select-control-bar.svelte';
|
||||||
import EmptyPlaceholder from '$lib/components/shared-components/empty-placeholder.svelte';
|
import EmptyPlaceholder from '$lib/components/shared-components/empty-placeholder.svelte';
|
||||||
import GalleryViewer from '$lib/components/shared-components/gallery-viewer/gallery-viewer.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 { archivedAsset } from '$lib/stores/archived-asset.store';
|
||||||
import { handleError } from '$lib/utils/handle-error';
|
import { handleError } from '$lib/utils/handle-error';
|
||||||
import { api, AssetResponseDto } from '@api';
|
import { api, AssetResponseDto } from '@api';
|
||||||
|
@ -17,6 +18,7 @@
|
||||||
import DotsVertical from 'svelte-material-icons/DotsVertical.svelte';
|
import DotsVertical from 'svelte-material-icons/DotsVertical.svelte';
|
||||||
import Plus from 'svelte-material-icons/Plus.svelte';
|
import Plus from 'svelte-material-icons/Plus.svelte';
|
||||||
import type { PageData } from './$types';
|
import type { PageData } from './$types';
|
||||||
|
import CircleIconButton from "$lib/components/elements/buttons/circle-icon-button.svelte";
|
||||||
|
|
||||||
export let data: PageData;
|
export let data: PageData;
|
||||||
|
|
||||||
|
@ -39,6 +41,9 @@
|
||||||
const onAssetDelete = (assetId: string) => {
|
const onAssetDelete = (assetId: string) => {
|
||||||
$archivedAsset = $archivedAsset.filter((a) => a.id !== assetId);
|
$archivedAsset = $archivedAsset.filter((a) => a.id !== assetId);
|
||||||
};
|
};
|
||||||
|
const handleSelectAll = () => {
|
||||||
|
selectedAssets = new Set($archivedAsset)
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<UserPageLayout user={data.user} hideNavbar={isMultiSelectionMode} title={data.meta.title}>
|
<UserPageLayout user={data.user} hideNavbar={isMultiSelectionMode} title={data.meta.title}>
|
||||||
|
@ -57,6 +62,7 @@
|
||||||
clearSelect={() => (selectedAssets = new Set())}
|
clearSelect={() => (selectedAssets = new Set())}
|
||||||
>
|
>
|
||||||
<ArchiveAction unarchive onAssetArchive={(asset) => onAssetDelete(asset.id)} />
|
<ArchiveAction unarchive onAssetArchive={(asset) => onAssetDelete(asset.id)} />
|
||||||
|
<CircleIconButton title="Delete" logo={SelectAll} on:click={handleSelectAll}/>
|
||||||
<CreateSharedLink />
|
<CreateSharedLink />
|
||||||
<AssetSelectContextMenu icon={Plus} title="Add">
|
<AssetSelectContextMenu icon={Plus} title="Add">
|
||||||
<AddToAlbum />
|
<AddToAlbum />
|
||||||
|
|
Loading…
Add table
Reference in a new issue