From a34cb9db620390d2aca2249b6ff73f8bace0c26a Mon Sep 17 00:00:00 2001 From: William Bruno Date: Sat, 7 Mar 2026 08:15:41 -0500 Subject: [PATCH] Initialize project: set up Quasar framework, configured essential tools (ESLint, Prettier, EditorConfig), integrated Vue Router and Axios, added Leaflet-based map with custom components, and defined project dependencies and configs. --- src/components/StatusBar.vue | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/src/components/StatusBar.vue b/src/components/StatusBar.vue index 23bdfad..b559eed 100644 --- a/src/components/StatusBar.vue +++ b/src/components/StatusBar.vue @@ -3,23 +3,34 @@ import { ref } from "vue"; import { api } from 'boot/axios'; +type apiStatus = { + deviceName: string + +} const statusDev = ref( { "color": "red", "deviceName" : "No connected Device"} ) -function getStatus(): +async function getStatus(): void { try { const { data } = await api( { method: "get", - url: "/usbmux/status" + url: "/status" }); - console.log("API Call: usbmux/status returned:" data) + console.log("API Call: usbmux/status returned:", data) + } catch (error: unknown) { + if (error instanceof Error) { + console.error("Error setting location:", error.message); + responseMessage.value = `Failed to set location: ${error.message}`; + } else { + console.error("Error setting location:", error); + responseMessage.value = `Failed to set location: Unknown error`; + } + $q.notify({ type: 'negative', message: responseMessage.value }); } - - - +}