Skip to content

High performance self-hosted photo and video management solution.

fix(web): revert descriptions (#6582)

martin234a95960b02
diff --git a/web/src/lib/components/album-page/album-viewer.svelte b/web/src/lib/components/album-page/album-viewer.svelte
index 50572ad05e..7feb3c7aa9 100644
--- a/web/src/lib/components/album-page/album-viewer.svelte
+++ b/web/src/lib/components/album-page/album-viewer.svelte
@@ -159,9 +159,13 @@
{/if}
<!-- ALBUM DESCRIPTION -->
- <p class="mb-12 mt-6 w-full pb-2 text-left text-lg font-medium dark:text-gray-300">
- {album.description}
- </p>
+ {#if album.description}
+ <p
+ class="whitespace-pre-line mb-12 mt-6 w-full pb-2 text-left font-medium text-base text-black dark:text-gray-300"
+ >
+ {album.description}
+ </p>
+ {/if}
</section>
</AssetGrid>
<UpdatePanel {assetStore} />
diff --git a/web/src/lib/components/asset-viewer/detail-panel.svelte b/web/src/lib/components/asset-viewer/detail-panel.svelte
index 25fb61a30e..393ec01c0b 100644
--- a/web/src/lib/components/asset-viewer/detail-panel.svelte
+++ b/web/src/lib/components/asset-viewer/detail-panel.svelte
@@ -214,7 +214,7 @@
</section>
{/if}
- {#if isOwner || description !== ''}
+ {#if isOwner}
<section class="px-4 mt-10">
{#key asset.id}
<textarea
@@ -233,6 +233,8 @@
/>
{/key}
</section>
+ {:else if description}
+ <p class="break-words whitespace-pre-line w-full text-black dark:text-white text-base">{description}</p>
{/if}
{#if !api.isSharedLink && people.length > 0}
diff --git a/web/src/routes/(user)/albums/[albumId]/+page.svelte b/web/src/routes/(user)/albums/[albumId]/+page.svelte
index cc73680f08..9808474e0e 100644
--- a/web/src/routes/(user)/albums/[albumId]/+page.svelte
+++ b/web/src/routes/(user)/albums/[albumId]/+page.svelte
@@ -653,16 +653,19 @@
</div>
{/if}
<!-- ALBUM DESCRIPTION -->
- <textarea
- class="w-full resize-none overflow-hidden text-black dark:text-white border-b-2 border-transparent border-gray-500 bg-transparent text-base outline-none transition-all focus:border-b-2 focus:border-immich-primary disabled:border-none dark:focus:border-immich-dark-primary hover:border-gray-400"
- bind:this={textArea}
- bind:value={description}
- disabled={!isOwned}
- on:input={() => autoGrowHeight(textArea)}
- on:focusout={handleUpdateDescription}
- use:autoGrowHeight
- placeholder="Add description"
- />
+ {#if isOwned}
+ <textarea
+ class="w-full resize-none overflow-hidden text-black dark:text-white border-b-2 border-transparent border-gray-500 bg-transparent text-base outline-none transition-all focus:border-b-2 focus:border-immich-primary disabled:border-none dark:focus:border-immich-dark-primary hover:border-gray-400"
+ bind:this={textArea}
+ bind:value={description}
+ on:input={() => autoGrowHeight(textArea)}
+ on:focusout={handleUpdateDescription}
+ use:autoGrowHeight
+ placeholder="Add description"
+ />
+ {:else if description}
+ <p class="break-words whitespace-pre-line w-full text-black dark:text-white text-base">{description}</p>
+ {/if}
</section>
{/if}