From db3c0d71f533da6a25697d5061a9eb1e337669a2 Mon Sep 17 00:00:00 2001 From: Guillaume Vincent Date: Wed, 19 Oct 2016 11:53:55 +0200 Subject: [PATCH] ux: add register page into login page --- src/router.js | 2 - src/store.js | 10 ++- src/views/Login.vue | 174 ++++++++++++++++++++++++++++++++++--------------- src/views/Register.vue | 108 ------------------------------ 4 files changed, 130 insertions(+), 164 deletions(-) delete mode 100644 src/views/Register.vue diff --git a/src/router.js b/src/router.js index 84e2913..38a6d44 100644 --- a/src/router.js +++ b/src/router.js @@ -3,7 +3,6 @@ import VueRouter from 'vue-router'; import PasswordGenerator from './views/PasswordGenerator'; import Login from './views/Login'; -import Register from './views/Register'; import PasswordReset from './views/PasswordReset'; import PasswordResetConfirm from './views/PasswordResetConfirm'; import Passwords from './views/Passwords'; @@ -13,7 +12,6 @@ Vue.use(VueRouter); const routes = [ {path: '/', name: 'home', component: PasswordGenerator}, {path: '/login', name: 'login', component: Login}, - {path: '/register', name: 'register', component: Register}, {path: '/passwords/', name: 'passwords', component: Passwords}, {path: '/passwords/:id', name: 'password', component: PasswordGenerator}, {path: '/password/reset', name: 'passwordReset', component: PasswordReset}, diff --git a/src/store.js b/src/store.js index 4ade1b2..89fc9c0 100644 --- a/src/store.js +++ b/src/store.js @@ -28,6 +28,7 @@ const state = { email: '', passwordStatus: 'CLEAN', passwords: [], + baseURL: 'https://lesspass.com', password: { ...defaultPassword } @@ -70,6 +71,12 @@ const mutations = { }, UPDATE_SITE(state, {site}){ state.password.site = site + }, + UPDATE_BASE_URL(state, {baseURL}){ + state.baseURL = baseURL + }, + UPDATE_EMAIL(state, {email}){ + state.email = email } }; @@ -133,8 +140,7 @@ const getters = { isAuthenticated: state => state.authenticated, isGuest: state => !state.authenticated, passwordStatus: state => state.passwordStatus, - email: state => state.email, - baseURL: state => state.baseURL + email: state => state.email }; export default new Vuex.Store({ diff --git a/src/views/Login.vue b/src/views/Login.vue index 6abbd38..923c1c0 100644 --- a/src/views/Login.vue +++ b/src/views/Login.vue @@ -1,5 +1,5 @@