mirror of https://github.com/1Panel-dev/1Panel
feat: Some adjustments to internationalization (#7332)
parent
20c9230291
commit
4d760d3019
|
@ -133,7 +133,7 @@ function getCheckedLabels(json: Node): string[] {
|
|||
|
||||
const search = async () => {
|
||||
await checkIsSystemIntl();
|
||||
let checkedLabels: string | any[];
|
||||
let checkedLabels: any[] = [];
|
||||
if (!globalStore.isIntl) {
|
||||
const res = await getSettingInfo();
|
||||
const json: Node = JSON.parse(res.data.xpackHideMenu);
|
||||
|
|
|
@ -10,6 +10,12 @@ router.beforeEach((to, from, next) => {
|
|||
axiosCanceler.removeAllPending();
|
||||
const globalStore = GlobalStore();
|
||||
|
||||
if (globalStore.isIntl && to.path.includes('xpack')) {
|
||||
next({ name: '404' });
|
||||
NProgress.done();
|
||||
return;
|
||||
}
|
||||
|
||||
if (to.name !== 'entrance' && !globalStore.isLogin) {
|
||||
next({
|
||||
name: 'entrance',
|
||||
|
|
|
@ -77,9 +77,10 @@
|
|||
@change="onSave('Language', form.language)"
|
||||
v-model="form.language"
|
||||
>
|
||||
<el-radio v-if="globalStore.isIntl" value="en">English</el-radio>
|
||||
<el-radio value="zh">中文(简体)</el-radio>
|
||||
<el-radio value="tw">中文(繁體)</el-radio>
|
||||
<el-radio value="en">English</el-radio>
|
||||
<el-radio v-if="!globalStore.isIntl" value="en">English</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
|
||||
|
|
Loading…
Reference in New Issue