fix(version): Tab-Titel + Impressum dynamisch aus version.js

Vorher waren "Calendarr v18" in index.html hardcoded und wurden bei
Releases nie mit gebumpt — v19/v20 wurden zwar in version.js gepflegt,
landeten aber nie im Tab-Titel. Jetzt liest calendar.js APP_VERSION
direkt aus version.js und setzt sowohl document.title als auch das
Impressum-Footer-Label, damit das nicht mehr auseinanderlaufen kann.

v21 / sw cache v21
This commit is contained in:
Scarriffle
2026-05-19 10:12:32 +02:00
parent 43575f9042
commit f102f02cb9
4 changed files with 14 additions and 6 deletions

View File

@@ -7,6 +7,14 @@ import { renderQuarter } from './views/quarter.js';
import { openColorPicker } from './color-picker.js';
import { openDatePicker, formatDtDisplay } from './date-picker.js';
import { t, setLang, getLang } from './i18n.js';
import { APP_VERSION } from './version.js';
// Version sofort beim Modul-Load ueberall sichtbar setzen.
document.title = `Calendarr ${APP_VERSION}`;
document.addEventListener('DOMContentLoaded', () => {
const imp = document.getElementById('impressum-version');
if (imp) imp.textContent = `Calendarr ${APP_VERSION}`;
});
// Fetch avatar image as blob URL (with auth header)
function fetchAvatarBlob() {
@@ -439,7 +447,7 @@ function updateTitle() {
titleEl.innerHTML =
`<span class="view-title-main">${main}</span>` +
(year ? `<span class="view-title-year">${year}</span>` : '');
document.title = `Calendarr - ${fullText}`;
document.title = `Calendarr ${APP_VERSION} - ${fullText}`;
}
function updateViewButtons() {

View File

@@ -1,2 +1,2 @@
// Increment APP_VERSION with every code change
export const APP_VERSION = 'v20';
export const APP_VERSION = 'v21';