mirror of
https://github.com/nocobase/nocobase
synced 2024-11-16 18:56:06 +00:00
1ff3aa94fc
* chore: change 'Default theme of antd' to 'Default' * feat(theme-editor): add migration * refactor: change file name * feat: add a uid to avoid mutiple additions * chore: add version info * chore: optimize * fix: upgrading error * chore: add comment * Update 202307250847-theme-editor.ts * Update plugin.ts * Update 202307250847-theme-editor.ts * refactor: better code --------- Co-authored-by: chenos <chenlinxh@gmail.com>
46 lines
883 B
TypeScript
46 lines
883 B
TypeScript
import { ThemeItem } from '../types';
|
|
|
|
/** antd 默认主题 */
|
|
export const defaultTheme: Omit<ThemeItem, 'id'> = {
|
|
config: {
|
|
name: 'Default',
|
|
},
|
|
optional: true,
|
|
isBuiltIn: true,
|
|
uid: 'default',
|
|
};
|
|
|
|
export const dark: Omit<ThemeItem, 'id'> = {
|
|
config: {
|
|
name: 'Dark',
|
|
// @ts-ignore
|
|
algorithm: 'darkAlgorithm',
|
|
},
|
|
optional: true,
|
|
isBuiltIn: true,
|
|
uid: 'dark',
|
|
};
|
|
|
|
export const compact: Omit<ThemeItem, 'id'> = {
|
|
config: {
|
|
name: 'Compact',
|
|
// @ts-ignore
|
|
algorithm: 'compactAlgorithm',
|
|
},
|
|
optional: true,
|
|
isBuiltIn: true,
|
|
uid: 'compact',
|
|
};
|
|
|
|
/** 同时包含 `紧凑` 和 `暗黑` 两种模式 */
|
|
export const compactDark: Omit<ThemeItem, 'id'> = {
|
|
config: {
|
|
name: 'Compact dark',
|
|
// @ts-ignore
|
|
algorithm: ['compactAlgorithm', 'darkAlgorithm'],
|
|
},
|
|
optional: true,
|
|
isBuiltIn: true,
|
|
uid: 'compact_dark',
|
|
};
|