fixed a bug which was causing username to note get saved on import

This commit is contained in:
Gourav Kumar 2024-07-14 17:41:41 +05:30
parent f6d119c852
commit 846e9a7aa5

View File

@ -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);
},
},
};