mirror of
https://github.com/soybeanjs/soybean-admin.git
synced 2025-09-30 15:16:42 +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" />
|
<NSwitch v-model:value="themeStore.sider.inverted" />
|
||||||
</SettingItem>
|
</SettingItem>
|
||||||
</Transition>
|
</Transition>
|
||||||
<SettingItem label="灰度模式">
|
<SettingItem :label="$t('theme.themeSchema.grayscale')">
|
||||||
<NSwitch v-model:value="themeStore.grayscale" />
|
<NSwitch v-model:value="themeStore.grayscale" />
|
||||||
</SettingItem>
|
</SettingItem>
|
||||||
</div>
|
</div>
|
||||||
|
@ -55,7 +55,8 @@ const local: App.I18n.Schema = {
|
|||||||
title: 'Theme Schema',
|
title: 'Theme Schema',
|
||||||
light: 'Light',
|
light: 'Light',
|
||||||
dark: 'Dark',
|
dark: 'Dark',
|
||||||
auto: 'Follow System'
|
auto: 'Follow System',
|
||||||
|
grayscale: 'Grayscale'
|
||||||
},
|
},
|
||||||
layoutMode: {
|
layoutMode: {
|
||||||
title: 'Layout Mode',
|
title: 'Layout Mode',
|
||||||
|
@ -55,7 +55,8 @@ const local: App.I18n.Schema = {
|
|||||||
title: '主题模式',
|
title: '主题模式',
|
||||||
light: '亮色模式',
|
light: '亮色模式',
|
||||||
dark: '暗黑模式',
|
dark: '暗黑模式',
|
||||||
auto: '跟随系统'
|
auto: '跟随系统',
|
||||||
|
grayscale: '灰度模式'
|
||||||
},
|
},
|
||||||
layoutMode: {
|
layoutMode: {
|
||||||
title: '布局模式',
|
title: '布局模式',
|
||||||
|
2
src/typings/app.d.ts
vendored
2
src/typings/app.d.ts
vendored
@ -299,7 +299,7 @@ declare namespace App {
|
|||||||
tokenExpired: string;
|
tokenExpired: string;
|
||||||
};
|
};
|
||||||
theme: {
|
theme: {
|
||||||
themeSchema: { title: string } & Record<UnionKey.ThemeScheme, string>;
|
themeSchema: { title: string } & Record<UnionKey.ThemeScheme | UnionKey.Grayscale, string>;
|
||||||
layoutMode: { title: string } & Record<UnionKey.ThemeLayoutMode, string>;
|
layoutMode: { title: string } & Record<UnionKey.ThemeLayoutMode, string>;
|
||||||
themeColor: {
|
themeColor: {
|
||||||
title: string;
|
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 */
|
/** Theme scheme */
|
||||||
type ThemeScheme = 'light' | 'dark' | 'auto';
|
type ThemeScheme = 'light' | 'dark' | 'auto';
|
||||||
|
|
||||||
|
/** Grayscale mode */
|
||||||
|
type Grayscale = 'grayscale';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The layout mode
|
* The layout mode
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user