feat(desktop): dedupe bind windows per platform and cap concurrency at 2
Track active bindPublishAccount calls in a per-platform map so a repeat invocation reuses and focuses the existing window instead of spawning a second one, and reject new platforms once 2 bind windows are already open. Surface desktop_account_bind_limit_reached as a warning modal in the renderer so users know to finish or close an existing authorization before starting another. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -53,6 +53,14 @@ function presentClientError(kind: ClientActionKind, error: unknown): ClientError
|
||||
};
|
||||
}
|
||||
|
||||
if (message === "desktop_account_bind_limit_reached") {
|
||||
return {
|
||||
tone: "warning",
|
||||
title: "授权窗口已达上限",
|
||||
content: "当前最多同时打开 2 个授权窗口。请先完成或关闭已有授权窗口,再继续新的绑定。",
|
||||
};
|
||||
}
|
||||
|
||||
if (message === "desktop_account_upsert_failed") {
|
||||
return {
|
||||
tone: "error",
|
||||
|
||||
Reference in New Issue
Block a user