diff --git a/photon-client/src/views/CameraMatchingView.vue b/photon-client/src/views/CameraMatchingView.vue index 04eca8bc95..72a3320e44 100644 --- a/photon-client/src/views/CameraMatchingView.vue +++ b/photon-client/src/views/CameraMatchingView.vue @@ -15,6 +15,7 @@ import PvDeleteModal from "@/components/common/pv-delete-modal.vue"; import PvCameraInfoCard from "@/components/common/pv-camera-info-card.vue"; import PvCameraMatchCard from "@/components/common/pv-camera-match-card.vue"; import { useTheme } from "vuetify"; +import PvSelect from "@/components/common/pv-select.vue"; const theme = useTheme(); @@ -64,6 +65,19 @@ const deleteThisCamera = (cameraUniqueName: string) => { }); }; +const swapDialog = ref({ show: false, cameraName: "", uniquePath: "" }); +const otherCamera = ref({ cameraName: "", uniquePath: "" }); + +const swapCamera = (cameraUniqueName: string, otherCameraUniqueName: string) => { + axiosPost("/utils/swapCameras", "swap two camera assignments", { + cameraUniqueName: cameraUniqueName, + otherCameraUniqueName: otherCameraUniqueName + }).finally(() => { + swapDialog.value.show = false; + otherCamera.value = { cameraName: "", uniquePath: "" }; + }); +}; + const cameraConnected = (uniquePath: string): boolean => { return ( useStateStore().vsmState.allConnectedCameras.find((it) => cameraInfoFor(it).uniquePath === uniquePath) !== undefined @@ -274,6 +288,25 @@ const getMatchedDevice = (info: PVCameraInfo | undefined): PVCameraInfo => { mdi-trash-can-outline + + + mdi-swap-horizontal + + @@ -467,6 +500,47 @@ const getMatchedDevice = (info: PVCameraInfo | undefined): PVCameraInfo => { + + + + + Swap Camera Configs + + + {{ swapDialog.cameraName }} + mdi-swap-horizontal + + + + + + Swap Cameras + + + +