diff --git a/src/App.vue b/src/App.vue
index f50106e6c..2e07879f5 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -313,10 +313,12 @@
-
-
-
+
+
+
+
+
diff --git a/src/components/InteractionDialog.vue b/src/components/InteractionDialog.vue
index c8b413a8a..a4adf7863 100644
--- a/src/components/InteractionDialog.vue
+++ b/src/components/InteractionDialog.vue
@@ -1,5 +1,11 @@
-
+
{
const hasActionsSlot = computed(() => !!slots.actions)
+const handleClose = (): void => {
+ if (interfaceStore.dialogQueue.length > 0) {
+ interfaceStore.openNextDialogOnQueue()
+ }
+}
+
watch(
() => props.showDialog,
(newVal) => {
diff --git a/src/components/Tutorial.vue b/src/components/Tutorial.vue
index edf4d61a7..7c9231201 100644
--- a/src/components/Tutorial.vue
+++ b/src/components/Tutorial.vue
@@ -91,20 +91,11 @@ const { showSnackbar } = useSnackbar()
const interfaceStore = useAppInterfaceStore()
const vehicleStore = useMainVehicleStore()
-const props = defineProps<{
- /**
- *
- */
- showTutorial?: boolean
-}>()
-
-const emits = defineEmits(['update:showTutorial'])
-
-const showTutorial = ref(props.showTutorial || false)
+const userHasSeenTutorial = useBlueOsStorage('cockpit-has-seen-tutorial', false)
+const showTutorial = ref((interfaceStore.activeDialog?.id === 'Tutorial' && !userHasSeenTutorial.value) || false)
const currentTutorialStep = ref(1)
const isVehicleConnectedVisible = ref(false)
const tallContent = ref(false)
-const userHasSeenTutorial = useBlueOsStorage('cockpit-has-seen-tutorial', false)
const steps = [
{
@@ -345,7 +336,7 @@ const handleStepChangeDown = (newStep: number): void => {
const dontShowTutorialAgain = (): void => {
userHasSeenTutorial.value = true
showTutorial.value = false
- emits('update:showTutorial', false)
+ interfaceStore.openNextDialogOnQueue()
showSnackbar({
message: 'This guide can be reopened via the Settings > General menu',
variant: 'info',
@@ -356,8 +347,6 @@ const dontShowTutorialAgain = (): void => {
const alwaysShowTutorialOnStartup = (): void => {
userHasSeenTutorial.value = false
- showTutorial.value = true
- emits('update:showTutorial', true)
}
const nextTutorialStep = (): void => {
@@ -379,7 +368,7 @@ const closeTutorial = (): void => {
showTutorial.value = false
interfaceStore.componentToHighlight = 'none'
currentTutorialStep.value = 1
- emits('update:showTutorial', false)
+ interfaceStore.openNextDialogOnQueue()
}
const setVehicleConnectedVisible = (): void => {
diff --git a/src/components/UpdateNotification.vue b/src/components/UpdateNotification.vue
index c79521856..0ce6c3e54 100644
--- a/src/components/UpdateNotification.vue
+++ b/src/components/UpdateNotification.vue
@@ -27,6 +27,7 @@
+ Close
@@ -37,6 +38,9 @@ import { onBeforeMount, ref } from 'vue'
import InteractionDialog, { type Action } from '@/components/InteractionDialog.vue'
import { app_version } from '@/libs/cosmos'
import { isElectron } from '@/libs/utils'
+import { useAppInterfaceStore } from '@/stores/appInterface'
+
+const interfaceStore = useAppInterfaceStore()
const showUpdateDialog = ref(false)
const dialogTitle = ref('')
@@ -52,6 +56,11 @@ const updateInfo = ref({
})
const ignoredUpdateVersions = useStorage('cockpit-ignored-update-versions', [])
+const handleClose = (): void => {
+ interfaceStore.openNextDialogOnQueue()
+ showUpdateDialog.value = false
+}
+
const formatDate = (date: string): string => {
return new Date(date).toLocaleDateString('en-US', { year: 'numeric', month: 'long', day: 'numeric' })
}
@@ -75,7 +84,9 @@ onBeforeMount(() => {
dialogVariant.value = 'info'
dialogActions.value = []
showProgress.value = false
- showUpdateDialog.value = true
+ if (interfaceStore.activeDialog?.id === 'UpdateNotification' || interfaceStore.activeDialog === undefined) {
+ showUpdateDialog.value = true
+ }
})
window.electronAPI.onUpdateNotAvailable(() => {
@@ -87,7 +98,7 @@ onBeforeMount(() => {
{
text: 'OK',
action: () => {
- showUpdateDialog.value = false
+ interfaceStore.openNextDialogOnQueue()
},
},
]
@@ -107,7 +118,7 @@ onBeforeMount(() => {
console.log(`User chose to ignore version ${updateInfo.value.version}`)
ignoredUpdateVersions.value.push(updateInfo.value.version)
window.electronAPI!.cancelUpdate()
- showUpdateDialog.value = false
+ interfaceStore.openNextDialogOnQueue()
},
},
{
@@ -121,7 +132,7 @@ onBeforeMount(() => {
action: () => {
console.log('User chose to cancel the update for the Electron app.')
window.electronAPI!.cancelUpdate()
- showUpdateDialog.value = false
+ interfaceStore.openNextDialogOnQueue()
dialogMessage.value = 'Downloading update...'
},
},
@@ -132,7 +143,7 @@ onBeforeMount(() => {
text: 'Not Now',
action: () => {
window.electronAPI!.cancelUpdate()
- showUpdateDialog.value = false
+ interfaceStore.openNextDialogOnQueue()
},
},
]
@@ -140,11 +151,13 @@ onBeforeMount(() => {
// Check if this version is in the ignored list
if (ignoredUpdateVersions.value.includes(info.version)) {
console.log(`Skipping ignored version ${info.version}.`)
- showUpdateDialog.value = false
+ interfaceStore.openNextDialogOnQueue()
return
}
- showUpdateDialog.value = true
+ if (interfaceStore.activeDialog?.id === 'UpdateNotification' || interfaceStore.activeDialog === undefined) {
+ showUpdateDialog.value = true
+ }
})
window.electronAPI.onDownloadProgress((progressInfo) => {
@@ -164,18 +177,20 @@ onBeforeMount(() => {
action: () => {
console.log('User chose to install the update for the Electron app now.')
window.electronAPI!.installUpdate()
- showUpdateDialog.value = false
+ interfaceStore.openNextDialogOnQueue()
},
},
{
text: 'Later',
action: () => {
console.log('User chose to install the update for the Electron app later.')
- showUpdateDialog.value = false
+ interfaceStore.openNextDialogOnQueue()
},
},
]
- showUpdateDialog.value = true
+ if (interfaceStore.activeDialog?.id === 'UpdateNotification' || interfaceStore.activeDialog === undefined) {
+ showUpdateDialog.value = true
+ }
})
})
diff --git a/src/components/VehicleDiscoveryDialog.vue b/src/components/VehicleDiscoveryDialog.vue
index 456f5fb99..1365690d1 100644
--- a/src/components/VehicleDiscoveryDialog.vue
+++ b/src/components/VehicleDiscoveryDialog.vue
@@ -47,15 +47,18 @@