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
@@ -14,6 +14,7 @@ import {
|
||||
import { users } from '@/helpers/auth'
|
||||
import { getInstanceMode } from '@/helpers/hosted-packs'
|
||||
import {
|
||||
PlayerSelectionNavigatedAwayError,
|
||||
registerInstancePlayerPicker,
|
||||
saveInstancePlayer,
|
||||
waitForSkinSiteSession,
|
||||
@@ -127,6 +128,14 @@ async function select(player: PlayerChoice) {
|
||||
function signInSkinSite() {
|
||||
awaitingSkinLogin.value = true
|
||||
hideForLogin = true
|
||||
active.value = false
|
||||
generation++
|
||||
// Settle the pending selection so `prepareInstancePlayer` releases its
|
||||
// in-flight entry; otherwise a later launch would await this forever and
|
||||
// never re-prompt. The caller treats this sentinel as a silent abort.
|
||||
rejectSelection?.(new PlayerSelectionNavigatedAwayError())
|
||||
resolveSelection = undefined
|
||||
rejectSelection = undefined
|
||||
openSkinSiteLogin()
|
||||
modal.value?.hide()
|
||||
void router.push('/starlight-skin')
|
||||
|
||||
Reference in new issue
Block a user