From 6bce42734a9ad7bc7e5ef8ae0e8adcfb4ce26df0 Mon Sep 17 00:00:00 2001 From: Travis Menghini Date: Tue, 26 Nov 2024 09:34:03 -1000 Subject: [PATCH] Allow Tags to be applied in bulk on search page --- .../search/[[photos=photos]]/[[assetId=id]]/+page.svelte | 7 +++++++ 1 file changed, 7 insertions(+) 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.svelte index c800dd7014910..647b0dfdd00ed 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 @@ -44,6 +44,8 @@ import { t } from 'svelte-i18n'; import { onMount, tick } from 'svelte'; import AssetJobActions from '$lib/components/photos-page/actions/asset-job-actions.svelte'; + import { preferences, user } from '$lib/stores/user.store'; + import TagAction from '$lib/components/photos-page/actions/tag-action.svelte'; const MAX_ASSET_COUNT = 5000; let { isViewing: showAssetViewer } = assetViewingStore; @@ -229,6 +231,8 @@ function getObjectKeys(obj: T): (keyof T)[] { return Object.keys(obj) as (keyof T)[]; } + let isAllUserOwned = $derived([...$selectedAssets].every((asset) => asset.ownerId === $user.id)); + @@ -250,6 +254,9 @@ + {#if $preferences.tags.enabled && isAllUserOwned} + + {/if}