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.
This commit is contained in:
@@ -3,23 +3,34 @@
|
|||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
import { api } from 'boot/axios';
|
import { api } from 'boot/axios';
|
||||||
|
|
||||||
|
type apiStatus = {
|
||||||
|
deviceName: string
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const statusDev = ref( { "color": "red", "deviceName" : "No connected Device"} )
|
const statusDev = ref( { "color": "red", "deviceName" : "No connected Device"} )
|
||||||
|
|
||||||
function getStatus():
|
async function getStatus(): void {
|
||||||
try {
|
try {
|
||||||
const { data } = await api( {
|
const { data } = await api( {
|
||||||
method: "get",
|
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 });
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|||||||
Reference in New Issue
Block a user