fix user_locale and favicon
This commit is contained in:
@@ -132,6 +132,9 @@ export const mutations = {
|
||||
},
|
||||
setLocale (state, locale) {
|
||||
state.locale = locale
|
||||
},
|
||||
setUserLocale (state, user_locale) {
|
||||
state.user_locale = user_locale
|
||||
}
|
||||
}
|
||||
|
||||
@@ -139,13 +142,11 @@ export const actions = {
|
||||
// this method is called server side only for each request
|
||||
// we use it to get configuration from db, setting locale, etc...
|
||||
async nuxtServerInit ({ commit }, { app, store, req }) {
|
||||
|
||||
// TOFIX: check if we could retrieve it directly?
|
||||
const settings = await app.$axios.$get('/settings')
|
||||
commit('setSettings', settings)
|
||||
|
||||
// check if we could retrieve it directly?
|
||||
const user_locale = await app.$axios.$get('/settings/user_locale')
|
||||
if (user_locale[store.state.locale]) { store.commit('setUserLocale', user_locale[store.state.locale]) }
|
||||
|
||||
// apply settings
|
||||
commit('showRecurrentEvents', settings.allow_recurrent_event && settings.recurrent_event_visible)
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user