Add configurable title and subtitle v0.6.1
This commit is contained in:
1 parent
47b8d42295
commit
c2640cf75a
8 files changed
+34
-9
No files matched your search
+5
-2
@@ -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 {}
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<div class="brand-mark" aria-hidden="true">◫</div>
|
||||
<div>
|
||||
<h1 id="app-name">Photo Date Editor</h1>
|
||||
<p>Local folder · in-place JPG, PNG, TIFF and HEIF metadata</p>
|
||||
<p id="app-subtitle">Local folder · in-place JPG, PNG, TIFF and HEIF metadata</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="top-actions">
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
const CACHE_NAME = 'photo-date-editor-v6-0';
|
||||
const CACHE_NAME = 'photo-date-editor-v6-1';
|
||||
const SHELL = ['/', '/styles.css', '/app.js', '/manifest.webmanifest', '/vendor/leaflet/leaflet.css', '/vendor/leaflet/leaflet.js'];
|
||||
|
||||
self.addEventListener('install', (event) => {
|
||||
|
||||
Reference in new issue
Block a user