From 846e9a7aa5492c7fd6345c9935d7f2502cac3938 Mon Sep 17 00:00:00 2001 From: gourav Date: Sun, 14 Jul 2024 17:41:41 +0530 Subject: [PATCH] fixed a bug which was causing username to note get saved on import --- frontend/src/components/ImportSecrets.vue | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/frontend/src/components/ImportSecrets.vue b/frontend/src/components/ImportSecrets.vue index 6e68aae..adb64b4 100644 --- a/frontend/src/components/ImportSecrets.vue +++ b/frontend/src/components/ImportSecrets.vue @@ -59,13 +59,13 @@ export default { var label = decodeURIComponent(url.pathname.slice(1)); // Remove the leading '/' const type = label.slice(1, -1).split("/")[0]; label = label.slice(6); - let accountName, issuerFromLabel; + let username, issuerFromLabel; const labelParts = label.split(":"); if (labelParts.length === 2) { issuerFromLabel = labelParts[0]; - accountName = labelParts[1]; + username = labelParts[1]; } else { - accountName = label; + username = label; } const params = {}; @@ -86,7 +86,7 @@ export default { scheme, type, label, - accountName, + username, issuer, secret, algorithm, @@ -121,6 +121,7 @@ export default { for (var i = 0; i < this.parsedTokens.length; i++) { await this.createSecret(this.parsedTokens[i]); } + this.$emit("close", true); }, }, };