mirror of
https://github.com/alangrainger/immich-public-proxy.git
synced 2024-12-28 03:41:58 +00:00
Add album title #8
This commit is contained in:
parent
32a72e2f0c
commit
28c2ed696c
4 changed files with 13 additions and 3 deletions
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "immich-public-proxy",
|
||||
"version": "1.3.0",
|
||||
"version": "1.3.1",
|
||||
"scripts": {
|
||||
"dev": "ts-node src/index.ts",
|
||||
"build": "npx tsc",
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
|
||||
<title>Gallery</title>
|
||||
<title><%- title || 'Gallery' %></title>
|
||||
<link type="text/css" rel="stylesheet" href="/style.css"/>
|
||||
<link type="text/css" rel="stylesheet" href="/lightgallery-bundle.min.css"/>
|
||||
</head>
|
||||
|
|
Loading…
Reference in a new issue