Adds/updates documentation, assets and implementation for Match3D and puzzle image generation workflows. Key changes: decision logs and pitfalls updated to prefer VectorEngine Gemini for Match3D material sheets and to require edits (multipart) for 1:1 container reference images; guidance added for when to use APIMart vs VectorEngine. .env.example clarified APIMart/Responses config. Many new public assets and PPT visuals added. Code changes across frontend and backend: updated shared contracts, server-rs match3d/puzzle/image-generation handlers, VectorEngine/OpenAI image generation clients, and multiple React components/tests to handle UI/background/container image signing, edits workflow, and puzzle UI background resolution. Added src/services/puzzle-runtime/puzzleUiBackgroundSource.ts and related test updates. Includes notes about multipart HTTP/1.1 requirement and test/verification commands in docs.
2.4 KiB
2.4 KiB
后台创作入口开关操作入口
日期:2026-05-11
背景
创作中心入口配置已经迁移到 SpacetimeDB,前端创作中心与 api-server 路由熔断共用同一份入口配置。为了让运营/管理员可以调整这张开关表,需要在后台提供显式操作入口,而不是只通过数据库表查询或手工 reducer 操作。
后台入口
后台新增导航:
- 名称:入口开关
- hash:
#creation-entry - 页面:
apps/admin-web/src/pages/AdminCreationEntrySwitchPage.tsx
页面能力:
- 读取当前入口开关表。
- 编辑单个入口:
idtitlesubtitlebadgeimageSrcvisibleopensortOrder
- 保存前复用后台写操作确认弹窗。
- 保存后重新用后端返回的配置刷新列表。
API
后台新增受管理员鉴权保护的接口:
GET /admin/api/creation-entry/config
POST /admin/api/creation-entry/config
POST body:
{
"id": "puzzle",
"title": "拼图",
"subtitle": "拼图关卡创作",
"badge": "可创建",
"imageSrc": "/creation-type-references/puzzle.webp",
"visible": true,
"open": true,
"sortOrder": 30
}
响应统一返回当前全量入口列表,方便后台页面直接刷新本地状态。
入库链路
Admin Web
-> api-server /admin/api/creation-entry/config
-> AppState::upsert_creation_entry_type_config
-> spacetime-client procedure upsert_creation_entry_type_config
-> spacetime-module creation_entry_type_config 表
visible=false 会让创作中心不展示对应入口;open=false 会让前端展示锁定态,并让 api-server 熔断对应玩法创作 / 运行态 API。隐藏入口但仍保留既有作品号、广场详情或试玩链路时,应只关闭 visible,不要关闭 open。
当前默认配置中,visual-novel 暂时从创作页隐藏并关闭入口,默认种子为 visible=false、open=false。如果后续只想恢复已发布作品试玩而不恢复创作入口,需要先明确 API 熔断范围,再通过后台入口开关调整,不能在前端硬编码恢复模板 Tab。
注意
- 前端后台页面只做管理表单,不成为配置事实源。
src/config/newWorkEntryConfig.ts不应恢复。- SpacetimeDB client bindings 当前新增了对应临时 binding 文件;后续执行标准 bindings regenerate 时应覆盖并保持同名 procedure/type。