Revert "fix"

This reverts commit 41dccd98a9.
This commit is contained in:
手瓜一十雪
2025-04-19 10:57:28 +08:00
parent 3ed5f543e2
commit 7b365367f7
88 changed files with 363 additions and 363 deletions

View File

@@ -4,14 +4,14 @@ import { resolve } from 'node:path';
import { deepMerge } from '../utils/object';
import { themeType } from '../types/theme';
import { z } from 'zod';
import { coerce } from '@/common/coerce';
import { actionType } from '@/common/coerce';
// 定义配置的类型
const WebUiConfigSchema = z.object({
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(''),
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(''),
theme: themeType,
});

View File

@@ -1,10 +1,10 @@
import { coerce } from '@/common/coerce';
import { actionType } from '@/common/coerce';
import { z } from 'zod';
export const themeType = z.object(
{
dark: z.record(coerce.string(), coerce.string()),
light: z.record(coerce.string(), coerce.string()),
dark: z.record(actionType.string(), actionType.string()),
light: z.record(actionType.string(), actionType.string()),
}
).default({
dark: {