From db79ee2c803c406dc98fd7df962d609cbeaedef4 Mon Sep 17 00:00:00 2001 From: Stringadmin Date: Wed, 3 Jun 2026 20:34:43 +0800 Subject: [PATCH] Revert "merge: re-merge origin/master after rollback, resolve same conflicts" This reverts commit 1546644decba3c8df7b8553ab49fbb3df8c4d86f, reversing changes made to f5a75074a4b6080e1fb39850ea33ef5e75c2b5bd. --- src/components/AppShell.tsx | 2 +- src/features/ecommerce/EcommercePage.tsx | 7 - src/features/profile/ProfilePage.tsx | 215 +- .../script-tokens/ScriptTokensPage.tsx | 96 +- src/features/script-tokens/TokenUsagePage.tsx | 43 +- src/features/workbench/WorkbenchPage.tsx | 44 +- src/styles/pages/ecommerce.css | 860 ------ src/styles/pages/home.css | 78 +- src/styles/pages/script-tokens-v5.css | 772 ----- src/styles/pages/script-tokens.css | 563 ---- src/styles/themes/dark-green.css | 2692 +---------------- 11 files changed, 73 insertions(+), 5299 deletions(-) diff --git a/src/components/AppShell.tsx b/src/components/AppShell.tsx index 72e1776..700938b 100644 --- a/src/components/AppShell.tsx +++ b/src/components/AppShell.tsx @@ -90,7 +90,7 @@ function AppShell({ "avatarConsole", "characterMix", ] as WebViewKey[]; - const showPageScrollActions = false; + const showPageScrollActions = showFloatingNav && !toolSurfaceViews.includes(activeView); const visibleNavItems = useMemo( () => { diff --git a/src/features/ecommerce/EcommercePage.tsx b/src/features/ecommerce/EcommercePage.tsx index c3b6416..9b574c3 100644 --- a/src/features/ecommerce/EcommercePage.tsx +++ b/src/features/ecommerce/EcommercePage.tsx @@ -2062,13 +2062,6 @@ function ProductClonePage(_props: ProductClonePageProps = {}) { 上传商品图,AI 即刻生成 符合多电商平台规范 的高转化率商品素材。 -
- {selectedCloneOutput.label} - {platform} - {market} - {language} - {formatRatioDisplayValue(ratio)} -
{status === "done" ? ( diff --git a/src/features/profile/ProfilePage.tsx b/src/features/profile/ProfilePage.tsx index 1c92533..1916f3d 100644 --- a/src/features/profile/ProfilePage.tsx +++ b/src/features/profile/ProfilePage.tsx @@ -1,10 +1,7 @@ import { CameraOutlined, - CheckOutlined, CheckCircleFilled, - CloseOutlined, DeleteOutlined, - EditOutlined, LockOutlined, MailOutlined, MobileOutlined, @@ -137,48 +134,6 @@ function mapAssetToSavedItem(asset: Awaited> }; } -function formatProfileDate(value: string | null | undefined): string { - if (!value) return "刚刚"; - const date = new Date(value); - if (Number.isNaN(date.getTime())) return value; - - return new Intl.DateTimeFormat("zh-CN", { - month: "numeric", - day: "numeric", - hour: "2-digit", - minute: "2-digit", - }).format(date); -} - -function formatTaskType(type: WebGenerationPreviewTask["type"]): string { - const labels: Record = { - image: "图像", - video: "视频", - agent: "智能体", - "digital-human": "数字人", - "character-mix": "角色融合", - }; - return labels[type] || type; -} - -function formatTaskStatus(status: WebGenerationPreviewTask["status"]): string { - const labels: Record = { - queued: "排队中", - running: "生成中", - completed: "已完成", - failed: "失败", - }; - return labels[status] || status; -} - -function formatAssetStatus(status: string | undefined): string { - const normalized = String(status || "").toLowerCase(); - if (normalized === "completed" || normalized === "ready" || normalized === "success") return "可用"; - if (normalized === "running" || normalized === "processing") return "处理中"; - if (normalized === "failed" || normalized === "error") return "失败"; - return status || "资产"; -} - function ProfilePage({ session, usage, @@ -232,9 +187,6 @@ function ProfilePage({ const [profileNotice, setProfileNotice] = useState(null); const [localAvatarUrl, setLocalAvatarUrl] = useState(() => session?.user.avatarUrl || readLocalProfileValue(userId, "avatar")); const [profileBio, setProfileBio] = useState(() => session?.user.bio || readLocalProfileValue(userId, "bio")); - const [isBioEditing, setIsBioEditing] = useState(false); - const [bioEditBackup, setBioEditBackup] = useState(""); - const [bioStatusNotice, setBioStatusNotice] = useState(null); const [bannerUrl, setBannerUrl] = useState(() => session?.user.backgroundUrl || readLocalProfileValue(userId, "background")); const completedTasks = tasks.filter((task) => task.status === "completed"); @@ -243,9 +195,6 @@ function ProfilePage({ const packageLabel = session?.user.activePackages?.[0]?.name || "按量积分"; const avatarUrl = session?.user.avatarUrl || localAvatarUrl || null; const displayedBio = profileBio.trim() || "这个人还没有填写个性签名"; - const emailLooksValid = /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email.trim()); - const phoneLooksValid = /^1[3-9]\d{9}$/.test(phone.trim()); - const passwordLooksReady = password.length >= (mode === "register" ? 6 : 1); useEffect(() => { setLocalAvatarUrl(session?.user.avatarUrl || readLocalProfileValue(userId, "avatar")); @@ -576,29 +525,8 @@ function ProfilePage({ void syncProfilePatch({ bio: nextBio || null }); }; - const startBioEdit = () => { - setBioEditBackup(profileBio); - setBioStatusNotice(null); - setIsBioEditing(true); - }; - - const confirmBioEdit = () => { - handleBioBlur(); - setIsBioEditing(false); - setBioStatusNotice("个性签名已保存"); - }; - - const cancelBioEdit = () => { - setProfileBio(bioEditBackup); - setIsBioEditing(false); - setBioStatusNotice(null); - }; - const renderEmptyState = (text: string, actionLabel: string, action: () => void) => (
-

{text}

{displayName} - {isBioEditing ? ( -
-