feat: move creation entry config to database

This commit is contained in:
2026-05-11 11:23:24 +08:00
parent 7f2461313e
commit 793d82cccd
37 changed files with 1458 additions and 204 deletions

View File

@@ -0,0 +1,35 @@
import { requestJson } from './apiClient';
export type CreationEntryTypeConfig = {
id: string;
title: string;
subtitle: string;
badge: string;
imageSrc: string;
visible: boolean;
open: boolean;
sortOrder: number;
updatedAtMicros: number;
};
export type CreationEntryConfig = {
startCard: {
title: string;
description: string;
idleBadge: string;
busyBadge: string;
};
typeModal: {
title: string;
description: string;
};
creationTypes: CreationEntryTypeConfig[];
};
export async function fetchCreationEntryConfig(): Promise<CreationEntryConfig> {
return requestJson<CreationEntryConfig>(
'/api/creation-entry/config',
{ method: 'GET' },
'读取创作入口配置失败',
);
}