|
@@ -71,22 +71,7 @@ |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<div class="form-group"> |
|
|
<div class="form-group"> |
|
|
<div class="inner-addon left-addon input-group"> |
|
|
|
|
|
<label for="masterPassword" class="sr-only">Master Password</label> |
|
|
|
|
|
<i class="fa fa-lock"></i> |
|
|
|
|
|
<input id="masterPassword" |
|
|
|
|
|
name="masterPassword" |
|
|
|
|
|
ref="masterPassword" |
|
|
|
|
|
type="password" |
|
|
|
|
|
class="form-control" |
|
|
|
|
|
placeholder="Master password" |
|
|
|
|
|
autocomplete="new-password" |
|
|
|
|
|
autocorrect="off" |
|
|
|
|
|
autocapitalize="off" |
|
|
|
|
|
v-model="masterPassword"> |
|
|
|
|
|
<fingerprint :fingerprint="fingerprint" v-on:click.native="togglePasswordType($refs.masterPassword)"> |
|
|
|
|
|
</fingerprint> |
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
<master-password v-model="masterPassword"></master-password> |
|
|
</div> |
|
|
</div> |
|
|
<div class="form-group row"> |
|
|
<div class="form-group row"> |
|
|
<div class="col-xs-9" v-show="generatedPassword"> |
|
|
<div class="col-xs-9" v-show="generatedPassword"> |
|
@@ -207,12 +192,11 @@ |
|
|
import LessPass from 'lesspass'; |
|
|
import LessPass from 'lesspass'; |
|
|
import {mapGetters} from 'vuex'; |
|
|
import {mapGetters} from 'vuex'; |
|
|
import Clipboard from 'clipboard'; |
|
|
import Clipboard from 'clipboard'; |
|
|
import debounce from 'lodash.debounce'; |
|
|
|
|
|
import {showTooltip} from '../api/tooltip'; |
|
|
import {showTooltip} from '../api/tooltip'; |
|
|
import Password from '../domain/password'; |
|
|
import Password from '../domain/password'; |
|
|
import {getSite} from '../domain/url-parser'; |
|
|
import {getSite} from '../domain/url-parser'; |
|
|
import RemoveAutoComplete from '../components/RemoveAutoComplete.vue'; |
|
|
import RemoveAutoComplete from '../components/RemoveAutoComplete.vue'; |
|
|
import Fingerprint from '../components/Fingerprint.vue'; |
|
|
|
|
|
|
|
|
import MasterPassword from '../components/MasterPassword.vue'; |
|
|
import VersionButton from '../components/VersionButton.vue'; |
|
|
import VersionButton from '../components/VersionButton.vue'; |
|
|
|
|
|
|
|
|
function fetchPasswords(store) { |
|
|
function fetchPasswords(store) { |
|
@@ -223,7 +207,7 @@ |
|
|
name: 'password-generator-view', |
|
|
name: 'password-generator-view', |
|
|
components: { |
|
|
components: { |
|
|
RemoveAutoComplete, |
|
|
RemoveAutoComplete, |
|
|
Fingerprint, |
|
|
|
|
|
|
|
|
MasterPassword, |
|
|
VersionButton |
|
|
VersionButton |
|
|
}, |
|
|
}, |
|
|
computed: mapGetters(['passwords', 'password', 'version']), |
|
|
computed: mapGetters(['passwords', 'password', 'version']), |
|
@@ -268,7 +252,7 @@ |
|
|
showOptions: false, |
|
|
showOptions: false, |
|
|
showError: false, |
|
|
showError: false, |
|
|
generatingPassword: false, |
|
|
generatingPassword: false, |
|
|
optionsSaved: false, |
|
|
|
|
|
|
|
|
optionsSaved: false |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
watch: { |
|
|
watch: { |
|
@@ -316,13 +300,9 @@ |
|
|
'masterPassword': function () { |
|
|
'masterPassword': function () { |
|
|
this.cleanErrors(); |
|
|
this.cleanErrors(); |
|
|
this.cleanFormInSeconds(30); |
|
|
this.cleanFormInSeconds(30); |
|
|
this.showFingerprint(); |
|
|
|
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
showFingerprint: debounce(function () { |
|
|
|
|
|
this.fingerprint = this.masterPassword; |
|
|
|
|
|
}, 1000), |
|
|
|
|
|
togglePasswordType(element){ |
|
|
togglePasswordType(element){ |
|
|
if (element.type === 'password') { |
|
|
if (element.type === 'password') { |
|
|
element.type = 'text'; |
|
|
element.type = 'text'; |
|
|