Add album title #8

This commit is contained in:
Alan Grainger
2024-11-01 14:19:15 +01:00
parent 32a72e2f0c
commit 28c2ed696c
4 changed files with 13 additions and 3 deletions
+9 -1
View File
@@ -49,9 +49,17 @@ class Render {
}
res.render('gallery', {
items,
openItem
openItem,
title: this.title(share)
})
}
/**
* Attempt to get a title from the link description or the album title
*/
title (share: SharedLink) {
return share.description || share?.album?.albumName || ''
}
}
const render = new Render()
+2
View File
@@ -14,9 +14,11 @@ export interface Asset {
export interface SharedLink {
key: string;
type: string;
description?: string;
assets: Asset[];
album?: {
id: string;
albumName?: string;
}
expiresAt: string | null;
}