diff --git a/photon-client/.eslintrc.json b/photon-client/.eslintrc.json index a257cd186a..ca944a24c4 100644 --- a/photon-client/.eslintrc.json +++ b/photon-client/.eslintrc.json @@ -15,6 +15,7 @@ "object-curly-spacing": ["error", "always"], "quote-props": ["error", "as-needed"], "no-case-declarations": "off", - "vue/require-default-prop": "off" + "vue/require-default-prop": "off", + "vue/v-on-event-hyphenation": "off" } } diff --git a/photon-client/src/components/cameras/CamerasView.vue b/photon-client/src/components/cameras/CamerasView.vue index 4448dcde1e..a0c1968d1e 100644 --- a/photon-client/src/components/cameras/CamerasView.vue +++ b/photon-client/src/components/cameras/CamerasView.vue @@ -68,7 +68,7 @@ const fpsTooLow = computed(() => {
(), { right: false, + disabled: false, hover: false } ); @@ -24,7 +26,14 @@ const hoverClass = props.hover ? "hover" : "";
diff --git a/photon-client/src/components/common/pv-input.vue b/photon-client/src/components/common/pv-input.vue index ff3434132c..282e95e367 100644 --- a/photon-client/src/components/common/pv-input.vue +++ b/photon-client/src/components/common/pv-input.vue @@ -35,9 +35,10 @@ const localValue = computed({ const handleKeydown = ({ key }) => { switch (key) { case "Enter": - if (!(props.rules || []).some((v) => v(localValue.value) === false || typeof v(localValue.value) === "string")) { - emit("onEnter", localValue.value); - } + // Explicitly check that all rule props return true + if (!props.rules?.every((rule) => rule(localValue.value) === true)) return; + + emit("onEnter", localValue.value); break; case "Escape": emit("onEscape"); diff --git a/photon-client/src/components/dashboard/CameraAndPipelineSelectCard.vue b/photon-client/src/components/dashboard/CameraAndPipelineSelectCard.vue index b01b4a4dd8..c7b6d3724b 100644 --- a/photon-client/src/components/dashboard/CameraAndPipelineSelectCard.vue +++ b/photon-client/src/components/dashboard/CameraAndPipelineSelectCard.vue @@ -138,7 +138,7 @@ const cancelPipelineCreation = () => { newPipelineType.value = useCameraSettingsStore().currentWebsocketPipelineType; }; -// Pipeline Creation +// Pipeline Deletion const showPipelineDeletionConfirmationDialog = ref(false); const confirmDeleteCurrentPipeline = () => { useCameraSettingsStore().deleteCurrentPipeline(); @@ -186,6 +186,11 @@ const cancelChangePipelineType = () => { showPipelineTypeChangeDialog.value = false; }; +// Pipeline duplication' +const duplicateCurrentPipeline = () => { + useCameraSettingsStore().duplicatePipeline(useCameraSettingsStore().currentCameraSettings.currentPipelineIndex); +}; + // Change Props whenever the pipeline settings are changed useCameraSettingsStore().$subscribe((mutation, state) => { const currentCameraSettings = state.cameras[useStateStore().currentCameraIndex]; @@ -225,12 +230,27 @@ useCameraSettingsStore().$subscribe((mutation, state) => { :input-cols="12 - 3" :rules="[(v) => checkCameraName(v)]" label="Camera" - @on-enter="saveCameraNameEdit" - @on-escape="cancelCameraNameEdit" + @onEnter="saveCameraNameEdit" + @onEscape="cancelCameraNameEdit" /> - +
+ + +
+
@@ -250,12 +270,21 @@ useCameraSettingsStore().$subscribe((mutation, state) => { :input-cols="12 - 3" :rules="[(v) => checkPipelineName(v)]" label="Pipeline" - @on-enter="(v) => savePipelineNameEdit(v)" - @on-escape="cancelPipelineNameEdit" + @onEnter="(v) => savePipelineNameEdit(v)" + @onEscape="cancelPipelineNameEdit" /> - +
+ + +
+ @@ -275,19 +304,21 @@ useCameraSettingsStore().$subscribe((mutation, state) => { - + +
diff --git a/photon-client/src/components/dashboard/CamerasCard.vue b/photon-client/src/components/dashboard/CamerasCard.vue index 5670106df3..21fb77ada2 100644 --- a/photon-client/src/components/dashboard/CamerasCard.vue +++ b/photon-client/src/components/dashboard/CamerasCard.vue @@ -66,7 +66,14 @@ const fpsTooLow = computed(() => {
- +