feat(admin): 新后台信息架构(分组管理/内容/侧边栏/卡片)

- /admin 切换为 AdminNext:分组管理(多层树、格式、增删改)、内容(选分组新增/编辑/删除条目)
- 侧边栏按分组树勾选,存入 settings.sidebar.tree_hidden
- 首页卡片:新建卡片、勾选分组(可混合格式)、每组条数
- 新增 manage.ts 客户端;旧 AdminPage 暂留作回退
- 测试 59 passed;Playwright 跑通 建根/子分组 → 加条目 → 侧栏勾选 → 混合卡片
This commit is contained in:
2026-10-30 20:40:31 +08:00
parent 6340e435e9
commit 2ccfb9b623
6 changed files with 1524 additions and 2 deletions
+6
View File
@@ -47,6 +47,10 @@ export type SiteSettings = {
shown_groups: string[]
/** 每个分区下的分组顺序:分区 id → 分组 id 列表 */
group_order: Record<string, string[]>
/** 新模型:侧栏隐藏的分组 key */
tree_hidden: string[]
/** 新模型:每级分组的顺序,键为父分组 key(根级用空串) */
tree_order: Record<string, string[]>
}
sections: SectionSettings
profile: ProfileSettings
@@ -85,6 +89,8 @@ export function defaultSettings(): SiteSettings {
hidden_groups: [],
shown_groups: [],
group_order: {},
tree_hidden: [],
tree_order: {},
},
sections: { hidden: [], order: [], titles: {}, limits: {} },
profile: {