feat(web): 积分中心 - 改为全局弹窗并去掉独立钱包页
顶栏、账户菜单、命令面板、画布余额和 /wallet 回跳都打开同一积分中心弹窗,支付结果不再跳进整页超市。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
11
web/src/lib/workspace-wallet.ts
Normal file
11
web/src/lib/workspace-wallet.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
export const WORKSPACE_WALLET_OPEN_EVENT = "wallet:open";
|
||||
|
||||
export type WorkspaceWalletOpenDetail = {
|
||||
paymentOrderId?: string;
|
||||
paymentInvalid?: boolean;
|
||||
};
|
||||
|
||||
/** 工作台任意入口打开积分中心弹窗,不再进入独立钱包页。 */
|
||||
export function openWorkspaceWallet(detail: WorkspaceWalletOpenDetail = {}) {
|
||||
window.dispatchEvent(new CustomEvent<WorkspaceWalletOpenDetail>(WORKSPACE_WALLET_OPEN_EVENT, { detail }));
|
||||
}
|
||||
Reference in New Issue
Block a user