Add configurable title and subtitle v0.6.1

This commit is contained in:
dmo committed 2026-07-23 13:18:19 +02:00
1 parent 47b8d42295
commit c2640cf75a
8 files changed
+34 -9

No files matched your search

+5 -2
View File
@@ -20,6 +20,7 @@ const $$ = (selector) => [...document.querySelectorAll(selector)];
const elements = {
appName: $('#app-name'),
appSubtitle: $('#app-subtitle'),
openButtons: [$('#open-folder'), $('#open-folder-top'), $('#open-folder-center')],
rescan: $('#rescan-folder'),
folderName: $('#folder-name'),
@@ -1029,8 +1030,10 @@ async function initialise() {
const response = await fetch('/api/config', { cache: 'no-store' });
if (response.ok) {
const config = await response.json();
elements.appName.textContent = config.appName;
document.title = config.appName;
const pageTitle = config.appTitle || config.appName;
elements.appName.textContent = pageTitle;
elements.appSubtitle.textContent = config.appSubtitle;
document.title = pageTitle;
state.mapConfig = config;
}
} catch {}