Weiter gebaut
Some checks failed
Host-Based Deploy (Java 21 Fix) / build-and-run (push) Has been cancelled
Some checks failed
Host-Based Deploy (Java 21 Fix) / build-and-run (push) Has been cancelled
This commit is contained in:
@@ -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 – BDSM – xXx Sphere</title>
|
||||
<link rel="stylesheet" href="/css/variables.css">
|
||||
@@ -96,6 +97,7 @@
|
||||
.gruppe-badge-private { background: rgba(233,69,96,0.15); color: var(--color-primary); }
|
||||
.gruppe-badge-public { background: rgba(46,204,113,0.15); color: var(--color-success); }
|
||||
.gruppe-badge-vanilla { background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; }
|
||||
.gruppe-badge-chastity { background: rgba(155,89,182,0.15); color: #9b59b6; border: 1px solid rgba(155,89,182,0.4); }
|
||||
.gruppe-toggle { font-size: 0.75rem; color: var(--color-muted); flex-shrink: 0; transition: transform 0.2s; }
|
||||
.gruppe-card.open .gruppe-toggle { transform: rotate(90deg); }
|
||||
|
||||
@@ -368,12 +370,14 @@
|
||||
Gruppe veröffentlichen (für alle sichtbar)
|
||||
</span>
|
||||
</label>
|
||||
<label>
|
||||
<span class="modal-check">
|
||||
<input type="checkbox" id="gVanilla">
|
||||
Auch für Vanilla-Game verfügbar
|
||||
</span>
|
||||
</label>
|
||||
<div style="margin-top:0.5rem;">
|
||||
<label for="gAvailableIn" style="font-size:0.85rem;display:block;margin-bottom:0.3rem;">Verfügbar in</label>
|
||||
<select id="gAvailableIn" style="width:100%;padding:0.5rem 0.75rem;border-radius:6px;border:1px solid var(--color-secondary);background:var(--color-secondary);color:var(--color-text);font-size:0.9rem;">
|
||||
<option value="BDSM_ONLY">Nur BDSM</option>
|
||||
<option value="BDSM_AND_VANILLA">BDSM & Vanilla</option>
|
||||
<option value="CHASTITY_ONLY">Nur Chastity</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="modal-error" id="modalError"></div>
|
||||
<div class="modal-actions">
|
||||
<button class="btn-cancel" id="cancelBtn">Abbrechen</button>
|
||||
@@ -636,8 +640,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('bdsm-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}`)
|
||||
@@ -722,7 +731,8 @@
|
||||
if (g.privateGruppe) badges.push(`<span class="gruppe-badge gruppe-badge-private">Privat</span>`);
|
||||
else badges.push(`<span class="gruppe-badge gruppe-badge-public">Öffentlich</span>`);
|
||||
if (type === 'user' && g.subscriberCount > 0) badges.push(`<span class="gruppe-badge">♥ ${g.subscriberCount} Abo${g.subscriberCount !== 1 ? 's' : ''}</span>`);
|
||||
if (g.vanillaAvailable) badges.push(`<span class="gruppe-badge gruppe-badge-vanilla">Vanilla</span>`);
|
||||
if (g.availableIn === 'BDSM_AND_VANILLA') badges.push(`<span class="gruppe-badge gruppe-badge-vanilla">Vanilla</span>`);
|
||||
if (g.availableIn === 'CHASTITY_ONLY') badges.push(`<span class="gruppe-badge gruppe-badge-chastity">Chastity</span>`);
|
||||
|
||||
return `
|
||||
<div class="gruppe-card" id="gruppe-${esc(g.gruppenId)}">
|
||||
@@ -936,7 +946,7 @@
|
||||
openItemId = null;
|
||||
pendingExpandId = gruppenId;
|
||||
pendingExpandType = 'user';
|
||||
loadUserGruppen();
|
||||
_notifyOnLoad = true; loadUserGruppen();
|
||||
} else {
|
||||
document.getElementById('userActionError').textContent = 'Fehler beim Löschen (HTTP ' + r.status + ').';
|
||||
}
|
||||
@@ -1077,7 +1087,7 @@
|
||||
pubCb.checked = !g.privateGruppe;
|
||||
pubCb.disabled = g.privateGruppe; // Veröffentlichen nur über den Veröffentlichen-Button
|
||||
document.getElementById('gPublicLabel').style.display = 'block';
|
||||
document.getElementById('gVanilla').checked = g.vanillaAvailable || false;
|
||||
document.getElementById('gAvailableIn').value = g.availableIn || 'BDSM_ONLY';
|
||||
const imgWrap = document.getElementById('gCurrentImgWrap');
|
||||
if (g.bild) {
|
||||
document.getElementById('gCurrentImg').src = 'data:image/png;base64,' + g.bild;
|
||||
@@ -1095,7 +1105,7 @@
|
||||
document.getElementById('gDesc').value = '';
|
||||
document.getElementById('gPublic').checked = false;
|
||||
document.getElementById('gPublicLabel').style.display = 'none';
|
||||
document.getElementById('gVanilla').checked = false;
|
||||
document.getElementById('gAvailableIn').value = 'BDSM_ONLY';
|
||||
document.getElementById('gCurrentImgWrap').style.display = 'none';
|
||||
gruppeModal.classList.add('open');
|
||||
document.getElementById('gName').focus();
|
||||
@@ -1129,7 +1139,7 @@
|
||||
name,
|
||||
beschreibung: document.getElementById('gDesc').value.trim() || null,
|
||||
privateGruppe: isEdit ? !document.getElementById('gPublic').checked : true,
|
||||
vanillaAvailable: document.getElementById('gVanilla').checked,
|
||||
availableIn: document.getElementById('gAvailableIn').value,
|
||||
bild: bildBase64
|
||||
};
|
||||
|
||||
@@ -1146,7 +1156,7 @@
|
||||
pendingExpandType = 'user';
|
||||
}
|
||||
userPage = 0;
|
||||
loadUserGruppen();
|
||||
_notifyOnLoad = true; loadUserGruppen();
|
||||
} else if (r.status === 409) {
|
||||
showModalError('Limit erreicht: maximal 10 eigene Aufgabengruppen möglich.');
|
||||
} else {
|
||||
@@ -1172,7 +1182,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;
|
||||
@@ -1194,7 +1204,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 + ').';
|
||||
@@ -1213,7 +1223,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.';
|
||||
@@ -1643,7 +1653,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 {
|
||||
@@ -1739,7 +1749,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 + ').';
|
||||
|
||||
Reference in New Issue
Block a user