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,30 +3,6 @@
|
||||
const I = window.IC || function() { return ''; };
|
||||
|
||||
const groups = [
|
||||
{
|
||||
label: 'Vanilla Game',
|
||||
icon: I('VANILLA'),
|
||||
items: [
|
||||
{ href: '/games/vanilla/neuvanilla.html', icon: I('PLAY_NEW'), label: 'Neue Session', id: 'navVanillaNeu' },
|
||||
{ href: '#', icon: I('WAITING'), label: 'Aktive Session', id: 'navVanillaAktiv' },
|
||||
{ href: '/games/vanilla/vanillaingame.html', icon: I('PLAY_ACTIVE'), label: 'Im Spiel', id: 'navVanillaImSpiel' },
|
||||
{ href: '/games/vanilla/aufgaben.html', icon: I('CHECK'), label: 'Aufgaben' },
|
||||
{ href: '/games/vanilla/toys.html', icon: I('TOYS'), label: 'Toys' },
|
||||
{ href: '/games/vanilla/entdecken.html', icon: I('DISCOVER'), label: 'Entdecken' },
|
||||
]
|
||||
},
|
||||
{
|
||||
label: 'BDSM Game',
|
||||
icon: I('BDSM'),
|
||||
items: [
|
||||
{ href: '/games/bdsm/neubdsm.html', icon: I('PLAY_NEW'), label: 'Neue Session', id: 'navBdsmNeu' },
|
||||
{ href: '#', icon: I('WAITING'), label: 'Aktive Session', id: 'navBdsmAktiv' },
|
||||
{ href: '/games/bdsm/bdsmingame.html', icon: I('PLAY_ACTIVE'), label: 'Im Spiel', id: 'navBdsmImSpiel' },
|
||||
{ href: '/games/bdsm/aufgaben.html', icon: I('CHECK'), label: 'Aufgaben' },
|
||||
{ href: '/games/bdsm/toys.html', icon: I('TOYS'), label: 'Toys' },
|
||||
{ href: '/games/bdsm/entdecken.html', icon: I('DISCOVER'), label: 'Entdecken' },
|
||||
]
|
||||
},
|
||||
{
|
||||
label: 'Chastity Game',
|
||||
icon: I('CHASTITY'),
|
||||
@@ -41,8 +17,22 @@
|
||||
{ href: '/games/chastity/unlock-history.html', icon: I('HISTORY'), label: 'Code-Historie' },
|
||||
]
|
||||
},
|
||||
{
|
||||
label: 'Aufgabenverwaltung',
|
||||
icon: I('CHECK'),
|
||||
items: [
|
||||
{ href: '/games/aufgaben/aufgaben.html', icon: I('CHECK'), label: 'Aufgaben' },
|
||||
{ href: '/games/aufgaben/toys.html', icon: I('TOYS'), label: 'Toys' },
|
||||
{ href: '/games/aufgaben/entdecken.html',icon: I('DISCOVER'), label: 'Entdecken' },
|
||||
]
|
||||
},
|
||||
];
|
||||
|
||||
const vanillaCls = path.startsWith('/games/vanilla/') ? ' class="active"' : '';
|
||||
const bdsmCls = path.startsWith('/games/bdsm/') ? ' class="active"' : '';
|
||||
const vanillaLink = `<li><a href="/games/vanilla/neuvanilla.html" id="navVanillaGame"${vanillaCls}><span class="icon">${I('VANILLA') || '⚪'}</span> Vanilla Game</a></li>`;
|
||||
const bdsmLink = `<li><a href="/games/bdsm/neubdsm.html" id="navBdsmGame"${bdsmCls}><span class="icon">${I('BDSM') || '⛓️'}</span> BDSM Game</a></li>`;
|
||||
|
||||
|
||||
// ── Hilfsfunktion: einzelner Nav-Link ──
|
||||
function navLink({ href, icon, label, badgeId }) {
|
||||
@@ -137,6 +127,8 @@
|
||||
${sep}
|
||||
${datingItem}
|
||||
<li><hr style="border:none;border-top:1px solid var(--color-secondary);margin:0.4rem 1rem;"></li>
|
||||
${vanillaLink}
|
||||
${bdsmLink}
|
||||
${nav}
|
||||
<li><hr style="border:none;border-top:1px solid var(--color-secondary);margin:0.4rem 1rem;" id="navAdminDivider" style="display:none"></li>
|
||||
${adminItem}
|
||||
@@ -171,19 +163,9 @@
|
||||
});
|
||||
});
|
||||
|
||||
// "Im Spiel" und "Aktive Session" standardmäßig ausblenden; wird nach Session-Check ggf. wieder eingeblendet
|
||||
const navNeu = document.getElementById('navBdsmNeu');
|
||||
const navAktiv = document.getElementById('navBdsmAktiv');
|
||||
const navImSpiel = document.getElementById('navBdsmImSpiel');
|
||||
const navCAktiv = document.getElementById('navChastityAktiv');
|
||||
const navVNeu = document.getElementById('navVanillaNeu');
|
||||
const navVAktiv = document.getElementById('navVanillaAktiv');
|
||||
const navVImSpiel = document.getElementById('navVanillaImSpiel');
|
||||
if (navAktiv) navAktiv.style.display = 'none';
|
||||
if (navImSpiel) navImSpiel.style.display = 'none';
|
||||
if (navCAktiv) navCAktiv.style.display = 'none';
|
||||
if (navVAktiv) navVAktiv.style.display = 'none';
|
||||
if (navVImSpiel) navVImSpiel.style.display = 'none';
|
||||
// "Aktives Lock" standardmäßig ausblenden; wird nach Session-Check ggf. wieder eingeblendet
|
||||
const navCAktiv = document.getElementById('navChastityAktiv');
|
||||
if (navCAktiv) navCAktiv.style.display = 'none';
|
||||
|
||||
// Session-Status prüfen
|
||||
fetch('/login/me')
|
||||
@@ -196,17 +178,14 @@
|
||||
const aktivRes = await fetch('/bdsm/einladung/meine-aktive');
|
||||
if (aktivRes.ok) {
|
||||
const aktiv = await aktivRes.json();
|
||||
if (navNeu) navNeu.style.display = 'none';
|
||||
if (navImSpiel) navImSpiel.style.display = 'none';
|
||||
if (navAktiv) {
|
||||
navAktiv.style.display = '';
|
||||
navAktiv.querySelector('a').href = aktiv.sessionId ? '/games/bdsm/bdsmingame.html' : '/games/bdsm/neubdsm.html';
|
||||
}
|
||||
const el = document.getElementById('navBdsmGame');
|
||||
if (el) el.href = aktiv.sessionId ? '/games/bdsm/bdsmingame.html' : '/games/bdsm/neubdsm.html';
|
||||
} else {
|
||||
const sessionRes = await fetch(`/bdsm?userId=${user.userId}`);
|
||||
const hasSession = sessionRes.status === 200;
|
||||
if (navNeu) navNeu.style.display = hasSession ? 'none' : '';
|
||||
if (navImSpiel) navImSpiel.style.display = hasSession ? '' : 'none';
|
||||
if (sessionRes.status === 200) {
|
||||
const el = document.getElementById('navBdsmGame');
|
||||
if (el) el.href = '/games/bdsm/bdsmingame.html';
|
||||
}
|
||||
}
|
||||
} catch (_) {}
|
||||
|
||||
@@ -215,17 +194,14 @@
|
||||
const vAktivRes = await fetch('/vanilla/einladung/meine-aktive');
|
||||
if (vAktivRes.ok) {
|
||||
const vAktiv = await vAktivRes.json();
|
||||
if (navVNeu) navVNeu.style.display = 'none';
|
||||
if (navVImSpiel) navVImSpiel.style.display = 'none';
|
||||
if (navVAktiv) {
|
||||
navVAktiv.style.display = '';
|
||||
navVAktiv.querySelector('a').href = vAktiv.sessionId ? '/games/vanilla/vanillaingame.html' : '/games/vanilla/neuvanilla.html';
|
||||
}
|
||||
const el = document.getElementById('navVanillaGame');
|
||||
if (el) el.href = vAktiv.sessionId ? '/games/vanilla/vanillaingame.html' : '/games/vanilla/neuvanilla.html';
|
||||
} else {
|
||||
const vSessionRes = await fetch(`/vanilla?userId=${user.userId}`);
|
||||
const vHasSession = vSessionRes.status === 200;
|
||||
if (navVNeu) navVNeu.style.display = vHasSession ? 'none' : '';
|
||||
if (navVImSpiel) navVImSpiel.style.display = vHasSession ? '' : 'none';
|
||||
if (vSessionRes.status === 200) {
|
||||
const el = document.getElementById('navVanillaGame');
|
||||
if (el) el.href = '/games/vanilla/vanillaingame.html';
|
||||
}
|
||||
}
|
||||
} catch (_) {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user