You've already forked Tricky-Addon-Update-Target-List
mirror of
https://github.com/KOWX712/Tricky-Addon-Update-Target-List.git
synced 2025-09-06 06:37:09 +00:00
misc: function to check advanced mode
This commit is contained in:
@@ -122,9 +122,7 @@ async function loadCurrentConfig() {
|
|||||||
|
|
||||||
// Check if in advanced mode
|
// Check if in advanced mode
|
||||||
if (autoConfig === '0' && allValue === null && (bootValue || systemValue || vendorValue)) {
|
if (autoConfig === '0' && allValue === null && (bootValue || systemValue || vendorValue)) {
|
||||||
advancedToggle.checked = true;
|
checkAdvanced(true);
|
||||||
normalInputs.classList.add('hidden');
|
|
||||||
advancedInputs.classList.remove('hidden');
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@@ -132,6 +130,19 @@ async function loadCurrentConfig() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Function to check advanced mode
|
||||||
|
function checkAdvanced(shouldCheck) {
|
||||||
|
if (shouldCheck) {
|
||||||
|
advancedToggle.checked = true;
|
||||||
|
normalInputs.classList.add('hidden');
|
||||||
|
advancedInputs.classList.remove('hidden');
|
||||||
|
} else {
|
||||||
|
advancedToggle.checked = false;
|
||||||
|
normalInputs.classList.remove('hidden');
|
||||||
|
advancedInputs.classList.add('hidden');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Unified date formatting function
|
// Unified date formatting function
|
||||||
window.formatDate = function(input, type) {
|
window.formatDate = function(input, type) {
|
||||||
let value = input.value.replace(/-/g, '');
|
let value = input.value.replace(/-/g, '');
|
||||||
@@ -240,11 +251,7 @@ export function securityPatch() {
|
|||||||
bootPatchInput.value = '';
|
bootPatchInput.value = '';
|
||||||
vendorPatchInput.value = '';
|
vendorPatchInput.value = '';
|
||||||
|
|
||||||
// Uncheck advanced mode
|
checkAdvanced(false);
|
||||||
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) {
|
||||||
@@ -328,9 +335,7 @@ export function securityPatch() {
|
|||||||
await new Promise(resolve => setTimeout(resolve, 200));
|
await new Promise(resolve => setTimeout(resolve, 200));
|
||||||
const output = await execCommand(`sh ${basePath}common/get_extra.sh --get-security-patch`);
|
const output = await execCommand(`sh ${basePath}common/get_extra.sh --get-security-patch`);
|
||||||
showPrompt('security_patch.fetched', true, 1000);
|
showPrompt('security_patch.fetched', true, 1000);
|
||||||
advancedToggle.checked = true;
|
checkAdvanced(true);
|
||||||
normalInputs.classList.add('hidden');
|
|
||||||
advancedInputs.classList.remove('hidden');
|
|
||||||
|
|
||||||
systemPatchInput.value = 'prop';
|
systemPatchInput.value = 'prop';
|
||||||
bootPatchInput.value = output;
|
bootPatchInput.value = output;
|
||||||
|
|||||||
Reference in New Issue
Block a user