You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
544 B
20 lines
544 B
<script setup lang="ts">
|
|
import { RouterView } from "vue-router";
|
|
import { createWebSocket, sharedWsUrl } from "./services/socket";
|
|
import { useEquipmentStatusStore } from "@/stores/equipmentStatus";
|
|
const equipmentStatusStore = useEquipmentStatusStore()
|
|
const wsClient = createWebSocket(sharedWsUrl);
|
|
wsClient.dataOb.subscribe((data:any) => {
|
|
if (data.type === "status") {
|
|
equipmentStatusStore.setEquipmentStatus(data['data'])
|
|
}
|
|
});
|
|
wsClient.connect();
|
|
</script>
|
|
|
|
<template>
|
|
<RouterView />
|
|
</template>
|
|
<style scoped>
|
|
|
|
</style>
|