feat(web): 积分中心 - 改为全局弹窗并去掉独立钱包页

顶栏、账户菜单、命令面板、画布余额和 /wallet 回跳都打开同一积分中心弹窗,支付结果不再跳进整页超市。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
ddCatandCursor committed 2026-09-17 23:32:19 +08:00
1 parent bb2a79d365
commit 87d92fcf8b
15 files changed
+183 -772

No files matched your search

@@ -4,6 +4,7 @@ import { Clapperboard, CloudDownload, CloudUpload, Coins, CopyPlus, Focus, Folde
import { Button, Dropdown, Tooltip } from "antd";
import { useWalletBalance } from "@/hooks/use-wallet-balance";
import { openWorkspaceWallet } from "@/lib/workspace-wallet";
import { canvasDockStyle } from "@/lib/canvas/canvas-aceternity-style";
import type { CanvasContextSummary } from "@/lib/canvas/canvas-context-summary";
import type { CanvasShortDramaProgress } from "@/lib/canvas/canvas-short-drama";
@@ -232,16 +233,17 @@ export function CanvasTopBar({
</Dropdown>
</CanvasTopBarTooltip>
{user && creditsEnabled ? (
<CanvasTopBarTooltip label="进入积分超市">
<Link
to="/wallet"
<CanvasTopBarTooltip label="打开积分中心">
<button
type="button"
className="canvas-topbar-action inline-flex h-9 min-w-[5.5rem] items-center justify-center gap-1.5 rounded-lg px-2.5 text-xs font-medium tabular-nums"
style={{ color: theme.node.text }}
aria-label="进入积分超市"
aria-label="打开积分中心"
onClick={() => openWorkspaceWallet()}
>
{refreshing && availableMicrocredits === null ? <LoaderCircle className="size-3.5 animate-spin opacity-60" style={{ color: theme.accent.primary }} /> : <Coins className="size-3.5" style={{ color: theme.accent.primary }} />}
<span>{availableMicrocredits === null ? "--" : (availableMicrocredits / 1_000_000).toLocaleString("zh-CN", { maximumFractionDigits: 3 })}</span>
</Link>
</button>
</CanvasTopBarTooltip>
) : null}
<CanvasTopBarTooltip label="进入专注模式(Shift + Ctrl/Cmd + F)">