1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 08:13:42 +00:00

password generator from vault add/edit

This commit is contained in:
Kyle Spearrin
2016-09-19 22:24:55 -04:00
parent 6ef3ff9f4d
commit e5c58c12fe
8 changed files with 89 additions and 18 deletions

View File

@@ -5,6 +5,8 @@
var addState = $stateParams.addState,
editState = $stateParams.editState;
$scope.showSelect = $stateParams.addState || $stateParams.editState;
popupUtils.initListSectionItemListeners();
$scope.password = '-';
@@ -61,16 +63,38 @@
};
$scope.close = function () {
dismiss();
};
$scope.select = function () {
if (addState) {
addState.site.password = $scope.password;
}
else if (editState) {
editState.site.password = $scope.password;
}
dismiss();
};
function dismiss() {
if (addState) {
$state.go('addSite', {
animation: 'out-slide-down',
site: addState
fromCurrent: addState.fromCurrent,
site: addState.site,
returnScrollY: addState.returnScrollY,
returnSearchText: addState.returnSearchText
});
}
else if (editState) {
$state.go('editSite', {
animation: 'out-slide-down',
siteId: editState
site: editState.site,
fromView: editState.fromView,
siteId: editState.siteId,
returnScrollY: editState.returnScrollY,
returnSearchText: editState.returnSearchText
});
}
else {
@@ -78,5 +102,5 @@
animation: 'out-slide-down'
});
}
};
}
});