From 28d7a98e16651692c31dc12affb834362f3850ac Mon Sep 17 00:00:00 2001 From: simon Date: Mon, 13 Apr 2026 09:59:43 +0200 Subject: [PATCH] modified: web/static/js/main.js modified: web/templates/404.html modified: web/templates/base.html modified: web/templates/group_admin/base.html modified: web/templates/group_admin/member_edit.html modified: web/templates/group_admin/members.html --- web/static/js/main.js | 24 ++++++++++++++++++++++ web/templates/404.html | 16 +++++++-------- web/templates/base.html | 6 +++--- web/templates/group_admin/base.html | 2 +- web/templates/group_admin/member_edit.html | 2 +- web/templates/group_admin/members.html | 2 +- 6 files changed, 38 insertions(+), 14 deletions(-) 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 @@
-

404 - Seite nicht gefunden

-

Die angeforderte Route existiert nicht oder wurde verschoben.

+

404 - Page not found

+

The requested route does not exist or has been moved.

-
Anfrage
+
Request
{{ request_method }} {{ requested_path }}
{% if not is_logged_in %} -

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 %}
@@ -68,7 +68,7 @@ {% for link in links %} {{ link.label }} {% endfor %} - Zurueck + Go Back diff --git a/web/templates/base.html b/web/templates/base.html index 5cf0614..9a7184f 100644 --- a/web/templates/base.html +++ b/web/templates/base.html @@ -98,7 +98,7 @@ - + {% if not session.get('is_site_admin') and user_groups and user_groups|length > 1 %} - +
{% block page_title %}{% endblock %}
- {{ now.strftime('%d.%m.%Y %H:%M') }} + --:--:--
{% with messages = get_flashed_messages(with_categories=true) %} diff --git a/web/templates/group_admin/base.html b/web/templates/group_admin/base.html index a832284..3744479 100644 --- a/web/templates/group_admin/base.html +++ b/web/templates/group_admin/base.html @@ -12,7 +12,7 @@