Bump: SW by-v1068 (Übungen-Redesign)

This commit is contained in:
rene 2026-05-19 18:58:12 +02:00
parent c5bb3ee2cb
commit b1e4d7fce1
4 changed files with 46 additions and 21 deletions

View file

@ -3,11 +3,13 @@
Router, State-Management, Navigation, Initialisierung.
============================================================ */
const APP_VER = '1036'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen
const APP_VER = '1068'; // ← 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
if (location.search.includes('_t=')) history.replaceState(null, '', '/');
// Cache-Bust-Parameter nach Update-Reload sofort entfernen.
// Flag MUSS vor replaceState gesetzt werden — index.html liest es danach.
window._BY_SW_RELOAD = location.search.includes('_t=');
if (window._BY_SW_RELOAD) history.replaceState(null, '', '/');
const App = (() => {
@ -67,13 +69,16 @@ const App = (() => {
agb: { title: 'AGB', module: null },
widget: { title: 'Widget', module: null, requiresAuth: true },
notifications: { title: 'Aktuelles', module: null, requiresAuth: true },
breeder: { title: 'Züchter-Profil', module: null },
litters: { title: 'Wurfverwaltung', module: null, requiresAuth: true },
breeder: { title: 'Züchter-Profil', module: null },
'breeder-editor': { title: 'Profil bearbeiten', module: null, requiresAuth: true },
litters: { title: 'Wurfverwaltung', module: null, requiresAuth: true },
wurfboerse: { title: 'Wurfbörse', module: null },
zuchthunde: { title: 'Zuchtkartei', module: null, requiresAuth: true },
laeufi: { title: 'Läufigkeit', module: null, requiresAuth: true },
'zucht-profil': { title: 'Hunde-Profil', module: null },
gruender: { title: '100 Gründer', module: null },
partner: { title: 'Unsere Partner', module: null },
'partner-profil': { title: 'Partner-Profil', module: null, requiresAuth: true },
jobs: { title: 'Wir suchen dich', module: null },
expenses: { title: 'Ausgaben', module: null, requiresAuth: true },
recalls: { title: 'Rückrufe', module: null },
@ -608,11 +613,16 @@ const App = (() => {
_checkNearbyAlerts();
setInterval(() => { _updateNotifBadge(); _updateChatBadge(); }, 30_000);
setInterval(_checkNearbyAlerts, 5 * 60_000);
// App-Heartbeat: last_seen aktualisieren (Nutzungsfrequenz für Admin)
const _sendHeartbeat = () => API.post('/auth/heartbeat', {}).catch(() => {});
_sendHeartbeat();
setInterval(_sendHeartbeat, 5 * 60_000);
document.addEventListener('visibilitychange', () => {
if (document.visibilityState === 'visible') {
_updateNotifBadge();
_updateChatBadge();
_checkNearbyAlerts();
_sendHeartbeat();
if (state.page === 'chat') {
pages['chat']?.module?.refresh?.();
}