feat: Versionsanzeige bei Copyright-Links und im Impressum

Neue version.js als Single Point of Truth (APP_VERSION).
Sidebar, Login-Screen und Impressum-Modal zeigen die aktuelle
Version an — ab jetzt bei jeder Änderung v2, v3 ... hochzählen.
Startet bei v1.
This commit is contained in:
Scarriffle
2026-04-24 11:36:43 +02:00
parent c5c6a5f71b
commit c03af1b7ea
3 changed files with 11 additions and 2 deletions

View File

@@ -763,7 +763,8 @@
<p><strong>Kontakt</strong><br>
<a href="mailto:scarriffleservices@gmail.com">scarriffleservices@gmail.com</a></p>
</div>
<div class="modal-footer">
<div class="modal-footer" style="justify-content:space-between;align-items:center">
<span id="impressum-version" style="font-size:12px;color:var(--text-3)"></span>
<button class="btn btn-ghost" onclick="closeImpressum()">Schliessen</button>
</div>
</div>

View File

@@ -1,4 +1,4 @@
import { api } from './api.js';
import { api } from './api.js';
import { applyTheme, isToday, isSameDay, toLocalDatetimeInput, toDateInput, dateKey, dayOfWeek, weekStart } from './utils.js';
import { renderMonth } from './views/month.js';
import { renderWeek } from './views/week.js';
@@ -7,6 +7,7 @@ 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';
// Fetch avatar image as blob URL (with auth header)
function fetchAvatarBlob() {
@@ -63,6 +64,11 @@ export async function initCalendar() {
setLang(settings.language || 'de');
applyTheme(settings);
updateViewButtons();
document.querySelectorAll('.sidebar-copyright, .impressum-link').forEach(el => {
el.innerHTML = `© 2026 Scarriffleservices · ${APP_VERSION}`;
});
const impVer = document.getElementById('impressum-version');
if (impVer) impVer.textContent = `Calendarr ${APP_VERSION}`;
renderCalendarList();
renderMiniCal();
await fetchAndRender();

2
frontend/js/version.js Normal file
View File

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