Feature: Einmaliger Offline-Hinweis 'App im Vordergrund lassen'
Beim ersten offline-Event pro Session erscheint ein blauer Info-Toast (8s): 'App im Vordergrund lassen — so bleiben Offline-Funktionen wie GPS und Datenspeicherung aktiv.' sessionStorage-Guard verhindert Wiederholung. SW by-v997, APP_VER 997
This commit is contained in:
parent
1d67d6307e
commit
902e6b8602
5 changed files with 14 additions and 3 deletions
|
|
@ -625,6 +625,16 @@
|
|||
}
|
||||
window.addEventListener('offline', function() {
|
||||
_updateBanner();
|
||||
// Einmaliger Hinweis pro Session: App im Vordergrund lassen
|
||||
if (!sessionStorage.getItem('by_offline_hint_shown')) {
|
||||
sessionStorage.setItem('by_offline_hint_shown', '1');
|
||||
setTimeout(function() {
|
||||
window.UI?.toast?.info(
|
||||
'App im Vordergrund lassen — so bleiben Offline-Funktionen wie GPS und Datenspeicherung aktiv.',
|
||||
8000
|
||||
);
|
||||
}, 800);
|
||||
}
|
||||
// Queue-Count abfragen
|
||||
if (navigator.serviceWorker) {
|
||||
navigator.serviceWorker.ready.then(function(reg) {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
Router, State-Management, Navigation, Initialisierung.
|
||||
============================================================ */
|
||||
|
||||
const APP_VER = '996'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen
|
||||
const APP_VER = '997'; // ← 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
|
||||
|
|
|
|||
|
|
@ -780,6 +780,7 @@ window.Page_routes = (() => {
|
|||
setTimeout(() => banner.remove(), 9000);
|
||||
}
|
||||
|
||||
|
||||
const ctrl = document.getElementById('rk-rec-ctrl');
|
||||
ctrl.innerHTML = `
|
||||
<button id="rk-rec-stopbtn" style="${_btnStyle()}flex:1;border-color:var(--c-danger);background:var(--c-danger);color:#fff;position:relative;overflow:hidden;touch-action:none;user-select:none;">
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
Offline-Cache + Push Notifications + Tile-Cache
|
||||
============================================================ */
|
||||
|
||||
const CACHE_VERSION = 'by-v996';
|
||||
const CACHE_VERSION = 'by-v997';
|
||||
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue