Bump: SW by-v1068 (Übungen-Redesign)
This commit is contained in:
parent
c5bb3ee2cb
commit
b1e4d7fce1
4 changed files with 46 additions and 21 deletions
|
|
@ -410,7 +410,7 @@ async def serve_media(path: str, request: _Request):
|
|||
raise _HE(404, "Nicht gefunden.")
|
||||
return _media_response(filepath)
|
||||
|
||||
APP_VER = "1036" # muss mit APP_VER in app.js übereinstimmen
|
||||
APP_VER = "1068" # muss mit APP_VER in app.js übereinstimmen
|
||||
|
||||
@app.get("/.well-known/assetlinks.json")
|
||||
async def assetlinks():
|
||||
|
|
|
|||
|
|
@ -101,9 +101,9 @@
|
|||
</script>
|
||||
|
||||
<!-- CSS: Reihenfolge ist wichtig — ?v= zwingt Browser zur Neuladung -->
|
||||
<link rel="stylesheet" href="/css/design-system.css?v=1025">
|
||||
<link rel="stylesheet" href="/css/layout.css?v=1013">
|
||||
<link rel="stylesheet" href="/css/components.css?v=1015">
|
||||
<link rel="stylesheet" href="/css/design-system.css?v=1068">
|
||||
<link rel="stylesheet" href="/css/layout.css?v=1068">
|
||||
<link rel="stylesheet" href="/css/components.css?v=1068">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
|
@ -460,6 +460,10 @@
|
|||
<div class="page-body page-container"></div>
|
||||
</section>
|
||||
|
||||
<section class="page" id="page-breeder-editor">
|
||||
<div class="page-body page-container"></div>
|
||||
</section>
|
||||
|
||||
<section class="page" id="page-social">
|
||||
<div class="page-body page-container"></div>
|
||||
</section>
|
||||
|
|
@ -508,6 +512,14 @@
|
|||
<div class="page-body page-container"></div>
|
||||
</section>
|
||||
|
||||
<section class="page" id="page-partner">
|
||||
<div class="page-body page-container"></div>
|
||||
</section>
|
||||
|
||||
<section class="page" id="page-partner-profil">
|
||||
<div class="page-body page-container"></div>
|
||||
</section>
|
||||
|
||||
<section class="page" id="page-jobs">
|
||||
<div class="page-body page-container"></div>
|
||||
</section>
|
||||
|
|
@ -604,10 +616,10 @@
|
|||
<div id="modal-container"></div>
|
||||
|
||||
<!-- JS: Reihenfolge ist wichtig — erst Basis, dann Features -->
|
||||
<script src="/js/api.js?v=919"></script>
|
||||
<script src="/js/ui.js?v=919"></script>
|
||||
<script src="/js/app.js?v=919"></script>
|
||||
<script src="/js/worlds.js?v=919"></script>
|
||||
<script src="/js/api.js?v=1068"></script>
|
||||
<script src="/js/ui.js?v=1068"></script>
|
||||
<script src="/js/app.js?v=1068"></script>
|
||||
<script src="/js/worlds.js?v=1068"></script>
|
||||
|
||||
<!-- Feature-Seiten werden lazy geladen -->
|
||||
|
||||
|
|
@ -693,7 +705,7 @@
|
|||
// Backup: controllerchange (falls updatefound nicht feuert)
|
||||
// NICHT registrieren wenn diese Seite selbst durch einen SW-Reload entstand (_t= im URL)
|
||||
// — verhindert Dauerschleife wenn clients.claim() erst nach Seitenstart feuert
|
||||
if (!location.search.includes('_t=')) {
|
||||
if (!window._BY_SW_RELOAD) {
|
||||
navigator.serviceWorker.addEventListener('controllerchange', () => {
|
||||
if (sessionStorage.getItem('by_skip_sw_reload')) {
|
||||
sessionStorage.removeItem('by_skip_sw_reload');
|
||||
|
|
|
|||
|
|
@ -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?.();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,9 @@
|
|||
Offline-Cache + Push Notifications + Tile-Cache
|
||||
============================================================ */
|
||||
|
||||
const CACHE_VERSION = 'by-v1036';
|
||||
// ← EINZIGE Stelle für die Version — STATIC_ASSETS und CACHE_VERSION leiten sich ab
|
||||
const VER = '1068';
|
||||
const CACHE_VERSION = `by-v${VER}`;
|
||||
const CACHE_STATIC = `${CACHE_VERSION}-static`;
|
||||
const CACHE_TILES = 'ban-yaro-tiles-v1'; // bleibt über SW-Updates erhalten
|
||||
const CACHE_API = 'ban-yaro-api-v1'; // API-Response-Cache
|
||||
|
|
@ -22,13 +24,14 @@ const PRIORITY_PAGES = [
|
|||
|
||||
// index.html wird NICHT pre-gecacht (immer Network-First)
|
||||
const STATIC_ASSETS = [
|
||||
'/css/design-system.css?v=982',
|
||||
'/css/layout.css?v=982',
|
||||
'/css/components.css?v=982',
|
||||
`/css/design-system.css?v=${VER}`,
|
||||
`/css/layout.css?v=${VER}`,
|
||||
`/css/components.css?v=${VER}`,
|
||||
'/icons/phosphor.svg',
|
||||
'/js/api.js',
|
||||
'/js/ui.js',
|
||||
'/js/app.js',
|
||||
`/js/api.js?v=${VER}`,
|
||||
`/js/ui.js?v=${VER}`,
|
||||
`/js/app.js?v=${VER}`,
|
||||
`/js/worlds.js?v=${VER}`,
|
||||
'/js/leaflet.markercluster.js',
|
||||
'/css/MarkerCluster.css',
|
||||
'/css/MarkerCluster.Default.css',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue