1
0
mirror of https://github.com/bitwarden/web synced 2026-01-01 16:13:15 +00:00

update listing when cipher is edited

This commit is contained in:
Kyle Spearrin
2017-10-12 15:48:30 -04:00
parent 001a116c8b
commit 598c7ea068
5 changed files with 23 additions and 16 deletions

View File

@@ -88,8 +88,11 @@
editModel.result.then(function (returnVal) {
if (returnVal.action === 'edit') {
cipher.name = returnVal.data.name;
cipher.subTitle = returnVal.data.login.username;
var index = $scope.ciphers.indexOf(cipher);
if (index > -1) {
returnVal.data.collectionIds = $scope.ciphers[index].collectionIds;
$scope.ciphers[index] = returnVal.data;
}
}
else if (returnVal.action === 'delete') {
var index = $scope.ciphers.indexOf(cipher);