feat(admin): 添加博主显示开关功能

在评论系统设置中添加管理员显示开关,允许控制博主标识的显示
更新前后端接口以支持新功能,包括数据库存储和界面切换组件
This commit is contained in:
anghunk
2026-01-20 09:31:40 +08:00
parent 456771bae3
commit ebcf814f91
6 changed files with 103 additions and 9 deletions

View File

@@ -37,6 +37,7 @@ export type CommentSettingsResponse = {
adminEmail: string | null;
adminBadge: string | null;
avatarPrefix: string | null;
adminEnabled: boolean;
};
export async function loginAdmin(name: string, password: string): Promise<string> {
@@ -78,6 +79,7 @@ export function saveCommentSettings(data: {
adminEmail?: string;
adminBadge?: string;
avatarPrefix?: string;
adminEnabled?: boolean;
}): Promise<{ message: string }> {
return put<{ message: string }>('/admin/settings/comments', data);
}