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
This commit is contained in:
@@ -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')
|
||||
|
||||
@@ -42,25 +42,25 @@
|
||||
<div class="d-flex align-items-center gap-3 mb-3">
|
||||
<i class="bi bi-signpost-split-fill text-warning" style="font-size: 2.2rem;"></i>
|
||||
<div>
|
||||
<h1 class="h3 mb-1">404 - Seite nicht gefunden</h1>
|
||||
<p class="text-secondary mb-0">Die angeforderte Route existiert nicht oder wurde verschoben.</p>
|
||||
<h1 class="h3 mb-1">404 - Page not found</h1>
|
||||
<p class="text-secondary mb-0">The requested route does not exist or has been moved.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<div class="small text-secondary mb-1">Anfrage</div>
|
||||
<div class="small text-secondary mb-1">Request</div>
|
||||
<div class="path-chip">{{ request_method }} {{ requested_path }}</div>
|
||||
</div>
|
||||
|
||||
<div class="mb-4">
|
||||
{% if not is_logged_in %}
|
||||
<p class="mb-0 text-secondary">Du bist aktuell nicht eingeloggt. Starte am besten ueber die Login-Seite.</p>
|
||||
<p class="mb-0 text-secondary">You are currently not signed in. Start from the login page.</p>
|
||||
{% elif is_site_admin and not session.get('group_id') %}
|
||||
<p class="mb-0 text-secondary">Du bist als Site Admin eingeloggt. Von dort kannst du Gruppen und Benutzer verwalten.</p>
|
||||
<p class="mb-0 text-secondary">You are signed in as Site Admin. You can manage groups and users from there.</p>
|
||||
{% elif role == 'admin' %}
|
||||
<p class="mb-0 text-secondary">Du bist Gruppen-Admin. Nutze Panel oder Group-Admin, um wieder in gueltige Bereiche zu kommen.</p>
|
||||
<p class="mb-0 text-secondary">You are a group admin. Use Panel or Group Admin to return to valid sections.</p>
|
||||
{% else %}
|
||||
<p class="mb-0 text-secondary">Nutze das Dashboard, um wieder in bekannte Bereiche zu navigieren.</p>
|
||||
<p class="mb-0 text-secondary">Use the dashboard to navigate back to known sections.</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
{% for link in links %}
|
||||
<a href="{{ link.href }}" class="btn {{ link.btn }}">{{ link.label }}</a>
|
||||
{% endfor %}
|
||||
<a href="javascript:history.back()" class="btn btn-outline-secondary">Zurueck</a>
|
||||
<a href="javascript:history.back()" class="btn btn-outline-secondary">Go Back</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
|
||||
<hr class="my-2 sidebar-hide-collapsed">
|
||||
|
||||
<!-- Gruppen-Switcher -->
|
||||
<!-- Group switcher -->
|
||||
{% if not session.get('is_site_admin') and user_groups and user_groups|length > 1 %}
|
||||
<div class="mb-2 sidebar-hide-collapsed">
|
||||
<small class="text-muted">Switch group:</small>
|
||||
@@ -150,12 +150,12 @@
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<!-- ── Hauptinhalt ───────────────────────────────────── -->
|
||||
<!-- ── Main content ───────────────────────────────────── -->
|
||||
<div id="page-content" class="flex-grow-1 overflow-auto">
|
||||
<div class="topbar d-flex align-items-center justify-content-between px-4 py-2">
|
||||
<button class="btn btn-sm btn-outline-secondary" id="sidebarToggle"><i class="bi bi-list"></i></button>
|
||||
<h6 class="mb-0 fw-semibold">{% block page_title %}{% endblock %}</h6>
|
||||
<small class="text-muted">{{ now.strftime('%d.%m.%Y %H:%M') }}</small>
|
||||
<small class="text-muted" id="client-clock">--:--:--</small>
|
||||
</div>
|
||||
|
||||
{% with messages = get_flashed_messages(with_categories=true) %}
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<nav class="navbar navbar-dark bg-warning bg-opacity-75">
|
||||
<div class="container-fluid">
|
||||
<a class="navbar-brand fw-bold text-dark" href="{{ url_for('group_admin.dashboard') }}">
|
||||
<i class="bi bi-gear-fill me-2"></i>{{ session.get('group_name', 'Gruppe') }} — Admin
|
||||
<i class="bi bi-gear-fill me-2"></i>{{ session.get('group_name', 'Group') }} — Admin
|
||||
</a>
|
||||
<div class="d-flex align-items-center gap-3">
|
||||
<a href="{{ url_for('group_admin.dashboard') }}" class="nav-link text-dark {{ 'fw-bold' if request.endpoint == 'group_admin.dashboard' }}">Dashboard</a>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<div class="col-md-7">
|
||||
<div class="card border-secondary">
|
||||
<div class="card-header">
|
||||
<i class="bi bi-shield-lock-fill me-2"></i>Panel-Berechtigungen
|
||||
<i class="bi bi-shield-lock-fill me-2"></i>Panel Permissions
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form method="post">
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Benutzer einladen (nur via Benutzername - Site Admin fügt Benutzer hinzu, Gruppen admin kann nur bestehende Mitglieder verwalten) -->
|
||||
<!-- Member invitation note: only Site Admin can add new users to groups -->
|
||||
<div class="col-md-4">
|
||||
<div class="card border-secondary">
|
||||
<div class="card-header"><i class="bi bi-info-circle me-2"></i>Note</div>
|
||||
|
||||
Reference in New Issue
Block a user