Fix: users.geburtstag Migration + Format TT.MM statt MM-DD
- database.py: ALTER TABLE users ADD COLUMN geburtstag TEXT (fehlte!)
- profile.py: Validierung auf \d{2}\.\d{2} (TT.MM Format)
- settings.js: Placeholder/Pattern auf TT.MM geändert
- worlds.js: Birthday-Check auf DD.MM Format angepasst
SW by-v1029, APP_VER 1029
This commit is contained in:
parent
a4377033ec
commit
b54d9fda99
7 changed files with 16 additions and 10 deletions
|
|
@ -3,7 +3,7 @@
|
|||
Router, State-Management, Navigation, Initialisierung.
|
||||
============================================================ */
|
||||
|
||||
const APP_VER = '1028'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen
|
||||
const APP_VER = '1029'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen
|
||||
const APP_VERSION = '1.6.0'; // ← semantische Version, wird bei make release gesetzt
|
||||
const IS_STAGING = location.hostname === 'staging.banyaro.app';
|
||||
// Cache-Bust-Parameter nach Update-Reload sofort entfernen
|
||||
|
|
|
|||
|
|
@ -1186,10 +1186,10 @@ window.Page_settings = (() => {
|
|||
</div>
|
||||
<div>
|
||||
<label style="display:block;font-size:var(--text-sm);font-weight:600;margin-bottom:var(--space-1)">Dein Geburtstag <span style="font-weight:400;color:var(--c-text-secondary)">(optional)</span></label>
|
||||
<input name="geburtstag" type="text" maxlength="5" placeholder="MM-TT"
|
||||
<input name="geburtstag" type="text" maxlength="5" placeholder="TT.MM"
|
||||
value="${_esc(u.geburtstag || '')}"
|
||||
pattern="\\d{2}-\\d{2}"
|
||||
title="Format: MM-TT, z.B. 03-15"
|
||||
pattern="\\d{2}\\.\\d{2}"
|
||||
title="Format: TT.MM, z.B. 16.05"
|
||||
style="${inputStyle}">
|
||||
<div style="font-size:var(--text-xs);color:var(--c-text-secondary);margin-top:var(--space-1)">Wird nur für Geburtstagsgrüße in der App verwendet.</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1096,8 +1096,8 @@ window.Worlds = (() => {
|
|||
const dayStr = new Date().toLocaleDateString('de-DE', { weekday:'long', day:'numeric', month:'long' });
|
||||
|
||||
// User-Geburtstag heute?
|
||||
const _todayMmDd = (() => { const d = new Date(); return String(d.getMonth()+1).padStart(2,'0')+'-'+String(d.getDate()).padStart(2,'0'); })();
|
||||
const userBdayToday = user?.geburtstag && user.geburtstag === _todayMmDd;
|
||||
const _todayDdMm = (() => { const d = new Date(); return String(d.getDate()).padStart(2,'0')+'.'+String(d.getMonth()+1).padStart(2,'0'); })();
|
||||
const userBdayToday = user?.geburtstag && user.geburtstag === _todayDdMm;
|
||||
const greet = userBdayToday
|
||||
? `Herzlichen Glückwunsch`
|
||||
: (hour < 5 ? 'Gute Nacht' : hour < 12 ? 'Guten Morgen' : hour < 18 ? 'Hallo' : 'Guten Abend');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue