From 68f6c3aa50a9b2fad2541d62afeff95aed9aab78 Mon Sep 17 00:00:00 2001 From: Guillaume Vincent Date: Tue, 3 Jan 2017 12:58:43 +0100 Subject: [PATCH] extract master password input into a component --- src/components/MasterPassword.vue | 50 +++++++++++++++++++++++++++++++++++++++ src/views/PasswordGenerator.vue | 28 ++++------------------ 2 files changed, 54 insertions(+), 24 deletions(-) create mode 100644 src/components/MasterPassword.vue diff --git a/src/components/MasterPassword.vue b/src/components/MasterPassword.vue new file mode 100644 index 0000000..6ae8154 --- /dev/null +++ b/src/components/MasterPassword.vue @@ -0,0 +1,50 @@ + + diff --git a/src/views/PasswordGenerator.vue b/src/views/PasswordGenerator.vue index 4a56962..2e4d07b 100644 --- a/src/views/PasswordGenerator.vue +++ b/src/views/PasswordGenerator.vue @@ -71,22 +71,7 @@
-
- - - - - -
+
@@ -207,12 +192,11 @@ import LessPass from 'lesspass'; import {mapGetters} from 'vuex'; import Clipboard from 'clipboard'; - import debounce from 'lodash.debounce'; import {showTooltip} from '../api/tooltip'; import Password from '../domain/password'; import {getSite} from '../domain/url-parser'; import RemoveAutoComplete from '../components/RemoveAutoComplete.vue'; - import Fingerprint from '../components/Fingerprint.vue'; + import MasterPassword from '../components/MasterPassword.vue'; import VersionButton from '../components/VersionButton.vue'; function fetchPasswords(store) { @@ -223,7 +207,7 @@ name: 'password-generator-view', components: { RemoveAutoComplete, - Fingerprint, + MasterPassword, VersionButton }, computed: mapGetters(['passwords', 'password', 'version']), @@ -268,7 +252,7 @@ showOptions: false, showError: false, generatingPassword: false, - optionsSaved: false, + optionsSaved: false } }, watch: { @@ -316,13 +300,9 @@ 'masterPassword': function () { this.cleanErrors(); this.cleanFormInSeconds(30); - this.showFingerprint(); } }, methods: { - showFingerprint: debounce(function () { - this.fingerprint = this.masterPassword; - }, 1000), togglePasswordType(element){ if (element.type === 'password') { element.type = 'text';