mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
properly handle auth shortcut in oder to not break layout on logout
This commit is contained in:
parent
df74427c39
commit
7f501879b1
@ -1,21 +1,15 @@
|
||||
<template>
|
||||
<div id="app">
|
||||
<default-layout v-if="showLayout" />
|
||||
<default-layout v-if="$store.state.token" />
|
||||
<router-view v-else></router-view>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import defaultLayout from '@/layouts/defaultLayout.vue'
|
||||
import CONFIG from './config'
|
||||
|
||||
export default {
|
||||
name: 'app',
|
||||
components: { defaultLayout },
|
||||
data() {
|
||||
return {
|
||||
showLayout: CONFIG.DEBUG_DISABLE_AUTH || this.$store.state.token,
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import Vuex from 'vuex'
|
||||
import Vue from 'vue'
|
||||
import createPersistedState from 'vuex-persistedstate'
|
||||
import CONFIG from '../config'
|
||||
|
||||
Vue.use(Vuex)
|
||||
|
||||
@ -33,7 +34,7 @@ const store = new Vuex.Store({
|
||||
}),
|
||||
],
|
||||
state: {
|
||||
token: null,
|
||||
token: CONFIG.DEBUG_DISABLE_AUTH ? 'validToken' : null,
|
||||
moderator: 'Dertest Moderator',
|
||||
openCreations: 0,
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user