fix: 修复未登录皮肤站时启动卡住且不再弹玩家选择
Axolotl desktop CI / guardrails (push) Has been cancelled
Repository checks / typos (push) Has been cancelled
Repository checks / tombi (push) Has been cancelled
Rust checks / shear (push) Has been cancelled
Sync source to CNB / Sync Git ref (push) Has been cancelled
Axolotl desktop CI / desktop (macos-latest) (push) Has been cancelled
Axolotl desktop CI / desktop (ubuntu-latest) (push) Has been cancelled
Axolotl desktop CI / desktop (windows-latest) (push) Has been cancelled
Axolotl desktop CI / website (push) Has been cancelled
Sync LobeHub models / sync (push) Has been cancelled
Axolotl desktop CI / guardrails (push) Has been cancelled
Repository checks / typos (push) Has been cancelled
Repository checks / tombi (push) Has been cancelled
Rust checks / shear (push) Has been cancelled
Sync source to CNB / Sync Git ref (push) Has been cancelled
Axolotl desktop CI / desktop (macos-latest) (push) Has been cancelled
Axolotl desktop CI / desktop (ubuntu-latest) (push) Has been cancelled
Axolotl desktop CI / desktop (windows-latest) (push) Has been cancelled
Axolotl desktop CI / website (push) Has been cancelled
Sync LobeHub models / sync (push) Has been cancelled
未登录皮肤站时启动游戏会弹窗要求选择/登录玩家。若点击“登录皮肤站” 跳转后不登录直接返回,再次启动不会重新弹窗,而是卡在“正在启动”。 原因:InstancePlayerModal 的 signInSkinSite 跳转登录时只隐藏弹窗, 没有 settle 玩家选择的 Promise,因此 prepareInstancePlayer 在 preparing 表中留下的任务永不结束。再次启动时复用了这个悬空任务, 既不再弹窗也无法继续启动。 修复: - instance-player 新增哨兵错误 PlayerSelectionNavigatedAwayError。 - signInSkinSite 跳转登录前以该错误 reject 当前选择,使 prepareInstancePlayer 的任务正常结束、清理 in-flight 记录,下次 启动会重新弹出玩家选择。 - App.vue 的启动错误处理识别该哨兵:跳转登录是用户主动操作而非启动 失败,静默中止启动,不弹错误提示。
This commit is contained in:
1 parent
405d980311
commit
42b0c7e7af
3 files changed
+26
No files matched your search
@@ -17,6 +17,18 @@ export type InstancePlayer = {
|
||||
skin_site_user?: string | null
|
||||
}
|
||||
export type PlayerChoice = InstancePlayer & { head?: string }
|
||||
|
||||
/**
|
||||
* Thrown when the player picker is dismissed because the user navigated to the
|
||||
* skin-site login page. Callers should treat this as a silent launch abort
|
||||
* (the user will pick a player next time), not as a real failure.
|
||||
*/
|
||||
export class PlayerSelectionNavigatedAwayError extends Error {
|
||||
constructor() {
|
||||
super('已跳转至皮肤站登录,请登录后重新启动。')
|
||||
this.name = 'PlayerSelectionNavigatedAwayError'
|
||||
}
|
||||
}
|
||||
type Picker = (instanceId: string, locked: InstancePlayer | null) => Promise<InstancePlayer>
|
||||
let picker: Picker | undefined
|
||||
const preparing = new Map<string, Promise<void>>()
|
||||
|
||||
Reference in new issue
Block a user