@@ -329,31 +329,15 @@ window.Page_welcome = (() => {
function _chip2HTML(dashData) {
const appt = dashData?.next_appointment;
- if (appt) {
- const apptLabel = UI.escape(appt.bezeichnung);
- const apptDate = _relDate(appt.naechstes) || appt.naechstes || '—';
- const apptIcon = _appointmentIcon(appt.typ);
- return `
-
-
- Nächster Termin
- ${apptLabel} · ${apptDate}
-
`;
- }
- const ex = dashData?.daily_exercise;
- if (ex) {
- return `
-
-
- Übung des Tages
- ${UI.escape(ex.name)}
-
`;
- }
+ if (!appt) return ''; // kein Termin → Chip fehlt; Bank kommt ggf. async
+ const apptLabel = UI.escape(appt.bezeichnung);
+ const apptDate = _relDate(appt.naechstes) || appt.naechstes || '—';
+ const apptIcon = _appointmentIcon(appt.typ);
return `
-
-
-
Übung des Tages
-
—
+
+
+ Nächster Termin
+ ${apptLabel} · ${apptDate}
`;
}
@@ -401,15 +385,24 @@ window.Page_welcome = (() => {
const distTxt = distM < 1000 ? `${distM} m` : `${(distM / 1000).toFixed(1)} km`;
const name = bench.name || 'Bank';
- const chip2 = _container.querySelector('#wc-chip-mid');
- if (!chip2) return;
- chip2.dataset.nav = 'map';
- chip2.dataset.bench = JSON.stringify({ lat: bench.lat, lon: bench.lon });
+ const chipsRow = _container.querySelector('#wc-chips-row');
+ if (!chipsRow) return;
+
+ // Chip ggf. schon da (Termin-Chip) oder neu einfügen (nach Chip 1)
+ let chip2 = _container.querySelector('#wc-chip-mid');
+ if (!chip2) {
+ chip2 = document.createElement('div');
+ chip2.className = 'wc-chip';
+ chip2.id = 'wc-chip-mid';
+ // nach erstem Chip einfügen
+ const first = chipsRow.querySelector('.wc-chip');
+ first ? first.after(chip2) : chipsRow.prepend(chip2);
+ }
+ chip2.dataset.nav = 'map';
chip2.innerHTML = `
Gassirunde
${UI.escape(name)} · ${distTxt}`;
- // Event neu binden (ersetzt existierenden)
chip2.addEventListener('click', () => App.navigate('map'));
}
@@ -496,8 +489,8 @@ window.Page_welcome = (() => {
if (photoUrl) {
heroBox.className = 'wc-hero wc-hero--photo';
- heroBox.style.backgroundImage = `url('${UI.escape(photoUrl)}')`;
heroBox.innerHTML = `
+
${avatarUrl ? `
})
` : ''}
@@ -731,10 +724,15 @@ window.Page_welcome = (() => {
}
/* Photo variant */
.wc-hero--photo {
- background-size: cover; background-position: center;
min-height: 260px;
flex-direction: column; align-items: center; justify-content: flex-end;
}
+ .wc-hero-bg-img {
+ position: absolute; inset: 0;
+ width: 100%; height: 100%;
+ object-fit: cover; object-position: center center;
+ z-index: 0;
+ }
.wc-hero-overlay {
position: absolute; inset: 0;
background: linear-gradient(to bottom, rgba(0,0,0,0.08) 0%, rgba(0,0,0,0.55) 100%);
diff --git a/backend/static/sw.js b/backend/static/sw.js
index 3023ff3..74c7811 100644
--- a/backend/static/sw.js
+++ b/backend/static/sw.js
@@ -3,7 +3,7 @@
Offline-Cache + Push Notifications + Tile-Cache
============================================================ */
-const CACHE_VERSION = 'by-v476';
+const CACHE_VERSION = 'by-v477';
const CACHE_STATIC = `${CACHE_VERSION}-static`;
const CACHE_TILES = 'ban-yaro-tiles-v1'; // bleibt über SW-Updates erhalten