From 10a4580cbe60164cd178ae3f35c7487ce257740b Mon Sep 17 00:00:00 2001 From: Pablo Santiago Date: Sat, 4 Jan 2025 19:17:14 +0100 Subject: [PATCH] Optimize target scope page --- .../target/port/authentication/form.vue | 10 +- .../components/target/port/dialog.vue | 2 +- src/frontend/components/target/port/form.vue | 3 + .../targets/[target_id]/scope.vue | 201 ++++++++---------- 4 files changed, 96 insertions(+), 120 deletions(-) diff --git a/src/frontend/components/target/port/authentication/form.vue b/src/frontend/components/target/port/authentication/form.vue index 10a51f4c..c5a697b2 100644 --- a/src/frontend/components/target/port/authentication/form.vue +++ b/src/frontend/components/target/port/authentication/form.vue @@ -28,7 +28,7 @@ (n) => !n || validate.name.test(n) || 'Invalid name value', ]" validate-on="input" - prepend-icon="mdi-shield-account" + prepend-inner-icon="mdi-shield-account" :disabled="type === 'None'" /> @@ -45,16 +45,15 @@ (s) => validate.secret.test(s) || 'Invalid secret value', ]" validate-on="input" - prepend-icon="mdi-shield-key" + prepend-inner-icon="mdi-shield-key" :disabled="type === 'None'" @update:model-value="disabled = false" /> - @@ -80,6 +79,9 @@ const secret = ref(null); const type = ref("None"); function submit(): void { + if (type.value === "None") { + emit("completed"); + } if (valid.value) { emit("loading", true); props.api diff --git a/src/frontend/components/target/port/dialog.vue b/src/frontend/components/target/port/dialog.vue index 46eb35d1..22567169 100644 --- a/src/frontend/components/target/port/dialog.vue +++ b/src/frontend/components/target/port/dialog.vue @@ -8,7 +8,7 @@ targetPort !== null ? $emit('completed') : null; " > - + - - - - - - - - - + + +