From e6bfa623819481b47393565ba6d11b68632ae752 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn-Michael=20Miehe?= Date: Thu, 9 May 2019 14:20:03 +0200 Subject: [PATCH] About -> UserCP --- frontend/src/components/forms/Login.vue | 2 +- frontend/src/router.js | 8 ++++---- frontend/src/views/Home.vue | 2 +- frontend/src/views/{About.vue => UserCP.vue} | 8 ++++---- 4 files changed, 10 insertions(+), 10 deletions(-) rename frontend/src/views/{About.vue => UserCP.vue} (88%) diff --git a/frontend/src/components/forms/Login.vue b/frontend/src/components/forms/Login.vue index d7b3222..8a49892 100644 --- a/frontend/src/components/forms/Login.vue +++ b/frontend/src/components/forms/Login.vue @@ -61,7 +61,7 @@ export default { let cookie_data = JSON.parse(response.data.message) Cookies.set('session', cookie_data.value, cookie_data.properties) this.$refs.main.showSnackbar('Login successful!', 'success') - this.$router.push('about') + this.$router.push('usercp') } else { this.$refs.main.showSnackbar(response.data.message, 'error') } diff --git a/frontend/src/router.js b/frontend/src/router.js index 4652504..bdf73cd 100644 --- a/frontend/src/router.js +++ b/frontend/src/router.js @@ -14,13 +14,13 @@ export default new Router({ component: Home }, { - path: '/about', - name: 'about', + path: '/usercp', + name: 'usercp', // route level code-splitting - // this generates a separate chunk (about.[hash].js) for this route + // this generates a separate chunk (usercp.[hash].js) for this route // which is lazy-loaded when the route is visited. component: () => - import(/* webpackChunkName: "about" */ './views/About.vue') + import(/* webpackChunkName: "usercp" */ './views/UserCP.vue') }, { path: '/game', diff --git a/frontend/src/views/Home.vue b/frontend/src/views/Home.vue index 94412e8..4bd2c75 100644 --- a/frontend/src/views/Home.vue +++ b/frontend/src/views/Home.vue @@ -38,7 +38,7 @@ export default { }) .then(response => { if (response.data.success) { - this.$router.push({ name: 'about' }) + this.$router.push({ name: 'usercp' }) } }) } diff --git a/frontend/src/views/About.vue b/frontend/src/views/UserCP.vue similarity index 88% rename from frontend/src/views/About.vue rename to frontend/src/views/UserCP.vue index a7de251..ccedc42 100644 --- a/frontend/src/views/About.vue +++ b/frontend/src/views/UserCP.vue @@ -2,7 +2,7 @@
-

user session: {{ sessionID }}

+

user logged in: {{ user }}

Logout @@ -14,14 +14,14 @@ import axios from '@/plugins/axios' import Header from '@/components/Header.vue' export default { - name: 'About', + name: 'UserCP', components: { Header }, data: () => ({ - sessionID: '' + user: '' }), methods: { @@ -50,7 +50,7 @@ export default { }) .then(response => { if (response.data.success) { - this.sessionID = response.data.message + this.user = response.data.message } else { this.goHome() }