Ver a proveniência

Clean code in PasswordGenerator.vue component

pull/342/head
Guillaume Vincent há 6 anos
ascendente
cometimento
ba37141e17
1 ficheiros alterados com 4 adições e 3 eliminações
  1. +4
    -3
      src/views/PasswordGenerator.vue

+ 4
- 3
src/views/PasswordGenerator.vue Ver ficheiro

@@ -172,12 +172,13 @@ export default {
this.passwordGenerated = "";
this.$refs.masterPassword.hidePassword();
},
cleanFormInSeconds(seconds = 15) {
cleanFormIn30Seconds() {
const thirtySecondsInMillisecond = 30 * 1000;
this.cleanTimeout = setTimeout(() => {
this.masterPassword = "";
this.passwordGenerated = "";
this.$refs.masterPassword.hidePassword();
}, 1000 * seconds);
}, thirtySecondsInMillisecond);
},
generatePassword() {
const site = this.password.site;
@@ -209,7 +210,7 @@ export default {
passwordProfile
).then(passwordGenerated => {
this.passwordGenerated = passwordGenerated;
this.cleanFormInSeconds(30);
this.cleanFormIn30Seconds();
});
},
focusBestInputField() {


Carregando…
Cancelar
Guardar