diff --git a/web/static/js/main.js b/web/static/js/main.js index 62d7483..2330c61 100644 --- a/web/static/js/main.js +++ b/web/static/js/main.js @@ -24,6 +24,9 @@ document.addEventListener('DOMContentLoaded', () => { updateOnlineCount(); setInterval(updateOnlineCount, 30_000); + // Client-side clock: always use the user's local PC/browser time + initClientClock(); + // Tooltips initialisieren document.querySelectorAll('[data-bs-toggle="tooltip"]').forEach(el => { new bootstrap.Tooltip(el); @@ -33,6 +36,27 @@ document.addEventListener('DOMContentLoaded', () => { initTableSort(); }); +function initClientClock() { + const el = document.getElementById('client-clock'); + if (!el) return; + + const render = () => { + const now = new Date(); + const locale = navigator.language || 'en-US'; + el.textContent = now.toLocaleString(locale, { + year: 'numeric', + month: '2-digit', + day: '2-digit', + hour: '2-digit', + minute: '2-digit', + second: '2-digit' + }); + }; + + render(); + setInterval(render, 1000); +} + // ── Online-Count API ────────────────────────────────────── function updateOnlineCount() { fetch('/api/online') diff --git a/web/templates/404.html b/web/templates/404.html index f876e7d..0d68538 100644 --- a/web/templates/404.html +++ b/web/templates/404.html @@ -42,25 +42,25 @@
Die angeforderte Route existiert nicht oder wurde verschoben.
+The requested route does not exist or has been moved.
Du bist aktuell nicht eingeloggt. Starte am besten ueber die Login-Seite.
+You are currently not signed in. Start from the login page.
{% elif is_site_admin and not session.get('group_id') %} -Du bist als Site Admin eingeloggt. Von dort kannst du Gruppen und Benutzer verwalten.
+You are signed in as Site Admin. You can manage groups and users from there.
{% elif role == 'admin' %} -Du bist Gruppen-Admin. Nutze Panel oder Group-Admin, um wieder in gueltige Bereiche zu kommen.
+You are a group admin. Use Panel or Group Admin to return to valid sections.
{% else %} -Nutze das Dashboard, um wieder in bekannte Bereiche zu navigieren.
+Use the dashboard to navigate back to known sections.
{% endif %}