From 262110434be8b05f526c51e565eadc200bd8ad13 Mon Sep 17 00:00:00 2001 From: Alberto Paganelli Date: Tue, 30 Jan 2024 17:52:15 +0100 Subject: [PATCH 1/5] wip: update popup --- .../src/components/devices/DeviceBadge.vue | 28 ++++- .../src/components/devices/NewDevicePopup.vue | 1 - .../components/devices/UpdateDevicePopup.vue | 117 ++++++++++++++++++ frontend/src/views/DevicesView.vue | 19 +-- 4 files changed, 154 insertions(+), 11 deletions(-) create mode 100644 frontend/src/components/devices/UpdateDevicePopup.vue diff --git a/frontend/src/components/devices/DeviceBadge.vue b/frontend/src/components/devices/DeviceBadge.vue index 727116157..441b33f63 100644 --- a/frontend/src/components/devices/DeviceBadge.vue +++ b/frontend/src/components/devices/DeviceBadge.vue @@ -2,10 +2,30 @@ import type { Device, Sensor, Camera } from '@domain/device/core' import { Measure, DeviceType } from '@domain/device/core' import { getMeasureColor } from '@/utils/MeasureUtils' +import { ref } from "vue"; +import UpdateDevicePopup from "@/components/devices/UpdateDevicePopup.vue"; defineProps<{ device: Device }>() + +const updatePopupVisible = ref(false) + +const openPopup = (device: Device) => { + updatePopupVisible.value = true + console.log(device) +} +const updateSensor = () => { + /* + updatePopupVisible.value = true + */ +} + +const updateCamera = () => { + /* + updatePopupVisible.value = true + */ +} diff --git a/frontend/src/views/DevicesView.vue b/frontend/src/views/DevicesView.vue index 8c410e3cb..4feb5e9df 100644 --- a/frontend/src/views/DevicesView.vue +++ b/frontend/src/views/DevicesView.vue @@ -2,7 +2,7 @@