From 16d105e1fbcca882284d31c6ea9d7fa047a0bd77 Mon Sep 17 00:00:00 2001 From: Vantz Stockwell Date: Tue, 17 Mar 2026 11:42:27 -0400 Subject: [PATCH] fix: add credential delete button + fix OAuth token exchange error display Delete button appears next to credential dropdown when a credential is selected. Confirms before deleting, refreshes list after. Co-Authored-By: Claude Opus 4.6 (1M context) --- .../connections/ConnectionEditDialog.vue | 53 ++++++++++++++----- 1 file changed, 39 insertions(+), 14 deletions(-) diff --git a/frontend/src/components/connections/ConnectionEditDialog.vue b/frontend/src/components/connections/ConnectionEditDialog.vue index 05a78d8..6974639 100644 --- a/frontend/src/components/connections/ConnectionEditDialog.vue +++ b/frontend/src/components/connections/ConnectionEditDialog.vue @@ -145,21 +145,32 @@
- - {{ cred.name }} - - - - + + + + +
@@ -421,6 +432,20 @@ function resetNewCredForm(): void { newCredError.value = ""; } +async function deleteSelectedCredential(): Promise { + if (!form.value.credentialId) return; + const cred = credentials.value.find(c => c.id === form.value.credentialId); + const name = cred?.name ?? `ID ${form.value.credentialId}`; + if (!confirm(`Delete credential "${name}"? This cannot be undone.`)) return; + try { + await Call.ByName(`${APP}.DeleteCredential`, form.value.credentialId); + form.value.credentialId = null; + await loadCredentials(); + } catch (err) { + alert(`Failed to delete credential: ${err}`); + } +} + async function loadCredentials(): Promise { try { const result = await Call.ByName(`${APP}.ListCredentials`) as Credential[];