1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-15 15:53:27 +00:00

Added length slider to password generator page

This commit is contained in:
Kyle Spearrin
2016-09-19 21:38:29 -04:00
parent 350d671c26
commit 6ef3ff9f4d
8 changed files with 68 additions and 4 deletions

View File

@@ -8,8 +8,27 @@
popupUtils.initListSectionItemListeners();
$scope.password = '-';
$scope.slider = {
value: 12,
options: {
floor: 5,
ceil: 64,
step: 1,
hideLimitLabels: true,
hidePointerLabels: true,
onChange: function () {
$scope.options.length = $scope.slider.value;
$scope.regenerate();
},
onEnd: function () {
$scope.saveOptions($scope.options);
}
}
};
$q.when(passwordGenerationService.getOptions()).then(function (options) {
$scope.options = options;
$scope.slider.value = options.length;
$scope.regenerate();
});