feat: 让模板声明信任内容编辑语义
This commit is contained in:
1 parent
6d7fae95b3
commit
e3a4074d8e
12 files changed
+159
-13
No files matched your search
@@ -0,0 +1,2 @@
|
||||
UPDATE "TrustContent" SET "type" = 'credential' WHERE "type" IN ('profile', 'experience');
|
||||
UPDATE "TrustContent" SET "type" = 'case' WHERE "type" IN ('portfolio', 'testimonial');
|
||||
@@ -184,6 +184,7 @@ class AdminWorkspaceController {
|
||||
displayName: manifest.displayName,
|
||||
admin: manifest.admin,
|
||||
assetSlots: manifest.assetSlots,
|
||||
trustContentTypes: manifest.trustContentTypes ?? [],
|
||||
}
|
||||
: null,
|
||||
};
|
||||
|
||||
@@ -826,6 +826,8 @@ test("admin can install a template and public workspace exposes enabled configur
|
||||
assert.equal(JSON.parse(workspace.body).fields.length, 5);
|
||||
const templateContent = JSON.parse(workspace.body).templateContent;
|
||||
assert.equal(templateContent.displayName, "阿成校园餐");
|
||||
assert.ok(templateContent.trustContentTypes.some((item) => item.type === "schedule"));
|
||||
assert.ok(templateContent.trustContentTypes.some((item) => item.label === "出摊与营业安排"));
|
||||
assert.ok(templateContent.admin.sections.some((section) => section.title === "首页出摊信息"));
|
||||
assert.ok(
|
||||
templateContent.admin.sections
|
||||
|
||||
Reference in new issue
Block a user