diff --git a/web/src/lib/components/photos-page/actions/archive-action.svelte b/web/src/lib/components/photos-page/actions/archive-action.svelte index 2a62f446cb750..1dc9cc0a51364 100644 --- a/web/src/lib/components/photos-page/actions/archive-action.svelte +++ b/web/src/lib/components/photos-page/actions/archive-action.svelte @@ -11,7 +11,7 @@ import MenuOption from '../../shared-components/context-menu/menu-option.svelte'; import { getAssetControlContext } from '../asset-select-control-bar.svelte'; - export let onArchive: OnArchive | undefined = undefined; + export let onArchive: OnArchive; export let menuItem = false; export let unarchive = false; @@ -39,7 +39,7 @@ asset.isArchived = isArchived; } - onArchive?.(ids, isArchived); + onArchive(ids, isArchived); notificationController.show({ message: `${isArchived ? 'Archived' : 'Unarchived'} ${ids.length}`, diff --git a/web/src/lib/components/photos-page/actions/favorite-action.svelte b/web/src/lib/components/photos-page/actions/favorite-action.svelte index e2c492bb47809..ea573ffd7fcb6 100644 --- a/web/src/lib/components/photos-page/actions/favorite-action.svelte +++ b/web/src/lib/components/photos-page/actions/favorite-action.svelte @@ -11,7 +11,7 @@ import { mdiHeartMinusOutline, mdiHeartOutline, mdiTimerSand } from '@mdi/js'; import { getAssetControlContext } from '../asset-select-control-bar.svelte'; - export let onFavorite: OnFavorite | undefined = undefined; + export let onFavorite: OnFavorite; export let menuItem = false; export let removeFavorite: boolean; @@ -40,7 +40,7 @@ asset.isFavorite = isFavorite; } - onFavorite?.(ids, isFavorite); + onFavorite(ids, isFavorite); notificationController.show({ message: isFavorite ? `Added ${ids.length} to favorites` : `Removed ${ids.length} from favorites`, diff --git a/web/src/lib/components/photos-page/asset-date-group.svelte b/web/src/lib/components/photos-page/asset-date-group.svelte index 04fb87211637f..d8372525b69af 100644 --- a/web/src/lib/components/photos-page/asset-date-group.svelte +++ b/web/src/lib/components/photos-page/asset-date-group.svelte @@ -25,6 +25,7 @@ export let viewport: Viewport; export let singleSelect = false; export let withStacked = false; + export let showArchiveIcon = false; export let assetStore: AssetStore; export let assetInteractionStore: AssetInteractionStore; @@ -170,6 +171,7 @@ > assetClickHandler(asset, groupAssets, groupTitle)} diff --git a/web/src/lib/components/photos-page/asset-grid.svelte b/web/src/lib/components/photos-page/asset-grid.svelte index a8eae24139902..60f3111293205 100644 --- a/web/src/lib/components/photos-page/asset-grid.svelte +++ b/web/src/lib/components/photos-page/asset-grid.svelte @@ -28,6 +28,7 @@ export let assetInteractionStore: AssetInteractionStore; export let removeAction: AssetAction | null = null; export let withStacked = false; + export let showArchiveIcon = false; export let isShared = false; export let album: AlbumResponseDto | null = null; export let isShowDeleteConfirmation = false; @@ -425,6 +426,7 @@ {#if intersecting} assets); diff --git a/web/src/routes/(user)/albums/[albumId]/+page.svelte b/web/src/routes/(user)/albums/[albumId]/+page.svelte index cdc5e8782f693..9d6106be6dc51 100644 --- a/web/src/routes/(user)/albums/[albumId]/+page.svelte +++ b/web/src/routes/(user)/albums/[albumId]/+page.svelte @@ -127,6 +127,7 @@ $: isOwned = $user.id == album.ownerId; $: isAllUserOwned = [...$selectedAssets].every((asset) => asset.ownerId === $user.id); $: isAllFavorite = [...$selectedAssets].every((asset) => asset.isFavorite); + $: isAllArchived = [...$selectedAssets].every((asset) => asset.isArchived); $: { assetGridWidth = isShowActivity ? globalWidth - (globalWidth < 768 ? 360 : 460) : globalWidth; } @@ -473,9 +474,9 @@ {#if isAllUserOwned} - + assetStore.triggerUpdate()} /> + assetStore.triggerUpdate()} /> {/if} - {#if isOwned || isAllUserOwned} handleRemoveAssets(assetIds)} /> @@ -591,6 +592,7 @@ isShared={album.sharedUsers.length > 0} isSelectionMode={viewMode === ViewMode.SELECT_THUMBNAIL} singleSelect={viewMode === ViewMode.SELECT_THUMBNAIL} + showArchiveIcon on:select={({ detail: asset }) => handleUpdateThumbnail(asset.id)} on:escape={handleEscape} > diff --git a/web/src/routes/(user)/archive/+page.svelte b/web/src/routes/(user)/archive/+page.svelte index 6505ea111e2d5..5bab71181c984 100644 --- a/web/src/routes/(user)/archive/+page.svelte +++ b/web/src/routes/(user)/archive/+page.svelte @@ -39,7 +39,7 @@ assetStore.removeAsset(assetId)} /> - + assetStore.triggerUpdate()} /> {/if} diff --git a/web/src/routes/(user)/favorites/+page.svelte b/web/src/routes/(user)/favorites/+page.svelte index 3f49b95c6010e..da13d1ab84f07 100644 --- a/web/src/routes/(user)/favorites/+page.svelte +++ b/web/src/routes/(user)/favorites/+page.svelte @@ -42,7 +42,7 @@ assetStore.removeAsset(assetId)} /> - + assetStore.removeAssets(ids)} /> diff --git a/web/src/routes/(user)/people/[personId]/+page.svelte b/web/src/routes/(user)/people/[personId]/+page.svelte index 64381677f0dd7..f572ff2cb7ac9 100644 --- a/web/src/routes/(user)/people/[personId]/+page.svelte +++ b/web/src/routes/(user)/people/[personId]/+page.svelte @@ -446,7 +446,7 @@ $assetStore.removeAsset(assetId)} /> - + assetStore.triggerUpdate()} /> $assetStore.removeAssets(ids)} /> diff --git a/web/src/routes/(user)/photos/+page.svelte b/web/src/routes/(user)/photos/+page.svelte index f1dc3646241ac..5ab2cc1c5eed5 100644 --- a/web/src/routes/(user)/photos/+page.svelte +++ b/web/src/routes/(user)/photos/+page.svelte @@ -65,7 +65,7 @@ onAssetDelete={(assetId) => assetStore.removeAsset(assetId)} /> - + assetStore.triggerUpdate()} /> assetStore.removeAssets(ids)} /> {#if $selectedAssets.size > 1} diff --git a/web/src/routes/(user)/search/+page.svelte b/web/src/routes/(user)/search/+page.svelte index a9e8054e02c35..354a84bd8923d 100644 --- a/web/src/routes/(user)/search/+page.svelte +++ b/web/src/routes/(user)/search/+page.svelte @@ -223,6 +223,8 @@ return personNames.join(', '); } + + const triggerAssetUpdate = () => (searchResultAssets = searchResultAssets);
@@ -239,8 +241,8 @@ - - + +