Phase C3: Site Settings Refactoring with horizontal sub-tabs and Logo upload

- Replaced vertical card layout with 5 horizontal tabs: 基础设置/Logo设置/邮件配置/短信配置/注册设置
- Added Logo upload tab with drag-drop preview and file upload
- Added Registration Settings tab (allow_register, email/phone verify, default role, welcome message)
- Added logo upload backend endpoint (POST /admin/settings/logo/upload)
- Added modal sub-component CSS classes for dark theme
- Fixed all hardcoded white backgrounds for dark theme
- Added uploadLogo method to adminAPI
This commit is contained in:
qyyfw committed 2026-07-05 19:28:49 +08:00
1 parent 35a8d727e0
commit 5828728f00
4 files changed
+682 -223

No files matched your search

+12 -2
View File
@@ -277,6 +277,7 @@ export const adminAPI = {
getStats: () => get<any>('/admin/dashboard/stats'),
getRecentLogs: () => get<any[]>('/admin/dashboard/recent-logs'),
getRecentAudit: () => get<any[]>('/admin/dashboard/recent-audit'),
getDailyStats: (days?: number) => get<{ days: number; data: Array<{ date: string; tokens: number }> }>(`/admin/dashboard/daily-stats${days ? `?days=${days}` : ''}`),
// 用户管理
getUsers: (params?: any) => {
const sp = new URLSearchParams();
@@ -588,8 +589,16 @@ export const adminAPI = {
getAIAppTemplates: () => get<any>('/admin/apps/templates'),
createAIAppTemplate: (data: any) => post<any>('/admin/apps/templates', data),
createAIAppFromTemplate: (templateId: string, data: any) => post<any>('/admin/apps/apps/from-template/' + templateId, data),
getAIAppCategories: () => get<any>('/admin/apps/categories')
getAIAppCategories: () => get<any>('/admin/apps/categories'),
// Logo 上传
uploadLogo: (formData: FormData) => {
const token = localStorage.getItem('access_token');
return fetch(`/app/api/admin/settings/logo/upload`, {
method: 'POST',
headers: { 'Authorization': `Bearer ${token}` },
body: formData,
}).then(res => res.json());
},
};
@@ -662,4 +671,5 @@ export const evolutionAPI = {
return get<import('@/types').EvolutionReport[]>(`/evolution/reports${qs}`);
},
getReportDetail: (reportId: string) => get<import('@/types').EvolutionReport>(`/evolution/reports/${reportId}`),
};