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
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue