From 1ce5fcafd908c8362f57a7f6c1955591542bd895 Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Mon, 9 Feb 2026 17:51:51 +0100 Subject: [PATCH] apppassword: display error --- dashboard/src/components/AppPasswords.vue | 38 ++++++++++++++++------- 1 file changed, 27 insertions(+), 11 deletions(-) diff --git a/dashboard/src/components/AppPasswords.vue b/dashboard/src/components/AppPasswords.vue index ca9ed7bb6..f1e19526d 100644 --- a/dashboard/src/components/AppPasswords.vue +++ b/dashboard/src/components/AppPasswords.vue @@ -54,6 +54,8 @@ const addedPassword = ref(''); const passwordName = ref(''); const identifiers = ref([]); const identifier = ref(''); +const addError = ref(''); +const busy = ref(false); const appsById = {}; async function refresh() { @@ -85,6 +87,8 @@ function onReset() { passwordName.value = ''; identifier.value = ''; addedPassword.value = ''; + addError.value = ''; + busy.value = false; setTimeout(checkValidity, 100); // update state of the confirm button }, 500); } @@ -92,16 +96,24 @@ function onReset() { async function onSubmit() { if (!form.value.reportValidity()) return; + busy.value = true; + addError.value = ''; addedPassword.value = ''; const [error, result] = await appPasswordsModel.add(identifier.value, passwordName.value); - if (error) return console.error(error); + if (error) { + busy.value = false; + addError.value = error.body ? error.body.message : 'Internal error'; + return; + } addedPassword.value = result.password; passwordName.value = ''; identifier.value = ''; await refresh(); + + busy.value = false; } async function onRemove(appPassword) { @@ -160,7 +172,8 @@ onMounted(async () => { { @close="onReset()" >
+
{{ addError }}
- - - - - +
+ + + + + - - - - + + + + +