From 24c00f124d1745cbb06a234bfee5eb537c024a8f Mon Sep 17 00:00:00 2001 From: KOWX712 Date: Thu, 13 Feb 2025 01:42:06 +0800 Subject: [PATCH] uncheck advanced mode on auto --- module/webui/scripts/security_patch.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/module/webui/scripts/security_patch.js b/module/webui/scripts/security_patch.js index 127f12a..2860623 100644 --- a/module/webui/scripts/security_patch.js +++ b/module/webui/scripts/security_patch.js @@ -176,10 +176,17 @@ export function securityPatch() { showPrompt('security_patch.auto_failed', false); } else { await execCommand(`sed -i "s/^auto_config=.*/auto_config=1/" /data/adb/security_patch`); + // Reset inputs allPatchInput.value = ''; systemPatchInput.value = ''; bootPatchInput.value = ''; vendorPatchInput.value = ''; + + // Uncheck advanced mode + advancedToggle.checked = false; + normalInputs.classList.remove('hidden'); + advancedInputs.classList.add('hidden'); + showPrompt('security_patch.auto_success'); } } catch (error) { @@ -207,6 +214,7 @@ export function securityPatch() { const value = `all=${allValue}`; const result = await handleSecurityPatch('manual', value); if (result) { + // Reset inputs systemPatchInput.value = ''; bootPatchInput.value = ''; vendorPatchInput.value = ''; @@ -247,6 +255,7 @@ export function securityPatch() { const value = config.filter(Boolean).join('\n'); const result = await handleSecurityPatch('manual', value); if (result) { + // Reset inputs allPatchInput.value = ''; } }