fix: Versionsanzeige direkt im HTML statt per JS
Vorher wurde die Version erst in initCalendar() gesetzt – wenn JS vorher fehlschlug, blieb der Text leer. Jetzt steht v1 direkt im HTML (Titel, Login-Button, Sidebar-Button, Impressum-Modal). Für künftige Releases: v1 → v2 in index.html + version.js ersetzen.
This commit is contained in:
@@ -3,7 +3,8 @@
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Calendarr</title>
|
||||
<!-- APP_VERSION: update here + version.js on every release -->
|
||||
<title>Calendarr v1</title>
|
||||
<link rel="icon" type="image/svg+xml" href="/static/favicon.svg" />
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/cropperjs/1.6.2/cropper.min.css" />
|
||||
<link rel="stylesheet" href="/static/css/app.css" />
|
||||
@@ -70,7 +71,7 @@
|
||||
<button type="submit" class="btn btn-primary btn-full">Anmelden</button>
|
||||
</form>
|
||||
</div>
|
||||
<button class="impressum-link" onclick="openImpressum()">© 2026 Scarriffleservices</button>
|
||||
<button class="impressum-link" onclick="openImpressum()">© 2026 Scarriffleservices · v1</button>
|
||||
</div>
|
||||
|
||||
<!-- ─── MAIN APP ──────────────────────────────────────────── -->
|
||||
@@ -172,7 +173,7 @@
|
||||
<div id="cal-list-items"></div>
|
||||
</div>
|
||||
</div>
|
||||
<button class="sidebar-copyright" onclick="openImpressum()">© 2026 Scarriffleservices</button>
|
||||
<button class="sidebar-copyright" onclick="openImpressum()">© 2026 Scarriffleservices · v1</button>
|
||||
</aside>
|
||||
|
||||
<!-- MAIN VIEW -->
|
||||
@@ -764,7 +765,7 @@
|
||||
<a href="mailto:scarriffleservices@gmail.com">scarriffleservices@gmail.com</a></p>
|
||||
</div>
|
||||
<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>
|
||||
<span style="font-size:12px;color:var(--text-3)">Calendarr v1</span>
|
||||
<button class="btn btn-ghost" onclick="closeImpressum()">Schliessen</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -7,7 +7,6 @@ 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() {
|
||||
@@ -64,11 +63,6 @@ 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();
|
||||
|
||||
Reference in New Issue
Block a user