feat: roughly admin info struct and interface

This commit is contained in:
shinya
2025-07-05 00:29:43 +08:00
parent 44ce8241c6
commit a4c56e2cdd
15 changed files with 1305 additions and 53 deletions

30
src/lib/admin.types.ts Normal file
View File

@@ -0,0 +1,30 @@
export interface AdminConfig {
SiteConfig: {
SiteName: string;
Announcement: string;
SearchDownstreamMaxPage: number;
SiteInterfaceCacheTime: number;
SearchResultDefaultAggregate: boolean;
};
UserConfig: {
AllowRegister: boolean;
Users: {
username: string;
role: 'user' | 'admin' | 'owner';
banned?: boolean;
}[];
};
SourceConfig: {
key: string;
name: string;
api: string;
detail?: string;
from: 'config' | 'custom';
disabled?: boolean;
}[];
}
export interface AdminConfigResult {
Role: 'owner' | 'admin';
Config: AdminConfig;
}