Skip to content

Commit

Permalink
feat: repository前端优化 TencentBlueKing#2555
Browse files Browse the repository at this point in the history
* feat: repository前端优化 TencentBlueKing#2555

* feat: repository前端优化 TencentBlueKing#2555
  • Loading branch information
lannoy0523 authored Sep 11, 2024
1 parent c14d78e commit 70fe6f6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions src/frontend/devops-repository/src/components/Header/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,15 @@
icons: {
type: Array,
default: () => [
{
icon: 'english',
name: 'English',
id: 'en'
},
{
icon: 'chinese',
name: '中文',
id: 'zh-cn'
},
{
icon: 'english',
name: 'English',
id: 'en'
}
]
}
Expand Down Expand Up @@ -144,11 +144,11 @@
const BK_CI_DOMAIN = location.host.split('.').slice(1).join('.')
if (id !== 'zh-cn') {
cookies.remove('blueking_language', { domain: BK_CI_DOMAIN, path: '/' })
cookies.set('blueking_language', 'en', { domain: BK_CI_DOMAIN, path: '/' })
cookies.set('blueking_language', 'en', { domain: BK_CI_DOMAIN, path: '/', expires: 366 })
location.reload()
} else {
cookies.remove('blueking_language', { domain: BK_CI_DOMAIN, path: '/' })
cookies.set('blueking_language', 'zh-cn', { domain: BK_CI_DOMAIN, path: '/' })
cookies.set('blueking_language', 'zh-cn', { domain: BK_CI_DOMAIN, path: '/', expires: 366 })
location.reload()
}
},
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/locale/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ function getLsLocale () {
function setLsLocale (locale) {
if (typeof cookies.set === 'function') {
cookies.remove(LS_KEY, { domain: BK_CI_DOMAIN, path: '/' })
cookies.set(LS_KEY, localeAliasMap[locale], { domain: BK_CI_DOMAIN, path: '/' })
cookies.set(LS_KEY, localeAliasMap[locale], { domain: BK_CI_DOMAIN, path: '/', expires: 366 })
}
}

Expand Down

0 comments on commit 70fe6f6

Please sign in to comment.