[🛠 Fix] Fix issue #29 & #30

1. [/] 改进 PLS 状态同步逻辑
2. [/] 使用 classList 改变元素样式状态, 而非直接赋值 className, 从而避免 #29
This commit is contained in:
Minoricew
2025-06-21 19:20:01 +08:00
parent ae2e2ff62d
commit 774d999752
4 changed files with 77 additions and 12 deletions

View File

@@ -331,6 +331,10 @@ if (!global.__HUGO_AURA_UI_REACTIVES__.subConfig)
);
if (ret.success) {
lifecycleStatus.svcRunning = false;
global.__HUGO_AURA__.plsStats.launched = false;
global.__HUGO_AURA__.plsStats.version = "unknown";
global.__HUGO_AURA__.plsStats.status = "dead";
global.__HUGO_AURA_UI_FUNCTIONS__.subConfig.plsStatus.updateToast(
"success",
"PLS 已停止",
@@ -442,11 +446,11 @@ if (!global.__HUGO_AURA_UI_REACTIVES__.subConfig)
break;
}
if (curPlsStats.version && curPlsStats.version !== "未知") {
const versionTextEl = document.getElementById(
"acs-bc-psp-version-text"
);
const versionTextEl = document.getElementById("acs-bc-psp-version-text");
if (curPlsStats.version && curPlsStats.version !== "unknown") {
versionTextEl.textContent = "v" + curPlsStats.version;
} else {
versionTextEl.textContent = "不可用"
}
},