update error prompt

This commit is contained in:
KOWX712
2025-02-11 19:34:56 +08:00
parent 0821e88fdc
commit 2980bda649

View File

@@ -140,7 +140,7 @@ export function securityPatch() {
vendorPatchInput.value = ''; vendorPatchInput.value = '';
showPrompt('security_patch.auto_success'); showPrompt('security_patch.auto_success');
} catch (error) { } catch (error) {
showPrompt('security_patch.auto_failed'); showPrompt('security_patch.auto_failed', false);
} }
hideSecurityPatchDialog(); hideSecurityPatchDialog();
loadCurrentConfig(); loadCurrentConfig();
@@ -160,13 +160,13 @@ export function securityPatch() {
`); `);
showPrompt('security_patch.value_empty'); showPrompt('security_patch.value_empty');
} catch (error) { } catch (error) {
showPrompt('security_patch.save_failed'); showPrompt('security_patch.save_failed', false);
} }
hideSecurityPatchDialog(); hideSecurityPatchDialog();
return; return;
} }
if (!isValid8Digit(allValue)) { if (!isValid8Digit(allValue)) {
showPrompt('security_patch.invalid_all'); showPrompt('security_patch.invalid_all', false);
return; return;
} }
try { try {
@@ -179,7 +179,7 @@ export function securityPatch() {
vendorPatchInput.value = ''; vendorPatchInput.value = '';
showPrompt('security_patch.save_success'); showPrompt('security_patch.save_success');
} catch (error) { } catch (error) {
showPrompt('security_patch.save_failed'); showPrompt('security_patch.save_failed', false);
} }
} else { } else {
// Advanced mode validation // Advanced mode validation
@@ -196,24 +196,24 @@ export function securityPatch() {
`); `);
showPrompt('security_patch.value_empty'); showPrompt('security_patch.value_empty');
} catch (error) { } catch (error) {
showPrompt('security_patch.save_failed'); showPrompt('security_patch.save_failed', false);
} }
hideSecurityPatchDialog(); hideSecurityPatchDialog();
return; return;
} }
if (bootValue && !isValid6Digit(bootValue)) { if (bootValue && !isValid6Digit(bootValue)) {
showPrompt('security_patch.invalid_boot'); showPrompt('security_patch.invalid_boot', false);
return; return;
} }
if (systemValue && !isValidDateFormat(systemValue)) { if (systemValue && !isValidDateFormat(systemValue)) {
showPrompt('security_patch.invalid_system'); showPrompt('security_patch.invalid_system', false);
return; return;
} }
if (vendorValue && !isValidDateFormat(vendorValue)) { if (vendorValue && !isValidDateFormat(vendorValue)) {
showPrompt('security_patch.invalid_vendor'); showPrompt('security_patch.invalid_vendor', false);
return; return;
} }
@@ -231,7 +231,7 @@ export function securityPatch() {
showPrompt('security_patch.save_success'); showPrompt('security_patch.save_success');
hideSecurityPatchDialog(); hideSecurityPatchDialog();
} catch (error) { } catch (error) {
showPrompt('security_patch.save_failed'); showPrompt('security_patch.save_failed', false);
} }
} }
hideSecurityPatchDialog(); hideSecurityPatchDialog();