Fix app tutorials (#6728)

* Fix tutorial basic

* fix other tutorials

* nit fix bug with button shrinking

* tutorial works backwards

* nit delete field on prev

* remove empty app duplication and magic code

* fix norefreshbar auto binding to false, making app dirty

* fix and improve app tutorial

* fix background runnable tutorial scroll

* fix connection tutorial

* mistake

* isCurrentlyInTutorial global state

* disable component navigation when in tutorial

* ci
This commit is contained in:
Diego Imbert
2025-10-02 12:09:30 +02:00
committed by GitHub
parent 259ee6903b
commit 65cdcff28c
14 changed files with 195 additions and 345 deletions

View File

@@ -6,10 +6,12 @@
import SkipTutorials from './SkipTutorials.svelte'
import TutorialControls from './TutorialControls.svelte'
import TutorialInner from './TutorialInner.svelte'
import { isCurrentlyInTutorial } from '$lib/stores'
export let index: number = 0
export let name: string = 'action'
export let tainted: boolean = false
export let onDestroyed: (() => void) | undefined = undefined
type Options = {
indexToInsertAt?: number
@@ -111,6 +113,7 @@
dispatch('error', { detail: name })
return
}
isCurrentlyInTutorial.val = true
tutorial = driver({
allowClose: true,
@@ -122,9 +125,11 @@
renderControls({ config, state })
},
onDestroyed: () => {
onDestroyed?.()
if (!tutorial?.hasNextStep()) {
$ignoredTutorials = Array.from(new Set([...$ignoredTutorials, index]))
}
isCurrentlyInTutorial.val = false
}
})