From 9297cf246735ffeadbd35ef94a7e9e95bbeca739 Mon Sep 17 00:00:00 2001 From: Whispering Wind <151555003+ReturnFI@users.noreply.github.com> Date: Fri, 11 Apr 2025 21:33:28 +0330 Subject: [PATCH] Remove SingBox --- core/scripts/webpanel/templates/settings.html | 90 +++++++++---------- 1 file changed, 43 insertions(+), 47 deletions(-) diff --git a/core/scripts/webpanel/templates/settings.html b/core/scripts/webpanel/templates/settings.html index 23ebf5c..44a3363 100644 --- a/core/scripts/webpanel/templates/settings.html +++ b/core/scripts/webpanel/templates/settings.html @@ -68,19 +68,13 @@
-
- -
+ -
+
@@ -467,7 +461,7 @@ function updateServiceUI(data) { const servicesMap = { "hysteria_telegram_bot": "#telegram", - "hysteria_singbox": "#singbox", + // "hysteria_singbox": "#singbox", // singbox removed "hysteria_normal_sub": "#normal", "hysteria_iplimit": "#ip-limit-service" }; @@ -483,9 +477,9 @@ $(selector).prepend(`
Service is running. You can stop it if needed.
`); $(selector + " .btn-danger").show(); - if (service === "hysteria_singbox") { - $("#singbox_start").prop('disabled', true); - } + // if (service === "hysteria_singbox") { // singbox removed + // $("#singbox_start").prop('disabled', true); + // } if(service === "hysteria_telegram_bot"){ $("#telegram_start").prop('disabled', true); } @@ -508,9 +502,9 @@ $(selector + " .btn-success").show(); $(selector + " .btn-danger").hide(); $(selector + " .alert-info").remove(); - if (service === "hysteria_singbox") { - $("#singbox_start").prop('disabled', false); - } + // if (service === "hysteria_singbox") { // singbox removed + // $("#singbox_start").prop('disabled', false); + // } if(service === "hysteria_telegram_bot"){ $("#telegram_start").prop('disabled', false); } @@ -598,32 +592,32 @@ }); } - function startSingbox() { - if (!validateForm('singbox')) return; - const domain = $("#singbox_domain").val(); - const port = $("#singbox_port").val(); - confirmAction("start SingBox", function () { - sendRequest( - "{{ url_for('singbox_start_api') }}", - "POST", - { domain: domain, port: port }, - "SingBox started successfully!", - "#singbox_start" - ); - }); - } + // function startSingbox() { // singbox removed + // if (!validateForm('singbox')) return; + // const domain = $("#singbox_domain").val(); + // const port = $("#singbox_port").val(); + // confirmAction("start SingBox", function () { + // sendRequest( + // "{{ url_for('singbox_start_api') }}", + // "POST", + // { domain: domain, port: port }, + // "SingBox started successfully!", + // "#singbox_start" + // ); + // }); + // } - function stopSingbox() { - confirmAction("stop SingBox", function () { - sendRequest( - "{{ url_for('singbox_stop_api') }}", - "DELETE", - null, - "SingBox stopped successfully!", - null - ); - }); - } + // function stopSingbox() { // singbox removed + // confirmAction("stop SingBox", function () { + // sendRequest( + // "{{ url_for('singbox_stop_api') }}", + // "DELETE", + // null, + // "SingBox stopped successfully!", + // null + // ); + // }); + // } function startNormal() { if (!validateForm('normal')) return; @@ -792,8 +786,8 @@ $("#telegram_start").on("click", startTelegram); $("#telegram_stop").on("click", stopTelegram); - $("#singbox_start").on("click", startSingbox); - $("#singbox_stop").on("click", stopSingbox); + // $("#singbox_start").on("click", startSingbox); // singbox removed + // $("#singbox_stop").on("click", stopSingbox); // singbox removed $("#normal_start").on("click", startNormal); $("#normal_stop").on("click", stopNormal); $("#port_change").on("click", changePort); @@ -806,7 +800,8 @@ $("#ip_limit_change_config").on("click", configIPLimit); - $('#singbox_domain, #normal_domain, #sni_domain').on('input', function () { + // $('#singbox_domain, #normal_domain, #sni_domain').on('input', function () { // singbox removed + $('#normal_domain, #sni_domain').on('input', function () { if (isValidDomain($(this).val())) { $(this).removeClass('is-invalid'); } else { @@ -814,7 +809,8 @@ } }); - $('#singbox_port, #normal_port, #hysteria_port').on('input', function () { + // $('#singbox_port, #normal_port, #hysteria_port').on('input', function () { // singbox removed + $('#normal_port, #hysteria_port').on('input', function () { if (isValidPort($(this).val())) { $(this).removeClass('is-invalid'); } else {