Fix: Installationsanleitung scrollt direkt zur Install-Karte — SW by-v440, APP_VER 419
Klick auf "Installationsanleitung" in Settings navigiert jetzt mit params
{ install: true }, welcome.js zeigt die Karte auch bei bereits installierter
PWA und scrollt direkt dorthin.
This commit is contained in:
parent
664fb2a79b
commit
b4c3698a3a
4 changed files with 16 additions and 9 deletions
|
|
@ -3,7 +3,7 @@
|
|||
Router, State-Management, Navigation, Initialisierung.
|
||||
============================================================ */
|
||||
|
||||
const APP_VER = '418'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen
|
||||
const APP_VER = '419'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen
|
||||
|
||||
const App = (() => {
|
||||
|
||||
|
|
|
|||
|
|
@ -575,7 +575,7 @@ window.Page_settings = (() => {
|
|||
});
|
||||
|
||||
document.getElementById('settings-install-btn')?.addEventListener('click', () => {
|
||||
App.navigate('welcome');
|
||||
App.navigate('welcome', true, { install: true });
|
||||
});
|
||||
|
||||
document.getElementById('settings-push-btn')?.addEventListener('click', async () => {
|
||||
|
|
|
|||
|
|
@ -4,13 +4,20 @@
|
|||
|
||||
window.Page_welcome = (() => {
|
||||
|
||||
let _container = null;
|
||||
let _appState = null;
|
||||
let _container = null;
|
||||
let _appState = null;
|
||||
let _showInstall = false;
|
||||
|
||||
async function init(container, appState) {
|
||||
_container = container;
|
||||
_appState = appState;
|
||||
async function init(container, appState, params = {}) {
|
||||
_container = container;
|
||||
_appState = appState;
|
||||
_showInstall = !!params.install;
|
||||
_render();
|
||||
if (_showInstall) {
|
||||
setTimeout(() => {
|
||||
_container.querySelector('.wc-install-card')?.scrollIntoView({ behavior: 'smooth', block: 'start' });
|
||||
}, 100);
|
||||
}
|
||||
}
|
||||
|
||||
function refresh() { _render(); }
|
||||
|
|
@ -86,7 +93,7 @@ window.Page_welcome = (() => {
|
|||
</div>
|
||||
|
||||
<!-- ── App installieren ──────────────────────────── -->
|
||||
${!isInstalled ? `
|
||||
${(!isInstalled || _showInstall) ? `
|
||||
<div class="card wc-install-card">
|
||||
<div class="wc-install-header">
|
||||
<svg class="ph-icon" aria-hidden="true"><use href="/icons/phosphor.svg#download-simple"></use></svg>
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
Offline-Cache + Push Notifications + Tile-Cache
|
||||
============================================================ */
|
||||
|
||||
const CACHE_VERSION = 'by-v439';
|
||||
const CACHE_VERSION = 'by-v440';
|
||||
const CACHE_STATIC = `${CACHE_VERSION}-static`;
|
||||
const CACHE_TILES = 'ban-yaro-tiles-v1'; // bleibt über SW-Updates erhalten
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue