进度条图标自定义

This commit is contained in:
mtvpls
2026-02-21 02:13:50 +08:00
parent 5d2f944346
commit f02dce869c
7 changed files with 273 additions and 1 deletions

View File

@@ -36,6 +36,9 @@ export async function POST(request: NextRequest) {
cacheMinutes,
loginBackgroundImage,
registerBackgroundImage,
progressThumbType,
progressThumbPresetId,
progressThumbCustomUrl,
} = body as {
enableBuiltInTheme: boolean;
builtInTheme: string;
@@ -44,6 +47,9 @@ export async function POST(request: NextRequest) {
cacheMinutes: number;
loginBackgroundImage?: string;
registerBackgroundImage?: string;
progressThumbType?: 'default' | 'preset' | 'custom';
progressThumbPresetId?: string;
progressThumbCustomUrl?: string;
};
// 参数校验
@@ -118,6 +124,9 @@ export async function POST(request: NextRequest) {
cacheVersion: cssChanged ? currentVersion + 1 : currentVersion,
loginBackgroundImage: loginBackgroundImage?.trim() || undefined,
registerBackgroundImage: registerBackgroundImage?.trim() || undefined,
progressThumbType: progressThumbType || 'default',
progressThumbPresetId: progressThumbPresetId?.trim() || undefined,
progressThumbCustomUrl: progressThumbCustomUrl?.trim() || undefined,
};
// 写入数据库

View File

@@ -50,6 +50,9 @@ export async function GET(request: NextRequest) {
OIDCButtonText: config.SiteConfig.OIDCButtonText || '',
loginBackgroundImage: config.ThemeConfig?.loginBackgroundImage || '',
registerBackgroundImage: config.ThemeConfig?.registerBackgroundImage || '',
progressThumbType: config.ThemeConfig?.progressThumbType || 'default',
progressThumbPresetId: config.ThemeConfig?.progressThumbPresetId || '',
progressThumbCustomUrl: config.ThemeConfig?.progressThumbCustomUrl || '',
// AI配置只暴露功能开关不暴露API密钥等敏感信息
AIEnabled: config.AIConfig?.Enabled || false,
AIEnableHomepageEntry: config.AIConfig?.EnableHomepageEntry || false,