Add the optional Immich integration and manual gallery push

Immich connections stay server-side with an encrypted API key, albums can be
imported, and photos are only sent back when an event's push button is pressed:
originals upload once, edited photos re-render, and edits hashes plus checksums
skip anything already in Immich. This also lands the accompanying editor, cloud
and administration work that was still uncommitted.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
This commit is contained in:
2026-11-25 17:43:05 +00:00
parent e0c76ba965
commit 0b3ab76405
26 changed files with 4323 additions and 144 deletions
+12 -2
View File
@@ -1,5 +1,6 @@
import nodemailer from 'nodemailer';
import { kv } from './db.mjs';
import { open, seal } from './secrets.mjs';
import {
SMTP_APP_PASSWORD,
SMTP_FROM,
@@ -13,7 +14,16 @@ const SETTINGS_KEY = 'mailSettings';
function savedSettings() {
const value = kv.get(SETTINGS_KEY);
return value && typeof value === 'object' ? value : {};
if (!value || typeof value !== 'object') return {};
if (typeof value.appPassword === 'string' && value.appPassword) {
try {
return { ...value, appPassword: open(value.appPassword) };
} catch (err) {
console.error('[luminary] could not decrypt the saved SMTP password:', err.message);
return { ...value, appPassword: '' };
}
}
return value;
}
/** Never returns the app password; `hasPassword` is enough for the admin UI. */
@@ -70,7 +80,7 @@ function validateSettings(input) {
export function saveMailSettings(input) {
const next = validateSettings(input ?? {});
kv.set(SETTINGS_KEY, next);
kv.set(SETTINGS_KEY, { ...next, appPassword: seal(next.appPassword) });
return mailStatus();
}