Weiter gebaut
Some checks failed
Host-Based Deploy (Java 21 Fix) / build-and-run (push) Has been cancelled

This commit is contained in:
2026-04-25 16:56:35 +02:00
parent e4b762f905
commit 4f2048bdc8
242 changed files with 14108 additions and 1770 deletions

View File

@@ -3,6 +3,7 @@
<head>
<meta charset="UTF-8">
<link rel="icon" href="/img/icon.png" type="image/png">
<meta http-equiv="refresh" content="0;url=/games/aufgaben/aufgaben.html">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Aufgaben Vanilla xXx Sphere</title>
<link rel="stylesheet" href="/css/variables.css">
@@ -629,8 +630,13 @@
.then(user => { if (!user) return; loadUserGruppen(); loadAboGruppen(); loadSystemGruppen(); })
.catch(() => { window.location.href = '/login.html'; });
// ── Cross-tab notification ──
let _notifyOnLoad = false;
const gruppenBc = new BroadcastChannel('vanilla-gruppen-updated');
// ── Load ──
function loadUserGruppen() {
if (_notifyOnLoad) { _notifyOnLoad = false; try { gruppenBc.postMessage(1); } catch (_) {} }
resetSelection();
document.getElementById('userLoading').style.display = 'block';
fetch(apiUrl(`/gruppe/list/user`) + `?page=${userPage}&size=${PAGE_SIZE}`)
@@ -924,7 +930,7 @@
openItemId = null;
pendingExpandId = gruppenId;
pendingExpandType = 'user';
loadUserGruppen();
_notifyOnLoad = true; loadUserGruppen();
} else {
document.getElementById('userActionError').textContent = 'Fehler beim Löschen (HTTP ' + r.status + ').';
}
@@ -1131,7 +1137,7 @@
pendingExpandType = 'user';
}
userPage = 0;
loadUserGruppen();
_notifyOnLoad = true; loadUserGruppen();
} else if (r.status === 409) {
showModalError('Limit erreicht: maximal 10 eigene Aufgabengruppen möglich.');
} else {
@@ -1157,7 +1163,7 @@
.then(r => {
if (r.ok || r.status === 202) {
userPage = 0;
loadUserGruppen();
_notifyOnLoad = true; loadUserGruppen();
} else if (r.status === 403) {
document.getElementById('userActionError').textContent = 'Keine Berechtigung.';
btn.disabled = false;
@@ -1179,7 +1185,7 @@
.then(r => {
if (r.ok || r.status === 201) {
userPage = 0;
loadUserGruppen();
_notifyOnLoad = true; loadUserGruppen();
document.getElementById('systemActionError').textContent = '';
} else {
document.getElementById('systemActionError').textContent = 'Fehler beim Kopieren (HTTP ' + r.status + ').';
@@ -1198,7 +1204,7 @@
.then(r => {
if (r.ok || r.status === 201) {
userPage = 0;
loadUserGruppen();
_notifyOnLoad = true; loadUserGruppen();
document.getElementById('aboActionError').textContent = '';
} else if (r.status === 409) {
document.getElementById('aboActionError').textContent = 'Limit erreicht: maximal 10 eigene Aufgabengruppen möglich.';
@@ -1628,7 +1634,7 @@
pendingExpandId = currentItemGruppeId;
pendingExpandType = 'user';
userPage = 0;
loadUserGruppen();
_notifyOnLoad = true; loadUserGruppen();
} else if (r.status === 409) {
showItemError('Limit erreicht: maximal 100 Einträge pro Gruppe möglich.');
} else {
@@ -1724,7 +1730,7 @@
pendingExpandId = selectedGruppeId;
pendingExpandType = 'user';
userPage = 0;
loadUserGruppen();
_notifyOnLoad = true; loadUserGruppen();
} else {
const errEl = document.getElementById('publishError');
errEl.textContent = 'Fehler beim Veröffentlichen (HTTP ' + r.status + ').';