Skip to content

Commit

Permalink
Views: General-config: Implement changes to open dialogs from queue
Browse files Browse the repository at this point in the history
Signed-off-by: Arturo Manzoli <[email protected]>
  • Loading branch information
ArturoManzoli committed Jan 15, 2025
1 parent 04bf36a commit 310c843
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions src/views/ConfigurationGeneralView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
size="x-small"
class="bg-[#FFFFFF22] mt-3 mb-2 shadow-2"
variant="flat"
@click="showDiscoveryDialog = true"
@click="handleVehicleDiscoveryDialog"
>
Search for vehicles
</v-btn>
Expand Down Expand Up @@ -294,7 +294,6 @@
</div>
</template>
</BaseConfigurationView>
<VehicleDiscoveryDialog v-model="showDiscoveryDialog" />
</template>

<script setup lang="ts">
Expand Down Expand Up @@ -352,6 +351,17 @@ const handleCustomRtcConfiguration = (): void => {
}
}
const handleVehicleDiscoveryDialog = (): void => {
interfaceStore.enqueueDialog({
id: 'VehicleDiscoveryDialog',
component: VehicleDiscoveryDialog,
props: {
showAutoSearchOption: true,
},
})
interfaceStore.openNextDialogOnQueue()
}
/** Main vehicle connection */
const vehicleConnected = ref<boolean | undefined>(mainVehicleStore.isVehicleOnline)
Expand Down Expand Up @@ -529,8 +539,6 @@ onMounted(() => {
tryToPrettifyRtcConfig()
})
const showDiscoveryDialog = ref(false)
const openCockpitFolder = (): void => {
if (isElectron() && window.electronAPI) {
window.electronAPI?.openCockpitFolder()
Expand Down

0 comments on commit 310c843

Please sign in to comment.