Преглед на файлове

refactor: add checked property to component data

pull/604/head
Andrea PIERRÉ преди 3 години
родител
ревизия
fa145da93e
No known key found for this signature in database GPG ключ ID: 78A39B4A078E6C06
променени са 2 файла, в които са добавени 5 реда и са изтрити 2 реда
  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 Целия файл

@@ -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 Целия файл

@@ -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);


Зареждане…
Отказ
Запис