From e77d3cb46d5de9b92a9636c5f302b56eea780379 Mon Sep 17 00:00:00 2001 From: Alan Grainger Date: Fri, 1 Nov 2024 20:39:39 +0100 Subject: [PATCH] Fix #9 missing config.json settings --- package.json | 2 +- src/immich.ts | 2 +- views/password.ejs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index ae2f092..1e0a548 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "immich-public-proxy", - "version": "1.3.2", + "version": "1.3.3", "scripts": { "dev": "ts-node src/index.ts", "build": "npx tsc", diff --git a/src/immich.ts b/src/immich.ts index e59c23f..75f794b 100644 --- a/src/immich.ts +++ b/src/immich.ts @@ -55,7 +55,7 @@ class Immich { // Password required - show the visitor the password page // `req.params.key` should already be sanitised at this point, but it never hurts to be explicit const key = request.key.replace(/[^\w-]/g, '') - res.render('password', { key }) + res.render('password', { key, lgConfig: render.lgConfig }) } else if (sharedLinkRes.link) { // Valid shared link const link = sharedLinkRes.link diff --git a/views/password.ejs b/views/password.ejs index 8583689..6e8c5a0 100644 --- a/views/password.ejs +++ b/views/password.ejs @@ -51,7 +51,7 @@ }) if (res.status === 200) { document.documentElement.innerHTML = await res.text() - initLightGallery() // from web.js + initLightGallery(<%- JSON.stringify(lgConfig) %>) // initLightGallery imported from web.js } } catch (e) { } }