redirect to home page after any logout
This commit is contained in:
parent
2cf2f378ce
commit
35e1ac5096
File diff suppressed because one or more lines are too long
|
@ -5,8 +5,11 @@ import qs from 'querystring-es3'
|
||||||
|
|
||||||
import materiauGQL from 'vuejs/api/gql/materiauflaglist.fragment.gql'
|
import materiauGQL from 'vuejs/api/gql/materiauflaglist.fragment.gql'
|
||||||
|
|
||||||
|
// import router from 'vuejs/route' // this is not working
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
namespaced: true,
|
namespaced: true,
|
||||||
|
// router,
|
||||||
|
|
||||||
// initial state
|
// initial state
|
||||||
state: {
|
state: {
|
||||||
|
@ -78,12 +81,24 @@ export default {
|
||||||
state.csrf_token = null
|
state.csrf_token = null
|
||||||
state.isloggedin = false
|
state.isloggedin = false
|
||||||
state.logout_token = null
|
state.logout_token = null
|
||||||
if (state.isAdmin) {
|
|
||||||
// TODO: what if on a page where login is needed (as commerce checkout and cart)
|
|
||||||
window.location.reload(true)
|
|
||||||
}
|
|
||||||
state.asAdmin = false
|
state.asAdmin = false
|
||||||
state.canSearch = false
|
state.canSearch = false
|
||||||
|
// if (state.isAdmin) {
|
||||||
|
// // TODO: what if on a page where login is needed (as commerce checkout and cart)
|
||||||
|
// window.location.reload(true)
|
||||||
|
// } else {
|
||||||
|
//
|
||||||
|
// // return systematically to home page
|
||||||
|
// this.$router.push({
|
||||||
|
// name:`home`
|
||||||
|
// // params: { alias:this.alias }
|
||||||
|
// // query: { nid: this.item.nid }
|
||||||
|
// // meta: { uuid:this.item.uuid },
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
|
||||||
|
// redirect to home page in every case
|
||||||
|
window.location = window.location.origin
|
||||||
},
|
},
|
||||||
setFlagColls (state, flagcolls) {
|
setFlagColls (state, flagcolls) {
|
||||||
console.log('User pre setFlagColls', state.flagcolls)
|
console.log('User pre setFlagColls', state.flagcolls)
|
||||||
|
|
Loading…
Reference in New Issue