Skip to content

Commit

Permalink
Added Tags Option to Memory-Viewer
Browse files Browse the repository at this point in the history
  • Loading branch information
Menghini committed Nov 28, 2024
1 parent 6b38f9e commit 4ed1360
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions web/src/lib/components/memory-page/memory-viewer.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@
import { tweened } from 'svelte/motion';
import { derived as storeDerived } from 'svelte/store';
import { fade } from 'svelte/transition';
import { preferences, user } from '$lib/stores/user.store';
import TagAction from '$lib/components/photos-page/actions/tag-action.svelte';
type MemoryIndex = {
memoryIndex: number;
Expand Down Expand Up @@ -221,6 +223,7 @@
$effect(() => {
handlePromiseError(handleAction(galleryInView ? 'pause' : 'play'));
});
let isAllUserOwned = $derived([...$selectedAssets].every((asset) => asset.ownerId === $user.id));
</script>

<svelte:window
Expand Down Expand Up @@ -253,6 +256,9 @@
<ChangeDate menuItem />
<ChangeLocation menuItem />
<ArchiveAction menuItem unarchive={isAllArchived} onArchive={handleRemove} />
{#if $preferences.tags.enabled && isAllUserOwned}
<TagAction menuItem />
{/if}
<DeleteAssets menuItem onAssetDelete={handleRemove} />
</ButtonContextMenu>
</AssetSelectControlBar>
Expand Down

0 comments on commit 4ed1360

Please sign in to comment.