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:
@@ -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();
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user