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
allow save empty
This commit is contained in:
@@ -100,7 +100,7 @@
|
|||||||
"auto_failed": "Failed to enable auto config",
|
"auto_failed": "Failed to enable auto config",
|
||||||
"save_success": "Security patch saved successfully",
|
"save_success": "Security patch saved successfully",
|
||||||
"save_failed": "Failed to save security patch",
|
"save_failed": "Failed to save security patch",
|
||||||
"value_empty": "Value cannot be empty",
|
"value_empty": "Security patch configuration is disabled.",
|
||||||
"invalid_all": "Invalid format.",
|
"invalid_all": "Invalid format.",
|
||||||
"invalid_boot": "Invalid boot format.",
|
"invalid_boot": "Invalid boot format.",
|
||||||
"invalid_system": "Invalid system format.",
|
"invalid_system": "Invalid system format.",
|
||||||
|
|||||||
@@ -100,7 +100,7 @@
|
|||||||
"auto_failed": "Failed to enable auto config",
|
"auto_failed": "Failed to enable auto config",
|
||||||
"save_success": "Security patch saved successfully",
|
"save_success": "Security patch saved successfully",
|
||||||
"save_failed": "Failed to save security patch",
|
"save_failed": "Failed to save security patch",
|
||||||
"value_empty": "Value cannot be empty",
|
"value_empty": "Security patch configuration is disabled.",
|
||||||
"invalid_all": "Invalid format.",
|
"invalid_all": "Invalid format.",
|
||||||
"invalid_boot": "Invalid boot format.",
|
"invalid_boot": "Invalid boot format.",
|
||||||
"invalid_system": "Invalid system format.",
|
"invalid_system": "Invalid system format.",
|
||||||
|
|||||||
@@ -100,7 +100,7 @@
|
|||||||
"auto_failed": "Error al habilitar la configuración automática",
|
"auto_failed": "Error al habilitar la configuración automática",
|
||||||
"save_success": "Parche de seguridad guardado con éxito",
|
"save_success": "Parche de seguridad guardado con éxito",
|
||||||
"save_failed": "Error al guardar el parche de seguridad",
|
"save_failed": "Error al guardar el parche de seguridad",
|
||||||
"value_empty": "El valor no puede estar vacío",
|
"value_empty": "La configuración del parche de seguridad está deshabilitada.",
|
||||||
"invalid_all": "Formato inválido.",
|
"invalid_all": "Formato inválido.",
|
||||||
"invalid_boot": "Formato de arranque inválido.",
|
"invalid_boot": "Formato de arranque inválido.",
|
||||||
"invalid_system": "Formato de sistema inválido.",
|
"invalid_system": "Formato de sistema inválido.",
|
||||||
|
|||||||
@@ -100,7 +100,7 @@
|
|||||||
"auto_failed": "自動設定を有効にできませんでした",
|
"auto_failed": "自動設定を有効にできませんでした",
|
||||||
"save_success": "セキュリティパッチが正常に保存されました",
|
"save_success": "セキュリティパッチが正常に保存されました",
|
||||||
"save_failed": "セキュリティパッチの保存に失敗しました",
|
"save_failed": "セキュリティパッチの保存に失敗しました",
|
||||||
"value_empty": "値は空にできません",
|
"value_empty": "セキュリティパッチの設定は無効です。",
|
||||||
"invalid_all": "無効な形式です。",
|
"invalid_all": "無効な形式です。",
|
||||||
"invalid_boot": "無効なブート形式です。",
|
"invalid_boot": "無効なブート形式です。",
|
||||||
"invalid_system": "無効なシステム形式です。",
|
"invalid_system": "無効なシステム形式です。",
|
||||||
|
|||||||
@@ -100,7 +100,7 @@
|
|||||||
"auto_failed": "Не удалось включить автоматическую конфигурацию",
|
"auto_failed": "Не удалось включить автоматическую конфигурацию",
|
||||||
"save_success": "Патч безопасности успешно сохранен",
|
"save_success": "Патч безопасности успешно сохранен",
|
||||||
"save_failed": "Не удалось сохранить патч безопасности",
|
"save_failed": "Не удалось сохранить патч безопасности",
|
||||||
"value_empty": "Значение не может быть пустым",
|
"value_empty": "Конфигурация патча безопасности отключена.",
|
||||||
"invalid_all": "Неверный формат.",
|
"invalid_all": "Неверный формат.",
|
||||||
"invalid_boot": "Неверный формат загрузки.",
|
"invalid_boot": "Неверный формат загрузки.",
|
||||||
"invalid_system": "Неверный формат системы.",
|
"invalid_system": "Неверный формат системы.",
|
||||||
|
|||||||
@@ -100,7 +100,7 @@
|
|||||||
"auto_failed": "Nabigong i-enable ang auto config",
|
"auto_failed": "Nabigong i-enable ang auto config",
|
||||||
"save_success": "Matagumpay na na-save ang security patch",
|
"save_success": "Matagumpay na na-save ang security patch",
|
||||||
"save_failed": "Nabigong i-save ang security patch",
|
"save_failed": "Nabigong i-save ang security patch",
|
||||||
"value_empty": "Hindi pwedeng walang laman ang value",
|
"value_empty": "Naka-disable ang configuration ng security patch.",
|
||||||
"invalid_all": "Invalid format.",
|
"invalid_all": "Invalid format.",
|
||||||
"invalid_boot": "Invalid boot format.",
|
"invalid_boot": "Invalid boot format.",
|
||||||
"invalid_system": "Invalid system format.",
|
"invalid_system": "Invalid system format.",
|
||||||
|
|||||||
@@ -100,7 +100,7 @@
|
|||||||
"auto_failed": "Otomatik yapılandırma etkinleştirilemedi",
|
"auto_failed": "Otomatik yapılandırma etkinleştirilemedi",
|
||||||
"save_success": "Güvenlik parçası başarıyla kaydedildi",
|
"save_success": "Güvenlik parçası başarıyla kaydedildi",
|
||||||
"save_failed": "Güvenlik parçası kaydedilemedi",
|
"save_failed": "Güvenlik parçası kaydedilemedi",
|
||||||
"value_empty": "Değer boş olamaz",
|
"value_empty": "Güvenlik parçası yapılandırması devre dışı bırakıldı.",
|
||||||
"invalid_all": "Geçersiz format",
|
"invalid_all": "Geçersiz format",
|
||||||
"invalid_boot": "Geçersiz başlatma formatı",
|
"invalid_boot": "Geçersiz başlatma formatı",
|
||||||
"invalid_system": "Geçersiz sistem formatı",
|
"invalid_system": "Geçersiz sistem formatı",
|
||||||
|
|||||||
@@ -100,7 +100,7 @@
|
|||||||
"auto_failed": "无法启用自动配置",
|
"auto_failed": "无法启用自动配置",
|
||||||
"save_success": "安全补丁成功保存",
|
"save_success": "安全补丁成功保存",
|
||||||
"save_failed": "保存安全补丁失败",
|
"save_failed": "保存安全补丁失败",
|
||||||
"value_empty": "值不能为空",
|
"value_empty": "安全补丁配置已禁用。",
|
||||||
"invalid_all": "无效格式。",
|
"invalid_all": "无效格式。",
|
||||||
"invalid_boot": "无效启动格式。",
|
"invalid_boot": "无效启动格式。",
|
||||||
"invalid_system": "无效系统格式。",
|
"invalid_system": "无效系统格式。",
|
||||||
|
|||||||
@@ -100,7 +100,7 @@
|
|||||||
"auto_failed": "無法啟用自動配置",
|
"auto_failed": "無法啟用自動配置",
|
||||||
"save_success": "安全補丁成功保存",
|
"save_success": "安全補丁成功保存",
|
||||||
"save_failed": "保存安全補丁失敗",
|
"save_failed": "保存安全補丁失敗",
|
||||||
"value_empty": "值不能為空",
|
"value_empty": "安全補丁配置已禁用。",
|
||||||
"invalid_all": "無效格式。",
|
"invalid_all": "無效格式。",
|
||||||
"invalid_boot": "無效啟動格式。",
|
"invalid_boot": "無效啟動格式。",
|
||||||
"invalid_system": "無效系統格式。",
|
"invalid_system": "無效系統格式。",
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ const autoButton = document.getElementById('auto-config');
|
|||||||
const saveButton = document.getElementById('save-patch');
|
const saveButton = document.getElementById('save-patch');
|
||||||
|
|
||||||
export function showSecurityPatchDialog() {
|
export function showSecurityPatchDialog() {
|
||||||
|
|
||||||
overlay.style.display = 'block';
|
overlay.style.display = 'block';
|
||||||
card.style.display = 'block';
|
card.style.display = 'block';
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
@@ -132,6 +131,10 @@ export function securityPatch() {
|
|||||||
autoButton.addEventListener('click', async () => {
|
autoButton.addEventListener('click', async () => {
|
||||||
try {
|
try {
|
||||||
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`);
|
||||||
|
allPatchInput.value = '';
|
||||||
|
bootPatchInput.value = '';
|
||||||
|
systemPatchInput.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');
|
||||||
@@ -146,7 +149,17 @@ export function securityPatch() {
|
|||||||
// Normal mode validation
|
// Normal mode validation
|
||||||
const allValue = allPatchInput.value.trim();
|
const allValue = allPatchInput.value.trim();
|
||||||
if (!allValue) {
|
if (!allValue) {
|
||||||
showPrompt('security_patch.value_empty');
|
// Allow saving empty value
|
||||||
|
try {
|
||||||
|
await execCommand(`
|
||||||
|
sed -i "s/^auto_config=.*/auto_config=0/" /data/adb/security_patch
|
||||||
|
> /data/adb/tricky_store/security_patch.txt
|
||||||
|
`);
|
||||||
|
showPrompt('security_patch.value_empty');
|
||||||
|
} catch (error) {
|
||||||
|
showPrompt('security_patch.save_failed');
|
||||||
|
}
|
||||||
|
hideSecurityPatchDialog();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!isValid8Digit(allValue)) {
|
if (!isValid8Digit(allValue)) {
|
||||||
@@ -158,6 +171,9 @@ export function securityPatch() {
|
|||||||
sed -i "s/^auto_config=.*/auto_config=0/" /data/adb/security_patch
|
sed -i "s/^auto_config=.*/auto_config=0/" /data/adb/security_patch
|
||||||
echo all=${allValue} > /data/adb/tricky_store/security_patch.txt
|
echo all=${allValue} > /data/adb/tricky_store/security_patch.txt
|
||||||
`);
|
`);
|
||||||
|
bootPatchInput.value = '';
|
||||||
|
systemPatchInput.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');
|
||||||
@@ -169,7 +185,17 @@ export function securityPatch() {
|
|||||||
const vendorValue = vendorPatchInput.value.trim();
|
const vendorValue = vendorPatchInput.value.trim();
|
||||||
|
|
||||||
if (!bootValue && !systemValue && !vendorValue) {
|
if (!bootValue && !systemValue && !vendorValue) {
|
||||||
showPrompt('security_patch.value_empty');
|
// Allow saving empty values for advanced mode as well
|
||||||
|
try {
|
||||||
|
await execCommand(`
|
||||||
|
sed -i "s/^auto_config=.*/auto_config=0/" /data/adb/security_patch
|
||||||
|
> /data/adb/tricky_store/security_patch.txt
|
||||||
|
`);
|
||||||
|
showPrompt('security_patch.value_empty');
|
||||||
|
} catch (error) {
|
||||||
|
showPrompt('security_patch.save_failed');
|
||||||
|
}
|
||||||
|
hideSecurityPatchDialog();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -198,6 +224,7 @@ export function securityPatch() {
|
|||||||
sed -i "s/^auto_config=.*/auto_config=0/" /data/adb/security_patch
|
sed -i "s/^auto_config=.*/auto_config=0/" /data/adb/security_patch
|
||||||
echo "${config.join(' ')}" > /data/adb/tricky_store/security_patch.txt
|
echo "${config.join(' ')}" > /data/adb/tricky_store/security_patch.txt
|
||||||
`);
|
`);
|
||||||
|
allPatchInput.value = '';
|
||||||
showPrompt('security_patch.save_success');
|
showPrompt('security_patch.save_success');
|
||||||
hideSecurityPatchDialog();
|
hideSecurityPatchDialog();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
Reference in New Issue
Block a user