diff --git a/nezha-fronted/src/components/chart/chartList.vue b/nezha-fronted/src/components/chart/chartList.vue index 187cc676a..93311bb98 100644 --- a/nezha-fronted/src/components/chart/chartList.vue +++ b/nezha-fronted/src/components/chart/chartList.vue @@ -77,6 +77,7 @@ v-if="fullscreen.visible" :visible.sync="fullscreen.visible" :show-close="false" + :class="fullscreen.chartInfo.type === 'map' ? 'no-transform-dialog' : ''" destroy-on-close fullscreen :append-to-body="true" diff --git a/nezha-fronted/src/components/common/login.vue b/nezha-fronted/src/components/common/login.vue index e50e1f3a9..c0f597f02 100644 --- a/nezha-fronted/src/components/common/login.vue +++ b/nezha-fronted/src/components/common/login.vue @@ -318,6 +318,7 @@ export default { localStorage.setItem('nz-username', this.loginData.username) localStorage.setItem('nz-prometheus-federation-enabled', res.data.prometheusFederationEnabled) localStorage.setItem('nz-language', this.lang) + this.$store.commit('setLanguage', this.lang) this.loginSuccess(res) } } else { @@ -339,6 +340,7 @@ export default { localStorage.setItem('nz-username', this.loginData.username) localStorage.setItem('nz-prometheus-federation-enabled', res.data.prometheusFederationEnabled) localStorage.setItem('nz-language', this.lang) + this.$store.commit('setLanguage', this.lang) res.data.user = { ...this.userInfo } diff --git a/nezha-fronted/src/components/common/rightBox/profileBox.vue b/nezha-fronted/src/components/common/rightBox/profileBox.vue index 3d35a4ebd..f4bf89f76 100644 --- a/nezha-fronted/src/components/common/rightBox/profileBox.vue +++ b/nezha-fronted/src/components/common/rightBox/profileBox.vue @@ -138,6 +138,7 @@ export default { this.esc(true) if (this.editProfile.lang !== localStorage.getItem('nz-language')) { localStorage.setItem('nz-language', this.editProfile.lang) + this.$store.commit('setLanguage', this.editProfile.lang) this.$i18n.locale = this.editProfile.lang this.$emit('clickProfile', true) } else { diff --git a/nezha-fronted/src/components/layout/header.vue b/nezha-fronted/src/components/layout/header.vue index 6c6742271..bbf41a929 100644 --- a/nezha-fronted/src/components/layout/header.vue +++ b/nezha-fronted/src/components/layout/header.vue @@ -221,6 +221,9 @@ export default { if (this.username != localStorage.getItem('nz-username')) { this.$router.go(0) } + if (this.$store.getters.getLanguage && (this.$store.getters.getLanguage !== localStorage.getItem('nz-language'))) { + localStorage.setItem('nz-language', this.$store.getters.getLanguage) + } } }, mounted () {