option to fetch a security patch date

This commit is contained in:
KOWX712
2025-02-18 18:05:10 +08:00
parent 581d81d5dd
commit c44a101776
14 changed files with 56 additions and 5 deletions

View File

@@ -9,6 +9,7 @@ const allPatchInput = document.getElementById('all-patch');
const bootPatchInput = document.getElementById('boot-patch');
const systemPatchInput = document.getElementById('system-patch');
const vendorPatchInput = document.getElementById('vendor-patch');
const getButton = document.getElementById('get-patch');
const autoButton = document.getElementById('auto-config');
const saveButton = document.getElementById('save-patch');
@@ -319,4 +320,20 @@ export function securityPatch() {
hideSecurityPatchDialog();
loadCurrentConfig();
});
// Get button
getButton.addEventListener('click', async () => {
try {
const output = await execCommand(`sh ${basePath}common/get_extra.sh --get-security-patch`);
advancedToggle.checked = true;
normalInputs.classList.add('hidden');
advancedInputs.classList.remove('hidden');
systemPatchInput.value = 'prop';
bootPatchInput.value = output;
vendorPatchInput.value = output;
} catch (error) {
showPrompt('security_patch.get_failed', false);
}
});
}