uncheck advanced mode on auto

This commit is contained in:
KOWX712
2025-02-13 01:42:06 +08:00
parent 5e3836f41f
commit 24c00f124d

View File

@@ -176,10 +176,17 @@ export function securityPatch() {
showPrompt('security_patch.auto_failed', false); showPrompt('security_patch.auto_failed', false);
} else { } else {
await execCommand(`sed -i "s/^auto_config=.*/auto_config=1/" /data/adb/security_patch`); await execCommand(`sed -i "s/^auto_config=.*/auto_config=1/" /data/adb/security_patch`);
// Reset inputs
allPatchInput.value = ''; allPatchInput.value = '';
systemPatchInput.value = ''; systemPatchInput.value = '';
bootPatchInput.value = ''; bootPatchInput.value = '';
vendorPatchInput.value = ''; vendorPatchInput.value = '';
// Uncheck advanced mode
advancedToggle.checked = false;
normalInputs.classList.remove('hidden');
advancedInputs.classList.add('hidden');
showPrompt('security_patch.auto_success'); showPrompt('security_patch.auto_success');
} }
} catch (error) { } catch (error) {
@@ -207,6 +214,7 @@ export function securityPatch() {
const value = `all=${allValue}`; const value = `all=${allValue}`;
const result = await handleSecurityPatch('manual', value); const result = await handleSecurityPatch('manual', value);
if (result) { if (result) {
// Reset inputs
systemPatchInput.value = ''; systemPatchInput.value = '';
bootPatchInput.value = ''; bootPatchInput.value = '';
vendorPatchInput.value = ''; vendorPatchInput.value = '';
@@ -247,6 +255,7 @@ export function securityPatch() {
const value = config.filter(Boolean).join('\n'); const value = config.filter(Boolean).join('\n');
const result = await handleSecurityPatch('manual', value); const result = await handleSecurityPatch('manual', value);
if (result) { if (result) {
// Reset inputs
allPatchInput.value = ''; allPatchInput.value = '';
} }
} }