Add album title #8
This commit is contained in:
parent
32a72e2f0c
commit
28c2ed696c
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "immich-public-proxy",
|
"name": "immich-public-proxy",
|
||||||
"version": "1.3.0",
|
"version": "1.3.1",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "ts-node src/index.ts",
|
"dev": "ts-node src/index.ts",
|
||||||
"build": "npx tsc",
|
"build": "npx tsc",
|
||||||
|
@ -49,9 +49,17 @@ class Render {
|
|||||||
}
|
}
|
||||||
res.render('gallery', {
|
res.render('gallery', {
|
||||||
items,
|
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()
|
const render = new Render()
|
||||||
|
@ -14,9 +14,11 @@ export interface Asset {
|
|||||||
export interface SharedLink {
|
export interface SharedLink {
|
||||||
key: string;
|
key: string;
|
||||||
type: string;
|
type: string;
|
||||||
|
description?: string;
|
||||||
assets: Asset[];
|
assets: Asset[];
|
||||||
album?: {
|
album?: {
|
||||||
id: string;
|
id: string;
|
||||||
|
albumName?: string;
|
||||||
}
|
}
|
||||||
expiresAt: string | null;
|
expiresAt: string | null;
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
|
<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="/style.css"/>
|
||||||
<link type="text/css" rel="stylesheet" href="/lightgallery-bundle.min.css"/>
|
<link type="text/css" rel="stylesheet" href="/lightgallery-bundle.min.css"/>
|
||||||
</head>
|
</head>
|
||||||
|
Loading…
Reference in New Issue
Block a user