bug修复
This commit is contained in:
1 parent
7fed799118
commit
eae135ec88
37 files changed
+866
-27
No files matched your search
@@ -46,6 +46,12 @@ type Section = {
|
||||
visible: boolean;
|
||||
background: string;
|
||||
textColor: string;
|
||||
/** 是否在商品摘要区域展示产品信息。 */
|
||||
showProductInformation: boolean;
|
||||
/** 产品信息区英文标题。 */
|
||||
productInformationTitle: string;
|
||||
/** 产品信息区最多展示的自定义属性数量。 */
|
||||
productInformationLimit: number;
|
||||
};
|
||||
type Schema = {
|
||||
global: {
|
||||
@@ -122,6 +128,9 @@ function createSection(type: SectionType): Section {
|
||||
visible: true,
|
||||
background: type === "HEADER" || type === "FOOTER" ? "#101a25" : "#ffffff",
|
||||
textColor: type === "HEADER" || type === "FOOTER" ? "#ffffff" : "#17211f",
|
||||
showProductInformation: true,
|
||||
productInformationTitle: "Product information",
|
||||
productInformationLimit: 8,
|
||||
};
|
||||
}
|
||||
/** 为产品详情页提供可直接发布的基础组件结构。 */
|
||||
@@ -547,7 +556,26 @@ function PreviewSection({
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
if(item.type==="PRODUCT_DETAIL")return <section className="pv-product-detail" style={style} onClick={onSelect}><div className="pv-product-image">{product?.coverMediaUrl?<img src={product.coverMediaUrl} alt={product.productName}/>:<ImageIcon size={44}/>}</div><div><span>PRODUCT</span><h1>{product?.productName||"Product title"}</h1>{product?.model&&<small>Model <strong>{product.model}</strong></small>}<p>{product?.summary||"Product summary and key selling points will be loaded from the selected product."}</p><button style={{background:primary}}>Request a quote</button></div>{product?.attributes?.length?<dl>{product.attributes.slice(0,4).map(attribute=><div key={attribute.name}><dt>{attribute.name}</dt><dd>{attribute.value} {attribute.unit}</dd></div>)}</dl>:null}</section>;
|
||||
if(item.type==="PRODUCT_DETAIL"){
|
||||
const attributes=product?.attributes?.slice(0,item.productInformationLimit||8)||[];
|
||||
const showInformation=item.showProductInformation!==false&&(Boolean(product?.model)||attributes.length>0);
|
||||
return <section className="pv-product-detail" style={style} onClick={onSelect}>
|
||||
<div className="pv-product-image">{product?.coverMediaUrl?<img src={product.coverMediaUrl} alt={product.productName}/>:<ImageIcon size={44}/>}</div>
|
||||
<div className="pv-product-summary">
|
||||
<span>PRODUCT</span>
|
||||
<h1>{product?.productName||"Product title"}</h1>
|
||||
<p>{product?.summary||"Product summary and key selling points will be loaded from the selected product."}</p>
|
||||
{showInformation&&<div className="pv-product-information">
|
||||
<h2>{item.productInformationTitle||"Product information"}</h2>
|
||||
<dl>
|
||||
{product?.model&&<div><dt>Model</dt><dd>{product.model}</dd></div>}
|
||||
{attributes.map(attribute=><div key={attribute.name}><dt>{attribute.name}</dt><dd>{attribute.value} {attribute.unit}</dd></div>)}
|
||||
</dl>
|
||||
</div>}
|
||||
<button style={{background:primary}}>Request a quote</button>
|
||||
</div>
|
||||
</section>;
|
||||
}
|
||||
if (item.type === "INQUIRY")
|
||||
return (
|
||||
<section className="pv-inquiry" style={style} onClick={onSelect}>
|
||||
@@ -721,6 +749,35 @@ function SectionSettings({
|
||||
</select>
|
||||
</Field>
|
||||
)}
|
||||
{item.type === "PRODUCT_DETAIL" && (
|
||||
<>
|
||||
<label className="check-line">
|
||||
<input
|
||||
type="checkbox"
|
||||
checked={item.showProductInformation !== false}
|
||||
onChange={(e) => onChange({ showProductInformation: e.target.checked })}
|
||||
/>
|
||||
展示产品信息
|
||||
</label>
|
||||
<Field label="产品信息英文标题">
|
||||
<input
|
||||
value={item.productInformationTitle || "Product information"}
|
||||
onChange={(e) => onChange({ productInformationTitle: e.target.value })}
|
||||
disabled={item.showProductInformation === false}
|
||||
/>
|
||||
</Field>
|
||||
<Field label="最多展示属性数">
|
||||
<input
|
||||
type="number"
|
||||
min="1"
|
||||
max="20"
|
||||
value={item.productInformationLimit || 8}
|
||||
onChange={(e) => onChange({ productInformationLimit: Number(e.target.value) })}
|
||||
disabled={item.showProductInformation === false}
|
||||
/>
|
||||
</Field>
|
||||
</>
|
||||
)}
|
||||
{["PRODUCTS", "CONTENT"].includes(item.type) && (
|
||||
<Field label="展示数量">
|
||||
<input
|
||||
|
||||
@@ -1,23 +1,39 @@
|
||||
import { FormEvent, useEffect, useState } from "react";
|
||||
import { KeyRound, LogOut, Save, Store, UserRound } from "lucide-react";
|
||||
import { KeyRound, LogOut, Plus, Save, Share2, Store, Trash2, UserRound } from "lucide-react";
|
||||
import { apiPost } from "./api";
|
||||
import type { Account } from "./LoginPage";
|
||||
|
||||
type StoreProfile = { siteCode: string; storeName: string; description: string; industry: string };
|
||||
type SocialChannel = { platform: string; displayName: string; profileUrl: string; shareEnabled: boolean; floatingEnabled: boolean; enabled: boolean; sortNo: number };
|
||||
const SOCIAL_PLATFORMS = ["FACEBOOK", "X", "LINKEDIN", "YOUTUBE", "INSTAGRAM", "WHATSAPP", "PINTEREST", "TIKTOK", "LINE", "TUMBLR", "EMAIL"];
|
||||
|
||||
export default function SettingsPage({ account, onAccount, onLogout }: { account: Account; onAccount: (value: Account) => void; onLogout: () => void }) {
|
||||
const [store, setStore] = useState<StoreProfile>({ siteCode: account.siteCode, storeName: "", description: "", industry: "" });
|
||||
const [profile, setProfile] = useState({ username: account.username, displayName: account.displayName });
|
||||
const [password, setPassword] = useState({ currentPassword: "", newPassword: "", confirmPassword: "" });
|
||||
const [socialChannels, setSocialChannels] = useState<SocialChannel[]>([]);
|
||||
const [message, setMessage] = useState("");
|
||||
const [error, setError] = useState("");
|
||||
|
||||
useEffect(() => { apiPost<StoreProfile>("/store/detail", { siteCode: account.siteCode }).then(setStore).catch(cause => setError(cause instanceof Error ? cause.message : "加载失败")); }, [account.siteCode]);
|
||||
useEffect(() => {
|
||||
apiPost<StoreProfile>("/store/detail", { siteCode: account.siteCode }).then(setStore).catch(cause => setError(cause instanceof Error ? cause.message : "加载失败"));
|
||||
apiPost<{ items: SocialChannel[] }>("/social-channels/list", { siteCode: account.siteCode }).then(data => setSocialChannels(data.items || [])).catch(cause => setError(cause instanceof Error ? cause.message : "社媒渠道加载失败"));
|
||||
}, [account.siteCode]);
|
||||
const run = async (operation: () => Promise<void>, success: string) => { try { setError(""); setMessage(""); await operation(); setMessage(success); } catch (cause) { setError(cause instanceof Error ? cause.message : "操作失败"); } };
|
||||
const saveStore = (event: FormEvent) => { event.preventDefault(); void run(async () => setStore(await apiPost("/store/save", store)), "店铺信息已保存"); };
|
||||
const saveProfile = (event: FormEvent) => { event.preventDefault(); void run(async () => onAccount(await apiPost("/auth/account", profile)), "账户资料已更新"); };
|
||||
const savePassword = (event: FormEvent) => { event.preventDefault(); void run(async () => { await apiPost("/auth/password", password); setPassword({ currentPassword: "", newPassword: "", confirmPassword: "" }); }, "密码已修改"); };
|
||||
const logout = () => void run(async () => { await apiPost("/auth/logout"); onLogout(); }, "");
|
||||
/** 新增一个尚未使用的平台渠道。 */
|
||||
const addSocialChannel = () => {
|
||||
const platform = SOCIAL_PLATFORMS.find(item => !socialChannels.some(channel => channel.platform === item));
|
||||
if (!platform) { setError("所有支持的社媒平台均已配置"); return; }
|
||||
setSocialChannels([...socialChannels, { platform, displayName: platform === "X" ? "X" : platform.charAt(0) + platform.slice(1).toLowerCase(), profileUrl: "", shareEnabled: true, floatingEnabled: false, enabled: true, sortNo: (socialChannels.length + 1) * 10 }]);
|
||||
};
|
||||
/** 更新指定社媒渠道。 */
|
||||
const updateSocialChannel = (index: number, patch: Partial<SocialChannel>) => setSocialChannels(current => current.map((item, itemIndex) => itemIndex === index ? { ...item, ...patch } : item));
|
||||
/** 保存整组社媒渠道配置。 */
|
||||
const saveSocialChannels = (event: FormEvent) => { event.preventDefault(); void run(async () => { await apiPost("/social-channels/save", { siteCode: account.siteCode, items: socialChannels }); }, "社媒渠道已保存"); };
|
||||
|
||||
return <div className="account-settings">
|
||||
<header><div><h1>系统设置</h1><p>维护店铺资料、登录账户和密码。</p></div><button className="secondary" onClick={logout}><LogOut size={17}/>退出登录</button></header>
|
||||
@@ -29,5 +45,21 @@ export default function SettingsPage({ account, onAccount, onLogout }: { account
|
||||
<form className="profile-card" onSubmit={savePassword}><div className="profile-card-title"><KeyRound/><div><h2>修改密码</h2><p>新密码需与当前密码不同。</p></div></div><label><span>当前密码</span><input required type="password" autoComplete="current-password" value={password.currentPassword} onChange={event => setPassword({ ...password, currentPassword: event.target.value })}/></label><label><span>新密码</span><input required type="password" minLength={8} maxLength={64} autoComplete="new-password" value={password.newPassword} onChange={event => setPassword({ ...password, newPassword: event.target.value })}/></label><label><span>确认新密码</span><input required type="password" minLength={8} maxLength={64} autoComplete="new-password" value={password.confirmPassword} onChange={event => setPassword({ ...password, confirmPassword: event.target.value })}/></label><div className="profile-actions"><button className="primary"><KeyRound size={17}/>修改密码</button></div></form>
|
||||
</div>
|
||||
</div>
|
||||
<form className="profile-card social-settings-card" onSubmit={saveSocialChannels}>
|
||||
<div className="profile-card-title"><Share2/><div><h2>社媒渠道</h2><p>配置产品分享入口和全站右侧悬浮联系渠道。</p></div><button type="button" className="social-add" onClick={addSocialChannel}><Plus size={16}/>添加渠道</button></div>
|
||||
<div className="social-channel-head"><span>平台</span><span>展示名称</span><span>主页或联系地址</span><span>展示位置</span><span>排序</span><span>操作</span></div>
|
||||
<div className="social-channel-list">
|
||||
{socialChannels.length === 0 && <div className="social-channel-empty">尚未配置社媒渠道</div>}
|
||||
{socialChannels.map((channel, index) => <div className="social-channel-row" key={`${channel.platform}-${index}`}>
|
||||
<select value={channel.platform} onChange={event => updateSocialChannel(index, { platform: event.target.value })}>{SOCIAL_PLATFORMS.map(platform => <option key={platform} value={platform} disabled={socialChannels.some((item, itemIndex) => itemIndex !== index && item.platform === platform)}>{platform}</option>)}</select>
|
||||
<input required maxLength={100} value={channel.displayName} onChange={event => updateSocialChannel(index, { displayName: event.target.value })}/>
|
||||
<input required maxLength={1000} type={channel.platform === "EMAIL" ? "email" : "url"} placeholder={channel.platform === "EMAIL" ? "sales@example.com" : "https://..."} value={channel.profileUrl} onChange={event => updateSocialChannel(index, { profileUrl: event.target.value })}/>
|
||||
<div className="social-channel-flags"><label><input type="checkbox" checked={channel.shareEnabled} onChange={event => updateSocialChannel(index, { shareEnabled: event.target.checked })}/>产品分享</label><label><input type="checkbox" checked={channel.floatingEnabled} onChange={event => updateSocialChannel(index, { floatingEnabled: event.target.checked })}/>右侧悬浮</label><label><input type="checkbox" checked={channel.enabled} onChange={event => updateSocialChannel(index, { enabled: event.target.checked })}/>启用</label></div>
|
||||
<input className="social-sort" type="number" min={0} max={9999} value={channel.sortNo} onChange={event => updateSocialChannel(index, { sortNo: Number(event.target.value) })}/>
|
||||
<button type="button" className="social-delete" title="删除渠道" onClick={() => setSocialChannels(current => current.filter((_, itemIndex) => itemIndex !== index))}><Trash2 size={17}/></button>
|
||||
</div>)}
|
||||
</div>
|
||||
<div className="profile-actions"><button className="primary"><Save size={17}/>保存社媒渠道</button></div>
|
||||
</form>
|
||||
</div>;
|
||||
}
|
||||
@@ -427,6 +427,7 @@ header p {
|
||||
.auth-loading{min-height:100vh;display:flex;align-items:center;justify-content:center;gap:12px;color:#66737d;background:#f4f6f8}.auth-spinner{width:24px;height:24px;border:2px solid #d4ddda;border-top-color:#176b5b;border-radius:50%;animation:auth-spin .8s linear infinite}@keyframes auth-spin{to{transform:rotate(360deg)}}
|
||||
.login-page{min-height:100vh;display:grid;place-items:center;padding:24px;background:#eef2f3}.login-panel{width:min(430px,100%);background:#fff;border:1px solid #dfe5e9;border-radius:8px;padding:38px;box-shadow:0 18px 48px rgba(19,37,45,.1)}.login-brand{display:flex;align-items:center;gap:12px;margin-bottom:38px}.login-brand>span{width:48px;height:48px;border-radius:7px;background:#efbd43;display:grid;place-items:center;color:#13202b;font-size:24px;font-weight:700}.login-brand>div{display:grid}.login-brand strong{font-size:23px}.login-brand small{color:#77858e}.login-copy h1{font-size:26px;margin:0 0 9px}.login-copy p{margin:0 0 28px;color:#74818a;line-height:1.6}.login-panel form{display:grid;gap:18px}.login-panel label{display:grid;gap:8px}.login-panel label>span{font-size:13px;font-weight:600}.login-input{height:48px;border:1px solid #d6dde2;border-radius:5px;display:flex;align-items:center;padding:0 13px;gap:10px;color:#7b878f}.login-input:focus-within{border-color:#176b5b;box-shadow:0 0 0 3px rgba(23,107,91,.09)}.login-input input{border:0;outline:0;min-width:0;flex:1;font:inherit}.login-input button{border:0;background:transparent;padding:4px;color:#65727b;display:grid;place-items:center}.login-error{padding:10px 12px;border:1px solid #f0c9c9;background:#fff6f6;color:#a33b3b;border-radius:5px;font-size:13px}.login-submit{height:48px;border:0;border-radius:5px;background:#176b5b;color:#fff;font:inherit;font-weight:600;cursor:pointer}.login-submit:disabled{opacity:.55;cursor:not-allowed}
|
||||
.account-settings{max-width:1500px;margin:0 auto}.account-settings>header{display:flex;align-items:flex-start;justify-content:space-between;margin-bottom:22px}.account-settings>header h1{margin:0 0 6px;font-size:28px}.account-settings>header p{margin:0;color:#71808a}.account-settings>header button{display:flex;align-items:center;gap:7px;border:1px solid #d8dee3;background:#fff;border-radius:5px;padding:10px 14px}.settings-message{margin-bottom:18px;padding:12px 15px;border:1px solid #bcdcd3;background:#eef8f5;color:#176b5b;border-radius:5px}.settings-message.error{border-color:#efcaca;background:#fff6f6;color:#9c3838}.settings-layout{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(360px,.65fr);gap:20px;align-items:start}.settings-side{display:grid;gap:20px}.profile-card{background:#fff;border:1px solid #dfe5e9;border-radius:6px;padding:24px;display:grid;grid-template-columns:1fr 1fr;gap:18px}.settings-side .profile-card{grid-template-columns:1fr}.profile-card-title{grid-column:1/-1;display:flex;align-items:flex-start;gap:13px;padding-bottom:18px;border-bottom:1px solid #e8ecef}.profile-card-title>svg{color:#176b5b}.profile-card-title h2{font-size:18px;margin:0 0 5px}.profile-card-title p{font-size:13px;color:#77848d;margin:0;line-height:1.5}.profile-card label{display:grid;gap:7px}.profile-card label>span{font-size:13px;font-weight:600}.profile-card input,.profile-card textarea{border:1px solid #d8dee3;border-radius:5px;padding:11px 12px;font:inherit;resize:vertical}.profile-card .wide,.profile-actions{grid-column:1/-1}.profile-actions{display:flex;justify-content:flex-end;padding-top:4px}.profile-actions button{border:0;border-radius:5px;background:#176b5b;color:#fff;padding:10px 15px;display:flex;align-items:center;gap:7px;font:inherit;cursor:pointer}@media(max-width:1000px){.settings-layout{grid-template-columns:1fr}}@media(max-width:620px){.login-panel{padding:28px 22px}.profile-card{grid-template-columns:1fr}.profile-card .wide,.profile-actions{grid-column:auto}.account-settings>header{gap:14px}.account-settings>header p{display:none}}
|
||||
.social-settings-card{margin-top:20px;display:block}.social-settings-card .profile-card-title{display:flex}.social-settings-card .social-add{margin-left:auto;border:1px solid #d8dee3;background:#fff;color:#176b5b;padding:9px 12px;display:flex;align-items:center;gap:6px;font:inherit;cursor:pointer}.social-channel-head,.social-channel-row{display:grid;grid-template-columns:150px minmax(140px,.7fr) minmax(260px,1.5fr) minmax(270px,1fr) 80px 48px;gap:12px;align-items:center}.social-channel-head{padding:16px 0 10px;color:#78858e;font-size:12px}.social-channel-row{padding:12px 0;border-top:1px solid #edf0f2}.social-channel-row>input,.social-channel-row>select{width:100%;min-width:0;border:1px solid #d8dee3;border-radius:5px;padding:10px 11px;font:inherit}.social-channel-flags{display:flex;gap:12px;flex-wrap:wrap}.social-channel-flags label{display:flex;align-items:center;gap:5px;font-size:12px}.social-channel-flags input{width:16px;height:16px}.social-delete{width:38px;height:38px;border:1px solid #ead2d2;background:#fff;color:#a43b3b;display:grid;place-items:center;cursor:pointer}.social-channel-empty{padding:32px;text-align:center;color:#849099;border-top:1px solid #edf0f2}.social-settings-card .profile-actions{margin-top:16px}@media(max-width:1100px){.social-channel-head{display:none}.social-channel-row{grid-template-columns:1fr 1fr}.social-channel-flags{grid-column:1/-1}.social-delete{justify-self:end}}@media(max-width:620px){.social-settings-card{padding:18px}.social-settings-card .profile-card-title{flex-wrap:wrap}.social-settings-card .social-add{margin-left:31px}.social-channel-row{grid-template-columns:1fr}.social-channel-flags,.social-delete{grid-column:auto}.social-delete{justify-self:end}}
|
||||
|
||||
/* 菜单导航管理 */
|
||||
.navigation-manager,.navigation-editor{max-width:1500px;margin:0 auto}.navigation-manager>header,.navigation-editor>header{align-items:flex-start}.navigation-list,.navigation-base,.navigation-items{background:#fff;border:1px solid #dfe5e9;border-radius:6px;overflow:hidden}.navigation-list-head,.navigation-list-row{display:grid;grid-template-columns:1.1fr 2.2fr .9fr 110px;align-items:center;gap:18px;padding:15px 20px}.navigation-list-head{background:#f7f9fb;color:#6d7983;font-size:12px;border-bottom:1px solid #e5e9ec}.navigation-list-row{min-height:70px;border-bottom:1px solid #edf0f2}.navigation-list-row:last-child{border-bottom:0}.navigation-list-row>span{color:#52616d;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.navigation-list-row>div{display:flex;gap:8px}.navigation-list-row button,.navigation-row-actions button{width:34px;height:34px;border:0;background:transparent;color:#176b5b;display:grid;place-items:center;border-radius:4px;cursor:pointer}.navigation-list-row button:hover,.navigation-row-actions button:hover{background:#eef5f3}.navigation-list-row button.danger,.navigation-row-actions button.danger{color:#b13d3d}.navigation-editor-title{display:flex;align-items:flex-start;gap:12px}.navigation-editor-title .icon-button{width:38px;height:38px;border:1px solid #d6dde2;background:#fff;border-radius:5px;display:grid;place-items:center;cursor:pointer}.navigation-base{padding:22px;display:grid;grid-template-columns:minmax(300px,2fr) minmax(180px,1fr) minmax(180px,1fr);gap:18px;margin-bottom:20px}.navigation-base label{display:grid;gap:7px}.navigation-base label>span{font-size:13px;font-weight:600}.navigation-base input,.navigation-base select,.navigation-item-row input,.navigation-item-row select{height:42px;width:100%;min-width:0;border:1px solid #d7dee3;border-radius:5px;background:#fff;padding:0 12px;font:inherit}.navigation-items-heading{padding:20px 22px;display:flex;justify-content:space-between;align-items:flex-start;border-bottom:1px solid #e6eaed}.navigation-items-heading h2{font-size:18px;margin:0 0 5px}.navigation-items-heading p{margin:0;color:#75818a;font-size:13px}.navigation-items-heading .secondary{height:40px}.navigation-item-head,.navigation-item-row{display:grid;grid-template-columns:minmax(160px,1fr) 190px minmax(260px,1.5fr) 72px 90px;align-items:center;gap:14px;padding:12px 20px}.navigation-item-head{background:#f7f9fb;color:#6d7983;font-size:12px;border-bottom:1px solid #e5e9ec}.navigation-item-row{position:relative;border-bottom:1px solid #edf0f2}.navigation-item-row.child{padding-left:50px;background:#fbfcfd}.navigation-item-row .child-marker{position:absolute;left:24px;color:#87939c}.navigation-row-actions{display:flex;justify-content:flex-end;gap:4px}.switch{display:inline-flex;align-items:center;cursor:pointer}.switch input{position:absolute;opacity:0;pointer-events:none}.switch span{width:40px;height:22px;border-radius:12px;background:#aeb8bf;position:relative;transition:.2s}.switch span:after{content:"";position:absolute;width:18px;height:18px;left:2px;top:2px;background:#fff;border-radius:50%;box-shadow:0 1px 3px #0003;transition:.2s}.switch input:checked+span{background:#176b5b}.switch input:checked+span:after{transform:translateX(18px)}.navigation-items>.empty{min-height:210px}@media(max-width:1050px){.navigation-list-head,.navigation-list-row{grid-template-columns:1fr 1.5fr 110px}.navigation-list-head span:nth-child(3),.navigation-list-row>span:nth-child(3){display:none}.navigation-base{grid-template-columns:1fr 1fr}.navigation-base label:first-child{grid-column:1/-1}.navigation-item-head{display:none}.navigation-item-row,.navigation-item-row.child{grid-template-columns:1fr 1fr;padding:16px}.navigation-item-row.child{padding-left:40px}.navigation-item-row select:nth-of-type(2){grid-column:1/-1}.navigation-row-actions{justify-content:flex-start}}@media(max-width:700px){.navigation-list-head{display:none}.navigation-list-row{grid-template-columns:1fr auto}.navigation-list-row>span{grid-column:1/-1}.navigation-base{grid-template-columns:1fr}.navigation-base label:first-child{grid-column:auto}.navigation-item-row,.navigation-item-row.child{grid-template-columns:1fr;padding:14px}.navigation-item-row select:nth-of-type(2){grid-column:auto}}
|
||||
@@ -439,6 +440,6 @@ header p {
|
||||
.product-cover-section .cover-upload{min-height:140px;grid-template-columns:120px minmax(0,1fr);grid-template-rows:auto auto auto;align-content:center;justify-content:center;column-gap:18px;row-gap:8px;padding:16px 24px}.product-cover-section .cover-upload>svg,.product-cover-section .cover-upload>img{grid-column:1;grid-row:1/-1;justify-self:center}.product-cover-section .cover-upload>img{width:120px;height:120px;object-fit:contain}.product-cover-section .cover-upload label{grid-column:2;grid-row:1;align-self:end}.product-cover-section .cover-upload p{grid-column:2;grid-row:2}.product-cover-section .cover-upload .upload-notice{grid-column:2;grid-row:3}.product-cover-section .cover-upload label,.product-cover-section .cover-upload p,.product-cover-section .cover-upload .upload-notice{justify-self:start;text-align:left}
|
||||
.gallery-upload-button{border:1px solid #d8dee3;border-radius:5px;padding:8px 12px;color:#176b5b;display:inline-flex;align-items:center;gap:6px;cursor:pointer;font-size:13px}.gallery-upload-button.uploading{color:#71808a;cursor:wait}.gallery-upload-button input{display:none}.gallery-help{margin:-8px 0 16px;color:#81908b;font-size:12px}.product-gallery-editor{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:14px}.product-gallery-editor article{border:1px solid #d8dee3;border-radius:5px;overflow:hidden;background:#f8faf9}.product-gallery-editor article>div{position:relative;aspect-ratio:1/1;background:#fff}.product-gallery-editor img{width:100%;height:100%;object-fit:contain}.product-gallery-editor article>div>span{position:absolute;z-index:1;top:7px;left:7px;background:#176b5b;color:#fff;padding:3px 7px;font-size:11px}.product-gallery-editor footer{display:flex;justify-content:center;gap:5px;padding:7px}.product-gallery-editor footer button{width:32px;height:30px;border:1px solid #d8dee3;background:#fff;color:#596873;display:grid;place-items:center;cursor:pointer}.product-gallery-editor footer button:last-child{color:#a43333}.product-gallery-editor footer button:disabled{opacity:.35;cursor:not-allowed}.gallery-empty{min-height:150px;border:1px dashed #bdc8c4;display:grid;place-items:center;align-content:center;gap:8px;color:#81908b;font-size:13px}
|
||||
.specification-row{display:grid;grid-template-columns:minmax(150px,.85fr) minmax(280px,1.65fr) minmax(130px,.7fr) minmax(110px,.55fr) 42px;gap:12px;align-items:end;padding:14px 0;border-top:1px solid #edf0f2}.specification-row label{display:grid;gap:7px;min-width:0}.specification-row label>span{font-size:12px;font-weight:600;color:#53616b}.specification-row input{box-sizing:border-box;border:1px solid #d8dee3;border-radius:5px;padding:10px 12px;font:inherit;width:100%}.specification-row button{height:43px;border:1px solid #ead6d6;background:#fff;color:#a93636;border-radius:5px;display:inline-grid;place-items:center;cursor:pointer}.specification-empty{border:1px dashed #d8dee3;border-radius:5px;padding:26px;text-align:center;color:#81908b;font-size:13px}
|
||||
.pv-product-detail{padding:44px 5%;display:grid;grid-template-columns:minmax(0,1.05fr) minmax(300px,.95fr);gap:34px;align-items:start}.pv-product-image{aspect-ratio:1/1;background:#eef2f0;display:grid;place-items:center;color:#899691;overflow:hidden}.pv-product-image img{width:100%;height:100%;object-fit:contain}.pv-product-detail>div:nth-child(2)>span{font-size:11px;font-weight:800;color:#176b5d}.pv-product-detail h1{font-size:34px;line-height:1.12;margin:12px 0 18px}.pv-product-detail small{display:block;border-block:1px solid #dce2df;padding:10px 0}.pv-product-detail p{line-height:1.65;color:#61706b}.pv-product-detail button{border:0;color:#fff;padding:12px 20px;font-weight:700;margin-top:10px}.pv-product-detail dl{grid-column:1/-1;margin:8px 0 0;border-top:2px solid #203630}.pv-product-detail dl>div{display:flex;justify-content:space-between;padding:10px 0;border-bottom:1px solid #dce2df}.pv-product-detail dt,.pv-product-detail dd{margin:0;font-size:12px}.preview-frame[style*="390px"] .pv-product-detail{grid-template-columns:1fr;padding:28px 20px}.preview-frame[style*="390px"] .pv-product-detail h1{font-size:27px}
|
||||
.pv-product-detail{padding:44px 5%;display:grid;grid-template-columns:minmax(0,1.05fr) minmax(300px,.95fr);gap:34px;align-items:start}.pv-product-image{aspect-ratio:1/1;background:#eef2f0;display:grid;place-items:center;color:#899691;overflow:hidden}.pv-product-image img{width:100%;height:100%;object-fit:contain}.pv-product-summary>span{font-size:11px;font-weight:800;color:#176b5d}.pv-product-detail h1{font-size:34px;line-height:1.12;margin:12px 0 18px}.pv-product-detail p{line-height:1.65;color:#61706b}.pv-product-detail button{border:0;color:#fff;padding:12px 20px;font-weight:700;margin-top:10px}.pv-product-information{margin:18px 0}.pv-product-information h2{font:500 14px Georgia,serif;margin:0 0 8px}.pv-product-information dl{margin:0}.pv-product-information dl>div{display:grid;grid-template-columns:90px minmax(0,1fr);gap:14px;padding:6px 0}.pv-product-information dt,.pv-product-information dd{margin:0;font-size:12px}.pv-product-information dt{color:#7a8783}.pv-product-information dd{font-weight:500;overflow-wrap:anywhere}.preview-frame[style*="390px"] .pv-product-detail{grid-template-columns:1fr;padding:28px 20px}.preview-frame[style*="390px"] .pv-product-detail h1{font-size:27px}
|
||||
@media(max-width:900px){.specification-row{grid-template-columns:1fr 1fr}.specification-values{grid-column:1/-1}.specification-row button{grid-column:2;justify-self:end;width:42px}}
|
||||
.dashboard-page{padding:34px 38px 48px;max-width:1600px;margin:0 auto}.dashboard-header{display:flex;align-items:flex-start;justify-content:space-between;margin-bottom:26px}.dashboard-header h1{font-size:30px;margin:0 0 7px;letter-spacing:0}.dashboard-header p{margin:0;color:#76827f}.dashboard-updated{display:flex;align-items:center;gap:12px;color:#7b8784;font-size:13px}.dashboard-updated button{width:38px;height:38px;border:1px solid #d9e0dd;background:#fff;display:grid;place-items:center;color:#176b5b}.spin{animation:dashboard-spin 1s linear infinite}@keyframes dashboard-spin{to{transform:rotate(360deg)}}.dashboard-inline-error{padding:10px 14px;margin-bottom:18px;background:#fff3f1;color:#a43d31;border-left:3px solid #c95043}.dashboard-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border:1px solid #dfe5e2;background:#fff;margin-bottom:20px}.dashboard-metric{min-width:0;height:132px;border:0;border-right:1px solid #e5e9e7;background:#fff;padding:24px;display:flex;align-items:flex-start;gap:16px;text-align:left;color:#182522}.dashboard-metric:last-child{border-right:0}.dashboard-metric:not(:disabled){cursor:pointer}.dashboard-metric:not(:disabled):hover{background:#f7faf9}.dashboard-metric>span:nth-child(2){display:grid;gap:4px}.dashboard-metric small{color:#74817d;font-size:12px}.dashboard-metric strong{font-size:29px;letter-spacing:0}.dashboard-metric em{font-style:normal;color:#697672;font-size:12px}.dashboard-metric>svg{margin-left:auto;color:#176b5b}.metric-icon{width:38px;height:38px;display:grid;place-items:center;background:#e9f3ef;color:#176b5b}.metric-icon svg{width:19px}.dashboard-grid{display:grid;gap:20px;margin-bottom:20px}.dashboard-primary-grid{grid-template-columns:minmax(0,1.7fr) minmax(320px,.8fr)}.dashboard-secondary-grid{grid-template-columns:minmax(0,1.35fr) minmax(250px,.7fr) minmax(0,1.15fr)}.dashboard-panel{background:#fff;border:1px solid #dfe5e2;padding:24px;min-width:0}.dashboard-panel-title{height:30px;display:flex;align-items:start;justify-content:space-between}.dashboard-panel-title h2{font-size:17px;margin:0;letter-spacing:0}.dashboard-panel-title>span,.dashboard-panel-title button{font-size:12px;color:#7b8784}.dashboard-panel-title button{border:0;background:transparent;display:flex;align-items:center;gap:4px;cursor:pointer}.traffic-legend{display:flex;justify-content:flex-end;gap:16px;font-size:11px;color:#77837f}.traffic-legend span{display:flex;align-items:center;gap:5px}.traffic-legend i{width:8px;height:8px}.traffic-legend .pv,.traffic-bars .pv{background:#176b5b}.traffic-legend .uv,.traffic-bars .uv{background:#b9d6cc}.traffic-chart{height:230px;display:flex;align-items:end;gap:9px;border-bottom:1px solid #dfe5e2;padding-top:24px}.traffic-day{height:100%;flex:1;min-width:0;display:grid;grid-template-rows:1fr 22px;gap:8px}.traffic-bars{display:flex;align-items:end;justify-content:center;gap:3px}.traffic-bars i{width:min(12px,40%);min-height:3px}.traffic-day>span{text-align:center;font-size:10px;color:#83908c;white-space:nowrap}.content-stat-list{display:grid;gap:20px;margin-top:22px}.content-stat-list button{border:0;background:transparent;padding:0;text-align:left;cursor:pointer}.content-stat-list button>span{display:flex;justify-content:space-between}.content-stat-list b{font-size:13px}.content-stat-list small{color:#76827f}.content-stat-list i,.device-list i{display:block;height:5px;background:#edf1ef;margin-top:8px}.content-stat-list em,.device-list em{display:block;height:100%;background:#176b5b}.publish-summary{display:flex;gap:8px;align-items:center;margin-top:24px;padding-top:18px;border-top:1px solid #e2e7e5;color:#52615d;font-size:12px}.top-page-list{margin-top:14px}.top-page-list>div{display:grid;grid-template-columns:28px minmax(0,1fr) auto;gap:10px;align-items:center;padding:11px 0;border-bottom:1px solid #edf0ef}.top-page-list>div>b{color:#9aa5a1;font-size:11px}.top-page-list span{min-width:0;display:grid}.top-page-list strong,.top-page-list small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.top-page-list strong{font-size:13px}.top-page-list small{font-size:11px;color:#86918e}.top-page-list em{font-style:normal;font-size:12px;color:#52615d}.device-list{display:grid;gap:20px;margin-top:22px}.device-list>div{display:grid;grid-template-columns:1fr auto;align-items:center}.device-list span{display:flex;gap:7px;align-items:center;font-size:12px}.device-list b{font-size:12px}.device-list i{grid-column:1/-1}.recent-inquiries{margin-top:12px}.recent-inquiries button{width:100%;border:0;border-bottom:1px solid #edf0ef;background:transparent;padding:12px 0;display:flex;justify-content:space-between;gap:12px;text-align:left;cursor:pointer}.recent-inquiries button:hover strong{color:#176b5b}.recent-inquiries span,.recent-inquiries em{display:grid;gap:3px;min-width:0}.recent-inquiries strong{font-size:13px}.recent-inquiries small{font-size:11px;color:#83908c;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.recent-inquiries emLine truncated
|
||||
Reference in new issue
Block a user