mirror of
https://github.com/InvoiceShelf/InvoiceShelf.git
synced 2026-04-07 13:41:23 +00:00
Fix language switching. It now switches instantly
This commit is contained in:
@@ -79,8 +79,10 @@ export const useGlobalStore = (useWindow = false) => {
|
||||
companyStore.selectedCompanyCurrency =
|
||||
response.data.current_company_currency
|
||||
|
||||
global.locale.value =
|
||||
response.data.current_user_settings.language || 'en'
|
||||
if(typeof global.locale !== 'string') {
|
||||
global.locale.value =
|
||||
response.data.current_user_settings.language || 'en'
|
||||
}
|
||||
|
||||
this.isAppLoaded = true
|
||||
resolve(response)
|
||||
|
||||
@@ -106,7 +106,7 @@ export const useUserStore = (useWindow = false) => {
|
||||
.then((response) => {
|
||||
if (data.settings.language) {
|
||||
this.currentUserSettings.language = data.settings.language
|
||||
global.locale = data.settings.language
|
||||
global.locale.value = data.settings.language
|
||||
}
|
||||
if (data.settings.default_estimate_template) {
|
||||
this.currentUserSettings.default_estimate_template =
|
||||
|
||||
Reference in New Issue
Block a user