From f440a2e8b3e7f3747a3a79d8719d82a10571fc55 Mon Sep 17 00:00:00 2001 From: Guillaume Vincent Date: Fri, 3 Feb 2017 11:16:24 +0100 Subject: [PATCH] Add default password profile view fix https://github.com/lesspass/lesspass/issues/142 --- src/components/Menu.vue | 6 +++ src/components/Options.vue | 98 ++++++++++++++++++++++++++++++++++++++++ src/components/VersionButton.vue | 36 --------------- src/router.js | 4 +- src/views/ConfigureOptions.vue | 51 +++++++++++++++++++++ src/views/Login.vue | 11 ++--- src/views/PasswordGenerator.vue | 98 ++++------------------------------------ 7 files changed, 170 insertions(+), 134 deletions(-) create mode 100644 src/components/Options.vue delete mode 100644 src/components/VersionButton.vue create mode 100644 src/views/ConfigureOptions.vue diff --git a/src/components/Menu.vue b/src/components/Menu.vue index bbbc3cc..ad7b045 100644 --- a/src/components/Menu.vue +++ b/src/components/Menu.vue @@ -27,6 +27,9 @@ + + + @@ -43,6 +46,9 @@ LessPass
+ + + diff --git a/src/components/Options.vue b/src/components/Options.vue new file mode 100644 index 0000000..2f12d32 --- /dev/null +++ b/src/components/Options.vue @@ -0,0 +1,98 @@ + + + diff --git a/src/components/VersionButton.vue b/src/components/VersionButton.vue deleted file mode 100644 index 7995e69..0000000 --- a/src/components/VersionButton.vue +++ /dev/null @@ -1,36 +0,0 @@ - - - diff --git a/src/router.js b/src/router.js index 4711449..ea41dcc 100644 --- a/src/router.js +++ b/src/router.js @@ -1,8 +1,9 @@ import Vue from 'vue'; import VueRouter from 'vue-router'; -import PasswordGenerator from './views/PasswordGenerator.vue'; +import ConfigureOptions from './views/ConfigureOptions.vue'; import Login from './views/Login.vue'; +import PasswordGenerator from './views/PasswordGenerator.vue'; import PasswordReset from './views/PasswordReset.vue'; import PasswordResetConfirm from './views/PasswordResetConfirm.vue'; import Passwords from './views/Passwords.vue'; @@ -13,6 +14,7 @@ const routes = [ {path: '/', name: 'home', component: PasswordGenerator}, {path: '/login', name: 'login', component: Login}, {path: '/passwords/', name: 'passwords', component: Passwords}, + {path: '/options/default/', name: 'configureOptions', component: ConfigureOptions}, {path: '/passwords/:id', name: 'password', component: PasswordGenerator}, {path: '/password/reset', name: 'passwordReset', component: PasswordReset}, {path: '/password/reset/confirm/:uid/:token', name: 'passwordResetConfirm', component: PasswordResetConfirm}, diff --git a/src/views/ConfigureOptions.vue b/src/views/ConfigureOptions.vue new file mode 100644 index 0000000..1bce448 --- /dev/null +++ b/src/views/ConfigureOptions.vue @@ -0,0 +1,51 @@ + + + diff --git a/src/views/Login.vue b/src/views/Login.vue index ce5af73..786cf2c 100644 --- a/src/views/Login.vue +++ b/src/views/Login.vue @@ -64,9 +64,6 @@
-
- -
@@ -82,7 +79,6 @@ import {mapGetters} from 'vuex'; import MasterPassword from '../components/MasterPassword.vue'; import OptionsButton from '../components/OptionsButton.vue'; - import VersionButton from '../components/VersionButton.vue'; const defaultErrors = { userNameAlreadyExist: false, @@ -111,8 +107,7 @@ }, components: { MasterPassword, - OptionsButton, - VersionButton + OptionsButton }, computed: { ...mapGetters(['version']) @@ -130,9 +125,9 @@ uppercase: true, numbers: true, symbols: true, - length: this.version == 2 ? 16 : 12, + length: 16, counter: 1, - version: this.version, + version: 2, }; return LessPass.generatePassword('lesspass.com', this.email, this.password, defaultPasswordProfile).then(generatedPassword => { this.password = generatedPassword; diff --git a/src/views/PasswordGenerator.vue b/src/views/PasswordGenerator.vue index 6ef05c3..1e4063d 100644 --- a/src/views/PasswordGenerator.vue +++ b/src/views/PasswordGenerator.vue @@ -113,75 +113,17 @@
-
-
- -
-
- -
-
- -
-
- -
-
-
-
- - -
-
- - -
-
- -
-
+
- -
-
- -