8000 feat(projects): multi language buttons support hiding. (#683) · soybeanjs/soybean-admin@d7aebb7 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Commit d7aebb7

Browse files
authored
feat(projects): multi language buttons support hiding. (#683)
1 parent 214341e commit d7aebb7

File tree

6 files changed

+26
-1
lines changed

6 files changed

+26
-1
lines c 8000 hanged

src/layouts/modules/global-header/index.vue

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,12 @@ const { isFullscreen, toggle } = useFullscreen();
4040
<div class="h-full flex-y-center justify-end">
4141
<GlobalSearch />
4242
<FullScreen v-if="!appStore.isMobile" :full="isFullscreen" @click="toggle" />
43-
<LangSwitch :lang="appStore.locale" :lang-options="appStore.localeOptions" @change-lang="appStore.changeLocale" />
43+
<LangSwitch
44+
v-if="themeStore.header.multilingual.visible"
45+
:lang="appStore.locale"
46+
:lang-options="appStore.localeOptions"
47+
@change-lang="appStore.changeLocale"
48+
/>
4449
<ThemeSchemaSwitch
4550
:theme-schema="themeStore.themeScheme"
4651
:is-dark="themeStore.darkMode"

src/layouts/modules/theme-drawer/modules/page-fun.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,9 @@ const isWrapperScrollMode = computed(() => themeStore.layout.scrollMode === 'wra
127127
placeholder="SoybeanAdmin"
128128
/>
129129
</SettingItem>
130+
<SettingItem key="9" :label="$t('theme.header.multilingual.visible')">
131+
<NSwitch v-model:value="themeStore.header.multilingual.visible" />
132+
</SettingItem>
130133
</TransitionGroup>
131134
</template>
132135

src/locales/langs/en-us.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,9 @@ const local: App.I18n.Schema = {
109109
breadcrumb: {
110110
visible: 'Breadcrumb Visible',
111111
showIcon: 'Breadcrumb Icon Visible'
112+
},
113+
multilingual: {
114+
visible: 'Display multilingual button'
112115
}
113116
},
114117
tab: {

src/locales/langs/zh-cn.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,9 @@ const local: App.I18n.Schema = {
109109
breadcrumb: {
110110
visible: '显示面包屑',
111111
showIcon: '显示面包屑图标'
112+
},
113+
multilingual: {
114+
visible: '显示多语言按钮'
112115
}
113116
},
114117
tab: {

src/theme/settings.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ export const themeSettings: App.Theme.ThemeSetting = {
2727
breadcrumb: {
2828
visible: true,
2929
showIcon: true
30+
},
31+
multilingual: {
32+
visible: true
3033
}
3134
},
3235
tab: {

src/typings/app.d.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,11 @@ declare namespace App {
5353
/** Whether to show the breadcrumb icon */
5454
showIcon: boolean;
5555
};
56+
/** Multilingual */
57+
multilingual: {
58+
/** Whether to show the multilingual */
59+
visible: boolean;
60+
};
5661
};
5762
/** Tab */
5863
tab: {
@@ -363,6 +368,9 @@ declare namespace App {
363368
visible: string;
364369
showIcon: string;
365370
};
371+
multilingual: {
372+
visible: string;
373+
};
366374
};
367375
tab: {
368376
visible: string;

0 commit comments

Comments
 (0)
0