High performance self-hosted photo and video management solution.
TypeScript backup-toolfluttergoogle-photosgoogle-photos-alternativejavascriptmobile-appnestjsnodejsphoto-galleryphotosphotos-managementself-hostedsveltesveltekittypescriptvideos
feat: editors can update album title & description (#31805)
Jason Rasmussenc4f9e0fab623
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 6e144d06e9..7781652442 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@@ -378,7 +378,7 @@<AlbumTitleid={album.id}albumName={album.albumName}- {isOwned}+ {isEditor}onUpdate={(albumName) => (album = { ...album, albumName })}/>@@ -428,7 +428,7 @@{/if}<AlbumDescriptionid={album.id}- {isOwned}+ {isEditor}bind:description={() => album.description, (description) => (album = { ...album, description })}/></section>diff --git a/web/src/routes/(user)/albums/[albumId=id]/[[photos=photos]]/[[assetId=id]]/AlbumDescription.spec.ts b/web/src/routes/(user)/albums/[albumId=id]/[[photos=photos]]/[[assetId=id]]/AlbumDescription.spec.tsindex 1b6f724177..e9990cf5bb 100644--- a/web/src/routes/(user)/albums/[albumId=id]/[[photos=photos]]/[[assetId=id]]/AlbumDescription.spec.ts+++ b/web/src/routes/(user)/albums/[albumId=id]/[[photos=photos]]/[[assetId=id]]/AlbumDescription.spec.ts@@ -5,13 +5,13 @@ import AlbumDescription from './AlbumDescription.svelte';describe('AlbumDescription component', () => {it('shows an AutogrowTextarea component when isOwned is true', () => {- render(AlbumDescription, { isOwned: true, id: '', description: '' });+ render(AlbumDescription, { isEditor: true, id: '', description: '' });const autogrowTextarea = screen.getByTestId('autogrow-textarea');expect(autogrowTextarea).toBeInTheDocument();});it('does not show an AutogrowTextarea component when isOwned is false', () => {- render(AlbumDescription, { isOwned: false, id: '', description: '' });+ render(AlbumDescription, { isEditor: false, id: '', description: '' });const autogrowTextarea = screen.queryByTestId('autogrow-textarea');expect(autogrowTextarea).not.toBeInTheDocument();});diff --git a/web/src/routes/(user)/albums/[albumId=id]/[[photos=photos]]/[[assetId=id]]/AlbumDescription.svelte b/web/src/routes/(user)/albums/[albumId=id]/[[photos=photos]]/[[assetId=id]]/AlbumDescription.svelteindex cb2fb2a9bb..c476a18bd0 100644--- a/web/src/routes/(user)/albums/[albumId=id]/[[photos=photos]]/[[assetId=id]]/AlbumDescription.svelte+++ b/web/src/routes/(user)/albums/[albumId=id]/[[photos=photos]]/[[assetId=id]]/AlbumDescription.svelte@@ -10,10 +10,10 @@interface Props {id: string;description: string;- isOwned: boolean;+ isEditor: boolean;}- let { id, description = $bindable(), isOwned }: Props = $props();+ let { id, description = $bindable(), isEditor }: Props = $props();const handleFocusOut = async () => {try {@@ -30,7 +30,7 @@};</script>-{#if isOwned}+{#if isEditor}<Textareabind:value={description}variant="ghost"diff --git a/web/src/routes/(user)/albums/[albumId=id]/[[photos=photos]]/[[assetId=id]]/AlbumTitle.svelte b/web/src/routes/(user)/albums/[albumId=id]/[[photos=photos]]/[[assetId=id]]/AlbumTitle.svelteindex fb0de34e70..33fee3e25f 100644--- a/web/src/routes/(user)/albums/[albumId=id]/[[photos=photos]]/[[assetId=id]]/AlbumTitle.svelte+++ b/web/src/routes/(user)/albums/[albumId=id]/[[photos=photos]]/[[assetId=id]]/AlbumTitle.svelte@@ -10,11 +10,11 @@type Props = {id: string;albumName: string;- isOwned: boolean;+ isEditor: boolean;onUpdate: (albumName: string) => void;};- let { id, albumName = $bindable(), isOwned, onUpdate }: Props = $props();+ let { id, albumName = $bindable(), isEditor, onUpdate }: Props = $props();let newAlbumName = $derived(albumName);@@ -39,7 +39,7 @@</script><div class="mb-2">- {#if isOwned}+ {#if isEditor}<Textareabind:value={newAlbumName}variant="ghost"