mirror of
https://github.com/bitwarden/desktop.git
synced 2024-11-02 08:30:14 +01:00
cipher request login subclass, sync fixes
This commit is contained in:
parent
fa88af8323
commit
56e1f6c25b
@ -385,7 +385,7 @@
|
||||
"message": "No"
|
||||
},
|
||||
"unexpectedError": {
|
||||
"message": "An unexpected error has occured."
|
||||
"message": "An unexpected error has occurred."
|
||||
},
|
||||
"nameRequired": {
|
||||
"message": "Name is required."
|
||||
@ -429,6 +429,9 @@
|
||||
"syncingComplete": {
|
||||
"message": "Syncing complete"
|
||||
},
|
||||
"syncingFailed": {
|
||||
"message": "Syncing failed"
|
||||
},
|
||||
"importLoginsConfirmation": {
|
||||
"message": "You can bulk import logins from the bitwarden.com web vault. Do you want to visit the website now?"
|
||||
},
|
||||
|
@ -3,15 +3,20 @@
|
||||
this.folderId = cipher.folderId;
|
||||
this.organizationId = cipher.organizationId;
|
||||
this.name = cipher.name ? cipher.name.encryptedString : null;
|
||||
this.notes = cipher.notes ? cipher.notes.encryptedString : null;
|
||||
this.favorite = cipher.favorite;
|
||||
|
||||
if (type === 1) {
|
||||
// login
|
||||
this.uri = cipher.uri ? cipher.uri.encryptedString : null;
|
||||
this.username = cipher.username ? cipher.username.encryptedString : null;
|
||||
this.password = cipher.password ? cipher.password.encryptedString : null;
|
||||
this.totp = cipher.totp ? cipher.totp.encryptedString : null;
|
||||
this.notes = cipher.notes ? cipher.notes.encryptedString : null;
|
||||
switch (type) {
|
||||
case 1: // login
|
||||
this.login = {
|
||||
uri: cipher.uri ? cipher.uri.encryptedString : null,
|
||||
username: cipher.username ? cipher.username.encryptedString : null,
|
||||
password: cipher.password ? cipher.password.encryptedString : null,
|
||||
totp: cipher.totp ? cipher.totp.encryptedString : null
|
||||
};
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -9,11 +9,16 @@
|
||||
|
||||
$scope.sync = function () {
|
||||
$scope.loading = true;
|
||||
syncService.fullSync(true, function () {
|
||||
$analytics.eventTrack('Synced Full');
|
||||
syncService.fullSync(true, function (success) {
|
||||
$scope.loading = false;
|
||||
toastr.success(i18nService.syncingComplete);
|
||||
setLastSync();
|
||||
if (success) {
|
||||
$analytics.eventTrack('Synced Full');
|
||||
toastr.success(i18nService.syncingComplete);
|
||||
}
|
||||
else {
|
||||
toastr.error(i18nService.syncingFailed);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
@ -61,6 +61,9 @@ function initSyncService() {
|
||||
self.syncCompleted(false);
|
||||
callback(false);
|
||||
});
|
||||
}, function () {
|
||||
self.syncCompleted(false);
|
||||
callback(false);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user