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

@@ -122,6 +122,7 @@
.gruppe-badge { font-size:0.65rem; padding:0.1rem 0.4rem; border-radius:20px; background:rgba(255,255,255,0.07); color:var(--color-muted); }
.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); }
.gruppe-body { border-top:1px solid var(--color-secondary); padding:1rem 1rem 0.75rem; }
@@ -278,11 +279,12 @@
<span style="font-size:0.78rem; color:var(--color-muted);">Aktuelles Bild neues wählen zum Ersetzen</span>
</div>
<input type="file" id="gBild" accept="image/*">
<label style="margin-top:0.5rem;">
<span class="modal-check">
<input type="checkbox" id="gVanilla">
Auch für Vanilla-Game verfügbar
</span>
<label style="margin-top:0.5rem;display:block;font-size:0.85rem;color:var(--color-muted);">Verfügbar in
<select id="gAvailableIn" style="margin-top:0.3rem;width:100%;padding:0.5rem 0.75rem;border:1px solid var(--color-secondary);border-radius:6px;background:var(--color-secondary);color:var(--color-text);font-size:0.88rem;">
<option value="BDSM_ONLY">Nur BDSM</option>
<option value="BDSM_AND_VANILLA">BDSM &amp; Vanilla</option>
<option value="CHASTITY_ONLY">Nur Chastity</option>
</select>
</label>
<div class="modal-error" id="gruppeModalError"></div>
<div class="modal-actions">
@@ -993,7 +995,7 @@ function renderAdminGruppen(gruppen) {
<div class="gruppe-meta">
<div class="gruppe-name">${esc(g.name)}</div>
<div class="gruppe-info">${g.von ? esc(g.von) + (counts ? ' · ' : '') : ''}${counts || 'Keine Einträge'}</div>
<div class="gruppe-badges"><span class="gruppe-badge gruppe-badge-public">Öffentlich</span>${g.vanillaAvailable ? '<span class="gruppe-badge gruppe-badge-vanilla">Vanilla</span>' : ''}</div>
<div class="gruppe-badges"><span class="gruppe-badge gruppe-badge-public">Öffentlich</span>${g.availableIn === 'BDSM_AND_VANILLA' ? '<span class="gruppe-badge gruppe-badge-vanilla">Vanilla</span>' : ''}${g.availableIn === 'CHASTITY_ONLY' ? '<span class="gruppe-badge gruppe-badge-chastity">Chastity</span>' : ''}</div>
</div>
<span class="gruppe-toggle">▶</span>
</div>
@@ -1269,7 +1271,7 @@ function openGruppeModal(editId) {
document.getElementById('gName').value = g.name || '';
document.getElementById('gVon').value = g.von || '';
document.getElementById('gDesc').value = g.beschreibung || '';
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; imgWrap.style.display = 'flex'; }
else imgWrap.style.display = 'none';
@@ -1278,7 +1280,7 @@ function openGruppeModal(editId) {
document.getElementById('gName').value = '';
document.getElementById('gVon').value = '';
document.getElementById('gDesc').value = '';
document.getElementById('gVanilla').checked = false;
document.getElementById('gAvailableIn').value = 'BDSM_ONLY';
document.getElementById('gCurrentImgWrap').style.display = 'none';
}
gruppeModal.classList.add('open');
@@ -1357,7 +1359,7 @@ gruppeModalSave.addEventListener('click', async () => {
let bildBase64 = null;
const fi = document.getElementById('gBild');
if (fi.files.length > 0) bildBase64 = await toBase64(fi.files[0]);
const payload = { name, von: document.getElementById('gVon').value.trim() || null, beschreibung: document.getElementById('gDesc').value.trim() || null, vanillaAvailable: document.getElementById('gVanilla').checked, bild: bildBase64 };
const payload = { name, von: document.getElementById('gVon').value.trim() || null, beschreibung: document.getElementById('gDesc').value.trim() || null, availableIn: document.getElementById('gAvailableIn').value, bild: bildBase64 };
const isEdit = currentEditGruppeId != null;
fetch(isEdit ? `/admin/aufgabengruppen/${currentEditGruppeId}` : '/admin/aufgabengruppen', {
method: isEdit ? 'PUT' : 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(payload)