fix
This commit is contained in:
1 parent
a2d11a7d7d
commit
f3fa3bd25b
88 files changed
+363
-363
No files matched your search
@@ -4,14 +4,14 @@ import { resolve } from 'node:path';
|
||||
import { deepMerge } from '../utils/object';
|
||||
import { themeType } from '../types/theme';
|
||||
import { z } from 'zod';
|
||||
import { actionType } from '@/common/coerce';
|
||||
import { coerce } from '@/common/coerce';
|
||||
// 定义配置的类型
|
||||
const WebUiConfigSchema = z.object({
|
||||
host: actionType.string().default('0.0.0.0'),
|
||||
port: actionType.number().default(6099),
|
||||
token: actionType.string().default('napcat'),
|
||||
loginRate: actionType.number().default(10),
|
||||
autoLoginAccount: actionType.string().default(''),
|
||||
host: coerce.string().default('0.0.0.0'),
|
||||
port: coerce.number().default(6099),
|
||||
token: coerce.string().default('napcat'),
|
||||
loginRate: coerce.number().default(10),
|
||||
autoLoginAccount: coerce.string().default(''),
|
||||
theme: themeType,
|
||||
});
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { actionType } from '@/common/coerce';
|
||||
import { coerce } from '@/common/coerce';
|
||||
import { z } from 'zod';
|
||||
|
||||
export const themeType = z.object(
|
||||
{
|
||||
dark: z.record(actionType.string(), actionType.string()),
|
||||
light: z.record(actionType.string(), actionType.string()),
|
||||
dark: z.record(coerce.string(), coerce.string()),
|
||||
light: z.record(coerce.string(), coerce.string()),
|
||||
}
|
||||
).default({
|
||||
dark: {
|
||||
|
||||
Reference in new issue
Block a user