优化UI
This commit is contained in:
@@ -287,6 +287,7 @@ export function AccountPage({ billing, projects, team, onRecharge, onNotify }: {
|
||||
|
||||
return (
|
||||
<section className="account-page">
|
||||
<div className="ac-inner">
|
||||
<header className="ac-head">
|
||||
<div>
|
||||
<h1>账单库</h1>
|
||||
@@ -617,6 +618,7 @@ export function AccountPage({ billing, projects, team, onRecharge, onNotify }: {
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<TopupModal
|
||||
open={topupChannel !== null}
|
||||
|
||||
@@ -265,6 +265,7 @@ export function AssetFactoryPage({ navigate }: { navigate: (page: Page) => void
|
||||
|
||||
return (
|
||||
<div className="asset-factory">
|
||||
<div className="asset-factory-inner">
|
||||
<header className="af-page-head">
|
||||
<div>
|
||||
<h1>图片创作</h1>
|
||||
@@ -384,6 +385,7 @@ export function AssetFactoryPage({ navigate }: { navigate: (page: Page) => void
|
||||
)}
|
||||
|
||||
<Pager page={taskCurPage} total={visible.length} pageSize={TASKS_PER_PAGE} onChange={setTaskPage} />
|
||||
</div>
|
||||
|
||||
{/* 批次详情弹窗:展示该批生成的全部图片(参考资产库),点图放大 */}
|
||||
{openBatch && createPortal(
|
||||
@@ -1600,7 +1602,7 @@ export function ImageWorkbenchPage({
|
||||
<div className="yz-image image-workbench">
|
||||
<header className="image-subpage-header">
|
||||
<div className="image-title-row">
|
||||
<button type="button" className="image-back-button" aria-label="返回图片创作" onClick={onBack}>
|
||||
<button type="button" className="image-back-button" aria-label="返回" onClick={onBack}>
|
||||
<ArrowLeft />
|
||||
</button>
|
||||
<div>
|
||||
@@ -1811,7 +1813,7 @@ export function ImageWorkbenchPage({
|
||||
<div className="yz-image image-workbench">
|
||||
<header className="image-subpage-header">
|
||||
<div className="image-title-row">
|
||||
<button type="button" className="image-back-button" aria-label="返回图片创作" onClick={onBack}>
|
||||
<button type="button" className="image-back-button" aria-label="返回" onClick={onBack}>
|
||||
<ArrowLeft />
|
||||
</button>
|
||||
<div>
|
||||
|
||||
@@ -128,6 +128,7 @@ export function Dashboard({
|
||||
|
||||
return (
|
||||
<section className="dashboard-page">
|
||||
<div className="dashboard-inner">
|
||||
<section className="welcome">
|
||||
<h1>欢迎回来{greetName ? `,${greetName}` : ""}</h1>
|
||||
<p>{dateLabel} · 你有{running}个项目正在进行中</p>
|
||||
@@ -258,6 +259,7 @@ export function Dashboard({
|
||||
</div>
|
||||
)}
|
||||
</section>
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -529,6 +529,7 @@ export function FreeCreatePage({ modelConfigs, onNotify, onTaskSettled, onBack }
|
||||
|
||||
return (
|
||||
<div className="fc-page">
|
||||
<div className="fc-inner">
|
||||
<header className="fc-head">
|
||||
<div className="fc-title-row">
|
||||
{onBack ? (
|
||||
@@ -606,6 +607,7 @@ export function FreeCreatePage({ modelConfigs, onNotify, onTaskSettled, onBack }
|
||||
onClear={clearInput}
|
||||
onSend={() => void handleSend()}
|
||||
/>
|
||||
</div>
|
||||
|
||||
{detailTask && (
|
||||
<VideoDetailModal
|
||||
|
||||
@@ -661,6 +661,7 @@ export function LibraryPage({ onUpload, onDeleteMany }: { onUpload: (formData: F
|
||||
|
||||
return (
|
||||
<section className={`library-page${editMode ? " manage-mode" : ""}`}>
|
||||
<div className="lib-inner">
|
||||
<header className="lib-head">
|
||||
<div>
|
||||
<h1>成品库</h1>
|
||||
@@ -978,6 +979,7 @@ export function LibraryPage({ onUpload, onDeleteMany }: { onUpload: (formData: F
|
||||
) : (
|
||||
<div className="lib-empty" role="status"><Images /><strong>{emptyHint}</strong><span>对应创作流程生成后会自动入库</span></div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<div className={`lib-sel-bar${editMode ? " active" : ""}`} role="toolbar" aria-label="批量操作">
|
||||
<div className="lib-sel-copy">
|
||||
|
||||
@@ -363,6 +363,7 @@ export function MessagesPage({ unreadCount, onMarkRead, onMarkAllRead, onArchive
|
||||
|
||||
return (
|
||||
<div className="msg-page">
|
||||
<div className="msg-inner">
|
||||
<div className="page-head">
|
||||
<button className="msg-back" type="button" onClick={() => navigate("dashboard")} aria-label="返回">
|
||||
<ArrowLeft size={18} strokeWidth={1.75} />
|
||||
@@ -537,6 +538,7 @@ export function MessagesPage({ unreadCount, onMarkRead, onMarkAllRead, onArchive
|
||||
)}
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{toast && (
|
||||
<div className="toast show" role="status" aria-live="polite">
|
||||
|
||||
@@ -344,6 +344,7 @@ export function ModelsPage({ onNotify, onBillingChanged }: {
|
||||
|
||||
return (
|
||||
<section className={`models-page${editMode ? " manage-mode" : ""}`}>
|
||||
<div className="ml-inner">
|
||||
<header className="ml-head">
|
||||
<div>
|
||||
<h1>模特库</h1>
|
||||
@@ -448,6 +449,7 @@ export function ModelsPage({ onNotify, onBillingChanged }: {
|
||||
})}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<div className={`ml-sel-bar${editMode ? " active" : ""}`} role="toolbar" aria-label="批量操作">
|
||||
<div className="ml-sel-copy">
|
||||
|
||||
@@ -500,6 +500,7 @@ export function PipelinePage(props: {
|
||||
project: Project;
|
||||
loading: boolean;
|
||||
navigate: (page: Page, options?: { projectId?: string; productId?: string }) => void;
|
||||
onBack?: () => void;
|
||||
user: User;
|
||||
team: Team;
|
||||
products: Product[];
|
||||
@@ -2809,7 +2810,7 @@ export function PipelinePage(props: {
|
||||
<section className="pipeline-page">
|
||||
<header className="pl-head">
|
||||
<div className="pl-title">
|
||||
<button className="pl-back" type="button" onClick={() => navigate("projects")} aria-label="返回视频创作">
|
||||
<button className="pl-back" type="button" onClick={() => (props.onBack ? props.onBack() : navigate("projects"))} aria-label="返回">
|
||||
<ArrowLeft />
|
||||
</button>
|
||||
<div>
|
||||
|
||||
@@ -207,6 +207,7 @@ export function ProductsPage({ products, projects = [], loading = false, navigat
|
||||
|
||||
return (
|
||||
<section className={`products-page${editMode ? " manage-mode" : ""}`}>
|
||||
<div className="pl-inner">
|
||||
<header className="pl-head">
|
||||
<div>
|
||||
<h1>商品库</h1>
|
||||
@@ -319,6 +320,7 @@ export function ProductsPage({ products, projects = [], loading = false, navigat
|
||||
<Pager page={curPage} total={filtered.length} pageSize={PROD_PAGE_SIZE} onChange={setPage} />
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<div className={`pl-sel-bar${editMode ? " active" : ""}`} role="toolbar" aria-label="批量操作">
|
||||
<div className="pl-sel-copy">
|
||||
@@ -473,6 +475,7 @@ export function ProductCreateUploadPage({ onCreate, onBack }: { onCreate: (paylo
|
||||
|
||||
return (
|
||||
<section className="product-create-page">
|
||||
<div className="pc-inner">
|
||||
<div className="page-head">
|
||||
<div>
|
||||
<h1>新建商品</h1>
|
||||
@@ -587,6 +590,7 @@ export function ProductCreateUploadPage({ onCreate, onBack }: { onCreate: (paylo
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
@@ -952,6 +956,7 @@ export function ProductDetailPage({ product, projects, initialTab = "assets", na
|
||||
|
||||
return (
|
||||
<section className="product-detail-page">
|
||||
<div className="pd-inner">
|
||||
|
||||
{/* 顶部 标题 + 状态 */}
|
||||
<div className="pd-title">
|
||||
@@ -1336,6 +1341,7 @@ export function ProductDetailPage({ product, projects, initialTab = "assets", na
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<MediaLightbox open={!!preview} src={preview?.src || ""} kind="image" name={preview?.name} close={() => setPreview(null)} />
|
||||
|
||||
|
||||
@@ -199,7 +199,7 @@ export function ProjectWizardPage({ products, projects = [], preselectProductId,
|
||||
<section className="project-wizard-page">
|
||||
<header className="nw-head">
|
||||
<div className="nw-title">
|
||||
<button className="nw-back" type="button" onClick={onBack} aria-label="返回视频创作">
|
||||
<button className="nw-back" type="button" onClick={onBack} aria-label="返回">
|
||||
<ArrowLeft />
|
||||
</button>
|
||||
<div>
|
||||
@@ -566,6 +566,7 @@ export function ProjectsPage({ products, projects, loading = false, navigate, op
|
||||
|
||||
return (
|
||||
<section className={`projects-page${editMode ? " manage-mode" : ""}`}>
|
||||
<div className="projects-inner">
|
||||
<header className="vc-head">
|
||||
<div>
|
||||
<h1>视频创作</h1>
|
||||
@@ -750,6 +751,7 @@ export function ProjectsPage({ products, projects, loading = false, navigate, op
|
||||
<Pager page={curPage} total={filtered.length} pageSize={PROJ_PAGE_SIZE} onChange={setPage} />
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<div className={`vc-sel-bar${editMode ? " active" : ""}`} role="toolbar" aria-label="批量操作">
|
||||
<div className="vc-sel-copy">
|
||||
|
||||
@@ -118,7 +118,7 @@ export function isPage(value: string): value is Page {
|
||||
|
||||
export function parentPage(page: Page): Page {
|
||||
if (["productDetail", "productCreateUpload"].includes(page)) return "products";
|
||||
if (page === "projectWizard") return "projects";
|
||||
if (["projectWizard", "freeCreate", "pipeline"].includes(page)) return "projects";
|
||||
if (["imageOptimize", "modelPhoto", "modelPhotoDemoA", "modelPhotoDemoB", "platformCover"].includes(page)) {
|
||||
return "assetFactory";
|
||||
}
|
||||
|
||||
@@ -387,6 +387,7 @@ export function SettingsPage({
|
||||
|
||||
return (
|
||||
<section className="settings-page">
|
||||
<div className="settings-inner">
|
||||
<div className="page-head">
|
||||
<div>
|
||||
<h1>设置</h1>
|
||||
@@ -682,6 +683,7 @@ export function SettingsPage({
|
||||
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* 上传头像 modal · 选图 → FormData(file) → onUploadAvatar */}
|
||||
<TeamModal
|
||||
|
||||
@@ -345,6 +345,7 @@ export function TeamPage({ team, user, billing, navigate, onCreateMember: onCrea
|
||||
|
||||
return (
|
||||
<section className="team-page">
|
||||
<div className="team-inner">
|
||||
<div className="page-head">
|
||||
<div>
|
||||
<h1>团队中心</h1>
|
||||
@@ -580,6 +581,7 @@ export function TeamPage({ team, user, billing, navigate, onCreateMember: onCrea
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
{/* 设置月限额(团队级)· 预设 pill + 实时剩余 */}
|
||||
<TeamModal
|
||||
|
||||
@@ -309,6 +309,7 @@ export function TrashPage({ onRestore, onPurge, onRestoreProducts, onPurgeProduc
|
||||
|
||||
return (
|
||||
<div className="trash-page">
|
||||
<div className="trash-inner">
|
||||
<div className="page-head">
|
||||
<div>
|
||||
<h1>垃圾桶</h1>
|
||||
@@ -371,6 +372,7 @@ export function TrashPage({ onRestore, onPurge, onRestoreProducts, onPurgeProduc
|
||||
))}
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<ConfirmModal
|
||||
open={purgeAllOpen}
|
||||
|
||||
Reference in New Issue
Block a user