-
-
-
- You can use your self hosted LessPass Database
-
- A LessPass database url is required
-
-
+
@@ -108,7 +103,7 @@
email: '',
password: '',
baseURL: 'https://lesspass.com',
- showPasswordHelp: false,
+ transformMasterPassword: false,
showError: false,
errorMessage: '',
errors: {...defaultErrors},
@@ -122,6 +117,29 @@
computed: {
...mapGetters(['version'])
},
+ watch: {
+ password: function () {
+ this.transformMasterPassword = false;
+ },
+ transformMasterPassword: function (transformPassword) {
+ if (!transformPassword) {
+ return;
+ }
+ const defaultPasswordProfile = {
+ lowercase: true,
+ uppercase: true,
+ numbers: true,
+ symbols: true,
+ length: this.version == 2 ? 16 : 12,
+ counter: 1,
+ version: this.version,
+ };
+ return LessPass.generatePassword('lesspass.com', this.email, this.password, defaultPasswordProfile).then(generatedPassword => {
+ console.log(generatedPassword)
+ this.password = generatedPassword;
+ });
+ }
+ },
methods: {
noErrors(){
return !(this.errors.userNameAlreadyExist || this.errors.emailInvalid || this.errors.emailRequired || this.errors.passwordRequired || this.errors.baseURLRequired || this.showError);
@@ -200,20 +218,6 @@
showErrorMessage(errorMessage = 'Oops! Something went wrong. Retry in a few minutes.'){
this.errorMessage = errorMessage;
this.showError = true;
- },
- transformMasterPassword(){
- const defaultPasswordProfile = {
- lowercase: true,
- uppercase: true,
- numbers: true,
- symbols: true,
- length: this.version == 2 ? 16 : 12,
- counter: 1,
- version: this.version,
- };
- return LessPass.generatePassword('lesspass.com', this.email, this.password, defaultPasswordProfile).then(generatedPassword => {
- this.password = generatedPassword;
- });
}
}
}