Merge branch 'dev-3.7' of https://git.mesalab.cn/nezha/nezha-fronted into dev-3.8

This commit is contained in:
zhangyu
2023-06-27 14:45:38 +08:00
4 changed files with 7 additions and 0 deletions

View File

@@ -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"

View File

@@ -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
}

View File

@@ -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 {

View File

@@ -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 () {