Onboarding: 'Los geht's' navigiert direkt zum vollen Hunde-Profil-Formular statt Mini-Wizard. Welcome-'Hund anlegen' nutzt echten Event-Listener statt inline onclick.
This commit is contained in:
parent
2d43618dc8
commit
fb9620fbcb
2 changed files with 7 additions and 4 deletions
|
|
@ -337,10 +337,12 @@ window.Page_onboarding = (() => {
|
||||||
// EVENTS
|
// EVENTS
|
||||||
// ----------------------------------------------------------
|
// ----------------------------------------------------------
|
||||||
function _bindEvents() {
|
function _bindEvents() {
|
||||||
// Weiter-Button (Schritt 1)
|
// Weiter-Button (Schritt 1) — direkt ins richtige Hunde-Profil,
|
||||||
|
// statt eines doppelten Mini-Formulars im Wizard. Onboarding gilt
|
||||||
|
// damit als erledigt, sobald der User dort angekommen ist.
|
||||||
_container.querySelector('#ob-next-btn')?.addEventListener('click', () => {
|
_container.querySelector('#ob-next-btn')?.addEventListener('click', () => {
|
||||||
_step = 2;
|
localStorage.setItem('by_onboarding_done', '1');
|
||||||
_render();
|
App.navigate('dog-profile');
|
||||||
});
|
});
|
||||||
|
|
||||||
// Zurück-Button (Schritt 2)
|
// Zurück-Button (Schritt 2)
|
||||||
|
|
|
||||||
|
|
@ -1425,7 +1425,7 @@ window.Worlds = (() => {
|
||||||
<div class="world-info-sub" style="margin-bottom:16px">
|
<div class="world-info-sub" style="margin-bottom:16px">
|
||||||
Lege ein Profil an und schalte alle Features frei
|
Lege ein Profil an und schalte alle Features frei
|
||||||
</div>
|
</div>
|
||||||
<button class="btn btn-primary" style="width:100%" onclick="Worlds.navigateTo('dog-profile')">
|
<button class="btn btn-primary" id="welcome-add-dog-btn" style="width:100%">
|
||||||
Hund anlegen
|
Hund anlegen
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -1444,6 +1444,7 @@ window.Worlds = (() => {
|
||||||
</div>
|
</div>
|
||||||
</div>`;
|
</div>`;
|
||||||
el.querySelectorAll('[data-wnav]').forEach(e => e.addEventListener('click', () => navigateTo(e.dataset.wnav)));
|
el.querySelectorAll('[data-wnav]').forEach(e => e.addEventListener('click', () => navigateTo(e.dataset.wnav)));
|
||||||
|
el.querySelector('#welcome-add-dog-btn')?.addEventListener('click', () => navigateTo('dog-profile'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue