Browse Source

refactor: add checked property to component data

pull/604/head
Andrea PIERRÉ 3 years ago
parent
commit
fa145da93e
No known key found for this signature in database GPG Key ID: 78A39B4A078E6C06
2 changed files with 5 additions and 2 deletions
  1. +3
    -1
      packages/lesspass-pure/src/components/MasterPassword.vue
  2. +2
    -1
      packages/lesspass-pure/src/views/Login.vue

+ 3
- 1
packages/lesspass-pure/src/components/MasterPassword.vue View File

@@ -65,6 +65,7 @@
class="form-check-input"
type="checkbox"
id="checkPlainPassword"
v-model="checkPlainPassword"
/>
<label class="form-check-label" for="checkPlainPassword">{{
$t("Use plain password")
@@ -98,7 +99,8 @@ export default {
icon3: "",
color1: "",
color2: "",
color3: ""
color3: "",
checkPlainPassword: false
};
},
methods: {


+ 2
- 1
packages/lesspass-pure/src/views/Login.vue View File

@@ -116,10 +116,11 @@ export default {
signIn() {
if (this.formIsValid()) {
const baseURL = this.baseURL;
let checkPlainPassword = this.$children[0].checkPlainPassword
this.$store.dispatch("setBaseURL", { baseURL });
encryptPassword(this.email, this.password)
.then(encryptedPassword => {
let pass = document.getElementById("checkPlainPassword").checked ? this.password : encryptedPassword;
let pass = checkPlainPassword ? this.password : encryptedPassword;
User.login({ email: this.email, password: pass })
.then(response => {
this.$store.dispatch("login", response.data);


Loading…
Cancel
Save