From 08b9cd1056a8931f26e063eb26490aee52805462 Mon Sep 17 00:00:00 2001 From: Alan Grainger <16197738+alangrainger@users.noreply.github.com> Date: Mon, 16 Feb 2026 21:48:14 +1300 Subject: [PATCH] #151 #96 Add album descriptions --- app/config.json | 1 + app/public/style.css | 13 ++++++++++++- app/src/render.ts | 8 ++++++++ app/src/types.ts | 1 + app/views/gallery.ejs | 5 +++++ 5 files changed, 27 insertions(+), 1 deletion(-) diff --git a/app/config.json b/app/config.json index e8108a5..205e027 100644 --- a/app/config.json +++ b/app/config.json @@ -12,6 +12,7 @@ "allowSlugLinks": true, "showHomePage": true, "showGalleryTitle": false, + "showGalleryDescription": false, "showMetadata": { "description": false }, diff --git a/app/public/style.css b/app/public/style.css index 114b1b3..169aa31 100644 --- a/app/public/style.css +++ b/app/public/style.css @@ -52,9 +52,12 @@ html { color: white; } -#header { +#header, #album-description { font-family: system-ui, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, Helvetica, Arial, "Helvetica Neue", sans-serif; color: white; +} + +#header { width: 100%; display: flex; } @@ -65,6 +68,14 @@ html { margin: 4px; } +#album-description h2 { + font-size: 12pt; + font-weight: normal; + font-style: italic; + margin: 4px; + white-space: pre; +} + #download-all { margin: auto 4px auto auto; } diff --git a/app/src/render.ts b/app/src/render.ts index 3da4857..3736e40 100644 --- a/app/src/render.ts +++ b/app/src/render.ts @@ -158,6 +158,7 @@ class Render { items, openItem, title: this.title(share), + description: getConfigOption('ipp.showGalleryDescription', false) ? this.description(share) : '', publicBaseUrl, path: '/share/' + share.key, showDownload: canDownload(share), @@ -173,6 +174,13 @@ class Render { return share.description || share?.album?.albumName || 'Gallery' } + /** + * Get the Immich shared link description + */ + description (share: SharedLink) { + return share?.album?.description || '' + } + /** * Download all assets as a zip file */ diff --git a/app/src/types.ts b/app/src/types.ts index fad3029..7a95367 100644 --- a/app/src/types.ts +++ b/app/src/types.ts @@ -49,6 +49,7 @@ export interface SharedLink { id: string; albumName?: string; order?: string; + description?: string; } expiresAt: string | null; } diff --git a/app/views/gallery.ejs b/app/views/gallery.ejs index 958bfe7..d86c196 100644 --- a/app/views/gallery.ejs +++ b/app/views/gallery.ejs @@ -32,6 +32,11 @@ <% } %> +<% if (description) { %> +
+

<%= description %>

+
+<% } %>
<% // Load the first 50 thumbnails, then load more as the user scrolls. See web.js