Update App.jsx via upload script - 2026-11-10 17:52:35
This commit is contained in:
parent
586553713c
commit
d9acf1f049
23
App.jsx
23
App.jsx
|
|
@ -253,7 +253,7 @@ const COUNTRIES = [
|
|||
|
||||
const COUNTRY_BY_NAME = Object.fromEntries(COUNTRIES.map(c => [c.name, c]));
|
||||
|
||||
const SAVE_KEY_LABEL = { 'crm:customers': '客户', 'crm:products': '产品', 'crm:quotes': '报价单', 'crm:sellerProfiles': '卖方信息', 'crm:certifications': '授权', 'crm:productCategories': '产品分组', 'crm:packingLists': '箱单', 'crm:catalogDocs': '产品目录', 'crm:jmsLines': 'Just My Socks', 'crm:backPanelTemplates': '后板图模板', 'crm:suppliers': '供应商', 'crm:webDetailTemplates': '模板', 'crm:webAssets': '网站图片', 'crm:webNews': '近期动态', 'crm:webPackSpecs': 'Packing List' };
|
||||
const SAVE_KEY_LABEL = { 'crm:customers': '客户', 'crm:products': '产品', 'crm:quotes': '报价单', 'crm:sellerProfiles': '卖方信息', 'crm:certifications': '授权', 'crm:productCategories': '产品分组', 'crm:packingLists': '箱单', 'crm:catalogDocs': '产品目录', 'crm:jmsLines': 'Just My Socks', 'crm:backPanelTemplates': '后板图模板', 'crm:suppliers': '供应商', 'crm:webDetailTemplates': '模板', 'crm:webAssets': '网站图片', 'crm:webNews': '新闻 / 动态', 'crm:webPackSpecs': 'Packing List' };
|
||||
const STORAGE_KEYS = { customers: 'crm:customers', products: 'crm:products', quotes: 'crm:quotes', sellerProfiles: 'crm:sellerProfiles', certifications: 'crm:certifications', productCategories: 'crm:productCategories', packingLists: 'crm:packingLists', catalogDocs: 'crm:catalogDocs', jmsLines: 'crm:jmsLines', backPanelTemplates: 'crm:backPanelTemplates', suppliers: 'crm:suppliers', webDetailTemplates: 'crm:webDetailTemplates', webAssets: 'crm:webAssets', webNews: 'crm:webNews', webPackSpecs: 'crm:webPackSpecs', orders: 'crm:orders' };
|
||||
|
||||
const blankCustomer = () => ({
|
||||
|
|
@ -2435,7 +2435,9 @@ const NAV_GROUPS = [
|
|||
{ id: 'templates', label: '模板管理', icon: Layers },
|
||||
{ id: 'packspecs', label: 'Packing List', icon: Boxes },
|
||||
] },
|
||||
{ id: 'website', label: '网站管理', icon: Globe },
|
||||
{ id: 'website', label: '网站管理', icon: Globe, children: [
|
||||
{ id: 'webnews', label: '新闻 / 动态', icon: FileText },
|
||||
] },
|
||||
{ id: 'backpanel', label: '后板图模板', icon: Settings2 },
|
||||
{ id: 'mic-upload', label: 'MIC产品上传', icon: UploadCloud },
|
||||
{ id: 'image-tool', label: '图像处理', icon: ImageIcon },
|
||||
|
|
@ -4273,8 +4275,9 @@ function MainApp({ username, onLogout }) {
|
|||
}} />
|
||||
)}
|
||||
|
||||
{view === 'website' && (
|
||||
{(view === 'website' || view === 'webnews') && (
|
||||
<WebsiteManager
|
||||
section={view === 'webnews' ? 'news' : 'assets'}
|
||||
assets={webAssets} setAssets={setWebAssets}
|
||||
news={webNews} setNews={setWebNews}
|
||||
templates={webDetailTemplates} setTemplates={setWebDetailTemplates}
|
||||
|
|
@ -7033,21 +7036,17 @@ const SITE_SLOT_GROUPS = [
|
|||
];
|
||||
const SITE_PUBLIC_BASE = 'https://ups-china.com';
|
||||
|
||||
function WebsiteManager({ assets, setAssets, news, setNews, templates, setTemplates, products, onNotify }) {
|
||||
const [tab, setTab] = useState('assets');
|
||||
// 网站管理:图片素材(主页面);新闻 / 动态是左侧菜单"网站管理"下面的子菜单
|
||||
function WebsiteManager({ section = 'assets', assets, setAssets, news, setNews, templates, setTemplates, products, onNotify }) {
|
||||
return (
|
||||
<div className="panel">
|
||||
<div className="panel-header" style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', gap: 10, flexWrap: 'wrap' }}>
|
||||
<div style={{ display: 'flex', gap: 6, flexWrap: 'wrap' }}>
|
||||
{[['assets', '图片素材'], ['news', '新闻 / 动态']].map(([k, label]) => (
|
||||
<button key={k} type="button" className={`btn btn-sm${tab === k ? ' btn-primary' : ''}`} onClick={() => setTab(k)}>{label}</button>
|
||||
))}
|
||||
</div>
|
||||
<div style={{ fontWeight: 600 }}>{section === 'news' ? '新闻 / 动态' : '图片素材'}</div>
|
||||
<div style={{ display: 'flex', gap: 8, alignItems: 'center' }}><SiteDeployButton /></div>
|
||||
</div>
|
||||
<div className="panel-body" style={{ padding: 18 }}>
|
||||
{tab === 'assets' && <SiteAssetsEditor assets={assets} setAssets={setAssets} onNotify={onNotify} />}
|
||||
{tab === 'news' && <SiteNewsEditor news={news} setNews={setNews} onNotify={onNotify} />}
|
||||
{section === 'assets' && <SiteAssetsEditor assets={assets} setAssets={setAssets} onNotify={onNotify} />}
|
||||
{section === 'news' && <SiteNewsEditor news={news} setNews={setNews} onNotify={onNotify} />}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in New Issue