From f4753c6ee5f88482906bff59e60cf058f25955ce Mon Sep 17 00:00:00 2001 From: Arturo Manzoli Date: Mon, 17 Feb 2025 14:05:54 -0300 Subject: [PATCH] App: Startup dialogs: Implement changes to run under dialog queue Signed-off-by: Arturo Manzoli --- src/components/Tutorial.vue | 16 +++++++- src/components/UpdateNotification.vue | 57 +++++++++++++++++++++------ 2 files changed, 60 insertions(+), 13 deletions(-) diff --git a/src/components/Tutorial.vue b/src/components/Tutorial.vue index 354193dbd..76c3b34f4 100644 --- a/src/components/Tutorial.vue +++ b/src/components/Tutorial.vue @@ -98,7 +98,18 @@ const { openSnackbar } = useSnackbar() const interfaceStore = useAppInterfaceStore() const vehicleStore = useMainVehicleStore() -const showTutorial = ref(true) +const props = defineProps<{ + /** + * + */ + modelValue: boolean +}>() + +const emit = defineEmits<{ + (e: 'update:modelValue', value: boolean): void +}>() + +const showTutorial = ref(false || props.modelValue) const currentTutorialStep = useStorage('cockpit-last-tutorial-step', 1) const isVehicleConnectedVisible = ref(false) const tallContent = ref(false) @@ -316,6 +327,7 @@ const handleStepChange = (newStep: number): void => { const dontShowTutorialAgain = (): void => { interfaceStore.userHasSeenTutorial = true showTutorial.value = false + emit('update:modelValue', false) currentTutorialStep.value = 1 openSnackbar({ message: 'This guide can be reopened via the Settings > General menu', @@ -348,8 +360,8 @@ const backTutorialStep = (): void => { const closeTutorial = (): void => { showTutorial.value = false interfaceStore.componentToHighlight = 'none' - interfaceStore.userHasSeenTutorial = true interfaceStore.isTutorialVisible = false + emit('update:modelValue', false) } const setVehicleConnectedVisible = (): void => { diff --git a/src/components/UpdateNotification.vue b/src/components/UpdateNotification.vue index c79521856..12b44427b 100644 --- a/src/components/UpdateNotification.vue +++ b/src/components/UpdateNotification.vue @@ -1,6 +1,6 @@ +