Kaynağa Gözat

refactor: remove prop

pull/604/head
Andrea PIERRÉ 3 yıl önce
ebeveyn
işleme
5f5fff3123
Veri tabanında bu imza için bilinen anahtar bulunamadı GPG Anahtar Kimliği: 78A39B4A078E6C06
2 değiştirilmiş dosya ile 9 ekleme ve 12 silme
  1. +4
    -6
      packages/lesspass-pure/src/components/MasterPassword.vue
  2. +5
    -6
      packages/lesspass-pure/src/views/Login.vue

+ 4
- 6
packages/lesspass-pure/src/components/MasterPassword.vue Dosyayı Görüntüle

@@ -64,11 +64,10 @@
<input
class="form-check-input"
type="checkbox"
id="flexSwitchCheckChecked"
v-bind:disabled="email === ''"
id="checkPlainPassword"
/>
<label class="form-check-label" for="flexSwitchCheckChecked">{{
PlainCheckboxText
<label class="form-check-label" for="checkPlainPassword">{{
$t("Use plain password")
}}</label>
</div>
</small>
@@ -89,8 +88,7 @@ export default {
type: Boolean,
default: false
},
EncryptButtonText: String,
PlainCheckboxText: String
EncryptButtonText: String
},
data() {
return {


+ 5
- 6
packages/lesspass-pure/src/views/Login.vue Dosyayı Görüntüle

@@ -37,7 +37,6 @@
v-bind:email="email"
v-bind:showEncryptButton="true"
v-bind:EncryptButtonText="$t('Encrypt my master password')"
v-bind:PlainCheckboxText="$t('Use plain password')"
></master-password>
</div>
<div class="form-group">
@@ -77,10 +76,10 @@ import User from "../api/user";
import { defaultbaseURL } from "../api/default";
import MasterPassword from "../components/MasterPassword.vue";
import message from "../services/message";

import LessPass from "lesspass";
import defaultPasswordProfile from "../store/defaultPassword";
function encryptPass(email, password) {

function encryptPassword(email, password) {
return LessPass.generatePassword(
"lesspass.com",
email,
@@ -118,9 +117,9 @@ export default {
if (this.formIsValid()) {
const baseURL = this.baseURL;
this.$store.dispatch("setBaseURL", { baseURL });
let pass = encryptPass(this.email, this.password)
.then(pass => {
pass = document.getElementById("flexSwitchCheckChecked").checked ? this.password : pass;
encryptPassword(this.email, this.password)
.then(encryptedPassword => {
let pass = document.getElementById("checkPlainPassword").checked ? this.password : encryptedPassword;
User.login({ email: this.email, password: pass })
.then(response => {
this.$store.dispatch("login", response.data);


Yükleniyor…
İptal
Kaydet