feat: Catch No Cookies

This commit is contained in:
Moriz Wahl 2021-12-13 16:09:47 +01:00
parent 64109b2903
commit abe8817696
2 changed files with 38 additions and 27 deletions

View File

@ -30,6 +30,11 @@ loadAllRules(i18n)
addNavigationGuards(router, store, apolloProvider.defaultClient)
if (!store) {
// Please supply a support page
window.location.assign('https://gradido.net/')
}
/* eslint-disable no-new */
new Vue({
el: '#app',

View File

@ -78,32 +78,38 @@ export const actions = {
},
}
export const store = new Vuex.Store({
plugins: [
createPersistedState({
storage: window.localStorage,
}),
],
state: {
email: '',
language: null,
firstName: '',
lastName: '',
username: '',
description: '',
token: null,
isAdmin: false,
coinanimation: true,
newsletterState: null,
community: {
name: '',
let store
try {
store = new Vuex.Store({
plugins: [
createPersistedState({
storage: window.localStorage,
}),
],
state: {
email: '',
language: null,
firstName: '',
lastName: '',
username: '',
description: '',
token: null,
isAdmin: false,
coinanimation: true,
newsletterState: null,
community: {
name: '',
description: '',
},
hasElopage: false,
publisherId: null,
},
hasElopage: false,
publisherId: null,
},
getters: {},
// Syncronous mutation of the state
mutations,
actions,
})
getters: {},
// Syncronous mutation of the state
mutations,
actions,
})
} catch (error) {}
export { store }