From ec6610571d5f4e60a4f6559c1e592a0dd57441a8 Mon Sep 17 00:00:00 2001 From: Whispering Wind <151555003+ReturnFI@users.noreply.github.com> Date: Sun, 18 May 2025 11:25:29 +0330 Subject: [PATCH] feat: Add NormalSub subpath configuration to settings UI Adds a 'Configure' tab to the Normal Subscriptions section in Settings. This tab allows users to view and edit the subpath for the NormalSub service. - Modified settings.html: - Added new tab link and pane for NormalSub subpath configuration. - Tab is only visible and accessible if NormalSub service is active. - Extended JavaScript: - `sendRequest` function now accepts an optional `postSuccessCallback`. - Added `isValidSubPath` for client-side validation. - `updateServiceUI` now manages visibility of the 'Configure' tab and fetches current subpath. - Implemented `fetchNormalSubPath` to get subpath via API. - Implemented `editNormalSubPath` to save subpath via API. - Integrated new input into `validateForm` and added real-time validation. - Updated `updateDecoyStatusUI` and its calls from `setupDecoy`/`stopDecoy` to use the new `postSuccessCallback` pattern for consistency. - Standardized form IDs (e.g., `telegram_form`, `port_form`) for better targeting in `validateForm` and `updateServiceUI`. --- core/scripts/webpanel/templates/settings.html | 268 ++++++++++++------ 1 file changed, 188 insertions(+), 80 deletions(-) diff --git a/core/scripts/webpanel/templates/settings.html b/core/scripts/webpanel/templates/settings.html index 88097bd..5f0d733 100644 --- a/core/scripts/webpanel/templates/settings.html +++ b/core/scripts/webpanel/templates/settings.html @@ -56,7 +56,7 @@ aria-controls='ip-limit' aria-selected='false'> IP Limit -