[🚧 Fix] Infrastructure logic errors

1. [/] 修复了 Header Icon 默认样式为 Hidden, 导致 UI Loader 尝试 Revive 后 Header Icon 消失的异常。
2. [/] 修正了一个 PLS 连接逻辑错误 (未正确处理更新 `installed` 参数的时机)。
3. [/] 修正了冰点上报拦截预览视图中, 未正确判断状态码导致的异常。
This commit is contained in:
Minoricew
2025-06-13 22:26:36 +08:00
parent 70ffa3f581
commit e63c989d88
4 changed files with 18 additions and 8 deletions

View File

@@ -272,14 +272,14 @@
status: "dead",
authToken: "66ccff0d000721114514191981023333",
};
const isPlsFolderExists = (
await global.ipcRenderer.invoke(`${IPC_METHOD_BASE}.getPlsBinExists`)
).data.isExists;
updatedPlsStats.installed = isPlsFolderExists;
} else {
updatedPlsStats = curPlsStats.data;
}
const isPlsFolderExists = (
await global.ipcRenderer.invoke(`${IPC_METHOD_BASE}.getPlsBinExists`)
).data.isExists;
updatedPlsStats.installed = isPlsFolderExists;
// @ts-expect-error
global.__HUGO_AURA__.plsStats = updatedPlsStats;
console.debug(
@@ -328,5 +328,7 @@
);
};
setTimeout(() => {
onSetup();
}, 1500);
})();

View File

@@ -32,6 +32,14 @@
}
)
.then(async (response) => {
if (response.status !== 200) {
resolve({
success: true,
data: null,
status: response.status
})
}
const parsedData = await response.json();
resolve({

View File

@@ -1,4 +1,4 @@
<div class="aura-header-icon aura-header-icon-hidden">
<div class="aura-header-icon">
<div
class="buttonClick__button-click__3bNeY1Ax"
onclick="global.__HUGO_AURA_UI_FUNCTIONS__.headerIcon.showAuraConfig()"

View File

@@ -10,9 +10,9 @@ global.__HUGO_AURA_UI_FUNCTIONS__.headerIcon = {
let clickTimeout = null;
const onMounted = () => {
if (global.__HUGO_AURA_CONFIG__.auraSettings.uiAccessMethod.showEntryIcon) {
if (!global.__HUGO_AURA_CONFIG__.auraSettings.uiAccessMethod.showEntryIcon) {
const iconEl = document.getElementsByClassName("aura-header-icon")[0];
iconEl.classList.remove("aura-header-icon-hidden");
iconEl.classList.add("aura-header-icon-hidden");
}
if (