mirror of
https://github.com/HugoAura/Seewo-HugoAura.git
synced 2026-06-20 23:14:28 +08:00
[🛠️ Fix] Settings renderer 'auraDisable' bug
This commit is contained in:
@@ -366,6 +366,19 @@ const renderNormalSettingsItem = (entry, formEl) => {
|
||||
// createOnLeaveEvtListener(channel, evtListener);
|
||||
}
|
||||
|
||||
const updateDisableStatus = (entry) => {
|
||||
const isDisabledRet = entry.auraDisable();
|
||||
setDisableStatus(
|
||||
entryOperationArea,
|
||||
isDisabledRet.value,
|
||||
isDisabledRet.tooltip
|
||||
);
|
||||
};
|
||||
|
||||
if (entry.auraDisable) {
|
||||
updateDisableStatus(entry);
|
||||
}
|
||||
|
||||
if (entry.aikariRequired) {
|
||||
if (!global.__HUGO_AURA__.aikariStats.connected) {
|
||||
setDisableStatus(entryOperationArea, true, "连接至 Aikari 以继续");
|
||||
@@ -373,7 +386,11 @@ const renderNormalSettingsItem = (entry, formEl) => {
|
||||
|
||||
const evtListener = (event) => {
|
||||
if (event.detail.connected) {
|
||||
setDisableStatus(entryOperationArea, false);
|
||||
try {
|
||||
updateDisableStatus(entry);
|
||||
} catch {
|
||||
setDisableStatus(entryOperationArea, false);
|
||||
}
|
||||
} else {
|
||||
setDisableStatus(entryOperationArea, true, "连接至 Aikari 以继续");
|
||||
}
|
||||
@@ -385,19 +402,6 @@ const renderNormalSettingsItem = (entry, formEl) => {
|
||||
const isShow = entry.auraIf();
|
||||
if (!isShow) entryContainerEl.classList.add("aura-settings-entry-hidden");
|
||||
|
||||
const updateDisableStatus = () => {
|
||||
const isDisabledRet = entry.auraDisable();
|
||||
setDisableStatus(
|
||||
entryOperationArea,
|
||||
global.__HUGO_AURA__.aikariStats.connected ? isDisabledRet.value : true,
|
||||
isDisabledRet.tooltip
|
||||
);
|
||||
};
|
||||
|
||||
if (entry.auraDisable) {
|
||||
updateDisableStatus();
|
||||
}
|
||||
|
||||
if (entry.associateVal) {
|
||||
const evtListener = (event) => {
|
||||
if (!entry.associateVal.includes(event.detail.path.join("."))) return;
|
||||
@@ -408,7 +412,7 @@ const renderNormalSettingsItem = (entry, formEl) => {
|
||||
: cls.add("aura-settings-entry-hidden");
|
||||
|
||||
if (entry.auraDisable) {
|
||||
updateDisableStatus();
|
||||
updateDisableStatus(entry);
|
||||
}
|
||||
};
|
||||
const channel = entry.aikariRequired
|
||||
|
||||
@@ -246,7 +246,14 @@ if (!global.__HUGO_AURA_UI_REACTIVES__.subConfig)
|
||||
{ target: "uninstSvc" }
|
||||
);
|
||||
if (ret.success) {
|
||||
lifecycleStatus.svcRunning = false;
|
||||
lifecycleStatus.svcInstalled = false;
|
||||
global.__HUGO_AURA__.aikariStats.connected = false;
|
||||
global.__HUGO_AURA__.aikariStats.launched = false;
|
||||
ipcRenderer.invoke(
|
||||
`${IPC_METHOD_BASE}.updateAikariStatus`,
|
||||
global.__HUGO_AURA__.aikariStats
|
||||
);
|
||||
global.__HUGO_AURA_UI_FUNCTIONS__.subConfig.aikariStatus.updateToast(
|
||||
"success",
|
||||
"服务卸载成功",
|
||||
|
||||
@@ -89,6 +89,7 @@ const deviceInfoPostSettings = [
|
||||
value:
|
||||
!global.__HUGO_AURA__.aikariRules.ssaFeatures.securityPolicies
|
||||
.freezeManagement.freezeDiskInfoPost.enabled,
|
||||
tooltip: "启用冰冻状态篡改以继续",
|
||||
};
|
||||
},
|
||||
defaultValue: [],
|
||||
@@ -228,6 +229,7 @@ const deviceInfoPostSettings = [
|
||||
value:
|
||||
!global.__HUGO_AURA__.aikariRules.deviceInfo.software
|
||||
.softwareReportPost.enabled,
|
||||
tooltip: "启用软件信息上报覆写以继续",
|
||||
};
|
||||
},
|
||||
defaultValue: true,
|
||||
|
||||
Reference in New Issue
Block a user