1
0
mirror of https://github.com/bitwarden/web synced 2026-01-20 09:23:52 +00:00

multi uri support for import/export

This commit is contained in:
Kyle Spearrin
2018-03-02 22:13:53 -05:00
parent 5c92350ed2
commit 27e68e4c75
3 changed files with 111 additions and 71 deletions

View File

@@ -26,8 +26,9 @@
return;
}
var i;
var collectionsDict = {};
for (var i = 0; i < decCollections.length; i++) {
for (i = 0; i < decCollections.length; i++) {
collectionsDict[decCollections[i].id] = decCollections[i];
}
@@ -78,10 +79,17 @@
switch (decCiphers[i].type) {
case constants.cipherType.login:
cipher.type = 'login';
cipher.login_uri = decCiphers[i].login.uri;
cipher.login_uri = null;
cipher.login_username = decCiphers[i].login.username;
cipher.login_password = decCiphers[i].login.password;
cipher.login_totp = decCiphers[i].login.totp;
if (decCiphers[i].login.uris && decCiphers[i].login.uris.length) {
cipher.login_uri = [];
for (j = 0; j < decCiphers[i].login.uris.length; j++) {
cipher.login_uri.push(decCiphers[i].login.uris[j].uri);
}
}
break;
case constants.cipherType.secureNote:
cipher.type = 'note';