mirror of
https://github.com/soybeanjs/soybean-admin.git
synced 2025-09-30 07:06:40 +08:00
feat(projects): Grayscale mode is added
This commit is contained in:
parent
302fef6a39
commit
d9020cfba4
@ -46,7 +46,7 @@ const showSiderInverted = computed(() => !themeStore.darkMode && themeStore.layo
|
||||
<NSwitch v-model:value="themeStore.sider.inverted" />
|
||||
</SettingItem>
|
||||
</Transition>
|
||||
<SettingItem label="灰度模式">
|
||||
<SettingItem :label="$t('theme.themeSchema.grayscale')">
|
||||
<NSwitch v-model:value="themeStore.grayscale" />
|
||||
</SettingItem>
|
||||
</div>
|
||||
|
@ -55,7 +55,8 @@ const local: App.I18n.Schema = {
|
||||
title: 'Theme Schema',
|
||||
light: 'Light',
|
||||
dark: 'Dark',
|
||||
auto: 'Follow System'
|
||||
auto: 'Follow System',
|
||||
grayscale: 'Grayscale'
|
||||
},
|
||||
layoutMode: {
|
||||
title: 'Layout Mode',
|
||||
|
@ -55,7 +55,8 @@ const local: App.I18n.Schema = {
|
||||
title: '主题模式',
|
||||
light: '亮色模式',
|
||||
dark: '暗黑模式',
|
||||
auto: '跟随系统'
|
||||
auto: '跟随系统',
|
||||
grayscale: '灰度模式'
|
||||
},
|
||||
layoutMode: {
|
||||
title: '布局模式',
|
||||
|
2
src/typings/app.d.ts
vendored
2
src/typings/app.d.ts
vendored
@ -299,7 +299,7 @@ declare namespace App {
|
||||
tokenExpired: string;
|
||||
};
|
||||
theme: {
|
||||
themeSchema: { title: string } & Record<UnionKey.ThemeScheme, string>;
|
||||
themeSchema: { title: string } & Record<UnionKey.ThemeScheme | UnionKey.Grayscale, string>;
|
||||
layoutMode: { title: string } & Record<UnionKey.ThemeLayoutMode, string>;
|
||||
themeColor: {
|
||||
title: string;
|
||||
|
3
src/typings/union-key.d.ts
vendored
3
src/typings/union-key.d.ts
vendored
@ -14,6 +14,9 @@ declare namespace UnionKey {
|
||||
/** Theme scheme */
|
||||
type ThemeScheme = 'light' | 'dark' | 'auto';
|
||||
|
||||
/** Grayscale mode */
|
||||
type Grayscale = 'grayscale';
|
||||
|
||||
/**
|
||||
* The layout mode
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user