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:
@@ -78,6 +78,30 @@ const CARD_DEFS = [
|
||||
defMin: 0,
|
||||
defMax: 0,
|
||||
},
|
||||
{
|
||||
id: 'SLOWMO_CARD',
|
||||
img: '/img/card_slowmo.png',
|
||||
name: 'Slow Motion',
|
||||
desc: 'Alle gestarteten Aktionen (Hygiene-Öffnung, Freeze, Kartenintervall) dauern bis zum gewählten Zeitpunkt viermal so lange.',
|
||||
defMin: 0,
|
||||
defMax: 0,
|
||||
},
|
||||
{
|
||||
id: 'SPEEDUP_CARD',
|
||||
img: '/img/card_speedup.png',
|
||||
name: 'Speed Up',
|
||||
desc: 'Alle gestarteten Aktionen (Hygiene-Öffnung, Freeze, Kartenintervall) dauern bis zum gewählten Zeitpunkt viermal so kurz.',
|
||||
defMin: 0,
|
||||
defMax: 0,
|
||||
},
|
||||
{
|
||||
id: 'GAME_CARD',
|
||||
img: '/img/card_game.png',
|
||||
name: 'Spiel-Karte',
|
||||
desc: 'Ein Minispiel wird gestartet.',
|
||||
defMin: 0,
|
||||
defMax: 0,
|
||||
},
|
||||
];
|
||||
|
||||
/** Lookup-Objekt für Konsumenten, die nach ID auf Name/Bild/Beschreibung zugreifen. */
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
|
||||
const path = window.location.pathname;
|
||||
const I = window.IC || function () { return ''; };
|
||||
const TOPBAR_H = '4.875rem';
|
||||
const TOPBAR_H = '4.875rem';
|
||||
const BOT_NAV_H = '3.75rem';
|
||||
|
||||
// ── CSS ──────────────────────────────────────────────────────────────────
|
||||
const style = document.createElement('style');
|
||||
@@ -82,7 +83,7 @@
|
||||
display: none;
|
||||
position: fixed;
|
||||
top: ${TOPBAR_H};
|
||||
left: 0; right: 0; bottom: 0;
|
||||
left: 0; right: 0; bottom: ${BOT_NAV_H};
|
||||
background: rgba(0,0,0,0.55);
|
||||
z-index: 998;
|
||||
}
|
||||
@@ -93,7 +94,7 @@
|
||||
position: fixed;
|
||||
top: ${TOPBAR_H};
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
bottom: ${BOT_NAV_H};
|
||||
width: min(80%, 360px);
|
||||
background: var(--color-card);
|
||||
border-left: 1px solid var(--color-secondary);
|
||||
@@ -155,10 +156,54 @@
|
||||
.mnav-link--danger { color: var(--color-primary); }
|
||||
.mnav-link--danger:hover { background: rgba(var(--color-primary-rgb,233,69,96),0.1); color: var(--color-primary); }
|
||||
|
||||
/* ── Bottom Navigation Bar ── */
|
||||
.mob-bottom-nav {
|
||||
display: none;
|
||||
position: fixed;
|
||||
bottom: 0; left: 0; right: 0;
|
||||
height: ${BOT_NAV_H};
|
||||
background: var(--color-card);
|
||||
border-top: 1px solid var(--color-secondary);
|
||||
box-shadow: 0 -2px 12px rgba(0,0,0,0.3);
|
||||
z-index: 500;
|
||||
align-items: stretch;
|
||||
}
|
||||
.mob-bn-tab {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 0.18rem;
|
||||
text-decoration: none;
|
||||
color: var(--color-muted);
|
||||
font-size: 1.25rem;
|
||||
line-height: 1;
|
||||
cursor: pointer;
|
||||
background: none;
|
||||
border: none;
|
||||
padding: 0.25rem 0;
|
||||
transition: color 0.12s;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
}
|
||||
.mob-bn-tab.active { color: var(--color-primary); }
|
||||
.mob-bn-tab:hover { color: var(--color-text); }
|
||||
.mob-bn-label {
|
||||
font-size: 0.6rem;
|
||||
font-weight: 600;
|
||||
line-height: 1;
|
||||
letter-spacing: 0.01em;
|
||||
}
|
||||
|
||||
/* ── Show only on mobile ── */
|
||||
@media (max-width: 768px) {
|
||||
.mobile-topbar { display: flex; }
|
||||
body.app { padding-top: ${TOPBAR_H}; }
|
||||
.mob-bottom-nav { display: flex; }
|
||||
body.app {
|
||||
padding-top: ${TOPBAR_H};
|
||||
padding-bottom: ${BOT_NAV_H};
|
||||
}
|
||||
#mobMenuToggle { display: none; }
|
||||
}
|
||||
`;
|
||||
document.head.appendChild(style);
|
||||
@@ -322,6 +367,35 @@
|
||||
document.body.appendChild(backdropEl);
|
||||
document.body.appendChild(panelEl);
|
||||
|
||||
// ── Bottom Navigation Bar ─────────────────────────────────────────────────
|
||||
const onGames = path.startsWith('/games/');
|
||||
const bottomNavEl = document.createElement('nav');
|
||||
bottomNavEl.className = 'mob-bottom-nav';
|
||||
bottomNavEl.id = 'mobBottomNav';
|
||||
bottomNavEl.innerHTML = `
|
||||
<a href="/userhome.html" class="mob-bn-tab${path === '/userhome.html' ? ' active' : ''}">
|
||||
<span>${I('HOME') || '🏠'}</span>
|
||||
<span class="mob-bn-label">Home</span>
|
||||
</a>
|
||||
<a href="/community/feed.html" class="mob-bn-tab${path.startsWith('/community/') ? ' active' : ''}">
|
||||
<span>${I('GROUPS') || '👥'}</span>
|
||||
<span class="mob-bn-label">Community</span>
|
||||
</a>
|
||||
<a href="/dating/dating.html" class="mob-bn-tab${path.startsWith('/dating/') ? ' active' : ''}" id="mobBnDatingTab">
|
||||
<span>${I('DATING') || '♥'}</span>
|
||||
<span class="mob-bn-label">Dating</span>
|
||||
</a>
|
||||
<button class="mob-bn-tab${onGames ? ' active' : ''}" id="mobBnGamesTab" aria-label="Games">
|
||||
<span>${I('GAMEPAD') || '🕹️'}</span>
|
||||
<span class="mob-bn-label">Games</span>
|
||||
</button>
|
||||
<a href="/konto/einstellungen.html" class="mob-bn-tab${path.startsWith('/konto/') || path.startsWith('/help/') ? ' active' : ''}">
|
||||
<span>${I('SETTINGS') || '⚙️'}</span>
|
||||
<span class="mob-bn-label">Konto</span>
|
||||
</a>
|
||||
`;
|
||||
document.body.appendChild(bottomNavEl);
|
||||
|
||||
// ── Accordion (nur eine Sektion gleichzeitig offen) ──────────────────────
|
||||
panelEl.querySelectorAll('.mnav-section-header').forEach(h => {
|
||||
h.addEventListener('click', () => {
|
||||
@@ -333,7 +407,13 @@
|
||||
});
|
||||
|
||||
// ── Open / Close ──────────────────────────────────────────────────────────
|
||||
function openMenu() {
|
||||
function openMenu(focusSectionLabel) {
|
||||
if (focusSectionLabel) {
|
||||
panelEl.querySelectorAll('.mnav-section').forEach(s => {
|
||||
const label = s.querySelector('.mnav-section-header span')?.textContent?.trim();
|
||||
s.classList.toggle('open', label === focusSectionLabel);
|
||||
});
|
||||
}
|
||||
panelEl.classList.add('open');
|
||||
backdropEl.classList.add('open');
|
||||
}
|
||||
@@ -352,6 +432,22 @@
|
||||
l.addEventListener('click', () => { if (l.getAttribute('href') !== '#') closeMenu(); });
|
||||
});
|
||||
|
||||
// ── Games-Tab öffnet Panel mit Games-Sektionen ────────────────────────────
|
||||
document.getElementById('mobBnGamesTab').addEventListener('click', e => {
|
||||
e.stopPropagation();
|
||||
if (panelEl.classList.contains('open')) {
|
||||
closeMenu();
|
||||
} else {
|
||||
// Ersten aktiven Game-Bereich öffnen, sonst Vanilla Game als Default
|
||||
const gameLabels = ['Vanilla Game', 'BDSM Game', 'Chastity Game'];
|
||||
const activeLabel = gameLabels.find(lbl => {
|
||||
const prefix = { 'Vanilla Game': '/games/vanilla/', 'BDSM Game': '/games/bdsm/', 'Chastity Game': '/games/chastity/' }[lbl];
|
||||
return path.startsWith(prefix);
|
||||
}) || 'Vanilla Game';
|
||||
openMenu(activeLabel);
|
||||
}
|
||||
});
|
||||
|
||||
// ── Badges ────────────────────────────────────────────────────────────────
|
||||
function setBadge(id, n) {
|
||||
const el = document.getElementById(id);
|
||||
@@ -406,13 +502,14 @@
|
||||
if (el) el.style.display = '';
|
||||
}
|
||||
|
||||
// Dating
|
||||
// Dating (Panel-Link + Bottom-Nav-Tab)
|
||||
const datingHref = user.datingAktiv
|
||||
? '/dating/dating.html'
|
||||
: '/konto/einstellungen.html#sec-dating';
|
||||
const datingLink = document.getElementById('mnavDatingLink');
|
||||
if (datingLink) {
|
||||
datingLink.href = user.datingAktiv
|
||||
? '/dating/dating.html'
|
||||
: '/konto/einstellungen.html#sec-dating';
|
||||
}
|
||||
if (datingLink) datingLink.href = datingHref;
|
||||
const bnDatingTab = document.getElementById('mobBnDatingTab');
|
||||
if (bnDatingTab) bnDatingTab.href = datingHref;
|
||||
|
||||
const hide = id => { const el = document.getElementById(id); if (el) el.style.display = 'none'; };
|
||||
const show = id => { const el = document.getElementById(id); if (el) el.style.display = ''; };
|
||||
|
||||
@@ -16,9 +16,9 @@
|
||||
margin-right: 0.5rem;
|
||||
line-height: 1;
|
||||
}
|
||||
.nav-burger:hover { border-color: var(--color-primary); color: var(--color-primary); }
|
||||
.nav-burger:hover { border-color: var(--color-primary); color: #fff; }
|
||||
.nav-burger-icon {
|
||||
font-size: 1.05rem; line-height: 1;
|
||||
font-size: 1.575rem; line-height: 1;
|
||||
position: relative;
|
||||
display: inline-flex; align-items: center; justify-content: center;
|
||||
width: 1.2em; height: 1.2em;
|
||||
@@ -91,16 +91,16 @@
|
||||
}
|
||||
.nav-col:last-child { border-right: none; }
|
||||
|
||||
/* Überschrift: auf Desktop ausgeblendet, auf Mobile als Accordion-Toggle */
|
||||
.nav-col-header {
|
||||
display: none;
|
||||
display: flex;
|
||||
align-items: center; justify-content: space-between;
|
||||
padding: 0.75rem 1.1rem;
|
||||
font-size: 0.85rem; font-weight: 600;
|
||||
padding: 0.75rem 1.1rem 0.5rem;
|
||||
font-size: 1.275rem; font-weight: 700;
|
||||
color: var(--color-text);
|
||||
cursor: pointer;
|
||||
cursor: default;
|
||||
border-bottom: 1px solid var(--color-secondary);
|
||||
}
|
||||
.nav-col-arrow { font-size: 0.65rem; transition: transform 0.2s; }
|
||||
.nav-col-arrow { display: none; font-size: 0.65rem; transition: transform 0.2s; }
|
||||
|
||||
.nav-col-body { padding: 0.35rem 0; }
|
||||
|
||||
@@ -158,7 +158,8 @@
|
||||
.nav-col { border-right: none; border-bottom: 1px solid var(--color-secondary); }
|
||||
.nav-col:last-child { border-bottom: none; }
|
||||
|
||||
.nav-col-header { display: flex; }
|
||||
.nav-col-header { font-size: 0.85rem; font-weight: 600; cursor: pointer; padding: 0.75rem 1.1rem; border-bottom: none; }
|
||||
.nav-col-arrow { display: block; }
|
||||
.nav-col.col-open .nav-col-arrow { transform: rotate(90deg); }
|
||||
|
||||
.nav-col-body { display: none; padding: 0; }
|
||||
@@ -256,23 +257,18 @@
|
||||
${link('/dating/matches.html', '', 'Matches' )}
|
||||
`;
|
||||
|
||||
const bdsmActive = ['/games/bdsm/neubdsm.html', '/games/bdsm/bdsmingame.html', '/games/bdsm/bdsmplayers.html'].some(p => path.startsWith(p)) ? ' active' : '';
|
||||
const vanillaActive = ['/games/vanilla/neuvanilla.html', '/games/vanilla/vanillaingame.html', '/games/vanilla/vanillawarten.html'].some(p => path.startsWith(p)) ? ' active' : '';
|
||||
|
||||
const col4Html = `
|
||||
${gameGroup('VANILLA', 'Vanilla Game', [
|
||||
{ href: '/games/vanilla/neuvanilla.html', icon: 'PLAY_NEW', label: 'Neue Session', id: 'navVanillaNeu' },
|
||||
{ href: '#', icon: 'WAITING', label: 'Aktive Session', id: 'navVanillaAktiv' },
|
||||
{ href: '/games/vanilla/vanillaingame.html', icon: 'PLAY_ACTIVE', label: 'Im Spiel', id: 'navVanillaImSpiel' },
|
||||
{ href: '/games/vanilla/aufgaben.html', icon: 'CHECK', label: 'Aufgaben' },
|
||||
{ href: '/games/vanilla/toys.html', icon: 'TOYS', label: 'Toys' },
|
||||
{ href: '/games/vanilla/entdecken.html', icon: 'DISCOVER', label: 'Entdecken' },
|
||||
])}
|
||||
${gameGroup('BDSM', 'BDSM Game', [
|
||||
{ href: '/games/bdsm/neubdsm.html', icon: 'PLAY_NEW', label: 'Neue Session', id: 'navBdsmNeu' },
|
||||
{ href: '#', icon: 'WAITING', label: 'Aktive Session', id: 'navBdsmAktiv' },
|
||||
{ href: '/games/bdsm/bdsmingame.html', icon: 'PLAY_ACTIVE', label: 'Im Spiel', id: 'navBdsmImSpiel' },
|
||||
{ href: '/games/bdsm/aufgaben.html', icon: 'CHECK', label: 'Aufgaben' },
|
||||
{ href: '/games/bdsm/toys.html', icon: 'TOYS', label: 'Toys' },
|
||||
{ href: '/games/bdsm/entdecken.html', icon: 'DISCOVER', label: 'Entdecken' },
|
||||
])}
|
||||
<a href="/games/vanilla/neuvanilla.html" class="nav-link${vanillaActive}" id="navVanillaGame">
|
||||
<span class="nav-icon">${I('VANILLA') || ''}</span>
|
||||
<span>Vanilla Game</span>
|
||||
</a>
|
||||
<a href="/games/bdsm/neubdsm.html" class="nav-link${bdsmActive}" id="navBdsmGame">
|
||||
<span class="nav-icon">${I('BDSM') || ''}</span>
|
||||
<span>BDSM Game</span>
|
||||
</a>
|
||||
${gameGroup('CHASTITY', 'Chastity Game', [
|
||||
{ href: '/games/chastity/neulock.html', icon: 'NEW_LOCK', label: 'Neues Lock', id: 'navChastityNeu' },
|
||||
{ href: '#', icon: 'ACTIVE_LOCK', label: 'Aktives Lock', id: 'navChastityAktiv' },
|
||||
@@ -283,6 +279,11 @@
|
||||
{ href: '/games/chastity/keyholder.html', icon: 'KEY', label: 'Keyholder' },
|
||||
{ href: '/games/chastity/unlock-history.html', icon: 'HISTORY', label: 'Code-Historie' },
|
||||
])}
|
||||
${gameGroup('CHECK', 'Aufgabenverwaltung', [
|
||||
{ href: '/games/aufgaben/aufgaben.html', icon: 'CHECK', label: 'Aufgaben' },
|
||||
{ href: '/games/aufgaben/toys.html', icon: 'TOYS', label: 'Toys' },
|
||||
{ href: '/games/aufgaben/entdecken.html',icon: 'DISCOVER', label: 'Entdecken' },
|
||||
])}
|
||||
`;
|
||||
|
||||
// ── Dropdown-HTML ────────────────────────────────────────────────────────
|
||||
@@ -306,7 +307,7 @@
|
||||
])}
|
||||
${column('colDating', 'Dating', col3Html, ['/dating/'])}
|
||||
${column('colGames', 'Games', col4Html, [
|
||||
'/games/vanilla/', '/games/bdsm/', '/games/chastity/',
|
||||
'/games/vanilla/', '/games/bdsm/', '/games/chastity/', '/games/aufgaben/',
|
||||
])}
|
||||
</div>
|
||||
<div class="nav-dropdown-footer">
|
||||
@@ -417,21 +418,16 @@
|
||||
const hide = id => { const el = document.getElementById(id); if (el) el.style.display = 'none'; };
|
||||
const show = id => { const el = document.getElementById(id); if (el) el.style.display = ''; };
|
||||
const href = (id, h) => { const el = document.getElementById(id); if (el) el.href = h; };
|
||||
hide('navVanillaAktiv'); hide('navVanillaImSpiel');
|
||||
hide('navBdsmAktiv'); hide('navBdsmImSpiel');
|
||||
hide('navChastityAktiv');
|
||||
|
||||
try {
|
||||
const r = await fetch('/bdsm/einladung/meine-aktive');
|
||||
if (r.ok) {
|
||||
const aktiv = await r.json();
|
||||
hide('navBdsmNeu'); hide('navBdsmImSpiel');
|
||||
show('navBdsmAktiv');
|
||||
href('navBdsmAktiv', aktiv.sessionId ? '/games/bdsm/bdsmingame.html' : '/games/bdsm/neubdsm.html');
|
||||
href('navBdsmGame', aktiv.sessionId ? '/games/bdsm/bdsmingame.html' : '/games/bdsm/neubdsm.html');
|
||||
} else {
|
||||
const sr = await fetch(`/bdsm?userId=${user.userId}`);
|
||||
if (sr.status === 200) { hide('navBdsmNeu'); show('navBdsmImSpiel'); }
|
||||
else show('navBdsmNeu');
|
||||
if (sr.status === 200) href('navBdsmGame', '/games/bdsm/bdsmingame.html');
|
||||
}
|
||||
} catch (_) {}
|
||||
|
||||
@@ -439,13 +435,10 @@
|
||||
const r = await fetch('/vanilla/einladung/meine-aktive');
|
||||
if (r.ok) {
|
||||
const aktiv = await r.json();
|
||||
hide('navVanillaNeu'); hide('navVanillaImSpiel');
|
||||
show('navVanillaAktiv');
|
||||
href('navVanillaAktiv', aktiv.sessionId ? '/games/vanilla/vanillaingame.html' : '/games/vanilla/neuvanilla.html');
|
||||
href('navVanillaGame', aktiv.sessionId ? '/games/vanilla/vanillaingame.html' : '/games/vanilla/neuvanilla.html');
|
||||
} else {
|
||||
const sr = await fetch(`/vanilla?userId=${user.userId}`);
|
||||
if (sr.status === 200) { hide('navVanillaNeu'); show('navVanillaImSpiel'); }
|
||||
else show('navVanillaNeu');
|
||||
if (sr.status === 200) href('navVanillaGame', '/games/vanilla/vanillaingame.html');
|
||||
}
|
||||
} catch (_) {}
|
||||
|
||||
|
||||
@@ -42,9 +42,6 @@
|
||||
{ href: '/games/vanilla/neuvanilla.html', icon: 'PLAY_NEW', label: 'Neue Session', id: 'snavVanillaNeu' },
|
||||
{ href: '#', icon: 'WAITING', label: 'Aktive Session', id: 'snavVanillaAktiv', hidden: true },
|
||||
{ href: '/games/vanilla/vanillaingame.html', icon: 'PLAY_ACTIVE', label: 'Im Spiel', id: 'snavVanillaImSpiel', hidden: true },
|
||||
{ href: '/games/vanilla/aufgaben.html', icon: 'CHECK', label: 'Aufgaben' },
|
||||
{ href: '/games/vanilla/toys.html', icon: 'TOYS', label: 'Toys' },
|
||||
{ href: '/games/vanilla/entdecken.html', icon: 'DISCOVER', label: 'Entdecken' },
|
||||
],
|
||||
},
|
||||
bdsm: {
|
||||
@@ -53,9 +50,14 @@
|
||||
{ href: '/games/bdsm/neubdsm.html', icon: 'PLAY_NEW', label: 'Neue Session', id: 'snavBdsmNeu' },
|
||||
{ href: '#', icon: 'WAITING', label: 'Aktive Session', id: 'snavBdsmAktiv', hidden: true },
|
||||
{ href: '/games/bdsm/bdsmingame.html', icon: 'PLAY_ACTIVE', label: 'Im Spiel', id: 'snavBdsmImSpiel', hidden: true },
|
||||
{ href: '/games/bdsm/aufgaben.html', icon: 'CHECK', label: 'Aufgaben' },
|
||||
{ href: '/games/bdsm/toys.html', icon: 'TOYS', label: 'Toys' },
|
||||
{ href: '/games/bdsm/entdecken.html', icon: 'DISCOVER', label: 'Entdecken' },
|
||||
],
|
||||
},
|
||||
aufgaben: {
|
||||
prefixes: ['/games/aufgaben/'],
|
||||
items: [
|
||||
{ href: '/games/aufgaben/aufgaben.html', icon: 'CHECK', label: 'Aufgaben' },
|
||||
{ href: '/games/aufgaben/toys.html', icon: 'TOYS', label: 'Toys' },
|
||||
{ href: '/games/aufgaben/entdecken.html',icon: 'DISCOVER', label: 'Entdecken' },
|
||||
],
|
||||
},
|
||||
chastity: {
|
||||
|
||||
@@ -119,15 +119,16 @@ document.addEventListener('click', e => {
|
||||
});
|
||||
|
||||
// ── Bild-Karussell (Lightbox/Detail-Ansicht) ─────────────────────────────────
|
||||
function bilderCarousel(bilder) {
|
||||
function bilderCarousel(bilder, initialIdx = 0) {
|
||||
if (!bilder || bilder.length === 0) return '';
|
||||
const idx = Math.max(0, Math.min(initialIdx, bilder.length - 1));
|
||||
const slides = bilder.map((b, i) =>
|
||||
`<div class="car-slide${i === 0 ? ' active' : ''}"><img class="post-bild" src="data:image/jpeg;base64,${b}" alt=""></div>`
|
||||
`<div class="car-slide${i === idx ? ' active' : ''}"><img class="post-bild" src="data:image/jpeg;base64,${b}" alt=""></div>`
|
||||
).join('');
|
||||
const nav = bilder.length > 1
|
||||
? `<button class="car-btn car-prev" onclick="event.stopPropagation();carNav(this,-1)">‹</button>
|
||||
<button class="car-btn car-next" onclick="event.stopPropagation();carNav(this,1)">›</button>
|
||||
<div class="car-indicator"><span class="car-cur">1</span> / ${bilder.length}</div>`
|
||||
<div class="car-indicator"><span class="car-cur">${idx + 1}</span> / ${bilder.length}</div>`
|
||||
: '';
|
||||
return `<div class="post-carousel">${slides}${nav}</div>`;
|
||||
}
|
||||
@@ -138,6 +139,8 @@ function bilderCarousel(bilder) {
|
||||
* – Post-Text bekommt scrollbare Höhenbegrenzung
|
||||
*/
|
||||
function _lbSetupContent(postId, prefix, bilder) {
|
||||
const initialIdx = window.__pigNextIdx != null ? window.__pigNextIdx : 0;
|
||||
window.__pigNextIdx = null;
|
||||
const body = document.getElementById('lbPostBody');
|
||||
const va = body.querySelector(`#${prefix}va-${postId}`);
|
||||
if (va) va.classList.add('lb-va');
|
||||
@@ -146,7 +149,7 @@ function _lbSetupContent(postId, prefix, bilder) {
|
||||
if (pbi) {
|
||||
if (hasImages) {
|
||||
pbi.classList.add('lb-ic');
|
||||
pbi.innerHTML = bilderCarousel(bilder);
|
||||
pbi.innerHTML = bilderCarousel(bilder, initialIdx);
|
||||
} else {
|
||||
pbi.style.display = 'none';
|
||||
}
|
||||
@@ -229,6 +232,16 @@ function _pigInit(id, probe) {
|
||||
`<div class="pig-item"><img src="data:image/jpeg;base64,${bilder[2]}" alt="">${moreHtml}</div>`);
|
||||
}
|
||||
}
|
||||
|
||||
// Click-Listener: angeklicktes Bild als Startindex für die Lightbox merken
|
||||
grid.querySelectorAll('.pig-item').forEach((item, idx) => {
|
||||
item.style.cursor = 'pointer';
|
||||
item.addEventListener('click', e => {
|
||||
e.stopPropagation();
|
||||
window.__pigNextIdx = idx;
|
||||
item.closest('.post-card')?.click();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function carNav(btn, dir) {
|
||||
|
||||
@@ -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