feat: add media center and email campaign schema
This commit is contained in:
1 parent
81e990ea39
commit
74504cda1b
10 files changed
+60
-9
No files matched your search
@@ -7,6 +7,7 @@ import {
|
||||
FileText,
|
||||
FolderTree,
|
||||
HelpCircle,
|
||||
Image,
|
||||
Mail,
|
||||
Newspaper,
|
||||
PanelsTopLeft,
|
||||
@@ -25,11 +26,12 @@ import InquirySettingsPanel from "./InquirySettingsPanel";
|
||||
import PageEditor from "./PageEditor";
|
||||
import DecorationEditor from "./DecorationEditor";
|
||||
import CustomCodeManager from "./CustomCodeManager";
|
||||
import MediaCenter from "./MediaCenter";
|
||||
|
||||
const API = "http://localhost:8081/api/admin/v1";
|
||||
const SITE_WEB = "http://localhost:5174";
|
||||
const SITE = "SIT0000000000001";
|
||||
type Section = "products" | "product-categories" | "NEWS" | "NEWS-categories" | "CASE" | "CASE-categories" | "HELP" | "HELP-categories" | "pages" | "decoration" | "custom-code" | "inquiries" | "inquiry-settings";
|
||||
type Section = "products" | "product-categories" | "NEWS" | "NEWS-categories" | "CASE" | "CASE-categories" | "HELP" | "HELP-categories" | "pages" | "decoration" | "custom-code" | "media" | "inquiries" | "inquiry-settings";
|
||||
type EditorialSection = "NEWS" | "CASE" | "HELP";
|
||||
type ContentEditorState = { contentType: EditorialSection; contentCode: string };
|
||||
type Item = {
|
||||
@@ -66,12 +68,13 @@ const menus = [
|
||||
{ key: "pages" as Section, label: "页面", icon: FileText },
|
||||
{ key: "decoration" as Section, label: "店铺装修", icon: Paintbrush },
|
||||
{ key: "custom-code" as Section, label: "自定义代码", icon: Code2 },
|
||||
{ key: "media" as Section, label: "素材中心", icon: Image },
|
||||
{ key: "inquiries" as Section, label: "询盘", icon: Mail },
|
||||
];
|
||||
const sectionLabels: Record<Section, string> = {
|
||||
products: "产品", "product-categories": "产品分类", NEWS: "新闻", "NEWS-categories": "新闻分类",
|
||||
CASE: "案例", "CASE-categories": "案例分类", HELP: "帮助", "HELP-categories": "帮助分类",
|
||||
pages: "页面", decoration: "店铺装修", "custom-code": "自定义代码", inquiries: "询盘", "inquiry-settings": "询盘设置",
|
||||
pages: "页面", decoration: "店铺装修", "custom-code": "自定义代码", media: "素材中心", inquiries: "询盘", "inquiry-settings": "询盘设置",
|
||||
};
|
||||
const statusLabels: Record<string, string> = { DRAFT: "草稿", PUBLISHED: "已上架", OFFLINE: "已下架" };
|
||||
|
||||
@@ -314,7 +317,7 @@ function App() {
|
||||
</div>
|
||||
</aside>
|
||||
<main>
|
||||
{section === "decoration" ? <DecorationEditor onBack={() => navigateSection("pages")}/> : section === "custom-code" ? <CustomCodeManager/> : editingProduct !== null ? <ProductEditor productCode={editingProduct || undefined} onBack={closeProductEditor} /> : editingContent !== null ? <ContentEditor contentType={editingContent.contentType} contentCode={editingContent.contentCode || undefined} onBack={closeContentEditor} /> : editingPage !== null ? <PageEditor pageCode={editingPage || undefined} onBack={closePageEditor}/> : <>
|
||||
{section === "decoration" ? <DecorationEditor onBack={() => navigateSection("pages")}/> : section === "custom-code" ? <CustomCodeManager/> : section === "media" ? <MediaCenter/> : editingProduct !== null ? <ProductEditor productCode={editingProduct || undefined} onBack={closeProductEditor} /> : editingContent !== null ? <ContentEditor contentType={editingContent.contentType} contentCode={editingContent.contentCode || undefined} onBack={closeContentEditor} /> : editingPage !== null ? <PageEditor pageCode={editingPage || undefined} onBack={closePageEditor}/> : <>
|
||||
{section.endsWith("-categories") ? <CategoryManager contentType={section === "NEWS-categories" ? "NEWS" : section === "CASE-categories" ? "CASE" : section === "HELP-categories" ? "HELP" : undefined}/> : <>
|
||||
<header>
|
||||
<div>
|
||||
|
||||
Reference in new issue
Block a user