About -> UserCP

This commit is contained in:
Jörn-Michael Miehe 2019-05-09 14:20:03 +02:00
parent 25630bba41
commit e6bfa62381
4 changed files with 10 additions and 10 deletions

View file

@ -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')
}

View file

@ -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',

View file

@ -38,7 +38,7 @@ export default {
})
.then(response => {
if (response.data.success) {
this.$router.push({ name: 'about' })
this.$router.push({ name: 'usercp' })
}
})
}

View file

@ -2,7 +2,7 @@
<v-container>
<Header />
<p>user session: {{ sessionID }}</p>
<p>user logged in: {{ user }}</p>
<v-btn @click.native="logout">Logout</v-btn>
</v-container>
</template>
@ -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()
}