feat: enhance tutorial functionality by disabling inputs and buttons during active steps
Chore App Build, Test, and Push Docker Images / build-and-push (push) Successful in 3m12s
Chore App Build, Test, and Push Docker Images / build-and-push (push) Successful in 3m12s
This commit is contained in:
@@ -8,6 +8,7 @@ import {
|
||||
maybeShow as tutorialMaybeShow,
|
||||
markStepSeen as tutorialMark,
|
||||
tutorialReady,
|
||||
isTutorialActive,
|
||||
} from '@/tutorial/controller'
|
||||
import type {
|
||||
Child,
|
||||
@@ -141,10 +142,12 @@ const fetchChildren = async (): Promise<Child[]> => {
|
||||
return Promise.resolve()
|
||||
}),
|
||||
)
|
||||
children.value = childList
|
||||
return childList
|
||||
} catch (err) {
|
||||
error.value = err instanceof Error ? err.message : 'Failed to fetch children'
|
||||
console.error('Error fetching children:', err)
|
||||
children.value = []
|
||||
return []
|
||||
} finally {
|
||||
loading.value = false
|
||||
@@ -182,8 +185,7 @@ onMounted(async () => {
|
||||
eventBus.on('child_reward_triggered', handleChildRewardTriggered)
|
||||
|
||||
const listPromise = fetchChildren()
|
||||
listPromise.then((list) => {
|
||||
children.value = list
|
||||
listPromise.then(() => {
|
||||
maybeTriggerCreateChildTutorial()
|
||||
})
|
||||
// listen for outside clicks to auto-close any open kebab menu
|
||||
@@ -387,6 +389,7 @@ onBeforeUnmount(() => {
|
||||
<FloatingActionButton
|
||||
v-if="isParentAuthenticated"
|
||||
aria-label="Add Child"
|
||||
:disabled="isTutorialActive"
|
||||
@click="createChild"
|
||||
/>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user