瀏覽代碼

refactor: add checked property to component data

pull/604/head
Andrea PIERRÉ 3 年之前
父節點
當前提交
fa145da93e
沒有發現已知的金鑰在資料庫的簽署中 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);


Loading…
取消
儲存