diff --git a/frontend/src/App.vue b/frontend/src/App.vue index fafd46b32..6cf78bb54 100755 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -60,7 +60,10 @@ export default { this.$router.push('overview') } else { //console.log('app.vue to Logout') - this.$store.dispatch('logout') + if (this.$route.path == '/reset') { + } else { + this.$store.dispatch('logout') + } } }, data() { diff --git a/frontend/src/apis/loginAPI.js b/frontend/src/apis/loginAPI.js index d422fe3ff..91020ddbb 100644 --- a/frontend/src/apis/loginAPI.js +++ b/frontend/src/apis/loginAPI.js @@ -63,6 +63,15 @@ const loginAPI = { } return apiPost(CONFIG.LOGIN_API_URL + 'createUser', payload) }, + sendEmail: async (email, email_text = 7, email_verification_code_type = 'resetPassword') => { + //console.log('api email', email) + const payload = { + email, + email_text, + email_verification_code_type, + } + return apiPost(CONFIG.LOGIN_API_URL + 'sendEmail', payload) + }, } export default loginAPI diff --git a/frontend/src/routes/router.js b/frontend/src/routes/router.js index cd3646fe0..571c64582 100644 --- a/frontend/src/routes/router.js +++ b/frontend/src/routes/router.js @@ -21,10 +21,6 @@ const router = new VueRouter({ }) router.beforeEach((to, from, next) => { - let language = to.params.lang - if (!language) { - language = 'de' - } next() }) diff --git a/frontend/src/routes/routes.js b/frontend/src/routes/routes.js index b50f2a7b1..d487ed05e 100755 --- a/frontend/src/routes/routes.js +++ b/frontend/src/routes/routes.js @@ -3,7 +3,7 @@ import NotFound from '@/views/NotFoundPage.vue' const routes = [ { path: '/overview', - component: () => import('../views/KontoOverview.vue'), + component: () => import('../views/Pages/KontoOverview.vue'), meta: { requiresAuth: true, }, @@ -38,7 +38,7 @@ const routes = [ }, { path: '/password', - component: () => import('../views/Pages/Password.vue'), + component: () => import('../views/Pages/ForgotPassword.vue'), }, { path: '/explorer', diff --git a/frontend/src/store/store.js b/frontend/src/store/store.js index 96b2c4be8..65463a3df 100644 --- a/frontend/src/store/store.js +++ b/frontend/src/store/store.js @@ -63,7 +63,6 @@ export const store = new Vuex.Store({ state.user.balance_gdt = balance / 10000 }, }, - // Asyncronous actions - used for api calls actions: { login: async ({ dispatch, commit }, data) => { const result = await loginAPI.login(data.email, data.password) @@ -74,19 +73,11 @@ export const store = new Vuex.Store({ $cookies.set('gdd_u', data.email) router.push('/overview') } else { - // Register failed, we perform a logout - //alert('>>>>> FAIl LOGIN') commit('loginfail', true) //dispatch('logout') } }, - passwordReset: async (data) => { - //console.log('<<<<<<<<<<< PASSWORT RESET TODO >>>>>>>>>>>', data.email) - }, - schoepfen: async (data) => { - // http://localhost/transaction-creations/ajaxCreate - }, createUser: async ({ commit, dispatch }, data) => { // console.log('action: createUser') const result = await loginAPI.create( diff --git a/frontend/src/views/Pages/Password.vue b/frontend/src/views/Pages/ForgotPassword.vue similarity index 79% rename from frontend/src/views/Pages/Password.vue rename to frontend/src/views/Pages/ForgotPassword.vue index 0db2a2725..d99d7731e 100644 --- a/frontend/src/views/Pages/Password.vue +++ b/frontend/src/views/Pages/ForgotPassword.vue @@ -26,17 +26,10 @@ :placeholder="$t('form.email')" name="Email" :rules="{ required: true, email: true }" - v-model="model.email" + v-model="form.email" > - {{ form }}
- + {{ $t('site.password.reset_now') }}
@@ -53,21 +46,26 @@ +