diff options
author | brantje <brantje@gmail.com> | 2016-09-29 00:23:24 +0300 |
---|---|---|
committer | brantje <brantje@gmail.com> | 2016-09-29 00:23:24 +0300 |
commit | fc99d93f8656604d4d0312aee4df5422d8bbd79f (patch) | |
tree | fdc6613d46f60940f71fd9447c300fdf5187abd9 /js/app/directives | |
parent | 3394d78d369e1bb0f9feaffe9e6eda5996100a4e (diff) |
Finish up vault settings
Diffstat (limited to 'js/app/directives')
-rw-r--r-- | js/app/directives/passwordgen.js | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/js/app/directives/passwordgen.js b/js/app/directives/passwordgen.js index a680f23c..1e3af42e 100644 --- a/js/app/directives/passwordgen.js +++ b/js/app/directives/passwordgen.js @@ -133,14 +133,18 @@ angular.module('passmanApp') }; scope.passwordNotNull = false; + scope.$watch("settings", function () { + if(scope.settings) { + if (!scope.password && scope.settings.generateOnCreate) { + scope.generatePasswordStart(); + } + } + }); + + scope.$watch("password", function () { scope.model = scope.password; scope.password_repeat = scope.model; - - if(!scope.password) { - console.log('Generating new pw'); - scope.generatePasswordStart(); - } }); // scope.onSuccess = function(e) { |