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);
|
// 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 (entry.aikariRequired) {
|
||||||
if (!global.__HUGO_AURA__.aikariStats.connected) {
|
if (!global.__HUGO_AURA__.aikariStats.connected) {
|
||||||
setDisableStatus(entryOperationArea, true, "连接至 Aikari 以继续");
|
setDisableStatus(entryOperationArea, true, "连接至 Aikari 以继续");
|
||||||
@@ -373,7 +386,11 @@ const renderNormalSettingsItem = (entry, formEl) => {
|
|||||||
|
|
||||||
const evtListener = (event) => {
|
const evtListener = (event) => {
|
||||||
if (event.detail.connected) {
|
if (event.detail.connected) {
|
||||||
|
try {
|
||||||
|
updateDisableStatus(entry);
|
||||||
|
} catch {
|
||||||
setDisableStatus(entryOperationArea, false);
|
setDisableStatus(entryOperationArea, false);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
setDisableStatus(entryOperationArea, true, "连接至 Aikari 以继续");
|
setDisableStatus(entryOperationArea, true, "连接至 Aikari 以继续");
|
||||||
}
|
}
|
||||||
@@ -385,19 +402,6 @@ const renderNormalSettingsItem = (entry, formEl) => {
|
|||||||
const isShow = entry.auraIf();
|
const isShow = entry.auraIf();
|
||||||
if (!isShow) entryContainerEl.classList.add("aura-settings-entry-hidden");
|
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) {
|
if (entry.associateVal) {
|
||||||
const evtListener = (event) => {
|
const evtListener = (event) => {
|
||||||
if (!entry.associateVal.includes(event.detail.path.join("."))) return;
|
if (!entry.associateVal.includes(event.detail.path.join("."))) return;
|
||||||
@@ -408,7 +412,7 @@ const renderNormalSettingsItem = (entry, formEl) => {
|
|||||||
: cls.add("aura-settings-entry-hidden");
|
: cls.add("aura-settings-entry-hidden");
|
||||||
|
|
||||||
if (entry.auraDisable) {
|
if (entry.auraDisable) {
|
||||||
updateDisableStatus();
|
updateDisableStatus(entry);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const channel = entry.aikariRequired
|
const channel = entry.aikariRequired
|
||||||
|
|||||||
@@ -246,7 +246,14 @@ if (!global.__HUGO_AURA_UI_REACTIVES__.subConfig)
|
|||||||
{ target: "uninstSvc" }
|
{ target: "uninstSvc" }
|
||||||
);
|
);
|
||||||
if (ret.success) {
|
if (ret.success) {
|
||||||
|
lifecycleStatus.svcRunning = false;
|
||||||
lifecycleStatus.svcInstalled = 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(
|
global.__HUGO_AURA_UI_FUNCTIONS__.subConfig.aikariStatus.updateToast(
|
||||||
"success",
|
"success",
|
||||||
"服务卸载成功",
|
"服务卸载成功",
|
||||||
|
|||||||
@@ -89,6 +89,7 @@ const deviceInfoPostSettings = [
|
|||||||
value:
|
value:
|
||||||
!global.__HUGO_AURA__.aikariRules.ssaFeatures.securityPolicies
|
!global.__HUGO_AURA__.aikariRules.ssaFeatures.securityPolicies
|
||||||
.freezeManagement.freezeDiskInfoPost.enabled,
|
.freezeManagement.freezeDiskInfoPost.enabled,
|
||||||
|
tooltip: "启用冰冻状态篡改以继续",
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
defaultValue: [],
|
defaultValue: [],
|
||||||
@@ -228,6 +229,7 @@ const deviceInfoPostSettings = [
|
|||||||
value:
|
value:
|
||||||
!global.__HUGO_AURA__.aikariRules.deviceInfo.software
|
!global.__HUGO_AURA__.aikariRules.deviceInfo.software
|
||||||
.softwareReportPost.enabled,
|
.softwareReportPost.enabled,
|
||||||
|
tooltip: "启用软件信息上报覆写以继续",
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
defaultValue: true,
|
defaultValue: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user