feat: 分离模板演示数据并校验预览资源
This commit is contained in:
1 parent
6edde5a8d6
commit
b60174885e
31 files changed
+1785
-69
No files matched your search
@@ -249,8 +249,12 @@ export function TemplateManagementPage() {
|
||||
renderItem={(item) => (
|
||||
<List.Item>
|
||||
<List.Item.Meta
|
||||
title={`${item.action} · ${item.actor.displayName}`}
|
||||
description={`${item.fromStatus ?? "-"} -> ${item.toStatus ?? "-"} · ${new Date(item.createdAt).toLocaleString()}`}
|
||||
title={`${item.action === "previewed" ? "预览模板" : item.action} · ${item.actor.displayName}`}
|
||||
description={
|
||||
item.action === "previewed"
|
||||
? `行业 ${typeof item.metadata?.industry === "string" ? item.metadata.industry : "-"} · ${new Date(item.createdAt).toLocaleString()}`
|
||||
: `${item.fromStatus ?? "-"} -> ${item.toStatus ?? "-"} · ${new Date(item.createdAt).toLocaleString()}`
|
||||
}
|
||||
/>
|
||||
</List.Item>
|
||||
)}
|
||||
@@ -260,7 +264,12 @@ export function TemplateManagementPage() {
|
||||
{previewVersion ? (
|
||||
<TemplatePackagePreviewModal
|
||||
version={previewVersion}
|
||||
onClose={() => setPreviewVersion(null)}
|
||||
onClose={() => {
|
||||
setPreviewVersion(null);
|
||||
void queryClient.invalidateQueries({
|
||||
queryKey: ["admin-template-package-audit", previewVersion.id],
|
||||
});
|
||||
}}
|
||||
/>
|
||||
) : null}
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user