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

This commit is contained in:
2026-04-04 00:09:08 +02:00
parent 87c85b1b17
commit d386f5a7a9
61 changed files with 29863 additions and 350 deletions

View File

@@ -488,6 +488,31 @@
<input type="checkbox" id="datingAktiv" style="width:1.1rem;height:1.1rem;accent-color:var(--color-primary);cursor:pointer;" onchange="onDatingToggle()">
</label>
</div>
<div id="datingSucheRow" style="display:none;">
<div class="settings-row" style="flex-direction:column;align-items:flex-start;gap:0.5rem;">
<div class="settings-row-info">
<div class="settings-row-label">Interesse an</div>
<div class="settings-row-desc">Welche Geschlechter sollen standardmäßig in der Dating-Suche angezeigt werden?</div>
</div>
<div style="display:flex;gap:1rem;flex-wrap:wrap;">
<label style="display:flex;align-items:center;gap:0.4rem;cursor:pointer;margin:0;font-size:0.9rem;color:var(--color-text);">
<input type="checkbox" id="sucheWeiblich" value="WEIBLICH"
style="width:1rem;height:1rem;accent-color:var(--color-primary);cursor:pointer;">
weiblich
</label>
<label style="display:flex;align-items:center;gap:0.4rem;cursor:pointer;margin:0;font-size:0.9rem;color:var(--color-text);">
<input type="checkbox" id="sucheMaennlich" value="MAENNLICH"
style="width:1rem;height:1rem;accent-color:var(--color-primary);cursor:pointer;">
männlich
</label>
<label style="display:flex;align-items:center;gap:0.4rem;cursor:pointer;margin:0;font-size:0.9rem;color:var(--color-text);">
<input type="checkbox" id="sucheDivers" value="DIVERS"
style="width:1rem;height:1rem;accent-color:var(--color-primary);cursor:pointer;">
divers
</label>
</div>
</div>
</div>
<div id="datingStadtRow" style="display:none;">
<div class="settings-row" style="flex-wrap:wrap;gap:0.5rem;">
<div class="settings-row-info">
@@ -1201,12 +1226,19 @@
}
if (user.datingLat != null) _datingLat = user.datingLat;
if (user.datingLon != null) _datingLon = user.datingLon;
document.getElementById('datingStadtRow').style.display = user.datingAktiv ? '' : 'none';
const show = user.datingAktiv ? '' : 'none';
document.getElementById('datingStadtRow').style.display = show;
document.getElementById('datingSucheRow').style.display = show;
const aktiveGeschlechter = user.datingGeschlechter || [];
document.getElementById('sucheWeiblich').checked = aktiveGeschlechter.includes('WEIBLICH');
document.getElementById('sucheMaennlich').checked = aktiveGeschlechter.includes('MAENNLICH');
document.getElementById('sucheDivers').checked = aktiveGeschlechter.includes('DIVERS');
}
function onDatingToggle() {
const aktiv = document.getElementById('datingAktiv').checked;
document.getElementById('datingStadtRow').style.display = aktiv ? '' : 'none';
const show = document.getElementById('datingAktiv').checked ? '' : 'none';
document.getElementById('datingStadtRow').style.display = show;
document.getElementById('datingSucheRow').style.display = show;
}
let _stadtSuggestTimer = null;
@@ -1312,7 +1344,15 @@
const res = await fetch('/user/me/dating', {
method: 'PUT',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ datingAktiv: aktiv, datingStadt: stadt || null, datingLat: _datingLat, datingLon: _datingLon })
body: JSON.stringify({
datingAktiv: aktiv,
datingStadt: stadt || null,
datingLat: _datingLat,
datingLon: _datingLon,
datingGeschlechter: ['sucheWeiblich','sucheMaennlich','sucheDivers']
.filter(id => document.getElementById(id).checked)
.map(id => document.getElementById(id).value)
})
});
if (res.ok) {
showToast();