High performance self-hosted photo and video management solution.
TypeScript backup-toolfluttergoogle-photosgoogle-photos-alternativejavascriptmobile-appnestjsnodejsphoto-galleryphotosphotos-managementself-hostedsveltesveltekittypescriptvideos
feat(web): add to locked folder in album and search (#18488)
Daimolean91b961642a1e
diff --git a/web/src/routes/(user)/albums/[albumId=id]/[[photos=photos]]/[[assetId=id]]/+page.svelte b/web/src/routes/(user)/albums/[albumId=id]/[[photos=photos]]/[[assetId=id]]/+page.svelteindex bd9186e3c0..ffeef43db1 100644--- a/web/src/routes/(user)/albums/[albumId=id]/[[photos=photos]]/[[assetId=id]]/+page.svelte+++ b/web/src/routes/(user)/albums/[albumId=id]/[[photos=photos]]/[[assetId=id]]/+page.svelte@@ -22,6 +22,7 @@import FavoriteAction from '$lib/components/photos-page/actions/favorite-action.svelte';import RemoveFromAlbum from '$lib/components/photos-page/actions/remove-from-album.svelte';import SelectAllAssets from '$lib/components/photos-page/actions/select-all-assets.svelte';+ import SetVisibilityAction from '$lib/components/photos-page/actions/set-visibility-action.svelte';import TagAction from '$lib/components/photos-page/actions/tag-action.svelte';import AssetGrid from '$lib/components/photos-page/asset-grid.svelte';import AssetSelectControlBar from '$lib/components/photos-page/asset-select-control-bar.svelte';@@ -306,6 +307,11 @@}};+ const handleSetVisibility = (assetIds: string[]) => {+ assetStore.removeAssets(assetIds);+ assetInteraction.clearMultiselect();+ };+const handleRemoveAssets = async (assetIds: string[]) => {assetStore.removeAssets(assetIds);await refreshAlbum();@@ -603,6 +609,7 @@/>{/if}<ArchiveAction menuItem unarchive={assetInteraction.isAllArchived} />+ <SetVisibilityAction menuItem onVisibilitySet={handleSetVisibility} />{/if}{#if $preferences.tags.enabled && assetInteraction.isAllUserOwned}diff --git a/web/src/routes/(user)/archive/[[photos=photos]]/[[assetId=id]]/+page.svelte b/web/src/routes/(user)/archive/[[photos=photos]]/[[assetId=id]]/+page.svelteindex 0ee796ee0a..b1cafa9d98 100644--- a/web/src/routes/(user)/archive/[[photos=photos]]/[[assetId=id]]/+page.svelte+++ b/web/src/routes/(user)/archive/[[photos=photos]]/[[assetId=id]]/+page.svelte@@ -20,6 +20,7 @@import { onDestroy } from 'svelte';import { t } from 'svelte-i18n';import type { PageData } from './$types';+ import SetVisibilityAction from '$lib/components/photos-page/actions/set-visibility-action.svelte';interface Props {data: PageData;@@ -38,6 +39,11 @@return;}};++ const handleSetVisibility = (assetIds: string[]) => {+ assetStore.removeAssets(assetIds);+ assetInteraction.clearMultiselect();+ };</script><UserPageLayout hideNavbar={assetInteraction.selectionActive} title={data.meta.title} scrollbar={false}>@@ -83,6 +89,7 @@/><ButtonContextMenu icon={mdiDotsVertical} title={$t('menu')}><DownloadAction menuItem />+ <SetVisibilityAction menuItem onVisibilitySet={handleSetVisibility} /><DeleteAssets menuItem onAssetDelete={(assetIds) => assetStore.removeAssets(assetIds)} /></ButtonContextMenu></AssetSelectControlBar>diff --git a/web/src/routes/(user)/favorites/[[photos=photos]]/[[assetId=id]]/+page.svelte b/web/src/routes/(user)/favorites/[[photos=photos]]/[[assetId=id]]/+page.svelteindex b67c4fb6b7..c08b080637 100644--- a/web/src/routes/(user)/favorites/[[photos=photos]]/[[assetId=id]]/+page.svelte+++ b/web/src/routes/(user)/favorites/[[photos=photos]]/[[assetId=id]]/+page.svelte@@ -10,6 +10,7 @@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 SetVisibilityAction from '$lib/components/photos-page/actions/set-visibility-action.svelte';import TagAction from '$lib/components/photos-page/actions/tag-action.svelte';import AssetGrid from '$lib/components/photos-page/asset-grid.svelte';import AssetSelectControlBar from '$lib/components/photos-page/asset-select-control-bar.svelte';@@ -42,6 +43,11 @@return;}};++ const handleSetVisibility = (assetIds: string[]) => {+ assetStore.removeAssets(assetIds);+ assetInteraction.clearMultiselect();+ };</script><UserPageLayout hideNavbar={assetInteraction.selectionActive} title={data.meta.title} scrollbar={false}>@@ -85,6 +91,7 @@{#if $preferences.tags.enabled}<TagAction menuItem />{/if}+ <SetVisibilityAction menuItem onVisibilitySet={handleSetVisibility} /><DeleteAssets menuItem onAssetDelete={(assetIds) => assetStore.removeAssets(assetIds)} /></ButtonContextMenu></AssetSelectControlBar>diff --git a/web/src/routes/(user)/people/[personId]/[[photos=photos]]/[[assetId=id]]/+page.svelte b/web/src/routes/(user)/people/[personId]/[[photos=photos]]/[[assetId=id]]/+page.svelteindex 6e47d74413..1e1dfc254d 100644--- a/web/src/routes/(user)/people/[personId]/[[photos=photos]]/[[assetId=id]]/+page.svelte+++ b/web/src/routes/(user)/people/[personId]/[[photos=photos]]/[[assetId=id]]/+page.svelte@@ -18,6 +18,7 @@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 SetVisibilityAction from '$lib/components/photos-page/actions/set-visibility-action.svelte';import TagAction from '$lib/components/photos-page/actions/tag-action.svelte';import AssetGrid from '$lib/components/photos-page/asset-grid.svelte';import AssetSelectControlBar from '$lib/components/photos-page/asset-select-control-bar.svelte';@@ -359,6 +360,11 @@handlePromiseError(updateAssetCount());}});++ const handleSetVisibility = (assetIds: string[]) => {+ assetStore.removeAssets(assetIds);+ assetInteraction.clearMultiselect();+ };</script><main@@ -525,6 +531,7 @@{#if $preferences.tags.enabled && assetInteraction.isAllUserOwned}<TagAction menuItem />{/if}+ <SetVisibilityAction menuItem onVisibilitySet={handleSetVisibility} /><DeleteAssets menuItem onAssetDelete={(assetIds) => handleDeleteAssets(assetIds)} /></ButtonContextMenu></AssetSelectControlBar>diff --git a/web/src/routes/(user)/search/[[photos=photos]]/[[assetId=id]]/+page.svelte b/web/src/routes/(user)/search/[[photos=photos]]/[[assetId=id]]/+page.svelteindex 2cabb534d7..32600cdec3 100644--- a/web/src/routes/(user)/search/[[photos=photos]]/[[assetId=id]]/+page.svelte+++ b/web/src/routes/(user)/search/[[photos=photos]]/[[assetId=id]]/+page.svelte@@ -15,6 +15,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 SetVisibilityAction from '$lib/components/photos-page/actions/set-visibility-action.svelte';import TagAction from '$lib/components/photos-page/actions/tag-action.svelte';import AssetSelectControlBar from '$lib/components/photos-page/asset-select-control-bar.svelte';import ButtonContextMenu from '$lib/components/shared-components/context-menu/button-context-menu.svelte';@@ -25,7 +26,7 @@import { AppRoute, QueryParameter } from '$lib/constants';import { AssetInteraction } from '$lib/stores/asset-interaction.svelte';import { assetViewingStore } from '$lib/stores/asset-viewing.store';- import type { TimelineAsset, Viewport } from '$lib/stores/assets-store.svelte';+ import { AssetStore, type TimelineAsset, type Viewport } from '$lib/stores/assets-store.svelte';import { lang, locale } from '$lib/stores/preferences.store';import { featureFlags } from '$lib/stores/server-config.store';import { preferences } from '$lib/stores/user.store';@@ -79,6 +80,8 @@});});+ let assetStore = new AssetStore();+const onEscape = () => {if ($showAssetViewer) {return;@@ -125,6 +128,13 @@const assetIdSet = new Set(assetIds);searchResultAssets = searchResultAssets.filter((asset: TimelineAsset) => !assetIdSet.has(asset.id));};++ const handleSetVisibility = (assetIds: string[]) => {+ assetStore.removeAssets(assetIds);+ assetInteraction.clearMultiselect();+ onAssetDelete(assetIds);+ };+const handleSelectAll = () => {assetInteraction.selectAssets(searchResultAssets);};@@ -414,6 +424,9 @@<ChangeDescription menuItem /><ChangeLocation menuItem /><ArchiveAction menuItem unarchive={assetInteraction.isAllArchived} />+ {#if assetInteraction.isAllUserOwned}+ <SetVisibilityAction menuItem onVisibilitySet={handleSetVisibility} />+ {/if}{#if $preferences.tags.enabled && assetInteraction.isAllUserOwned}<TagAction menuItem />{/if}