From c4078c8242d533badbec02075d458c1f21e3bc94 Mon Sep 17 00:00:00 2001 From: divocat Date: Thu, 23 Oct 2025 18:35:34 +0300 Subject: [PATCH 1/9] feat: update some translations --- fe-app-podkop/locales/calls.json | 74 +++++++++++-------- fe-app-podkop/locales/podkop.pot | 72 ++++++++++-------- fe-app-podkop/locales/podkop.ru.po | 20 +++-- .../partials/renderAvailableActions.ts | 2 +- .../diagnostic/partials/renderSystemInfo.ts | 2 +- .../src/validators/validateVlessUrl.ts | 3 +- .../luci-static/resources/view/podkop/main.js | 7 +- luci-app-podkop/po/ru/podkop.po | 20 +++-- luci-app-podkop/po/templates/podkop.pot | 72 ++++++++++-------- 9 files changed, 158 insertions(+), 114 deletions(-) diff --git a/fe-app-podkop/locales/calls.json b/fe-app-podkop/locales/calls.json index a5c991b..60d8c28 100644 --- a/fe-app-podkop/locales/calls.json +++ b/fe-app-podkop/locales/calls.json @@ -62,6 +62,13 @@ "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:437" ] }, + { + "call": "Available actions", + "key": "Available actions", + "places": [ + "src/podkop/tabs/diagnostic/partials/renderAvailableActions.ts:43" + ] + }, { "call": "Bootsrap DNS", "key": "Bootsrap DNS", @@ -94,14 +101,14 @@ "call": "Cache File Path", "key": "Cache File Path", "places": [ - "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:322" + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:329" ] }, { "call": "Cache file path cannot be empty", "key": "Cache file path cannot be empty", "places": [ - "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:336" + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:343" ] }, { @@ -178,7 +185,7 @@ "call": "Config File Path", "key": "Config File Path", "places": [ - "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:309" + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:316" ] }, { @@ -241,14 +248,14 @@ "call": "Delay in milliseconds before reloading podkop after interface UP", "key": "Delay in milliseconds before reloading podkop after interface UP", "places": [ - "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:215" + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:222" ] }, { "call": "Delay value cannot be empty", "key": "Delay value cannot be empty", "places": [ - "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:222" + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:229" ] }, { @@ -276,14 +283,14 @@ "call": "Disable QUIC", "key": "Disable QUIC", "places": [ - "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:239" + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:246" ] }, { "call": "Disable the QUIC protocol to improve compatibility or fix issues with video streaming", "key": "Disable the QUIC protocol to improve compatibility or fix issues with video streaming", "places": [ - "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:240" + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:247" ] }, { @@ -372,7 +379,7 @@ "call": "Dont Touch My DHCP!", "key": "Dont Touch My DHCP!", "places": [ - "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:300" + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:307" ] }, { @@ -394,28 +401,28 @@ "call": "Download Lists via Proxy/VPN", "key": "Download Lists via Proxy/VPN", "places": [ - "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:262" + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:269" ] }, { "call": "Download Lists via specific proxy section", "key": "Download Lists via specific proxy section", "places": [ - "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:271" + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:278" ] }, { "call": "Downloading all lists via main Proxy/VPN", "key": "Downloading all lists via main Proxy/VPN", "places": [ - "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:263" + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:270" ] }, { "call": "Downloading all lists via specific Proxy/VPN", "key": "Downloading all lists via specific Proxy/VPN", "places": [ - "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:272" + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:279" ] }, { @@ -465,7 +472,7 @@ "call": "Enable YACD", "key": "Enable YACD", "places": [ - "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:230" + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:237" ] }, { @@ -500,14 +507,14 @@ "call": "Exclude NTP", "key": "Exclude NTP", "places": [ - "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:358" + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:365" ] }, { "call": "Exclude NTP protocol traffic from the tunnel to prevent it from being routed through the proxy or VPN", "key": "Exclude NTP protocol traffic from the tunnel to prevent it from being routed through the proxy or VPN", "places": [ - "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:359" + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:366" ] }, { @@ -584,21 +591,21 @@ "call": "Interface Monitoring", "key": "Interface Monitoring", "places": [ - "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:182" + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:189" ] }, { "call": "Interface Monitoring Delay", "key": "Interface Monitoring Delay", "places": [ - "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:214" + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:221" ] }, { "call": "Interface monitoring for Bad WAN", "key": "Interface monitoring for Bad WAN", "places": [ - "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:183" + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:190" ] }, { @@ -830,7 +837,7 @@ "call": "List Update Frequency", "key": "List Update Frequency", "places": [ - "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:250" + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:257" ] }, { @@ -872,7 +879,7 @@ "call": "Monitored Interfaces", "key": "Monitored Interfaces", "places": [ - "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:191" + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:198" ] }, { @@ -980,21 +987,21 @@ "call": "Path must be absolute (start with /)", "key": "Path must be absolute (start with /)", "places": [ - "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:340" + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:347" ] }, { "call": "Path must contain at least one directory (like /tmp/cache.db)", "key": "Path must contain at least one directory (like /tmp/cache.db)", "places": [ - "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:349" + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:356" ] }, { "call": "Path must end with cache.db", "key": "Path must end with cache.db", "places": [ - "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:344" + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:351" ] }, { @@ -1015,7 +1022,7 @@ "call": "Podkop will not modify your DHCP configuration", "key": "Podkop will not modify your DHCP configuration", "places": [ - "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:301" + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:308" ] }, { @@ -1095,7 +1102,7 @@ "call": "Routing Excluded IPs", "key": "Routing Excluded IPs", "places": [ - "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:369" + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:376" ] }, { @@ -1186,7 +1193,7 @@ "call": "Select how often the domain or subnet lists are updated automatically", "key": "Select how often the domain or subnet lists are updated automatically", "places": [ - "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:251" + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:258" ] }, { @@ -1215,14 +1222,14 @@ "call": "Select or enter path for sing-box cache file. Change this ONLY if you know what you are doing", "key": "Select or enter path for sing-box cache file. Change this ONLY if you know what you are doing", "places": [ - "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:323" + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:330" ] }, { "call": "Select path for sing-box config file. Change this ONLY if you know what you are doing", "key": "Select path for sing-box config file. Change this ONLY if you know what you are doing", "places": [ - "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:310" + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:317" ] }, { @@ -1264,7 +1271,7 @@ "call": "Select the WAN interfaces to be monitored", "key": "Select the WAN interfaces to be monitored", "places": [ - "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:192" + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:199" ] }, { @@ -1363,7 +1370,7 @@ "call": "Specify a local IP address to be excluded from routing", "key": "Specify a local IP address to be excluded from routing", "places": [ - "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:370" + "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:377" ] }, { @@ -1423,6 +1430,13 @@ "src/podkop/tabs/dashboard/initController.ts:301" ] }, + { + "call": "System information", + "key": "System information", + "places": [ + "src/podkop/tabs/diagnostic/partials/renderSystemInfo.ts:21" + ] + }, { "call": "Table exist", "key": "Table exist", diff --git a/fe-app-podkop/locales/podkop.pot b/fe-app-podkop/locales/podkop.pot index 75fe1bb..c3929c7 100644 --- a/fe-app-podkop/locales/podkop.pot +++ b/fe-app-podkop/locales/podkop.pot @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: PODKOP\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-21 20:02+0300\n" -"PO-Revision-Date: 2025-10-21 20:02+0300\n" +"POT-Creation-Date: 2025-10-23 15:27+0300\n" +"PO-Revision-Date: 2025-10-23 15:27+0300\n" "Last-Translator: divocat \n" "Language-Team: LANGUAGE \n" "Language: \n" @@ -52,6 +52,10 @@ msgstr "" msgid "At least one valid subnet or IP must be specified. Comments-only content is not allowed." msgstr "" +#: src/podkop/tabs/diagnostic/partials/renderAvailableActions.ts:43 +msgid "Available actions" +msgstr "" + #: src/podkop/tabs/diagnostic/checks/runDnsCheck.ts:72 msgid "Bootsrap DNS" msgstr "" @@ -68,11 +72,11 @@ msgstr "" msgid "Browser is using FakeIP correctly" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:322 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:329 msgid "Cache File Path" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:336 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:343 msgid "Cache file path cannot be empty" msgstr "" @@ -116,7 +120,7 @@ msgstr "" msgid "Community Lists" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:309 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:316 msgid "Config File Path" msgstr "" @@ -152,11 +156,11 @@ msgstr "" msgid "Dashboard currently unavailable" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:215 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:222 msgid "Delay in milliseconds before reloading podkop after interface UP" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:222 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:229 msgid "Delay value cannot be empty" msgstr "" @@ -172,11 +176,11 @@ msgstr "" msgid "Disable autostart" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:239 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:246 msgid "Disable QUIC" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:240 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:247 msgid "Disable the QUIC protocol to improve compatibility or fix issues with video streaming" msgstr "" @@ -229,7 +233,7 @@ msgstr "" msgid "Domain Resolver" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:300 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:307 msgid "Dont Touch My DHCP!" msgstr "" @@ -242,19 +246,19 @@ msgstr "" msgid "Download" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:262 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:269 msgid "Download Lists via Proxy/VPN" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:271 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:278 msgid "Download Lists via specific proxy section" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:263 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:270 msgid "Downloading all lists via main Proxy/VPN" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:272 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:279 msgid "Downloading all lists via specific Proxy/VPN" msgstr "" @@ -283,7 +287,7 @@ msgstr "" msgid "Enable the mixed proxy, allowing this section to route traffic through both HTTP and SOCKS proxies" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:230 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:237 msgid "Enable YACD" msgstr "" @@ -303,11 +307,11 @@ msgstr "" msgid "Enter subnets in CIDR notation (e.g. 103.21.244.0/22) or single IP addresses" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:358 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:365 msgid "Exclude NTP" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:359 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:366 msgid "Exclude NTP protocol traffic from the tunnel to prevent it from being routed through the proxy or VPN" msgstr "" @@ -351,15 +355,15 @@ msgstr "" msgid "HTTP error" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:182 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:189 msgid "Interface Monitoring" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:214 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:221 msgid "Interface Monitoring Delay" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:183 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:190 msgid "Interface monitoring for Bad WAN" msgstr "" @@ -492,7 +496,7 @@ msgstr "" msgid "Latest" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:250 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:257 msgid "List Update Frequency" msgstr "" @@ -516,7 +520,7 @@ msgstr "" msgid "Mixed Proxy Port" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:191 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:198 msgid "Monitored Interfaces" msgstr "" @@ -579,15 +583,15 @@ msgstr "" msgid "Path cannot be empty" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:340 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:347 msgid "Path must be absolute (start with /)" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:349 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:356 msgid "Path must contain at least one directory (like /tmp/cache.db)" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:344 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:351 msgid "Path must end with cache.db" msgstr "" @@ -599,7 +603,7 @@ msgstr "" msgid "Podkop Settings" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:301 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:308 msgid "Podkop will not modify your DHCP configuration" msgstr "" @@ -646,7 +650,7 @@ msgstr "" msgid "Router DNS is routed through sing-box" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:369 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:376 msgid "Routing Excluded IPs" msgstr "" @@ -698,7 +702,7 @@ msgstr "" msgid "Select DNS protocol to use" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:251 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:258 msgid "Select how often the domain or subnet lists are updated automatically" msgstr "" @@ -715,11 +719,11 @@ msgstr "" msgid "Select or enter DNS server address" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:323 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:330 msgid "Select or enter path for sing-box cache file. Change this ONLY if you know what you are doing" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:310 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:317 msgid "Select path for sing-box config file. Change this ONLY if you know what you are doing" msgstr "" @@ -743,7 +747,7 @@ msgstr "" msgid "Select the network interface to which the traffic will originate" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:192 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:199 msgid "Select the WAN interfaces to be monitored" msgstr "" @@ -800,7 +804,7 @@ msgstr "" msgid "Source Network Interface" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:370 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:377 msgid "Specify a local IP address to be excluded from routing" msgstr "" @@ -837,6 +841,10 @@ msgstr "" msgid "System info" msgstr "" +#: src/podkop/tabs/diagnostic/partials/renderSystemInfo.ts:21 +msgid "System information" +msgstr "" + #: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:80 msgid "Table exist" msgstr "" diff --git a/fe-app-podkop/locales/podkop.ru.po b/fe-app-podkop/locales/podkop.ru.po index 1754091..29c2e15 100644 --- a/fe-app-podkop/locales/podkop.ru.po +++ b/fe-app-podkop/locales/podkop.ru.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: PODKOP\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-21 23:02+0300\n" -"PO-Revision-Date: 2025-10-21 23:02+0300\n" +"POT-Creation-Date: 2025-10-23 18:27+0300\n" +"PO-Revision-Date: 2025-10-23 18:27+0300\n" "Last-Translator: divocat\n" "Language-Team: none\n" "Language: ru\n" @@ -44,6 +44,9 @@ msgstr "Необходимо указать хотя бы один действ msgid "At least one valid subnet or IP must be specified. Comments-only content is not allowed." msgstr "Необходимо указать хотя бы одну действительную подсеть или IP. Только комментарии недопустимы." +msgid "Available actions" +msgstr "Доступные действия" + msgid "Bootsrap DNS" msgstr "Bootstrap DNS" @@ -465,10 +468,10 @@ msgid "Regional options cannot be used together" msgstr "Нельзя использовать несколько региональных опций одновременно" msgid "Remote Domain Lists" -msgstr "Удалённые списки доменов" +msgstr "Внешние списки доменов" msgid "Remote Subnet Lists" -msgstr "Удалённые списки подсетей" +msgstr "Внешние списки подсетей" msgid "Restart podkop" msgstr "Перезапустить Podkop" @@ -600,10 +603,10 @@ msgid "Specify local IP addresses or subnets whose traffic will always be routed msgstr "Укажите локальные IP-адреса или подсети, трафик которых всегда будет направляться через настроенный маршрут." msgid "Specify remote URLs to download and use domain lists" -msgstr "Укажите удаленные URL-адреса для загрузки и использования списков доменов." +msgstr "Укажите URL-адреса для загрузки и использования списков доменов." msgid "Specify remote URLs to download and use subnet lists" -msgstr "Укажите удаленные URL-адреса для загрузки и использования списков подсетей." +msgstr "Укажите URL-адреса для загрузки и использования списков подсетей." msgid "Specify the path to the list file located on the router filesystem" msgstr "Укажите путь к файлу списка, расположенному в файловой системе маршрутизатора." @@ -620,11 +623,14 @@ msgstr "Успешно скопировано!" msgid "System info" msgstr "Системная информация" +msgid "System information" +msgstr "Системная информация" + msgid "Table exist" msgstr "Таблица существует" msgid "Test latency" -msgstr "Измерить задержки" +msgstr "Тестировние задержки" msgid "Text List" msgstr "Текстовый список" diff --git a/fe-app-podkop/src/podkop/tabs/diagnostic/partials/renderAvailableActions.ts b/fe-app-podkop/src/podkop/tabs/diagnostic/partials/renderAvailableActions.ts index 4b81bef..f54fd7f 100644 --- a/fe-app-podkop/src/podkop/tabs/diagnostic/partials/renderAvailableActions.ts +++ b/fe-app-podkop/src/podkop/tabs/diagnostic/partials/renderAvailableActions.ts @@ -40,7 +40,7 @@ export function renderAvailableActions({ showSingBoxConfig, }: IRenderAvailableActionsProps) { return E('div', { class: 'pdk_diagnostic-page__right-bar__actions' }, [ - E('b', {}, 'Available actions'), + E('b', {}, _('Available actions')), ...insertIf(restart.visible, [ renderButton({ classNames: ['cbi-button-apply'], diff --git a/fe-app-podkop/src/podkop/tabs/diagnostic/partials/renderSystemInfo.ts b/fe-app-podkop/src/podkop/tabs/diagnostic/partials/renderSystemInfo.ts index 4b05a45..f686b8a 100644 --- a/fe-app-podkop/src/podkop/tabs/diagnostic/partials/renderSystemInfo.ts +++ b/fe-app-podkop/src/podkop/tabs/diagnostic/partials/renderSystemInfo.ts @@ -18,7 +18,7 @@ export function renderSystemInfo({ items }: IRenderSystemInfoProps) { E( 'b', { class: 'pdk_diagnostic-page__right-bar__system-info__title' }, - 'System information', + _('System information'), ), ...items.map((item) => { const tagClass = [ diff --git a/fe-app-podkop/src/validators/validateVlessUrl.ts b/fe-app-podkop/src/validators/validateVlessUrl.ts index deea0a9..8db37d2 100644 --- a/fe-app-podkop/src/validators/validateVlessUrl.ts +++ b/fe-app-podkop/src/validators/validateVlessUrl.ts @@ -43,7 +43,8 @@ export function validateVlessUrl(url: string): ValidationResult { if (!port) return { valid: false, message: 'Invalid VLESS URL: missing port' }; - const portNum = Number(port); + const cleanedPort = port.replace('/', ''); + const portNum = Number(cleanedPort); if (!Number.isInteger(portNum) || portNum < 1 || portNum > 65535) return { valid: false, diff --git a/luci-app-podkop/htdocs/luci-static/resources/view/podkop/main.js b/luci-app-podkop/htdocs/luci-static/resources/view/podkop/main.js index c4f8273..b315c30 100644 --- a/luci-app-podkop/htdocs/luci-static/resources/view/podkop/main.js +++ b/luci-app-podkop/htdocs/luci-static/resources/view/podkop/main.js @@ -259,7 +259,8 @@ function validateVlessUrl(url) { return { valid: false, message: "Invalid VLESS URL: missing hostname" }; if (!port) return { valid: false, message: "Invalid VLESS URL: missing port" }; - const portNum = Number(port); + const cleanedPort = port.replace("/", ""); + const portNum = Number(cleanedPort); if (!Number.isInteger(portNum) || portNum < 1 || portNum > 65535) return { valid: false, @@ -3341,7 +3342,7 @@ function renderAvailableActions({ showSingBoxConfig }) { return E("div", { class: "pdk_diagnostic-page__right-bar__actions" }, [ - E("b", {}, "Available actions"), + E("b", {}, _("Available actions")), ...insertIf(restart.visible, [ renderButton({ classNames: ["cbi-button-apply"], @@ -3599,7 +3600,7 @@ function renderSystemInfo({ items }) { E( "b", { class: "pdk_diagnostic-page__right-bar__system-info__title" }, - "System information" + _("System information") ), ...items.map((item) => { const tagClass = [ diff --git a/luci-app-podkop/po/ru/podkop.po b/luci-app-podkop/po/ru/podkop.po index 1754091..366e28d 100644 --- a/luci-app-podkop/po/ru/podkop.po +++ b/luci-app-podkop/po/ru/podkop.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: PODKOP\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-21 23:02+0300\n" -"PO-Revision-Date: 2025-10-21 23:02+0300\n" +"POT-Creation-Date: 2025-10-23 18:27+0300\n" +"PO-Revision-Date: 2025-10-23 18:27+0300\n" "Last-Translator: divocat\n" "Language-Team: none\n" "Language: ru\n" @@ -44,6 +44,9 @@ msgstr "Необходимо указать хотя бы один действ msgid "At least one valid subnet or IP must be specified. Comments-only content is not allowed." msgstr "Необходимо указать хотя бы одну действительную подсеть или IP. Только комментарии недопустимы." +msgid "Available actions" +msgstr "" + msgid "Bootsrap DNS" msgstr "Bootstrap DNS" @@ -465,10 +468,10 @@ msgid "Regional options cannot be used together" msgstr "Нельзя использовать несколько региональных опций одновременно" msgid "Remote Domain Lists" -msgstr "Удалённые списки доменов" +msgstr "Внешние списки доменов" msgid "Remote Subnet Lists" -msgstr "Удалённые списки подсетей" +msgstr "Внешние списки подсетей" msgid "Restart podkop" msgstr "Перезапустить Podkop" @@ -600,10 +603,10 @@ msgid "Specify local IP addresses or subnets whose traffic will always be routed msgstr "Укажите локальные IP-адреса или подсети, трафик которых всегда будет направляться через настроенный маршрут." msgid "Specify remote URLs to download and use domain lists" -msgstr "Укажите удаленные URL-адреса для загрузки и использования списков доменов." +msgstr "Укажите URL-адреса для загрузки и использования списков доменов." msgid "Specify remote URLs to download and use subnet lists" -msgstr "Укажите удаленные URL-адреса для загрузки и использования списков подсетей." +msgstr "Укажите URL-адреса для загрузки и использования списков подсетей." msgid "Specify the path to the list file located on the router filesystem" msgstr "Укажите путь к файлу списка, расположенному в файловой системе маршрутизатора." @@ -620,11 +623,14 @@ msgstr "Успешно скопировано!" msgid "System info" msgstr "Системная информация" +msgid "System information" +msgstr "" + msgid "Table exist" msgstr "Таблица существует" msgid "Test latency" -msgstr "Измерить задержки" +msgstr "Тестировние задержки" msgid "Text List" msgstr "Текстовый список" diff --git a/luci-app-podkop/po/templates/podkop.pot b/luci-app-podkop/po/templates/podkop.pot index 75fe1bb..c3929c7 100644 --- a/luci-app-podkop/po/templates/podkop.pot +++ b/luci-app-podkop/po/templates/podkop.pot @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: PODKOP\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-21 20:02+0300\n" -"PO-Revision-Date: 2025-10-21 20:02+0300\n" +"POT-Creation-Date: 2025-10-23 15:27+0300\n" +"PO-Revision-Date: 2025-10-23 15:27+0300\n" "Last-Translator: divocat \n" "Language-Team: LANGUAGE \n" "Language: \n" @@ -52,6 +52,10 @@ msgstr "" msgid "At least one valid subnet or IP must be specified. Comments-only content is not allowed." msgstr "" +#: src/podkop/tabs/diagnostic/partials/renderAvailableActions.ts:43 +msgid "Available actions" +msgstr "" + #: src/podkop/tabs/diagnostic/checks/runDnsCheck.ts:72 msgid "Bootsrap DNS" msgstr "" @@ -68,11 +72,11 @@ msgstr "" msgid "Browser is using FakeIP correctly" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:322 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:329 msgid "Cache File Path" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:336 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:343 msgid "Cache file path cannot be empty" msgstr "" @@ -116,7 +120,7 @@ msgstr "" msgid "Community Lists" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:309 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:316 msgid "Config File Path" msgstr "" @@ -152,11 +156,11 @@ msgstr "" msgid "Dashboard currently unavailable" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:215 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:222 msgid "Delay in milliseconds before reloading podkop after interface UP" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:222 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:229 msgid "Delay value cannot be empty" msgstr "" @@ -172,11 +176,11 @@ msgstr "" msgid "Disable autostart" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:239 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:246 msgid "Disable QUIC" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:240 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:247 msgid "Disable the QUIC protocol to improve compatibility or fix issues with video streaming" msgstr "" @@ -229,7 +233,7 @@ msgstr "" msgid "Domain Resolver" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:300 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:307 msgid "Dont Touch My DHCP!" msgstr "" @@ -242,19 +246,19 @@ msgstr "" msgid "Download" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:262 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:269 msgid "Download Lists via Proxy/VPN" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:271 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:278 msgid "Download Lists via specific proxy section" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:263 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:270 msgid "Downloading all lists via main Proxy/VPN" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:272 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:279 msgid "Downloading all lists via specific Proxy/VPN" msgstr "" @@ -283,7 +287,7 @@ msgstr "" msgid "Enable the mixed proxy, allowing this section to route traffic through both HTTP and SOCKS proxies" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:230 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:237 msgid "Enable YACD" msgstr "" @@ -303,11 +307,11 @@ msgstr "" msgid "Enter subnets in CIDR notation (e.g. 103.21.244.0/22) or single IP addresses" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:358 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:365 msgid "Exclude NTP" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:359 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:366 msgid "Exclude NTP protocol traffic from the tunnel to prevent it from being routed through the proxy or VPN" msgstr "" @@ -351,15 +355,15 @@ msgstr "" msgid "HTTP error" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:182 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:189 msgid "Interface Monitoring" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:214 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:221 msgid "Interface Monitoring Delay" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:183 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:190 msgid "Interface monitoring for Bad WAN" msgstr "" @@ -492,7 +496,7 @@ msgstr "" msgid "Latest" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:250 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:257 msgid "List Update Frequency" msgstr "" @@ -516,7 +520,7 @@ msgstr "" msgid "Mixed Proxy Port" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:191 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:198 msgid "Monitored Interfaces" msgstr "" @@ -579,15 +583,15 @@ msgstr "" msgid "Path cannot be empty" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:340 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:347 msgid "Path must be absolute (start with /)" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:349 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:356 msgid "Path must contain at least one directory (like /tmp/cache.db)" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:344 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:351 msgid "Path must end with cache.db" msgstr "" @@ -599,7 +603,7 @@ msgstr "" msgid "Podkop Settings" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:301 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:308 msgid "Podkop will not modify your DHCP configuration" msgstr "" @@ -646,7 +650,7 @@ msgstr "" msgid "Router DNS is routed through sing-box" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:369 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:376 msgid "Routing Excluded IPs" msgstr "" @@ -698,7 +702,7 @@ msgstr "" msgid "Select DNS protocol to use" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:251 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:258 msgid "Select how often the domain or subnet lists are updated automatically" msgstr "" @@ -715,11 +719,11 @@ msgstr "" msgid "Select or enter DNS server address" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:323 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:330 msgid "Select or enter path for sing-box cache file. Change this ONLY if you know what you are doing" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:310 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:317 msgid "Select path for sing-box config file. Change this ONLY if you know what you are doing" msgstr "" @@ -743,7 +747,7 @@ msgstr "" msgid "Select the network interface to which the traffic will originate" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:192 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:199 msgid "Select the WAN interfaces to be monitored" msgstr "" @@ -800,7 +804,7 @@ msgstr "" msgid "Source Network Interface" msgstr "" -#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:370 +#: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:377 msgid "Specify a local IP address to be excluded from routing" msgstr "" @@ -837,6 +841,10 @@ msgstr "" msgid "System info" msgstr "" +#: src/podkop/tabs/diagnostic/partials/renderSystemInfo.ts:21 +msgid "System information" +msgstr "" + #: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:80 msgid "Table exist" msgstr "" From 8301f4c271881066005e8f551e173d4f6350d7dc Mon Sep 17 00:00:00 2001 From: divocat Date: Thu, 23 Oct 2025 18:59:23 +0300 Subject: [PATCH 2/9] feat: update checks displaying --- fe-app-podkop/locales/calls.json | 179 +++++------------- fe-app-podkop/locales/podkop.pot | 135 +++++-------- fe-app-podkop/locales/podkop.ru.po | 64 ++----- .../tabs/diagnostic/checks/contstants.ts | 10 +- .../tabs/diagnostic/checks/runDnsCheck.ts | 25 +-- .../tabs/diagnostic/checks/runFakeIPCheck.ts | 29 +-- .../tabs/diagnostic/checks/runNftCheck.ts | 23 +-- .../tabs/diagnostic/checks/runSingBoxCheck.ts | 21 +- .../tabs/diagnostic/helpers/getCheckTitle.ts | 3 + .../podkop/tabs/diagnostic/helpers/getMeta.ts | 28 +++ .../luci-static/resources/view/podkop/main.js | 111 +++++------ luci-app-podkop/po/ru/podkop.po | 68 ++----- luci-app-podkop/po/templates/podkop.pot | 135 +++++-------- 13 files changed, 280 insertions(+), 551 deletions(-) create mode 100644 fe-app-podkop/src/podkop/tabs/diagnostic/helpers/getCheckTitle.ts create mode 100644 fe-app-podkop/src/podkop/tabs/diagnostic/helpers/getMeta.ts diff --git a/fe-app-podkop/locales/calls.json b/fe-app-podkop/locales/calls.json index 60d8c28..c11f557 100644 --- a/fe-app-podkop/locales/calls.json +++ b/fe-app-podkop/locales/calls.json @@ -38,7 +38,7 @@ "call": "Additional marking rules found", "key": "Additional marking rules found", "places": [ - "src/podkop/tabs/diagnostic/checks/runNftCheck.ts:117" + "src/podkop/tabs/diagnostic/checks/runNftCheck.ts:106" ] }, { @@ -73,7 +73,7 @@ "call": "Bootsrap DNS", "key": "Bootsrap DNS", "places": [ - "src/podkop/tabs/diagnostic/checks/runDnsCheck.ts:72" + "src/podkop/tabs/diagnostic/checks/runDnsCheck.ts:65" ] }, { @@ -87,14 +87,14 @@ "call": "Browser is not using FakeIP", "key": "Browser is not using FakeIP", "places": [ - "src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts:81" + "src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts:58" ] }, { "call": "Browser is using FakeIP correctly", "key": "Browser is using FakeIP correctly", "places": [ - "src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts:80" + "src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts:57" ] }, { @@ -112,52 +112,50 @@ ] }, { - "call": "Cannot receive DNS checks result", - "key": "Cannot receive DNS checks result", + "call": "Cannot receive checks result", + "key": "Cannot receive checks result", "places": [ - "src/podkop/tabs/diagnostic/checks/runDnsCheck.ts:26" + "src/podkop/tabs/diagnostic/checks/runDnsCheck.ts:27", + "src/podkop/tabs/diagnostic/checks/runNftCheck.ts:28", + "src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts:25" ] }, { - "call": "Cannot receive nftables checks result", - "key": "Cannot receive nftables checks result", + "call": "Checking, please wait", + "key": "Checking, please wait", "places": [ - "src/podkop/tabs/diagnostic/checks/runNftCheck.ts:27" + "src/podkop/tabs/diagnostic/checks/runDnsCheck.ts:15", + "src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts:15", + "src/podkop/tabs/diagnostic/checks/runNftCheck.ts:13", + "src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts:13" ] }, { - "call": "Cannot receive Sing-box checks result", - "key": "Cannot receive Sing-box checks result", + "call": "checks", + "key": "checks", "places": [ - "src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts:24" + "src/podkop/tabs/diagnostic/helpers/getCheckTitle.ts:2" ] }, { - "call": "Checking dns, please wait", - "key": "Checking dns, please wait", + "call": "Checks failed", + "key": "Checks failed", "places": [ - "src/podkop/tabs/diagnostic/checks/runDnsCheck.ts:14" + "src/podkop/tabs/diagnostic/helpers/getMeta.ts:26" ] }, { - "call": "Checking FakeIP, please wait", - "key": "Checking FakeIP, please wait", + "call": "Checks partially passed", + "key": "Checks partially passed", "places": [ - "src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts:14" + "src/podkop/tabs/diagnostic/helpers/getMeta.ts:20" ] }, { - "call": "Checking nftables, please wait", - "key": "Checking nftables, please wait", + "call": "Checks passed", + "key": "Checks passed", "places": [ - "src/podkop/tabs/diagnostic/checks/runNftCheck.ts:12" - ] - }, - { - "call": "Checking sing-box, please wait", - "key": "Checking sing-box, please wait", - "places": [ - "src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts:12" + "src/podkop/tabs/diagnostic/helpers/getMeta.ts:13" ] }, { @@ -262,7 +260,7 @@ "call": "DHCP has DNS server", "key": "DHCP has DNS server", "places": [ - "src/podkop/tabs/diagnostic/checks/runDnsCheck.ts:89" + "src/podkop/tabs/diagnostic/checks/runDnsCheck.ts:82" ] }, { @@ -301,25 +299,11 @@ "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:382" ] }, - { - "call": "DNS checks", - "key": "DNS checks", - "places": [ - "src/podkop/tabs/diagnostic/checks/contstants.ts:14" - ] - }, - { - "call": "DNS checks passed", - "key": "DNS checks passed", - "places": [ - "src/podkop/tabs/diagnostic/checks/runDnsCheck.ts:64" - ] - }, { "call": "DNS on router", "key": "DNS on router", "places": [ - "src/podkop/tabs/diagnostic/checks/runDnsCheck.ts:84" + "src/podkop/tabs/diagnostic/checks/runDnsCheck.ts:77" ] }, { @@ -524,34 +508,6 @@ "src/helpers/copyToClipboard.ts:12" ] }, - { - "call": "FakeIP checks", - "key": "FakeIP checks", - "places": [ - "src/podkop/tabs/diagnostic/checks/contstants.ts:29" - ] - }, - { - "call": "FakeIP checks failed", - "key": "FakeIP checks failed", - "places": [ - "src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts:57" - ] - }, - { - "call": "FakeIP checks partially passed", - "key": "FakeIP checks partially passed", - "places": [ - "src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts:51" - ] - }, - { - "call": "FakeIP checks passed", - "key": "FakeIP checks passed", - "places": [ - "src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts:44" - ] - }, { "call": "Fastest", "key": "Fastest", @@ -816,7 +772,7 @@ "call": "Invalid VLESS URL: parsing failed", "key": "Invalid VLESS URL: parsing failed", "places": [ - "src/validators/validateVlessUrl.ts:109" + "src/validators/validateVlessUrl.ts:110" ] }, { @@ -858,7 +814,7 @@ "call": "Main DNS", "key": "Main DNS", "places": [ - "src/podkop/tabs/diagnostic/checks/runDnsCheck.ts:79" + "src/podkop/tabs/diagnostic/checks/runDnsCheck.ts:72" ] }, { @@ -889,32 +845,11 @@ "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:120" ] }, - { - "call": "Nftables checks", - "key": "Nftables checks", - "places": [ - "src/podkop/tabs/diagnostic/checks/contstants.ts:24" - ] - }, - { - "call": "Nftables checks partially passed", - "key": "Nftables checks partially passed", - "places": [ - "src/podkop/tabs/diagnostic/checks/runNftCheck.ts:75" - ] - }, - { - "call": "Nftables checks passed", - "key": "Nftables checks passed", - "places": [ - "src/podkop/tabs/diagnostic/checks/runNftCheck.ts:74" - ] - }, { "call": "No other marking rules found", "key": "No other marking rules found", "places": [ - "src/podkop/tabs/diagnostic/checks/runNftCheck.ts:116" + "src/podkop/tabs/diagnostic/checks/runNftCheck.ts:105" ] }, { @@ -1036,14 +971,14 @@ "call": "Proxy traffic is not routed via FakeIP", "key": "Proxy traffic is not routed via FakeIP", "places": [ - "src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts:89" + "src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts:66" ] }, { "call": "Proxy traffic is routed via FakeIP", "key": "Proxy traffic is routed via FakeIP", "places": [ - "src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts:88" + "src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts:65" ] }, { @@ -1088,14 +1023,14 @@ "call": "Router DNS is not routed through sing-box", "key": "Router DNS is not routed through sing-box", "places": [ - "src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts:74" + "src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts:51" ] }, { "call": "Router DNS is routed through sing-box", "key": "Router DNS is routed through sing-box", "places": [ - "src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts:73" + "src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts:50" ] }, { @@ -1109,42 +1044,42 @@ "call": "Rules mangle counters", "key": "Rules mangle counters", "places": [ - "src/podkop/tabs/diagnostic/checks/runNftCheck.ts:90" + "src/podkop/tabs/diagnostic/checks/runNftCheck.ts:79" ] }, { "call": "Rules mangle exist", "key": "Rules mangle exist", "places": [ - "src/podkop/tabs/diagnostic/checks/runNftCheck.ts:85" + "src/podkop/tabs/diagnostic/checks/runNftCheck.ts:74" ] }, { "call": "Rules mangle output counters", "key": "Rules mangle output counters", "places": [ - "src/podkop/tabs/diagnostic/checks/runNftCheck.ts:100" + "src/podkop/tabs/diagnostic/checks/runNftCheck.ts:89" ] }, { "call": "Rules mangle output exist", "key": "Rules mangle output exist", "places": [ - "src/podkop/tabs/diagnostic/checks/runNftCheck.ts:95" + "src/podkop/tabs/diagnostic/checks/runNftCheck.ts:84" ] }, { "call": "Rules proxy counters", "key": "Rules proxy counters", "places": [ - "src/podkop/tabs/diagnostic/checks/runNftCheck.ts:110" + "src/podkop/tabs/diagnostic/checks/runNftCheck.ts:99" ] }, { "call": "Rules proxy exist", "key": "Rules proxy exist", "places": [ - "src/podkop/tabs/diagnostic/checks/runNftCheck.ts:105" + "src/podkop/tabs/diagnostic/checks/runNftCheck.ts:94" ] }, { @@ -1307,56 +1242,42 @@ "call": "Sing-box autostart disabled", "key": "Sing-box autostart disabled", "places": [ - "src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts:86" - ] - }, - { - "call": "Sing-box checks", - "key": "Sing-box checks", - "places": [ - "src/podkop/tabs/diagnostic/checks/contstants.ts:19" - ] - }, - { - "call": "Sing-box checks passed", - "key": "Sing-box checks passed", - "places": [ - "src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts:66" + "src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts:77" ] }, { "call": "Sing-box installed", "key": "Sing-box installed", "places": [ - "src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts:71" + "src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts:62" ] }, { "call": "Sing-box listening ports", "key": "Sing-box listening ports", "places": [ - "src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts:96" + "src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts:87" ] }, { "call": "Sing-box process running", "key": "Sing-box process running", "places": [ - "src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts:91" + "src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts:82" ] }, { "call": "Sing-box service exist", "key": "Sing-box service exist", "places": [ - "src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts:81" + "src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts:72" ] }, { "call": "Sing-box version >= 1.12.4", "key": "Sing-box version >= 1.12.4", "places": [ - "src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts:76" + "src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts:67" ] }, { @@ -1441,7 +1362,7 @@ "call": "Table exist", "key": "Table exist", "places": [ - "src/podkop/tabs/diagnostic/checks/runNftCheck.ts:80" + "src/podkop/tabs/diagnostic/checks/runNftCheck.ts:69" ] }, { @@ -1636,7 +1557,7 @@ "src/validators/validateSubnet.ts:38", "src/validators/validateTrojanUrl.ts:59", "src/validators/validateUrl.ts:16", - "src/validators/validateVlessUrl.ts:107" + "src/validators/validateVlessUrl.ts:108" ] }, { diff --git a/fe-app-podkop/locales/podkop.pot b/fe-app-podkop/locales/podkop.pot index c3929c7..55acc57 100644 --- a/fe-app-podkop/locales/podkop.pot +++ b/fe-app-podkop/locales/podkop.pot @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: PODKOP\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-23 15:27+0300\n" -"PO-Revision-Date: 2025-10-23 15:27+0300\n" +"POT-Creation-Date: 2025-10-23 15:55+0300\n" +"PO-Revision-Date: 2025-10-23 15:55+0300\n" "Last-Translator: divocat \n" "Language-Team: LANGUAGE \n" "Language: \n" @@ -36,7 +36,7 @@ msgstr "" msgid "Active Connections" msgstr "" -#: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:117 +#: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:106 msgid "Additional marking rules found" msgstr "" @@ -56,7 +56,7 @@ msgstr "" msgid "Available actions" msgstr "" -#: src/podkop/tabs/diagnostic/checks/runDnsCheck.ts:72 +#: src/podkop/tabs/diagnostic/checks/runDnsCheck.ts:65 msgid "Bootsrap DNS" msgstr "" @@ -64,11 +64,11 @@ msgstr "" msgid "Bootstrap DNS server" msgstr "" -#: src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts:81 +#: src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts:58 msgid "Browser is not using FakeIP" msgstr "" -#: src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts:80 +#: src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts:57 msgid "Browser is using FakeIP correctly" msgstr "" @@ -80,32 +80,33 @@ msgstr "" msgid "Cache file path cannot be empty" msgstr "" -#: src/podkop/tabs/diagnostic/checks/runDnsCheck.ts:26 -msgid "Cannot receive DNS checks result" +#: src/podkop/tabs/diagnostic/checks/runDnsCheck.ts:27 +#: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:28 +#: src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts:25 +msgid "Cannot receive checks result" msgstr "" -#: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:27 -msgid "Cannot receive nftables checks result" +#: src/podkop/tabs/diagnostic/checks/runDnsCheck.ts:15 +#: src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts:15 +#: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:13 +#: src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts:13 +msgid "Checking, please wait" msgstr "" -#: src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts:24 -msgid "Cannot receive Sing-box checks result" +#: src/podkop/tabs/diagnostic/helpers/getCheckTitle.ts:2 +msgid "checks" msgstr "" -#: src/podkop/tabs/diagnostic/checks/runDnsCheck.ts:14 -msgid "Checking dns, please wait" +#: src/podkop/tabs/diagnostic/helpers/getMeta.ts:26 +msgid "Checks failed" msgstr "" -#: src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts:14 -msgid "Checking FakeIP, please wait" +#: src/podkop/tabs/diagnostic/helpers/getMeta.ts:20 +msgid "Checks partially passed" msgstr "" -#: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:12 -msgid "Checking nftables, please wait" -msgstr "" - -#: src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts:12 -msgid "Checking sing-box, please wait" +#: src/podkop/tabs/diagnostic/helpers/getMeta.ts:13 +msgid "Checks passed" msgstr "" #: src/validators/validateSubnet.ts:33 @@ -164,7 +165,7 @@ msgstr "" msgid "Delay value cannot be empty" msgstr "" -#: src/podkop/tabs/diagnostic/checks/runDnsCheck.ts:89 +#: src/podkop/tabs/diagnostic/checks/runDnsCheck.ts:82 msgid "DHCP has DNS server" msgstr "" @@ -189,15 +190,7 @@ msgstr "" msgid "Disabled" msgstr "" -#: src/podkop/tabs/diagnostic/checks/contstants.ts:14 -msgid "DNS checks" -msgstr "" - -#: src/podkop/tabs/diagnostic/checks/runDnsCheck.ts:64 -msgid "DNS checks passed" -msgstr "" - -#: src/podkop/tabs/diagnostic/checks/runDnsCheck.ts:84 +#: src/podkop/tabs/diagnostic/checks/runDnsCheck.ts:77 msgid "DNS on router" msgstr "" @@ -319,22 +312,6 @@ msgstr "" msgid "Failed to copy!" msgstr "" -#: src/podkop/tabs/diagnostic/checks/contstants.ts:29 -msgid "FakeIP checks" -msgstr "" - -#: src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts:57 -msgid "FakeIP checks failed" -msgstr "" - -#: src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts:51 -msgid "FakeIP checks partially passed" -msgstr "" - -#: src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts:44 -msgid "FakeIP checks passed" -msgstr "" - #: src/podkop/methods/custom/getDashboardSections.ts:117 msgid "Fastest" msgstr "" @@ -484,7 +461,7 @@ msgstr "" msgid "Invalid URL format" msgstr "" -#: src/validators/validateVlessUrl.ts:109 +#: src/validators/validateVlessUrl.ts:110 msgid "Invalid VLESS URL: parsing failed" msgstr "" @@ -508,7 +485,7 @@ msgstr "" msgid "Local Subnet Lists" msgstr "" -#: src/podkop/tabs/diagnostic/checks/runDnsCheck.ts:79 +#: src/podkop/tabs/diagnostic/checks/runDnsCheck.ts:72 msgid "Main DNS" msgstr "" @@ -528,19 +505,7 @@ msgstr "" msgid "Network Interface" msgstr "" -#: src/podkop/tabs/diagnostic/checks/contstants.ts:24 -msgid "Nftables checks" -msgstr "" - -#: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:75 -msgid "Nftables checks partially passed" -msgstr "" - -#: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:74 -msgid "Nftables checks passed" -msgstr "" - -#: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:116 +#: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:105 msgid "No other marking rules found" msgstr "" @@ -611,11 +576,11 @@ msgstr "" msgid "Proxy Configuration URL" msgstr "" -#: src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts:89 +#: src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts:66 msgid "Proxy traffic is not routed via FakeIP" msgstr "" -#: src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts:88 +#: src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts:65 msgid "Proxy traffic is routed via FakeIP" msgstr "" @@ -642,11 +607,11 @@ msgstr "" msgid "Restart podkop" msgstr "" -#: src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts:74 +#: src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts:51 msgid "Router DNS is not routed through sing-box" msgstr "" -#: src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts:73 +#: src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts:50 msgid "Router DNS is routed through sing-box" msgstr "" @@ -654,27 +619,27 @@ msgstr "" msgid "Routing Excluded IPs" msgstr "" -#: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:90 +#: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:79 msgid "Rules mangle counters" msgstr "" -#: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:85 +#: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:74 msgid "Rules mangle exist" msgstr "" -#: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:100 +#: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:89 msgid "Rules mangle output counters" msgstr "" -#: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:95 +#: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:84 msgid "Rules mangle output exist" msgstr "" -#: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:110 +#: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:99 msgid "Rules proxy counters" msgstr "" -#: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:105 +#: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:94 msgid "Rules proxy exist" msgstr "" @@ -768,35 +733,27 @@ msgstr "" msgid "Sing-box" msgstr "" -#: src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts:86 +#: src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts:77 msgid "Sing-box autostart disabled" msgstr "" -#: src/podkop/tabs/diagnostic/checks/contstants.ts:19 -msgid "Sing-box checks" -msgstr "" - -#: src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts:66 -msgid "Sing-box checks passed" -msgstr "" - -#: src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts:71 +#: src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts:62 msgid "Sing-box installed" msgstr "" -#: src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts:96 +#: src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts:87 msgid "Sing-box listening ports" msgstr "" -#: src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts:91 +#: src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts:82 msgid "Sing-box process running" msgstr "" -#: src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts:81 +#: src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts:72 msgid "Sing-box service exist" msgstr "" -#: src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts:76 +#: src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts:67 msgid "Sing-box version >= 1.12.4" msgstr "" @@ -845,7 +802,7 @@ msgstr "" msgid "System information" msgstr "" -#: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:80 +#: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:69 msgid "Table exist" msgstr "" @@ -965,7 +922,7 @@ msgstr "" #: src/validators/validateSubnet.ts:38 #: src/validators/validateTrojanUrl.ts:59 #: src/validators/validateUrl.ts:16 -#: src/validators/validateVlessUrl.ts:107 +#: src/validators/validateVlessUrl.ts:108 msgid "Valid" msgstr "" diff --git a/fe-app-podkop/locales/podkop.ru.po b/fe-app-podkop/locales/podkop.ru.po index 29c2e15..471a18f 100644 --- a/fe-app-podkop/locales/podkop.ru.po +++ b/fe-app-podkop/locales/podkop.ru.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: PODKOP\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-23 18:27+0300\n" -"PO-Revision-Date: 2025-10-23 18:27+0300\n" +"POT-Creation-Date: 2025-10-23 18:55+0300\n" +"PO-Revision-Date: 2025-10-23 18:55+0300\n" "Last-Translator: divocat\n" "Language-Team: none\n" "Language: ru\n" @@ -65,26 +65,23 @@ msgstr "Путь к файлу кэша" msgid "Cache file path cannot be empty" msgstr "Путь к файлу кэша не может быть пустым" -msgid "Cannot receive DNS checks result" -msgstr "Не удалось получить результаты проверки DNS" +msgid "Cannot receive checks result" +msgstr "Не удалось получить результаты проверки" -msgid "Cannot receive nftables checks result" -msgstr "Не удалось получить результаты проверки nftables" +msgid "Checking, please wait" +msgstr "Проверяем, пожалуйста подождите" -msgid "Cannot receive Sing-box checks result" -msgstr "Не удалось получить результаты проверки Sing-box" +msgid "checks" +msgstr "проверки" -msgid "Checking dns, please wait" -msgstr "Проверка dns, пожалуйста подождите" +msgid "Checks failed" +msgstr "Проверки не пройдены" -msgid "Checking FakeIP, please wait" -msgstr "Проверка FakeIP, пожалуйста подождите" +msgid "Checks partially passed" +msgstr "Проверки пройдены частично" -msgid "Checking nftables, please wait" -msgstr "Проверка nftables, пожалуйста подождите" - -msgid "Checking sing-box, please wait" -msgstr "Проверка sing-box, пожалуйста подождите" +msgid "Checks passed" +msgstr "Проверки пройдены" msgid "CIDR must be between 0 and 32" msgstr "CIDR должен быть между 0 и 32" @@ -146,12 +143,6 @@ msgstr "Отключить QUIC протокол для улучшения со msgid "Disabled" msgstr "Отключено" -msgid "DNS checks" -msgstr "DNS проверки" - -msgid "DNS checks passed" -msgstr "DNS проверки успешно завершены" - msgid "DNS on router" msgstr "DNS на роутере" @@ -239,18 +230,6 @@ msgstr "Исключите трафик протокола NTP из туннел msgid "Failed to copy!" msgstr "Не удалось скопировать!" -msgid "FakeIP checks" -msgstr "Проверка FakeIP" - -msgid "FakeIP checks failed" -msgstr "Проверки FakeIP не пройдены" - -msgid "FakeIP checks partially passed" -msgstr "Проверка FakeIP частично пройдена" - -msgid "FakeIP checks passed" -msgstr "Проверки FakeIP пройдены" - msgid "Fastest" msgstr "Самый быстрый" @@ -395,15 +374,6 @@ msgstr "Наблюдаемые интерфейсы" msgid "Network Interface" msgstr "Сетевой интерфейс" -msgid "Nftables checks" -msgstr "Проверки Nftables" - -msgid "Nftables checks partially passed" -msgstr "Проверки Nftables частично пройдена" - -msgid "Nftables checks passed" -msgstr "Nftables проверки успешно завершены" - msgid "No other marking rules found" msgstr "Другие правила маркировки не найдены" @@ -572,12 +542,6 @@ msgstr "Sing-box" msgid "Sing-box autostart disabled" msgstr "Автостарт sing-box отключен" -msgid "Sing-box checks" -msgstr "Sing-box проверки" - -msgid "Sing-box checks passed" -msgstr "Sing-box проверки успешно завершены" - msgid "Sing-box installed" msgstr "Sing-box установлен" diff --git a/fe-app-podkop/src/podkop/tabs/diagnostic/checks/contstants.ts b/fe-app-podkop/src/podkop/tabs/diagnostic/checks/contstants.ts index 5c3b2d9..326c40a 100644 --- a/fe-app-podkop/src/podkop/tabs/diagnostic/checks/contstants.ts +++ b/fe-app-podkop/src/podkop/tabs/diagnostic/checks/contstants.ts @@ -1,3 +1,5 @@ +import { getCheckTitle } from '../helpers/getCheckTitle'; + export enum DIAGNOSTICS_CHECKS { DNS = 'DNS', SINGBOX = 'SINGBOX', @@ -11,22 +13,22 @@ export const DIAGNOSTICS_CHECKS_MAP: Record< > = { [DIAGNOSTICS_CHECKS.DNS]: { order: 1, - title: _('DNS checks'), + title: getCheckTitle('DNS'), code: DIAGNOSTICS_CHECKS.DNS, }, [DIAGNOSTICS_CHECKS.SINGBOX]: { order: 2, - title: _('Sing-box checks'), + title: getCheckTitle('Sing-box'), code: DIAGNOSTICS_CHECKS.SINGBOX, }, [DIAGNOSTICS_CHECKS.NFT]: { order: 3, - title: _('Nftables checks'), + title: getCheckTitle('Nftables'), code: DIAGNOSTICS_CHECKS.NFT, }, [DIAGNOSTICS_CHECKS.FAKEIP]: { order: 4, - title: _('FakeIP checks'), + title: getCheckTitle('FakeIP'), code: DIAGNOSTICS_CHECKS.FAKEIP, }, }; diff --git a/fe-app-podkop/src/podkop/tabs/diagnostic/checks/runDnsCheck.ts b/fe-app-podkop/src/podkop/tabs/diagnostic/checks/runDnsCheck.ts index c64cf7b..4a13b4e 100644 --- a/fe-app-podkop/src/podkop/tabs/diagnostic/checks/runDnsCheck.ts +++ b/fe-app-podkop/src/podkop/tabs/diagnostic/checks/runDnsCheck.ts @@ -3,6 +3,7 @@ import { DIAGNOSTICS_CHECKS_MAP } from './contstants'; import { PodkopShellMethods } from '../../../methods'; import { IDiagnosticsChecksItem } from '../../../services'; import { updateCheckStore } from './updateCheckStore'; +import { getMeta } from '../helpers/getMeta'; export async function runDnsCheck() { const { order, title, code } = DIAGNOSTICS_CHECKS_MAP.DNS; @@ -11,7 +12,7 @@ export async function runDnsCheck() { order, code, title, - description: _('Checking dns, please wait'), + description: _('Checking, please wait'), state: 'loading', items: [], }); @@ -23,7 +24,7 @@ export async function runDnsCheck() { order, code, title, - description: _('Cannot receive DNS checks result'), + description: _('Cannot receive checks result'), state: 'error', items: [], }); @@ -45,27 +46,19 @@ export async function runDnsCheck() { Boolean(data.bootstrap_dns_status) || Boolean(data.dns_status); - function getStatus() { - if (allGood) { - return 'success'; - } - - if (atLeastOneGood) { - return 'warning'; - } - - return 'error'; - } + const { state, description } = getMeta({ atLeastOneGood, allGood }); updateCheckStore({ order, code, title, - description: _('DNS checks passed'), - state: getStatus(), + description, + state, items: [ ...insertIf( - data.dns_type === 'doh' || data.dns_type === 'dot', + data.dns_type === 'doh' || + data.dns_type === 'dot' || + !data.bootstrap_dns_status, [ { state: data.bootstrap_dns_status ? 'success' : 'error', diff --git a/fe-app-podkop/src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts b/fe-app-podkop/src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts index 780a547..ebfc729 100644 --- a/fe-app-podkop/src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts +++ b/fe-app-podkop/src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts @@ -3,6 +3,7 @@ import { DIAGNOSTICS_CHECKS_MAP } from './contstants'; import { PodkopShellMethods, RemoteFakeIPMethods } from '../../../methods'; import { IDiagnosticsChecksItem } from '../../../services'; import { updateCheckStore } from './updateCheckStore'; +import { getMeta } from '../helpers/getMeta'; export async function runFakeIPCheck() { const { order, title, code } = DIAGNOSTICS_CHECKS_MAP.FAKEIP; @@ -11,7 +12,7 @@ export async function runFakeIPCheck() { order, code, title, - description: _('Checking FakeIP, please wait'), + description: _('Checking, please wait'), state: 'loading', items: [], }); @@ -34,31 +35,7 @@ export async function runFakeIPCheck() { const atLeastOneGood = checks.router && checks.browserFakeIP && checks.differentIP; - function getMeta(): { - description: string; - state: 'loading' | 'warning' | 'success' | 'error' | 'skipped'; - } { - if (allGood) { - return { - state: 'success', - description: _('FakeIP checks passed'), - }; - } - - if (atLeastOneGood) { - return { - state: 'warning', - description: _('FakeIP checks partially passed'), - }; - } - - return { - state: 'error', - description: _('FakeIP checks failed'), - }; - } - - const { state, description } = getMeta(); + const { state, description } = getMeta({ atLeastOneGood, allGood }); updateCheckStore({ order, diff --git a/fe-app-podkop/src/podkop/tabs/diagnostic/checks/runNftCheck.ts b/fe-app-podkop/src/podkop/tabs/diagnostic/checks/runNftCheck.ts index 5f413c9..a28a378 100644 --- a/fe-app-podkop/src/podkop/tabs/diagnostic/checks/runNftCheck.ts +++ b/fe-app-podkop/src/podkop/tabs/diagnostic/checks/runNftCheck.ts @@ -1,6 +1,7 @@ import { DIAGNOSTICS_CHECKS_MAP } from './contstants'; import { RemoteFakeIPMethods, PodkopShellMethods } from '../../../methods'; import { updateCheckStore } from './updateCheckStore'; +import { getMeta } from '../helpers/getMeta'; export async function runNftCheck() { const { order, title, code } = DIAGNOSTICS_CHECKS_MAP.NFT; @@ -9,7 +10,7 @@ export async function runNftCheck() { order, code, title, - description: _('Checking nftables, please wait'), + description: _('Checking, please wait'), state: 'loading', items: [], }); @@ -24,7 +25,7 @@ export async function runNftCheck() { order, code, title, - description: _('Cannot receive nftables checks result'), + description: _('Cannot receive checks result'), state: 'error', items: [], }); @@ -54,26 +55,14 @@ export async function runNftCheck() { Boolean(data.rules_proxy_counters) || !data.rules_other_mark_exist; - function getStatus() { - if (allGood) { - return 'success'; - } - - if (atLeastOneGood) { - return 'warning'; - } - - return 'error'; - } + const { state, description } = getMeta({ atLeastOneGood, allGood }); updateCheckStore({ order, code, title, - description: allGood - ? _('Nftables checks passed') - : _('Nftables checks partially passed'), - state: getStatus(), + description, + state, items: [ { state: data.table_exist ? 'success' : 'error', diff --git a/fe-app-podkop/src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts b/fe-app-podkop/src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts index 15e0bc9..28c7815 100644 --- a/fe-app-podkop/src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts +++ b/fe-app-podkop/src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts @@ -1,6 +1,7 @@ import { DIAGNOSTICS_CHECKS_MAP } from './contstants'; import { PodkopShellMethods } from '../../../methods'; import { updateCheckStore } from './updateCheckStore'; +import { getMeta } from '../helpers/getMeta'; export async function runSingBoxCheck() { const { order, title, code } = DIAGNOSTICS_CHECKS_MAP.SINGBOX; @@ -9,7 +10,7 @@ export async function runSingBoxCheck() { order, code, title, - description: _('Checking sing-box, please wait'), + description: _('Checking, please wait'), state: 'loading', items: [], }); @@ -21,7 +22,7 @@ export async function runSingBoxCheck() { order, code, title, - description: _('Cannot receive Sing-box checks result'), + description: _('Cannot receive checks result'), state: 'error', items: [], }); @@ -47,24 +48,14 @@ export async function runSingBoxCheck() { Boolean(data.sing_box_process_running) || Boolean(data.sing_box_ports_listening); - function getStatus() { - if (allGood) { - return 'success'; - } - - if (atLeastOneGood) { - return 'warning'; - } - - return 'error'; - } + const { state, description } = getMeta({ atLeastOneGood, allGood }); updateCheckStore({ order, code, title, - description: _('Sing-box checks passed'), - state: getStatus(), + description, + state, items: [ { state: data.sing_box_installed ? 'success' : 'error', diff --git a/fe-app-podkop/src/podkop/tabs/diagnostic/helpers/getCheckTitle.ts b/fe-app-podkop/src/podkop/tabs/diagnostic/helpers/getCheckTitle.ts new file mode 100644 index 0000000..cb7f7a6 --- /dev/null +++ b/fe-app-podkop/src/podkop/tabs/diagnostic/helpers/getCheckTitle.ts @@ -0,0 +1,3 @@ +export function getCheckTitle(name: string) { + return `${name} ${_('checks')}`; +} diff --git a/fe-app-podkop/src/podkop/tabs/diagnostic/helpers/getMeta.ts b/fe-app-podkop/src/podkop/tabs/diagnostic/helpers/getMeta.ts new file mode 100644 index 0000000..c8a4f9b --- /dev/null +++ b/fe-app-podkop/src/podkop/tabs/diagnostic/helpers/getMeta.ts @@ -0,0 +1,28 @@ +interface IGetMetaProps { + allGood: boolean; + atLeastOneGood: boolean; +} + +export function getMeta({ allGood, atLeastOneGood }: IGetMetaProps): { + description: string; + state: 'loading' | 'warning' | 'success' | 'error' | 'skipped'; +} { + if (allGood) { + return { + state: 'success', + description: _('Checks passed'), + }; + } + + if (atLeastOneGood) { + return { + state: 'warning', + description: _('Checks partially passed'), + }; + } + + return { + state: 'error', + description: _('Checks failed'), + }; +} diff --git a/luci-app-podkop/htdocs/luci-static/resources/view/podkop/main.js b/luci-app-podkop/htdocs/luci-static/resources/view/podkop/main.js index b315c30..4c6e0e5 100644 --- a/luci-app-podkop/htdocs/luci-static/resources/view/podkop/main.js +++ b/luci-app-podkop/htdocs/luci-static/resources/view/podkop/main.js @@ -979,26 +979,31 @@ var TabService = class _TabService { }; var TabServiceInstance = TabService.getInstance(); +// src/podkop/tabs/diagnostic/helpers/getCheckTitle.ts +function getCheckTitle(name) { + return `${name} ${_("checks")}`; +} + // src/podkop/tabs/diagnostic/checks/contstants.ts var DIAGNOSTICS_CHECKS_MAP = { ["DNS" /* DNS */]: { order: 1, - title: _("DNS checks"), + title: getCheckTitle("DNS"), code: "DNS" /* DNS */ }, ["SINGBOX" /* SINGBOX */]: { order: 2, - title: _("Sing-box checks"), + title: getCheckTitle("Sing-box"), code: "SINGBOX" /* SINGBOX */ }, ["NFT" /* NFT */]: { order: 3, - title: _("Nftables checks"), + title: getCheckTitle("Nftables"), code: "NFT" /* NFT */ }, ["FAKEIP" /* FAKEIP */]: { order: 4, - title: _("FakeIP checks"), + title: getCheckTitle("FakeIP"), code: "FAKEIP" /* FAKEIP */ } }; @@ -2356,6 +2361,26 @@ function updateCheckStore(check, minified) { }); } +// src/podkop/tabs/diagnostic/helpers/getMeta.ts +function getMeta({ allGood, atLeastOneGood }) { + if (allGood) { + return { + state: "success", + description: _("Checks passed") + }; + } + if (atLeastOneGood) { + return { + state: "warning", + description: _("Checks partially passed") + }; + } + return { + state: "error", + description: _("Checks failed") + }; +} + // src/podkop/tabs/diagnostic/checks/runDnsCheck.ts async function runDnsCheck() { const { order, title, code } = DIAGNOSTICS_CHECKS_MAP.DNS; @@ -2363,7 +2388,7 @@ async function runDnsCheck() { order, code, title, - description: _("Checking dns, please wait"), + description: _("Checking, please wait"), state: "loading", items: [] }); @@ -2373,7 +2398,7 @@ async function runDnsCheck() { order, code, title, - description: _("Cannot receive DNS checks result"), + description: _("Cannot receive checks result"), state: "error", items: [] }); @@ -2382,24 +2407,16 @@ async function runDnsCheck() { const data = dnsChecks.data; const allGood = Boolean(data.dns_on_router) && Boolean(data.dhcp_config_status) && Boolean(data.bootstrap_dns_status) && Boolean(data.dns_status); const atLeastOneGood = Boolean(data.dns_on_router) || Boolean(data.dhcp_config_status) || Boolean(data.bootstrap_dns_status) || Boolean(data.dns_status); - function getStatus() { - if (allGood) { - return "success"; - } - if (atLeastOneGood) { - return "warning"; - } - return "error"; - } + const { state, description } = getMeta({ atLeastOneGood, allGood }); updateCheckStore({ order, code, title, - description: _("DNS checks passed"), - state: getStatus(), + description, + state, items: [ ...insertIf( - data.dns_type === "doh" || data.dns_type === "dot", + data.dns_type === "doh" || data.dns_type === "dot" || !data.bootstrap_dns_status, [ { state: data.bootstrap_dns_status ? "success" : "error", @@ -2437,7 +2454,7 @@ async function runSingBoxCheck() { order, code, title, - description: _("Checking sing-box, please wait"), + description: _("Checking, please wait"), state: "loading", items: [] }); @@ -2447,7 +2464,7 @@ async function runSingBoxCheck() { order, code, title, - description: _("Cannot receive Sing-box checks result"), + description: _("Cannot receive checks result"), state: "error", items: [] }); @@ -2456,21 +2473,13 @@ async function runSingBoxCheck() { const data = singBoxChecks.data; const allGood = Boolean(data.sing_box_installed) && Boolean(data.sing_box_version_ok) && Boolean(data.sing_box_service_exist) && Boolean(data.sing_box_autostart_disabled) && Boolean(data.sing_box_process_running) && Boolean(data.sing_box_ports_listening); const atLeastOneGood = Boolean(data.sing_box_installed) || Boolean(data.sing_box_version_ok) || Boolean(data.sing_box_service_exist) || Boolean(data.sing_box_autostart_disabled) || Boolean(data.sing_box_process_running) || Boolean(data.sing_box_ports_listening); - function getStatus() { - if (allGood) { - return "success"; - } - if (atLeastOneGood) { - return "warning"; - } - return "error"; - } + const { state, description } = getMeta({ atLeastOneGood, allGood }); updateCheckStore({ order, code, title, - description: _("Sing-box checks passed"), - state: getStatus(), + description, + state, items: [ { state: data.sing_box_installed ? "success" : "error", @@ -2516,7 +2525,7 @@ async function runNftCheck() { order, code, title, - description: _("Checking nftables, please wait"), + description: _("Checking, please wait"), state: "loading", items: [] }); @@ -2528,7 +2537,7 @@ async function runNftCheck() { order, code, title, - description: _("Cannot receive nftables checks result"), + description: _("Cannot receive checks result"), state: "error", items: [] }); @@ -2537,21 +2546,13 @@ async function runNftCheck() { const data = nftablesChecks.data; const allGood = Boolean(data.table_exist) && Boolean(data.rules_mangle_exist) && Boolean(data.rules_mangle_counters) && Boolean(data.rules_mangle_output_exist) && Boolean(data.rules_mangle_output_counters) && Boolean(data.rules_proxy_exist) && Boolean(data.rules_proxy_counters) && !data.rules_other_mark_exist; const atLeastOneGood = Boolean(data.table_exist) || Boolean(data.rules_mangle_exist) || Boolean(data.rules_mangle_counters) || Boolean(data.rules_mangle_output_exist) || Boolean(data.rules_mangle_output_counters) || Boolean(data.rules_proxy_exist) || Boolean(data.rules_proxy_counters) || !data.rules_other_mark_exist; - function getStatus() { - if (allGood) { - return "success"; - } - if (atLeastOneGood) { - return "warning"; - } - return "error"; - } + const { state, description } = getMeta({ atLeastOneGood, allGood }); updateCheckStore({ order, code, title, - description: allGood ? _("Nftables checks passed") : _("Nftables checks partially passed"), - state: getStatus(), + description, + state, items: [ { state: data.table_exist ? "success" : "error", @@ -2607,7 +2608,7 @@ async function runFakeIPCheck() { order, code, title, - description: _("Checking FakeIP, please wait"), + description: _("Checking, please wait"), state: "loading", items: [] }); @@ -2621,25 +2622,7 @@ async function runFakeIPCheck() { }; const allGood = checks.router || checks.browserFakeIP || checks.differentIP; const atLeastOneGood = checks.router && checks.browserFakeIP && checks.differentIP; - function getMeta() { - if (allGood) { - return { - state: "success", - description: _("FakeIP checks passed") - }; - } - if (atLeastOneGood) { - return { - state: "warning", - description: _("FakeIP checks partially passed") - }; - } - return { - state: "error", - description: _("FakeIP checks failed") - }; - } - const { state, description } = getMeta(); + const { state, description } = getMeta({ atLeastOneGood, allGood }); updateCheckStore({ order, code, diff --git a/luci-app-podkop/po/ru/podkop.po b/luci-app-podkop/po/ru/podkop.po index 366e28d..471a18f 100644 --- a/luci-app-podkop/po/ru/podkop.po +++ b/luci-app-podkop/po/ru/podkop.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: PODKOP\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-23 18:27+0300\n" -"PO-Revision-Date: 2025-10-23 18:27+0300\n" +"POT-Creation-Date: 2025-10-23 18:55+0300\n" +"PO-Revision-Date: 2025-10-23 18:55+0300\n" "Last-Translator: divocat\n" "Language-Team: none\n" "Language: ru\n" @@ -45,7 +45,7 @@ msgid "At least one valid subnet or IP must be specified. Comments-only content msgstr "Необходимо указать хотя бы одну действительную подсеть или IP. Только комментарии недопустимы." msgid "Available actions" -msgstr "" +msgstr "Доступные действия" msgid "Bootsrap DNS" msgstr "Bootstrap DNS" @@ -65,26 +65,23 @@ msgstr "Путь к файлу кэша" msgid "Cache file path cannot be empty" msgstr "Путь к файлу кэша не может быть пустым" -msgid "Cannot receive DNS checks result" -msgstr "Не удалось получить результаты проверки DNS" +msgid "Cannot receive checks result" +msgstr "Не удалось получить результаты проверки" -msgid "Cannot receive nftables checks result" -msgstr "Не удалось получить результаты проверки nftables" +msgid "Checking, please wait" +msgstr "Проверяем, пожалуйста подождите" -msgid "Cannot receive Sing-box checks result" -msgstr "Не удалось получить результаты проверки Sing-box" +msgid "checks" +msgstr "проверки" -msgid "Checking dns, please wait" -msgstr "Проверка dns, пожалуйста подождите" +msgid "Checks failed" +msgstr "Проверки не пройдены" -msgid "Checking FakeIP, please wait" -msgstr "Проверка FakeIP, пожалуйста подождите" +msgid "Checks partially passed" +msgstr "Проверки пройдены частично" -msgid "Checking nftables, please wait" -msgstr "Проверка nftables, пожалуйста подождите" - -msgid "Checking sing-box, please wait" -msgstr "Проверка sing-box, пожалуйста подождите" +msgid "Checks passed" +msgstr "Проверки пройдены" msgid "CIDR must be between 0 and 32" msgstr "CIDR должен быть между 0 и 32" @@ -146,12 +143,6 @@ msgstr "Отключить QUIC протокол для улучшения со msgid "Disabled" msgstr "Отключено" -msgid "DNS checks" -msgstr "DNS проверки" - -msgid "DNS checks passed" -msgstr "DNS проверки успешно завершены" - msgid "DNS on router" msgstr "DNS на роутере" @@ -239,18 +230,6 @@ msgstr "Исключите трафик протокола NTP из туннел msgid "Failed to copy!" msgstr "Не удалось скопировать!" -msgid "FakeIP checks" -msgstr "Проверка FakeIP" - -msgid "FakeIP checks failed" -msgstr "Проверки FakeIP не пройдены" - -msgid "FakeIP checks partially passed" -msgstr "Проверка FakeIP частично пройдена" - -msgid "FakeIP checks passed" -msgstr "Проверки FakeIP пройдены" - msgid "Fastest" msgstr "Самый быстрый" @@ -395,15 +374,6 @@ msgstr "Наблюдаемые интерфейсы" msgid "Network Interface" msgstr "Сетевой интерфейс" -msgid "Nftables checks" -msgstr "Проверки Nftables" - -msgid "Nftables checks partially passed" -msgstr "Проверки Nftables частично пройдена" - -msgid "Nftables checks passed" -msgstr "Nftables проверки успешно завершены" - msgid "No other marking rules found" msgstr "Другие правила маркировки не найдены" @@ -572,12 +542,6 @@ msgstr "Sing-box" msgid "Sing-box autostart disabled" msgstr "Автостарт sing-box отключен" -msgid "Sing-box checks" -msgstr "Sing-box проверки" - -msgid "Sing-box checks passed" -msgstr "Sing-box проверки успешно завершены" - msgid "Sing-box installed" msgstr "Sing-box установлен" @@ -624,7 +588,7 @@ msgid "System info" msgstr "Системная информация" msgid "System information" -msgstr "" +msgstr "Системная информация" msgid "Table exist" msgstr "Таблица существует" diff --git a/luci-app-podkop/po/templates/podkop.pot b/luci-app-podkop/po/templates/podkop.pot index c3929c7..55acc57 100644 --- a/luci-app-podkop/po/templates/podkop.pot +++ b/luci-app-podkop/po/templates/podkop.pot @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: PODKOP\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-23 15:27+0300\n" -"PO-Revision-Date: 2025-10-23 15:27+0300\n" +"POT-Creation-Date: 2025-10-23 15:55+0300\n" +"PO-Revision-Date: 2025-10-23 15:55+0300\n" "Last-Translator: divocat \n" "Language-Team: LANGUAGE \n" "Language: \n" @@ -36,7 +36,7 @@ msgstr "" msgid "Active Connections" msgstr "" -#: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:117 +#: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:106 msgid "Additional marking rules found" msgstr "" @@ -56,7 +56,7 @@ msgstr "" msgid "Available actions" msgstr "" -#: src/podkop/tabs/diagnostic/checks/runDnsCheck.ts:72 +#: src/podkop/tabs/diagnostic/checks/runDnsCheck.ts:65 msgid "Bootsrap DNS" msgstr "" @@ -64,11 +64,11 @@ msgstr "" msgid "Bootstrap DNS server" msgstr "" -#: src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts:81 +#: src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts:58 msgid "Browser is not using FakeIP" msgstr "" -#: src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts:80 +#: src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts:57 msgid "Browser is using FakeIP correctly" msgstr "" @@ -80,32 +80,33 @@ msgstr "" msgid "Cache file path cannot be empty" msgstr "" -#: src/podkop/tabs/diagnostic/checks/runDnsCheck.ts:26 -msgid "Cannot receive DNS checks result" +#: src/podkop/tabs/diagnostic/checks/runDnsCheck.ts:27 +#: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:28 +#: src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts:25 +msgid "Cannot receive checks result" msgstr "" -#: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:27 -msgid "Cannot receive nftables checks result" +#: src/podkop/tabs/diagnostic/checks/runDnsCheck.ts:15 +#: src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts:15 +#: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:13 +#: src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts:13 +msgid "Checking, please wait" msgstr "" -#: src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts:24 -msgid "Cannot receive Sing-box checks result" +#: src/podkop/tabs/diagnostic/helpers/getCheckTitle.ts:2 +msgid "checks" msgstr "" -#: src/podkop/tabs/diagnostic/checks/runDnsCheck.ts:14 -msgid "Checking dns, please wait" +#: src/podkop/tabs/diagnostic/helpers/getMeta.ts:26 +msgid "Checks failed" msgstr "" -#: src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts:14 -msgid "Checking FakeIP, please wait" +#: src/podkop/tabs/diagnostic/helpers/getMeta.ts:20 +msgid "Checks partially passed" msgstr "" -#: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:12 -msgid "Checking nftables, please wait" -msgstr "" - -#: src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts:12 -msgid "Checking sing-box, please wait" +#: src/podkop/tabs/diagnostic/helpers/getMeta.ts:13 +msgid "Checks passed" msgstr "" #: src/validators/validateSubnet.ts:33 @@ -164,7 +165,7 @@ msgstr "" msgid "Delay value cannot be empty" msgstr "" -#: src/podkop/tabs/diagnostic/checks/runDnsCheck.ts:89 +#: src/podkop/tabs/diagnostic/checks/runDnsCheck.ts:82 msgid "DHCP has DNS server" msgstr "" @@ -189,15 +190,7 @@ msgstr "" msgid "Disabled" msgstr "" -#: src/podkop/tabs/diagnostic/checks/contstants.ts:14 -msgid "DNS checks" -msgstr "" - -#: src/podkop/tabs/diagnostic/checks/runDnsCheck.ts:64 -msgid "DNS checks passed" -msgstr "" - -#: src/podkop/tabs/diagnostic/checks/runDnsCheck.ts:84 +#: src/podkop/tabs/diagnostic/checks/runDnsCheck.ts:77 msgid "DNS on router" msgstr "" @@ -319,22 +312,6 @@ msgstr "" msgid "Failed to copy!" msgstr "" -#: src/podkop/tabs/diagnostic/checks/contstants.ts:29 -msgid "FakeIP checks" -msgstr "" - -#: src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts:57 -msgid "FakeIP checks failed" -msgstr "" - -#: src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts:51 -msgid "FakeIP checks partially passed" -msgstr "" - -#: src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts:44 -msgid "FakeIP checks passed" -msgstr "" - #: src/podkop/methods/custom/getDashboardSections.ts:117 msgid "Fastest" msgstr "" @@ -484,7 +461,7 @@ msgstr "" msgid "Invalid URL format" msgstr "" -#: src/validators/validateVlessUrl.ts:109 +#: src/validators/validateVlessUrl.ts:110 msgid "Invalid VLESS URL: parsing failed" msgstr "" @@ -508,7 +485,7 @@ msgstr "" msgid "Local Subnet Lists" msgstr "" -#: src/podkop/tabs/diagnostic/checks/runDnsCheck.ts:79 +#: src/podkop/tabs/diagnostic/checks/runDnsCheck.ts:72 msgid "Main DNS" msgstr "" @@ -528,19 +505,7 @@ msgstr "" msgid "Network Interface" msgstr "" -#: src/podkop/tabs/diagnostic/checks/contstants.ts:24 -msgid "Nftables checks" -msgstr "" - -#: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:75 -msgid "Nftables checks partially passed" -msgstr "" - -#: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:74 -msgid "Nftables checks passed" -msgstr "" - -#: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:116 +#: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:105 msgid "No other marking rules found" msgstr "" @@ -611,11 +576,11 @@ msgstr "" msgid "Proxy Configuration URL" msgstr "" -#: src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts:89 +#: src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts:66 msgid "Proxy traffic is not routed via FakeIP" msgstr "" -#: src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts:88 +#: src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts:65 msgid "Proxy traffic is routed via FakeIP" msgstr "" @@ -642,11 +607,11 @@ msgstr "" msgid "Restart podkop" msgstr "" -#: src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts:74 +#: src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts:51 msgid "Router DNS is not routed through sing-box" msgstr "" -#: src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts:73 +#: src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts:50 msgid "Router DNS is routed through sing-box" msgstr "" @@ -654,27 +619,27 @@ msgstr "" msgid "Routing Excluded IPs" msgstr "" -#: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:90 +#: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:79 msgid "Rules mangle counters" msgstr "" -#: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:85 +#: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:74 msgid "Rules mangle exist" msgstr "" -#: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:100 +#: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:89 msgid "Rules mangle output counters" msgstr "" -#: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:95 +#: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:84 msgid "Rules mangle output exist" msgstr "" -#: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:110 +#: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:99 msgid "Rules proxy counters" msgstr "" -#: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:105 +#: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:94 msgid "Rules proxy exist" msgstr "" @@ -768,35 +733,27 @@ msgstr "" msgid "Sing-box" msgstr "" -#: src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts:86 +#: src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts:77 msgid "Sing-box autostart disabled" msgstr "" -#: src/podkop/tabs/diagnostic/checks/contstants.ts:19 -msgid "Sing-box checks" -msgstr "" - -#: src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts:66 -msgid "Sing-box checks passed" -msgstr "" - -#: src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts:71 +#: src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts:62 msgid "Sing-box installed" msgstr "" -#: src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts:96 +#: src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts:87 msgid "Sing-box listening ports" msgstr "" -#: src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts:91 +#: src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts:82 msgid "Sing-box process running" msgstr "" -#: src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts:81 +#: src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts:72 msgid "Sing-box service exist" msgstr "" -#: src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts:76 +#: src/podkop/tabs/diagnostic/checks/runSingBoxCheck.ts:67 msgid "Sing-box version >= 1.12.4" msgstr "" @@ -845,7 +802,7 @@ msgstr "" msgid "System information" msgstr "" -#: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:80 +#: src/podkop/tabs/diagnostic/checks/runNftCheck.ts:69 msgid "Table exist" msgstr "" @@ -965,7 +922,7 @@ msgstr "" #: src/validators/validateSubnet.ts:38 #: src/validators/validateTrojanUrl.ts:59 #: src/validators/validateUrl.ts:16 -#: src/validators/validateVlessUrl.ts:107 +#: src/validators/validateVlessUrl.ts:108 msgid "Valid" msgstr "" From 9f8f032dce9df9a0d86d79f51993f899e137fd60 Mon Sep 17 00:00:00 2001 From: divocat Date: Thu, 23 Oct 2025 19:01:06 +0300 Subject: [PATCH 3/9] feat: increase shell timeout to 15s --- fe-app-podkop/src/podkop/methods/shell/callBaseMethod.ts | 2 +- .../htdocs/luci-static/resources/view/podkop/main.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fe-app-podkop/src/podkop/methods/shell/callBaseMethod.ts b/fe-app-podkop/src/podkop/methods/shell/callBaseMethod.ts index 04f1ef9..519cd36 100644 --- a/fe-app-podkop/src/podkop/methods/shell/callBaseMethod.ts +++ b/fe-app-podkop/src/podkop/methods/shell/callBaseMethod.ts @@ -9,7 +9,7 @@ export async function callBaseMethod( const response = await executeShellCommand({ command, args: [method as string, ...args], - timeout: 10000, + timeout: 15000, }); if (response.stdout) { diff --git a/luci-app-podkop/htdocs/luci-static/resources/view/podkop/main.js b/luci-app-podkop/htdocs/luci-static/resources/view/podkop/main.js index 4c6e0e5..b68dcec 100644 --- a/luci-app-podkop/htdocs/luci-static/resources/view/podkop/main.js +++ b/luci-app-podkop/htdocs/luci-static/resources/view/podkop/main.js @@ -487,7 +487,7 @@ async function callBaseMethod(method, args = [], command = "/usr/bin/podkop") { const response = await executeShellCommand({ command, args: [method, ...args], - timeout: 1e4 + timeout: 15e3 }); if (response.stdout) { try { From 13d27dab216e9088441d0c9cab151c94f7c2bc16 Mon Sep 17 00:00:00 2001 From: divocat Date: Thu, 23 Oct 2025 19:08:27 +0300 Subject: [PATCH 4/9] feat: add toast when shell exec failed --- fe-app-podkop/locales/calls.json | 28 +++++++++++++----- fe-app-podkop/locales/podkop.pot | 29 ++++++++++++------- fe-app-podkop/locales/podkop.ru.po | 7 +++-- .../podkop/tabs/diagnostic/initController.ts | 25 +++++++++++++++- .../luci-static/resources/view/podkop/main.js | 23 ++++++++++++++- luci-app-podkop/po/ru/podkop.po | 7 +++-- luci-app-podkop/po/templates/podkop.pot | 29 ++++++++++++------- 7 files changed, 114 insertions(+), 34 deletions(-) diff --git a/fe-app-podkop/locales/calls.json b/fe-app-podkop/locales/calls.json index c11f557..b4e1ca0 100644 --- a/fe-app-podkop/locales/calls.json +++ b/fe-app-podkop/locales/calls.json @@ -508,6 +508,18 @@ "src/helpers/copyToClipboard.ts:12" ] }, + { + "call": "Failed to execute!", + "key": "Failed to execute!", + "places": [ + "src/podkop/tabs/diagnostic/initController.ts:225", + "src/podkop/tabs/diagnostic/initController.ts:229", + "src/podkop/tabs/diagnostic/initController.ts:259", + "src/podkop/tabs/diagnostic/initController.ts:263", + "src/podkop/tabs/diagnostic/initController.ts:297", + "src/podkop/tabs/diagnostic/initController.ts:301" + ] + }, { "call": "Fastest", "key": "Fastest", @@ -533,7 +545,7 @@ "call": "Global check", "key": "Global check", "places": [ - "src/podkop/tabs/diagnostic/initController.ts:218" + "src/podkop/tabs/diagnostic/initController.ts:220" ] }, { @@ -786,7 +798,7 @@ "call": "Latest", "key": "Latest", "places": [ - "src/podkop/tabs/diagnostic/initController.ts:404" + "src/podkop/tabs/diagnostic/initController.ts:427" ] }, { @@ -901,7 +913,7 @@ "call": "Outdated", "key": "Outdated", "places": [ - "src/podkop/tabs/diagnostic/initController.ts:394" + "src/podkop/tabs/diagnostic/initController.ts:417" ] }, { @@ -1227,7 +1239,7 @@ "call": "Show sing-box config", "key": "Show sing-box config", "places": [ - "src/podkop/tabs/diagnostic/initController.ts:278", + "src/podkop/tabs/diagnostic/initController.ts:288", "src/podkop/tabs/diagnostic/partials/renderAvailableActions.ts:116" ] }, @@ -1447,13 +1459,13 @@ "call": "unknown", "key": "unknown", "places": [ - "src/podkop/tabs/diagnostic/initController.ts:34", - "src/podkop/tabs/diagnostic/initController.ts:35", "src/podkop/tabs/diagnostic/initController.ts:36", "src/podkop/tabs/diagnostic/initController.ts:37", "src/podkop/tabs/diagnostic/initController.ts:38", "src/podkop/tabs/diagnostic/initController.ts:39", - "src/podkop/tabs/diagnostic/initController.ts:373" + "src/podkop/tabs/diagnostic/initController.ts:40", + "src/podkop/tabs/diagnostic/initController.ts:41", + "src/podkop/tabs/diagnostic/initController.ts:391" ] }, { @@ -1572,7 +1584,7 @@ "call": "View logs", "key": "View logs", "places": [ - "src/podkop/tabs/diagnostic/initController.ts:248", + "src/podkop/tabs/diagnostic/initController.ts:254", "src/podkop/tabs/diagnostic/partials/renderAvailableActions.ts:107" ] }, diff --git a/fe-app-podkop/locales/podkop.pot b/fe-app-podkop/locales/podkop.pot index 55acc57..2b6b460 100644 --- a/fe-app-podkop/locales/podkop.pot +++ b/fe-app-podkop/locales/podkop.pot @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: PODKOP\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-23 15:55+0300\n" -"PO-Revision-Date: 2025-10-23 15:55+0300\n" +"POT-Creation-Date: 2025-10-23 16:08+0300\n" +"PO-Revision-Date: 2025-10-23 16:08+0300\n" "Last-Translator: divocat \n" "Language-Team: LANGUAGE \n" "Language: \n" @@ -312,6 +312,15 @@ msgstr "" msgid "Failed to copy!" msgstr "" +#: src/podkop/tabs/diagnostic/initController.ts:225 +#: src/podkop/tabs/diagnostic/initController.ts:229 +#: src/podkop/tabs/diagnostic/initController.ts:259 +#: src/podkop/tabs/diagnostic/initController.ts:263 +#: src/podkop/tabs/diagnostic/initController.ts:297 +#: src/podkop/tabs/diagnostic/initController.ts:301 +msgid "Failed to execute!" +msgstr "" + #: src/podkop/methods/custom/getDashboardSections.ts:117 msgid "Fastest" msgstr "" @@ -324,7 +333,7 @@ msgstr "" msgid "Get global check" msgstr "" -#: src/podkop/tabs/diagnostic/initController.ts:218 +#: src/podkop/tabs/diagnostic/initController.ts:220 msgid "Global check" msgstr "" @@ -469,7 +478,7 @@ msgstr "" msgid "IP address 0.0.0.0 is not allowed" msgstr "" -#: src/podkop/tabs/diagnostic/initController.ts:404 +#: src/podkop/tabs/diagnostic/initController.ts:427 msgid "Latest" msgstr "" @@ -536,7 +545,7 @@ msgstr "" msgid "Outbound JSON must contain at least \"type\", \"server\" and \"server_port\" fields" msgstr "" -#: src/podkop/tabs/diagnostic/initController.ts:394 +#: src/podkop/tabs/diagnostic/initController.ts:417 msgid "Outdated" msgstr "" @@ -724,7 +733,7 @@ msgstr "" msgid "Settings" msgstr "" -#: src/podkop/tabs/diagnostic/initController.ts:278 +#: src/podkop/tabs/diagnostic/initController.ts:288 #: src/podkop/tabs/diagnostic/partials/renderAvailableActions.ts:116 msgid "Show sing-box config" msgstr "" @@ -851,13 +860,13 @@ msgstr "" msgid "UDP over TCP" msgstr "" -#: src/podkop/tabs/diagnostic/initController.ts:34 -#: src/podkop/tabs/diagnostic/initController.ts:35 #: src/podkop/tabs/diagnostic/initController.ts:36 #: src/podkop/tabs/diagnostic/initController.ts:37 #: src/podkop/tabs/diagnostic/initController.ts:38 #: src/podkop/tabs/diagnostic/initController.ts:39 -#: src/podkop/tabs/diagnostic/initController.ts:373 +#: src/podkop/tabs/diagnostic/initController.ts:40 +#: src/podkop/tabs/diagnostic/initController.ts:41 +#: src/podkop/tabs/diagnostic/initController.ts:391 msgid "unknown" msgstr "" @@ -931,7 +940,7 @@ msgstr "" msgid "Validation errors:" msgstr "" -#: src/podkop/tabs/diagnostic/initController.ts:248 +#: src/podkop/tabs/diagnostic/initController.ts:254 #: src/podkop/tabs/diagnostic/partials/renderAvailableActions.ts:107 msgid "View logs" msgstr "" diff --git a/fe-app-podkop/locales/podkop.ru.po b/fe-app-podkop/locales/podkop.ru.po index 471a18f..56cff1e 100644 --- a/fe-app-podkop/locales/podkop.ru.po +++ b/fe-app-podkop/locales/podkop.ru.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: PODKOP\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-23 18:55+0300\n" -"PO-Revision-Date: 2025-10-23 18:55+0300\n" +"POT-Creation-Date: 2025-10-23 19:08+0300\n" +"PO-Revision-Date: 2025-10-23 19:08+0300\n" "Last-Translator: divocat\n" "Language-Team: none\n" "Language: ru\n" @@ -230,6 +230,9 @@ msgstr "Исключите трафик протокола NTP из туннел msgid "Failed to copy!" msgstr "Не удалось скопировать!" +msgid "Failed to execute!" +msgstr "Не удалось выполнить!" + msgid "Fastest" msgstr "Самый быстрый" diff --git a/fe-app-podkop/src/podkop/tabs/diagnostic/initController.ts b/fe-app-podkop/src/podkop/tabs/diagnostic/initController.ts index 8e6a3c2..75e0977 100644 --- a/fe-app-podkop/src/podkop/tabs/diagnostic/initController.ts +++ b/fe-app-podkop/src/podkop/tabs/diagnostic/initController.ts @@ -16,6 +16,8 @@ import { PodkopShellMethods } from '../../methods'; import { fetchServicesInfo } from '../../fetchers'; import { normalizeCompiledVersion } from '../../../helpers/normalizeCompiledVersion'; import { renderModal } from '../../../partials'; +import { PODKOP_LUCI_APP_VERSION } from '../../../constants'; +import { showToast } from '../../../helpers/showToast'; async function fetchSystemInfo() { const systemInfo = await PodkopShellMethods.getSystemInfo(); @@ -218,9 +220,13 @@ async function handleShowGlobalCheck() { _('Global check'), renderModal(globalCheck.data as string, 'global_check'), ); + } else { + logger.error('[DIAGNOSTIC]', 'handleShowGlobalCheck - e', globalCheck); + showToast(_('Failed to execute!'), 'error'); } } catch (e) { logger.error('[DIAGNOSTIC]', 'handleShowGlobalCheck - e', e); + showToast(_('Failed to execute!'), 'error'); } finally { store.set({ diagnosticsActions: { @@ -248,9 +254,13 @@ async function handleViewLogs() { _('View logs'), renderModal(viewLogs.data as string, 'view_logs'), ); + } else { + logger.error('[DIAGNOSTIC]', 'handleViewLogs - e', viewLogs); + showToast(_('Failed to execute!'), 'error'); } } catch (e) { logger.error('[DIAGNOSTIC]', 'handleViewLogs - e', e); + showToast(_('Failed to execute!'), 'error'); } finally { store.set({ diagnosticsActions: { @@ -278,9 +288,17 @@ async function handleShowSingBoxConfig() { _('Show sing-box config'), renderModal(showSingBoxConfig.data as string, 'show_sing_box_config'), ); + } else { + logger.error( + '[DIAGNOSTIC]', + 'handleShowSingBoxConfig - e', + showSingBoxConfig, + ); + showToast(_('Failed to execute!'), 'error'); } } catch (e) { logger.error('[DIAGNOSTIC]', 'handleShowSingBoxConfig - e', e); + showToast(_('Failed to execute!'), 'error'); } finally { store.set({ diagnosticsActions: { @@ -387,6 +405,11 @@ function renderDiagnosticSystemInfoWidget() { } if (version !== `v${diagnosticsSystemInfo.podkop_latest_version}`) { + logger.debug( + '[DIAGNOSTIC]', + 'diagnosticsSystemInfo', + diagnosticsSystemInfo, + ); return { key: 'Podkop', value: version, @@ -412,7 +435,7 @@ function renderDiagnosticSystemInfoWidget() { getPodkopVersionRow(), { key: 'Luci App', - value: normalizeCompiledVersion(diagnosticsSystemInfo.luci_app_version), + value: normalizeCompiledVersion(PODKOP_LUCI_APP_VERSION), }, { key: 'Sing-box', diff --git a/luci-app-podkop/htdocs/luci-static/resources/view/podkop/main.js b/luci-app-podkop/htdocs/luci-static/resources/view/podkop/main.js index b68dcec..0439e17 100644 --- a/luci-app-podkop/htdocs/luci-static/resources/view/podkop/main.js +++ b/luci-app-podkop/htdocs/luci-static/resources/view/podkop/main.js @@ -3797,9 +3797,13 @@ async function handleShowGlobalCheck() { _("Global check"), renderModal(globalCheck.data, "global_check") ); + } else { + logger.error("[DIAGNOSTIC]", "handleShowGlobalCheck - e", globalCheck); + showToast(_("Failed to execute!"), "error"); } } catch (e) { logger.error("[DIAGNOSTIC]", "handleShowGlobalCheck - e", e); + showToast(_("Failed to execute!"), "error"); } finally { store.set({ diagnosticsActions: { @@ -3824,9 +3828,13 @@ async function handleViewLogs() { _("View logs"), renderModal(viewLogs.data, "view_logs") ); + } else { + logger.error("[DIAGNOSTIC]", "handleViewLogs - e", viewLogs); + showToast(_("Failed to execute!"), "error"); } } catch (e) { logger.error("[DIAGNOSTIC]", "handleViewLogs - e", e); + showToast(_("Failed to execute!"), "error"); } finally { store.set({ diagnosticsActions: { @@ -3851,9 +3859,17 @@ async function handleShowSingBoxConfig() { _("Show sing-box config"), renderModal(showSingBoxConfig.data, "show_sing_box_config") ); + } else { + logger.error( + "[DIAGNOSTIC]", + "handleShowSingBoxConfig - e", + showSingBoxConfig + ); + showToast(_("Failed to execute!"), "error"); } } catch (e) { logger.error("[DIAGNOSTIC]", "handleShowSingBoxConfig - e", e); + showToast(_("Failed to execute!"), "error"); } finally { store.set({ diagnosticsActions: { @@ -3946,6 +3962,11 @@ function renderDiagnosticSystemInfoWidget() { }; } if (version !== `v${diagnosticsSystemInfo.podkop_latest_version}`) { + logger.debug( + "[DIAGNOSTIC]", + "diagnosticsSystemInfo", + diagnosticsSystemInfo + ); return { key: "Podkop", value: version, @@ -3969,7 +3990,7 @@ function renderDiagnosticSystemInfoWidget() { getPodkopVersionRow(), { key: "Luci App", - value: normalizeCompiledVersion(diagnosticsSystemInfo.luci_app_version) + value: normalizeCompiledVersion(PODKOP_LUCI_APP_VERSION) }, { key: "Sing-box", diff --git a/luci-app-podkop/po/ru/podkop.po b/luci-app-podkop/po/ru/podkop.po index 471a18f..56cff1e 100644 --- a/luci-app-podkop/po/ru/podkop.po +++ b/luci-app-podkop/po/ru/podkop.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: PODKOP\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-23 18:55+0300\n" -"PO-Revision-Date: 2025-10-23 18:55+0300\n" +"POT-Creation-Date: 2025-10-23 19:08+0300\n" +"PO-Revision-Date: 2025-10-23 19:08+0300\n" "Last-Translator: divocat\n" "Language-Team: none\n" "Language: ru\n" @@ -230,6 +230,9 @@ msgstr "Исключите трафик протокола NTP из туннел msgid "Failed to copy!" msgstr "Не удалось скопировать!" +msgid "Failed to execute!" +msgstr "Не удалось выполнить!" + msgid "Fastest" msgstr "Самый быстрый" diff --git a/luci-app-podkop/po/templates/podkop.pot b/luci-app-podkop/po/templates/podkop.pot index 55acc57..2b6b460 100644 --- a/luci-app-podkop/po/templates/podkop.pot +++ b/luci-app-podkop/po/templates/podkop.pot @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: PODKOP\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-23 15:55+0300\n" -"PO-Revision-Date: 2025-10-23 15:55+0300\n" +"POT-Creation-Date: 2025-10-23 16:08+0300\n" +"PO-Revision-Date: 2025-10-23 16:08+0300\n" "Last-Translator: divocat \n" "Language-Team: LANGUAGE \n" "Language: \n" @@ -312,6 +312,15 @@ msgstr "" msgid "Failed to copy!" msgstr "" +#: src/podkop/tabs/diagnostic/initController.ts:225 +#: src/podkop/tabs/diagnostic/initController.ts:229 +#: src/podkop/tabs/diagnostic/initController.ts:259 +#: src/podkop/tabs/diagnostic/initController.ts:263 +#: src/podkop/tabs/diagnostic/initController.ts:297 +#: src/podkop/tabs/diagnostic/initController.ts:301 +msgid "Failed to execute!" +msgstr "" + #: src/podkop/methods/custom/getDashboardSections.ts:117 msgid "Fastest" msgstr "" @@ -324,7 +333,7 @@ msgstr "" msgid "Get global check" msgstr "" -#: src/podkop/tabs/diagnostic/initController.ts:218 +#: src/podkop/tabs/diagnostic/initController.ts:220 msgid "Global check" msgstr "" @@ -469,7 +478,7 @@ msgstr "" msgid "IP address 0.0.0.0 is not allowed" msgstr "" -#: src/podkop/tabs/diagnostic/initController.ts:404 +#: src/podkop/tabs/diagnostic/initController.ts:427 msgid "Latest" msgstr "" @@ -536,7 +545,7 @@ msgstr "" msgid "Outbound JSON must contain at least \"type\", \"server\" and \"server_port\" fields" msgstr "" -#: src/podkop/tabs/diagnostic/initController.ts:394 +#: src/podkop/tabs/diagnostic/initController.ts:417 msgid "Outdated" msgstr "" @@ -724,7 +733,7 @@ msgstr "" msgid "Settings" msgstr "" -#: src/podkop/tabs/diagnostic/initController.ts:278 +#: src/podkop/tabs/diagnostic/initController.ts:288 #: src/podkop/tabs/diagnostic/partials/renderAvailableActions.ts:116 msgid "Show sing-box config" msgstr "" @@ -851,13 +860,13 @@ msgstr "" msgid "UDP over TCP" msgstr "" -#: src/podkop/tabs/diagnostic/initController.ts:34 -#: src/podkop/tabs/diagnostic/initController.ts:35 #: src/podkop/tabs/diagnostic/initController.ts:36 #: src/podkop/tabs/diagnostic/initController.ts:37 #: src/podkop/tabs/diagnostic/initController.ts:38 #: src/podkop/tabs/diagnostic/initController.ts:39 -#: src/podkop/tabs/diagnostic/initController.ts:373 +#: src/podkop/tabs/diagnostic/initController.ts:40 +#: src/podkop/tabs/diagnostic/initController.ts:41 +#: src/podkop/tabs/diagnostic/initController.ts:391 msgid "unknown" msgstr "" @@ -931,7 +940,7 @@ msgstr "" msgid "Validation errors:" msgstr "" -#: src/podkop/tabs/diagnostic/initController.ts:248 +#: src/podkop/tabs/diagnostic/initController.ts:254 #: src/podkop/tabs/diagnostic/partials/renderAvailableActions.ts:107 msgid "View logs" msgstr "" From 7cd70468c5f1aabd97da7a28d94b3c6af09e60f4 Mon Sep 17 00:00:00 2001 From: divocat Date: Thu, 23 Oct 2025 20:00:55 +0300 Subject: [PATCH 5/9] feat: add wiki disclaimer to diagnostics --- fe-app-podkop/locales/calls.json | 83 +++++++---- fe-app-podkop/locales/podkop.pot | 66 +++++---- fe-app-podkop/locales/podkop.ru.po | 27 ++-- fe-app-podkop/src/icons/index.ts | 1 + .../src/icons/renderBookOpenTextIcon24.ts | 28 ++++ .../tabs/diagnostic/diagnostic.store.ts | 8 +- .../podkop/tabs/diagnostic/helpers/getMeta.ts | 2 +- .../podkop/tabs/diagnostic/initController.ts | 29 ++++ .../partials/renderWikiDisclaimer.ts | 40 ++++++ .../tabs/diagnostic/renderDiagnostic.ts | 1 + .../src/podkop/tabs/diagnostic/styles.ts | 25 ++++ .../src/validators/validateProxyUrl.ts | 18 +-- .../luci-static/resources/view/podkop/main.js | 135 ++++++++++++++++-- luci-app-podkop/po/ru/podkop.po | 27 ++-- luci-app-podkop/po/templates/podkop.pot | 66 +++++---- 15 files changed, 427 insertions(+), 129 deletions(-) create mode 100644 fe-app-podkop/src/icons/renderBookOpenTextIcon24.ts create mode 100644 fe-app-podkop/src/podkop/tabs/diagnostic/partials/renderWikiDisclaimer.ts diff --git a/fe-app-podkop/locales/calls.json b/fe-app-podkop/locales/calls.json index b4e1ca0..15a92ea 100644 --- a/fe-app-podkop/locales/calls.json +++ b/fe-app-podkop/locales/calls.json @@ -144,13 +144,6 @@ "src/podkop/tabs/diagnostic/helpers/getMeta.ts:26" ] }, - { - "call": "Checks partially passed", - "key": "Checks partially passed", - "places": [ - "src/podkop/tabs/diagnostic/helpers/getMeta.ts:20" - ] - }, { "call": "Checks passed", "key": "Checks passed", @@ -352,6 +345,13 @@ "src/validators/validateDns.ts:7" ] }, + { + "call": "Do not panic, everything can be fixed, just...", + "key": "Do not panic, everything can be fixed, just...", + "places": [ + "src/podkop/tabs/diagnostic/partials/renderWikiDisclaimer.ts:26" + ] + }, { "call": "Domain Resolver", "key": "Domain Resolver", @@ -512,12 +512,12 @@ "call": "Failed to execute!", "key": "Failed to execute!", "places": [ - "src/podkop/tabs/diagnostic/initController.ts:225", - "src/podkop/tabs/diagnostic/initController.ts:229", - "src/podkop/tabs/diagnostic/initController.ts:259", - "src/podkop/tabs/diagnostic/initController.ts:263", - "src/podkop/tabs/diagnostic/initController.ts:297", - "src/podkop/tabs/diagnostic/initController.ts:301" + "src/podkop/tabs/diagnostic/initController.ts:226", + "src/podkop/tabs/diagnostic/initController.ts:230", + "src/podkop/tabs/diagnostic/initController.ts:260", + "src/podkop/tabs/diagnostic/initController.ts:264", + "src/podkop/tabs/diagnostic/initController.ts:298", + "src/podkop/tabs/diagnostic/initController.ts:302" ] }, { @@ -545,7 +545,7 @@ "call": "Global check", "key": "Global check", "places": [ - "src/podkop/tabs/diagnostic/initController.ts:220" + "src/podkop/tabs/diagnostic/initController.ts:221" ] }, { @@ -794,11 +794,18 @@ "src/validators/validateSubnet.ts:18" ] }, + { + "call": "Issues detected", + "key": "Issues detected", + "places": [ + "src/podkop/tabs/diagnostic/helpers/getMeta.ts:20" + ] + }, { "call": "Latest", "key": "Latest", "places": [ - "src/podkop/tabs/diagnostic/initController.ts:427" + "src/podkop/tabs/diagnostic/initController.ts:452" ] }, { @@ -913,7 +920,7 @@ "call": "Outdated", "key": "Outdated", "places": [ - "src/podkop/tabs/diagnostic/initController.ts:417" + "src/podkop/tabs/diagnostic/initController.ts:442" ] }, { @@ -951,6 +958,16 @@ "../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:351" ] }, + { + "call": "Pending", + "key": "Pending", + "places": [ + "src/podkop/tabs/diagnostic/diagnostic.store.ts:95", + "src/podkop/tabs/diagnostic/diagnostic.store.ts:103", + "src/podkop/tabs/diagnostic/diagnostic.store.ts:111", + "src/podkop/tabs/diagnostic/diagnostic.store.ts:119" + ] + }, { "call": "Podkop", "key": "Podkop", @@ -993,16 +1010,6 @@ "src/podkop/tabs/diagnostic/checks/runFakeIPCheck.ts:65" ] }, - { - "call": "Queued", - "key": "Queued", - "places": [ - "src/podkop/tabs/diagnostic/diagnostic.store.ts:95", - "src/podkop/tabs/diagnostic/diagnostic.store.ts:103", - "src/podkop/tabs/diagnostic/diagnostic.store.ts:111", - "src/podkop/tabs/diagnostic/diagnostic.store.ts:119" - ] - }, { "call": "Regional options cannot be used together", "key": "Regional options cannot be used together", @@ -1239,7 +1246,7 @@ "call": "Show sing-box config", "key": "Show sing-box config", "places": [ - "src/podkop/tabs/diagnostic/initController.ts:288", + "src/podkop/tabs/diagnostic/initController.ts:289", "src/podkop/tabs/diagnostic/partials/renderAvailableActions.ts:116" ] }, @@ -1426,6 +1433,13 @@ "src/podkop/tabs/dashboard/initController.ts:265" ] }, + { + "call": "Troubleshooting", + "key": "Troubleshooting", + "places": [ + "src/podkop/tabs/diagnostic/partials/renderWikiDisclaimer.ts:25" + ] + }, { "call": "TTL must be a positive number", "key": "TTL must be a positive number", @@ -1459,13 +1473,13 @@ "call": "unknown", "key": "unknown", "places": [ - "src/podkop/tabs/diagnostic/initController.ts:36", "src/podkop/tabs/diagnostic/initController.ts:37", "src/podkop/tabs/diagnostic/initController.ts:38", "src/podkop/tabs/diagnostic/initController.ts:39", "src/podkop/tabs/diagnostic/initController.ts:40", "src/podkop/tabs/diagnostic/initController.ts:41", - "src/podkop/tabs/diagnostic/initController.ts:391" + "src/podkop/tabs/diagnostic/initController.ts:42", + "src/podkop/tabs/diagnostic/initController.ts:416" ] }, { @@ -1487,7 +1501,7 @@ "call": "URL must start with vless://, ss://, trojan://, or socks4/5://", "key": "URL must start with vless://, ss://, trojan://, or socks4/5://", "places": [ - "src/validators/validateProxyUrl.ts:27" + "src/validators/validateProxyUrl.ts:29" ] }, { @@ -1584,10 +1598,17 @@ "call": "View logs", "key": "View logs", "places": [ - "src/podkop/tabs/diagnostic/initController.ts:254", + "src/podkop/tabs/diagnostic/initController.ts:255", "src/podkop/tabs/diagnostic/partials/renderAvailableActions.ts:107" ] }, + { + "call": "Visit Wiki", + "key": "Visit Wiki", + "places": [ + "src/podkop/tabs/diagnostic/partials/renderWikiDisclaimer.ts:31" + ] + }, { "call": "Warning: %s cannot be used together with %s. Previous selections have been removed.", "key": "Warning: %s cannot be used together with %s. Previous selections have been removed.", diff --git a/fe-app-podkop/locales/podkop.pot b/fe-app-podkop/locales/podkop.pot index 2b6b460..e72e2a9 100644 --- a/fe-app-podkop/locales/podkop.pot +++ b/fe-app-podkop/locales/podkop.pot @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: PODKOP\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-23 16:08+0300\n" -"PO-Revision-Date: 2025-10-23 16:08+0300\n" +"POT-Creation-Date: 2025-10-23 17:00+0300\n" +"PO-Revision-Date: 2025-10-23 17:00+0300\n" "Last-Translator: divocat \n" "Language-Team: LANGUAGE \n" "Language: \n" @@ -101,10 +101,6 @@ msgstr "" msgid "Checks failed" msgstr "" -#: src/podkop/tabs/diagnostic/helpers/getMeta.ts:20 -msgid "Checks partially passed" -msgstr "" - #: src/podkop/tabs/diagnostic/helpers/getMeta.ts:13 msgid "Checks passed" msgstr "" @@ -222,6 +218,10 @@ msgstr "" msgid "DNS server address cannot be empty" msgstr "" +#: src/podkop/tabs/diagnostic/partials/renderWikiDisclaimer.ts:26 +msgid "Do not panic, everything can be fixed, just..." +msgstr "" + #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:166 msgid "Domain Resolver" msgstr "" @@ -312,12 +312,12 @@ msgstr "" msgid "Failed to copy!" msgstr "" -#: src/podkop/tabs/diagnostic/initController.ts:225 -#: src/podkop/tabs/diagnostic/initController.ts:229 -#: src/podkop/tabs/diagnostic/initController.ts:259 -#: src/podkop/tabs/diagnostic/initController.ts:263 -#: src/podkop/tabs/diagnostic/initController.ts:297 -#: src/podkop/tabs/diagnostic/initController.ts:301 +#: src/podkop/tabs/diagnostic/initController.ts:226 +#: src/podkop/tabs/diagnostic/initController.ts:230 +#: src/podkop/tabs/diagnostic/initController.ts:260 +#: src/podkop/tabs/diagnostic/initController.ts:264 +#: src/podkop/tabs/diagnostic/initController.ts:298 +#: src/podkop/tabs/diagnostic/initController.ts:302 msgid "Failed to execute!" msgstr "" @@ -333,7 +333,7 @@ msgstr "" msgid "Get global check" msgstr "" -#: src/podkop/tabs/diagnostic/initController.ts:220 +#: src/podkop/tabs/diagnostic/initController.ts:221 msgid "Global check" msgstr "" @@ -478,7 +478,11 @@ msgstr "" msgid "IP address 0.0.0.0 is not allowed" msgstr "" -#: src/podkop/tabs/diagnostic/initController.ts:427 +#: src/podkop/tabs/diagnostic/helpers/getMeta.ts:20 +msgid "Issues detected" +msgstr "" + +#: src/podkop/tabs/diagnostic/initController.ts:452 msgid "Latest" msgstr "" @@ -545,7 +549,7 @@ msgstr "" msgid "Outbound JSON must contain at least \"type\", \"server\" and \"server_port\" fields" msgstr "" -#: src/podkop/tabs/diagnostic/initController.ts:417 +#: src/podkop/tabs/diagnostic/initController.ts:442 msgid "Outdated" msgstr "" @@ -569,6 +573,13 @@ msgstr "" msgid "Path must end with cache.db" msgstr "" +#: src/podkop/tabs/diagnostic/diagnostic.store.ts:95 +#: src/podkop/tabs/diagnostic/diagnostic.store.ts:103 +#: src/podkop/tabs/diagnostic/diagnostic.store.ts:111 +#: src/podkop/tabs/diagnostic/diagnostic.store.ts:119 +msgid "Pending" +msgstr "" + #: src/podkop/tabs/dashboard/initController.ts:340 msgid "Podkop" msgstr "" @@ -593,13 +604,6 @@ msgstr "" msgid "Proxy traffic is routed via FakeIP" msgstr "" -#: src/podkop/tabs/diagnostic/diagnostic.store.ts:95 -#: src/podkop/tabs/diagnostic/diagnostic.store.ts:103 -#: src/podkop/tabs/diagnostic/diagnostic.store.ts:111 -#: src/podkop/tabs/diagnostic/diagnostic.store.ts:119 -msgid "Queued" -msgstr "" - #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:245 msgid "Regional options cannot be used together" msgstr "" @@ -733,7 +737,7 @@ msgstr "" msgid "Settings" msgstr "" -#: src/podkop/tabs/diagnostic/initController.ts:288 +#: src/podkop/tabs/diagnostic/initController.ts:289 #: src/podkop/tabs/diagnostic/partials/renderAvailableActions.ts:116 msgid "Show sing-box config" msgstr "" @@ -843,6 +847,10 @@ msgstr "" msgid "Traffic Total" msgstr "" +#: src/podkop/tabs/diagnostic/partials/renderWikiDisclaimer.ts:25 +msgid "Troubleshooting" +msgstr "" + #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:80 msgid "TTL must be a positive number" msgstr "" @@ -860,13 +868,13 @@ msgstr "" msgid "UDP over TCP" msgstr "" -#: src/podkop/tabs/diagnostic/initController.ts:36 #: src/podkop/tabs/diagnostic/initController.ts:37 #: src/podkop/tabs/diagnostic/initController.ts:38 #: src/podkop/tabs/diagnostic/initController.ts:39 #: src/podkop/tabs/diagnostic/initController.ts:40 #: src/podkop/tabs/diagnostic/initController.ts:41 -#: src/podkop/tabs/diagnostic/initController.ts:391 +#: src/podkop/tabs/diagnostic/initController.ts:42 +#: src/podkop/tabs/diagnostic/initController.ts:416 msgid "unknown" msgstr "" @@ -879,7 +887,7 @@ msgstr "" msgid "Uplink" msgstr "" -#: src/validators/validateProxyUrl.ts:27 +#: src/validators/validateProxyUrl.ts:29 msgid "URL must start with vless://, ss://, trojan://, or socks4/5://" msgstr "" @@ -940,11 +948,15 @@ msgstr "" msgid "Validation errors:" msgstr "" -#: src/podkop/tabs/diagnostic/initController.ts:254 +#: src/podkop/tabs/diagnostic/initController.ts:255 #: src/podkop/tabs/diagnostic/partials/renderAvailableActions.ts:107 msgid "View logs" msgstr "" +#: src/podkop/tabs/diagnostic/partials/renderWikiDisclaimer.ts:31 +msgid "Visit Wiki" +msgstr "" + #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:247 msgid "Warning: %s cannot be used together with %s. Previous selections have been removed." msgstr "" diff --git a/fe-app-podkop/locales/podkop.ru.po b/fe-app-podkop/locales/podkop.ru.po index 56cff1e..4c9f731 100644 --- a/fe-app-podkop/locales/podkop.ru.po +++ b/fe-app-podkop/locales/podkop.ru.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: PODKOP\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-23 19:08+0300\n" -"PO-Revision-Date: 2025-10-23 19:08+0300\n" +"POT-Creation-Date: 2025-10-23 20:00+0300\n" +"PO-Revision-Date: 2025-10-23 20:00+0300\n" "Last-Translator: divocat\n" "Language-Team: none\n" "Language: ru\n" @@ -75,10 +75,7 @@ msgid "checks" msgstr "проверки" msgid "Checks failed" -msgstr "Проверки не пройдены" - -msgid "Checks partially passed" -msgstr "Проверки пройдены частично" +msgstr "Проверки не выполнены" msgid "Checks passed" msgstr "Проверки пройдены" @@ -164,6 +161,9 @@ msgstr "DNS-сервер" msgid "DNS server address cannot be empty" msgstr "Адрес DNS-сервера не может быть пустым" +msgid "Do not panic, everything can be fixed, just..." +msgstr "Не паникуйте, всё можно исправить, просто..." + msgid "Domain Resolver" msgstr "Резолвер доменов" @@ -350,6 +350,9 @@ msgstr "Неверный URL VLESS: ошибка разбора" msgid "IP address 0.0.0.0 is not allowed" msgstr "IP-адрес 0.0.0.0 не допускается" +msgid "Issues detected" +msgstr "Обнаружены проблемы" + msgid "Latest" msgstr "Последняя" @@ -416,6 +419,9 @@ msgstr "Путь должен содержать хотя бы одну дире msgid "Path must end with cache.db" msgstr "Путь должен заканчиваться на cache.db" +msgid "Pending" +msgstr "Ожидает запуска" + msgid "Podkop" msgstr "Podkop" @@ -434,9 +440,6 @@ msgstr "Прокси-трафик не маршрутизируется чере msgid "Proxy traffic is routed via FakeIP" msgstr "Прокси-трафик направляется через FakeIP" -msgid "Queued" -msgstr "В очереди" - msgid "Regional options cannot be used together" msgstr "Нельзя использовать несколько региональных опций одновременно" @@ -617,6 +620,9 @@ msgstr "Трафик" msgid "Traffic Total" msgstr "Всего трафика" +msgid "Troubleshooting" +msgstr "Устранение неполадок" + msgid "TTL must be a positive number" msgstr "TTL должно быть положительным числом" @@ -677,6 +683,9 @@ msgstr "Ошибки валидации:" msgid "View logs" msgstr "Посмотреть логи" +msgid "Visit Wiki" +msgstr "Перейти в wiki" + msgid "Warning: %s cannot be used together with %s. Previous selections have been removed." msgstr "Предупреждение: %s нельзя использовать вместе с %s. Предыдущие варианты были удалены." diff --git a/fe-app-podkop/src/icons/index.ts b/fe-app-podkop/src/icons/index.ts index 71d9625..419b490 100644 --- a/fe-app-podkop/src/icons/index.ts +++ b/fe-app-podkop/src/icons/index.ts @@ -15,3 +15,4 @@ export * from './renderCircleCheckBigIcon24'; export * from './renderSquareChartGanttIcon24'; export * from './renderCogIcon24'; export * from './renderSearchIcon24'; +export * from './renderBookOpenTextIcon24'; diff --git a/fe-app-podkop/src/icons/renderBookOpenTextIcon24.ts b/fe-app-podkop/src/icons/renderBookOpenTextIcon24.ts new file mode 100644 index 0000000..552f8ff --- /dev/null +++ b/fe-app-podkop/src/icons/renderBookOpenTextIcon24.ts @@ -0,0 +1,28 @@ +import { svgEl } from '../helpers'; + +export function renderBookOpenTextIcon24() { + const NS = 'http://www.w3.org/2000/svg'; + return svgEl( + 'svg', + { + xmlns: NS, + viewBox: '0 0 24 24', + fill: 'none', + stroke: 'currentColor', + 'stroke-width': '2', + 'stroke-linecap': 'round', + 'stroke-linejoin': 'round', + class: 'lucide lucide-book-open-text-icon lucide-book-open-text', + }, + [ + svgEl('path', { d: 'M12 7v14' }), + svgEl('path', { d: 'M16 12h2' }), + svgEl('path', { d: 'M16 8h2' }), + svgEl('path', { + d: 'M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z', + }), + svgEl('path', { d: 'M6 12h2' }), + svgEl('path', { d: 'M6 8h2' }), + ], + ); +} diff --git a/fe-app-podkop/src/podkop/tabs/diagnostic/diagnostic.store.ts b/fe-app-podkop/src/podkop/tabs/diagnostic/diagnostic.store.ts index 4e91415..8da0b3e 100644 --- a/fe-app-podkop/src/podkop/tabs/diagnostic/diagnostic.store.ts +++ b/fe-app-podkop/src/podkop/tabs/diagnostic/diagnostic.store.ts @@ -92,7 +92,7 @@ export const loadingDiagnosticsChecksStore: Pick< code: DIAGNOSTICS_CHECKS.DNS, title: DIAGNOSTICS_CHECKS_MAP.DNS.title, order: DIAGNOSTICS_CHECKS_MAP.DNS.order, - description: _('Queued'), + description: _('Pending'), items: [], state: 'skipped', }, @@ -100,7 +100,7 @@ export const loadingDiagnosticsChecksStore: Pick< code: DIAGNOSTICS_CHECKS.SINGBOX, title: DIAGNOSTICS_CHECKS_MAP.SINGBOX.title, order: DIAGNOSTICS_CHECKS_MAP.SINGBOX.order, - description: _('Queued'), + description: _('Pending'), items: [], state: 'skipped', }, @@ -108,7 +108,7 @@ export const loadingDiagnosticsChecksStore: Pick< code: DIAGNOSTICS_CHECKS.NFT, title: DIAGNOSTICS_CHECKS_MAP.NFT.title, order: DIAGNOSTICS_CHECKS_MAP.NFT.order, - description: _('Queued'), + description: _('Pending'), items: [], state: 'skipped', }, @@ -116,7 +116,7 @@ export const loadingDiagnosticsChecksStore: Pick< code: DIAGNOSTICS_CHECKS.FAKEIP, title: DIAGNOSTICS_CHECKS_MAP.FAKEIP.title, order: DIAGNOSTICS_CHECKS_MAP.FAKEIP.order, - description: _('Queued'), + description: _('Pending'), items: [], state: 'skipped', }, diff --git a/fe-app-podkop/src/podkop/tabs/diagnostic/helpers/getMeta.ts b/fe-app-podkop/src/podkop/tabs/diagnostic/helpers/getMeta.ts index c8a4f9b..4a571d2 100644 --- a/fe-app-podkop/src/podkop/tabs/diagnostic/helpers/getMeta.ts +++ b/fe-app-podkop/src/podkop/tabs/diagnostic/helpers/getMeta.ts @@ -17,7 +17,7 @@ export function getMeta({ allGood, atLeastOneGood }: IGetMetaProps): { if (atLeastOneGood) { return { state: 'warning', - description: _('Checks partially passed'), + description: _('Issues detected'), }; } diff --git a/fe-app-podkop/src/podkop/tabs/diagnostic/initController.ts b/fe-app-podkop/src/podkop/tabs/diagnostic/initController.ts index 75e0977..06d4cae 100644 --- a/fe-app-podkop/src/podkop/tabs/diagnostic/initController.ts +++ b/fe-app-podkop/src/podkop/tabs/diagnostic/initController.ts @@ -18,6 +18,7 @@ import { normalizeCompiledVersion } from '../../../helpers/normalizeCompiledVers import { renderModal } from '../../../partials'; import { PODKOP_LUCI_APP_VERSION } from '../../../constants'; import { showToast } from '../../../helpers/showToast'; +import { renderWikiDisclaimer } from './partials/renderWikiDisclaimer'; async function fetchSystemInfo() { const systemInfo = await PodkopShellMethods.getSystemInfo(); @@ -309,6 +310,30 @@ async function handleShowSingBoxConfig() { } } +function renderWikiDisclaimerWidget() { + const diagnosticsChecks = store.get().diagnosticsChecks; + + function getWikiKind() { + const allResults = diagnosticsChecks.map((check) => check.state); + + if (allResults.includes('error')) { + return 'error'; + } + + if (allResults.includes('warning')) { + return 'warning'; + } + + return 'default'; + } + + const container = document.getElementById('pdk_diagnostic-page-wiki'); + + return preserveScrollForPage(() => { + container!.replaceChildren(renderWikiDisclaimer(getWikiKind())); + }); +} + function renderDiagnosticAvailableActionsWidget() { const diagnosticsActions = store.get().diagnosticsActions; const servicesInfoWidget = store.get().servicesInfoWidget; @@ -464,6 +489,7 @@ async function onStoreUpdate( ) { if (diff.diagnosticsChecks) { renderDiagnosticsChecks(); + renderWikiDisclaimerWidget(); } if (diff.diagnosticsRunAction) { @@ -519,6 +545,9 @@ function onPageMount() { // Initial system info render renderDiagnosticSystemInfoWidget(); + // Initial Wiki disclaimer render + renderWikiDisclaimerWidget(); + // Initial services info fetch fetchServicesInfo(); diff --git a/fe-app-podkop/src/podkop/tabs/diagnostic/partials/renderWikiDisclaimer.ts b/fe-app-podkop/src/podkop/tabs/diagnostic/partials/renderWikiDisclaimer.ts new file mode 100644 index 0000000..61e34d2 --- /dev/null +++ b/fe-app-podkop/src/podkop/tabs/diagnostic/partials/renderWikiDisclaimer.ts @@ -0,0 +1,40 @@ +import { renderBookOpenTextIcon24 } from '../../../../icons'; +import { renderButton } from '../../../../partials'; +import { insertIf } from '../../../../helpers'; + +export function renderWikiDisclaimer(kind: 'default' | 'error' | 'warning') { + const iconWrap = E('span', { + class: 'pdk_diagnostic-page__right-bar__wiki__icon', + }); + iconWrap.appendChild(renderBookOpenTextIcon24()); + + const className = [ + 'pdk_diagnostic-page__right-bar__wiki', + ...insertIf(kind === 'error', [ + 'pdk_diagnostic-page__right-bar__wiki--error', + ]), + ...insertIf(kind === 'warning', [ + 'pdk_diagnostic-page__right-bar__wiki--warning', + ]), + ].join(' '); + + return E('div', { class: className }, [ + E('div', { class: 'pdk_diagnostic-page__right-bar__wiki__content' }, [ + iconWrap, + E('div', { class: 'pdk_diagnostic-page__right-bar__wiki__texts' }, [ + E('b', {}, _('Troubleshooting')), + E('div', {}, _('Do not panic, everything can be fixed, just...')), + ]), + ]), + renderButton({ + classNames: ['cbi-button-save'], + text: _('Visit Wiki'), + onClick: () => + window.open( + 'https://podkop.net/docs/troubleshooting/', + '_blank', + 'noopener,noreferrer', + ), + }), + ]); +} diff --git a/fe-app-podkop/src/podkop/tabs/diagnostic/renderDiagnostic.ts b/fe-app-podkop/src/podkop/tabs/diagnostic/renderDiagnostic.ts index 2b98d67..391e67f 100644 --- a/fe-app-podkop/src/podkop/tabs/diagnostic/renderDiagnostic.ts +++ b/fe-app-podkop/src/podkop/tabs/diagnostic/renderDiagnostic.ts @@ -8,6 +8,7 @@ export function render() { }), ]), E('div', { class: 'pdk_diagnostic-page__right-bar' }, [ + E('div', { id: 'pdk_diagnostic-page-wiki' }), E('div', { id: 'pdk_diagnostic-page-actions' }), E('div', { id: 'pdk_diagnostic-page-system-info' }), ]), diff --git a/fe-app-podkop/src/podkop/tabs/diagnostic/styles.ts b/fe-app-podkop/src/podkop/tabs/diagnostic/styles.ts index 75a9042..def1d78 100644 --- a/fe-app-podkop/src/podkop/tabs/diagnostic/styles.ts +++ b/fe-app-podkop/src/podkop/tabs/diagnostic/styles.ts @@ -28,6 +28,31 @@ export const styles = ` grid-row-gap: 10px; } +.pdk_diagnostic-page__right-bar__wiki { + border: 2px var(--background-color-low, lightgray) solid; + border-radius: 4px; + padding: 10px; + + display: grid; + grid-template-columns: auto; + grid-row-gap: 10px; +} + +.pdk_diagnostic-page__right-bar__wiki--warning { + border: 2px var(--warn-color-medium, orange) solid; +} +.pdk_diagnostic-page__right-bar__wiki--error { + border: 2px var(--error-color-medium, red) solid; +} + +.pdk_diagnostic-page__right-bar__wiki__content { + display: grid; + grid-template-columns: 1fr 5fr; + grid-column-gap: 10px; +} + +.pdk_diagnostic-page__right-bar__wiki__texts {} + .pdk_diagnostic-page__right-bar__actions { border: 2px var(--background-color-low, lightgray) solid; border-radius: 4px; diff --git a/fe-app-podkop/src/validators/validateProxyUrl.ts b/fe-app-podkop/src/validators/validateProxyUrl.ts index 15a3003..912bbca 100644 --- a/fe-app-podkop/src/validators/validateProxyUrl.ts +++ b/fe-app-podkop/src/validators/validateProxyUrl.ts @@ -6,20 +6,22 @@ import { validateSocksUrl } from './validateSocksUrl'; // TODO refactor current validation and add tests export function validateProxyUrl(url: string): ValidationResult { - if (url.startsWith('ss://')) { - return validateShadowsocksUrl(url); + const trimmedUrl = url.trim(); + + if (trimmedUrl.startsWith('ss://')) { + return validateShadowsocksUrl(trimmedUrl); } - if (url.startsWith('vless://')) { - return validateVlessUrl(url); + if (trimmedUrl.startsWith('vless://')) { + return validateVlessUrl(trimmedUrl); } - if (url.startsWith('trojan://')) { - return validateTrojanUrl(url); + if (trimmedUrl.startsWith('trojan://')) { + return validateTrojanUrl(trimmedUrl); } - if (/^socks(4|4a|5):\/\//.test(url)) { - return validateSocksUrl(url); + if (/^socks(4|4a|5):\/\//.test(trimmedUrl)) { + return validateSocksUrl(trimmedUrl); } return { diff --git a/luci-app-podkop/htdocs/luci-static/resources/view/podkop/main.js b/luci-app-podkop/htdocs/luci-static/resources/view/podkop/main.js index 0439e17..88812a8 100644 --- a/luci-app-podkop/htdocs/luci-static/resources/view/podkop/main.js +++ b/luci-app-podkop/htdocs/luci-static/resources/view/podkop/main.js @@ -452,17 +452,18 @@ function validateSocksUrl(url) { // src/validators/validateProxyUrl.ts function validateProxyUrl(url) { - if (url.startsWith("ss://")) { - return validateShadowsocksUrl(url); + const trimmedUrl = url.trim(); + if (trimmedUrl.startsWith("ss://")) { + return validateShadowsocksUrl(trimmedUrl); } - if (url.startsWith("vless://")) { - return validateVlessUrl(url); + if (trimmedUrl.startsWith("vless://")) { + return validateVlessUrl(trimmedUrl); } - if (url.startsWith("trojan://")) { - return validateTrojanUrl(url); + if (trimmedUrl.startsWith("trojan://")) { + return validateTrojanUrl(trimmedUrl); } - if (/^socks(4|4a|5):\/\//.test(url)) { - return validateSocksUrl(url); + if (/^socks(4|4a|5):\/\//.test(trimmedUrl)) { + return validateSocksUrl(trimmedUrl); } return { valid: false, @@ -1087,7 +1088,7 @@ var loadingDiagnosticsChecksStore = { code: "DNS" /* DNS */, title: DIAGNOSTICS_CHECKS_MAP.DNS.title, order: DIAGNOSTICS_CHECKS_MAP.DNS.order, - description: _("Queued"), + description: _("Pending"), items: [], state: "skipped" }, @@ -1095,7 +1096,7 @@ var loadingDiagnosticsChecksStore = { code: "SINGBOX" /* SINGBOX */, title: DIAGNOSTICS_CHECKS_MAP.SINGBOX.title, order: DIAGNOSTICS_CHECKS_MAP.SINGBOX.order, - description: _("Queued"), + description: _("Pending"), items: [], state: "skipped" }, @@ -1103,7 +1104,7 @@ var loadingDiagnosticsChecksStore = { code: "NFT" /* NFT */, title: DIAGNOSTICS_CHECKS_MAP.NFT.title, order: DIAGNOSTICS_CHECKS_MAP.NFT.order, - description: _("Queued"), + description: _("Pending"), items: [], state: "skipped" }, @@ -1111,7 +1112,7 @@ var loadingDiagnosticsChecksStore = { code: "FAKEIP" /* FAKEIP */, title: DIAGNOSTICS_CHECKS_MAP.FAKEIP.title, order: DIAGNOSTICS_CHECKS_MAP.FAKEIP.order, - description: _("Queued"), + description: _("Pending"), items: [], state: "skipped" } @@ -2341,6 +2342,7 @@ function render2() { }) ]), E("div", { class: "pdk_diagnostic-page__right-bar" }, [ + E("div", { id: "pdk_diagnostic-page-wiki" }), E("div", { id: "pdk_diagnostic-page-actions" }), E("div", { id: "pdk_diagnostic-page-system-info" }) ]) @@ -2372,7 +2374,7 @@ function getMeta({ allGood, atLeastOneGood }) { if (atLeastOneGood) { return { state: "warning", - description: _("Checks partially passed") + description: _("Issues detected") }; } return { @@ -3195,6 +3197,34 @@ function renderSearchIcon24() { ); } +// src/icons/renderBookOpenTextIcon24.ts +function renderBookOpenTextIcon24() { + const NS = "http://www.w3.org/2000/svg"; + return svgEl( + "svg", + { + xmlns: NS, + viewBox: "0 0 24 24", + fill: "none", + stroke: "currentColor", + "stroke-width": "2", + "stroke-linecap": "round", + "stroke-linejoin": "round", + class: "lucide lucide-book-open-text-icon lucide-book-open-text" + }, + [ + svgEl("path", { d: "M12 7v14" }), + svgEl("path", { d: "M16 12h2" }), + svgEl("path", { d: "M16 8h2" }), + svgEl("path", { + d: "M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z" + }), + svgEl("path", { d: "M6 12h2" }), + svgEl("path", { d: "M6 8h2" }) + ] + ); +} + // src/partials/button/renderButton.ts function renderButton({ classNames = [], @@ -3618,6 +3648,41 @@ function normalizeCompiledVersion(version) { return version; } +// src/podkop/tabs/diagnostic/partials/renderWikiDisclaimer.ts +function renderWikiDisclaimer(kind) { + const iconWrap = E("span", { + class: "pdk_diagnostic-page__right-bar__wiki__icon" + }); + iconWrap.appendChild(renderBookOpenTextIcon24()); + const className = [ + "pdk_diagnostic-page__right-bar__wiki", + ...insertIf(kind === "error", [ + "pdk_diagnostic-page__right-bar__wiki--error" + ]), + ...insertIf(kind === "warning", [ + "pdk_diagnostic-page__right-bar__wiki--warning" + ]) + ].join(" "); + return E("div", { class: className }, [ + E("div", { class: "pdk_diagnostic-page__right-bar__wiki__content" }, [ + iconWrap, + E("div", { class: "pdk_diagnostic-page__right-bar__wiki__texts" }, [ + E("b", {}, _("Troubleshooting")), + E("div", {}, _("Do not panic, everything can be fixed, just...")) + ]) + ]), + renderButton({ + classNames: ["cbi-button-save"], + text: _("Visit Wiki"), + onClick: () => window.open( + "https://podkop.net/docs/troubleshooting/", + "_blank", + "noopener,noreferrer" + ) + }) + ]); +} + // src/podkop/tabs/diagnostic/initController.ts async function fetchSystemInfo() { const systemInfo = await PodkopShellMethods.getSystemInfo(); @@ -3879,6 +3944,23 @@ async function handleShowSingBoxConfig() { }); } } +function renderWikiDisclaimerWidget() { + const diagnosticsChecks = store.get().diagnosticsChecks; + function getWikiKind() { + const allResults = diagnosticsChecks.map((check) => check.state); + if (allResults.includes("error")) { + return "error"; + } + if (allResults.includes("warning")) { + return "warning"; + } + return "default"; + } + const container = document.getElementById("pdk_diagnostic-page-wiki"); + return preserveScrollForPage(() => { + container.replaceChildren(renderWikiDisclaimer(getWikiKind())); + }); +} function renderDiagnosticAvailableActionsWidget() { const diagnosticsActions = store.get().diagnosticsActions; const servicesInfoWidget = store.get().servicesInfoWidget; @@ -4013,6 +4095,7 @@ function renderDiagnosticSystemInfoWidget() { async function onStoreUpdate2(next, prev, diff) { if (diff.diagnosticsChecks) { renderDiagnosticsChecks(); + renderWikiDisclaimerWidget(); } if (diff.diagnosticsRunAction) { renderDiagnosticRunActionWidget(); @@ -4047,6 +4130,7 @@ function onPageMount2() { renderDiagnosticRunActionWidget(); renderDiagnosticAvailableActionsWidget(); renderDiagnosticSystemInfoWidget(); + renderWikiDisclaimerWidget(); fetchServicesInfo(); fetchSystemInfo(); } @@ -4125,6 +4209,31 @@ var styles4 = ` grid-row-gap: 10px; } +.pdk_diagnostic-page__right-bar__wiki { + border: 2px var(--background-color-low, lightgray) solid; + border-radius: 4px; + padding: 10px; + + display: grid; + grid-template-columns: auto; + grid-row-gap: 10px; +} + +.pdk_diagnostic-page__right-bar__wiki--warning { + border: 2px var(--warn-color-medium, orange) solid; +} +.pdk_diagnostic-page__right-bar__wiki--error { + border: 2px var(--error-color-medium, red) solid; +} + +.pdk_diagnostic-page__right-bar__wiki__content { + display: grid; + grid-template-columns: 1fr 5fr; + grid-column-gap: 10px; +} + +.pdk_diagnostic-page__right-bar__wiki__texts {} + .pdk_diagnostic-page__right-bar__actions { border: 2px var(--background-color-low, lightgray) solid; border-radius: 4px; diff --git a/luci-app-podkop/po/ru/podkop.po b/luci-app-podkop/po/ru/podkop.po index 56cff1e..4c9f731 100644 --- a/luci-app-podkop/po/ru/podkop.po +++ b/luci-app-podkop/po/ru/podkop.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: PODKOP\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-23 19:08+0300\n" -"PO-Revision-Date: 2025-10-23 19:08+0300\n" +"POT-Creation-Date: 2025-10-23 20:00+0300\n" +"PO-Revision-Date: 2025-10-23 20:00+0300\n" "Last-Translator: divocat\n" "Language-Team: none\n" "Language: ru\n" @@ -75,10 +75,7 @@ msgid "checks" msgstr "проверки" msgid "Checks failed" -msgstr "Проверки не пройдены" - -msgid "Checks partially passed" -msgstr "Проверки пройдены частично" +msgstr "Проверки не выполнены" msgid "Checks passed" msgstr "Проверки пройдены" @@ -164,6 +161,9 @@ msgstr "DNS-сервер" msgid "DNS server address cannot be empty" msgstr "Адрес DNS-сервера не может быть пустым" +msgid "Do not panic, everything can be fixed, just..." +msgstr "Не паникуйте, всё можно исправить, просто..." + msgid "Domain Resolver" msgstr "Резолвер доменов" @@ -350,6 +350,9 @@ msgstr "Неверный URL VLESS: ошибка разбора" msgid "IP address 0.0.0.0 is not allowed" msgstr "IP-адрес 0.0.0.0 не допускается" +msgid "Issues detected" +msgstr "Обнаружены проблемы" + msgid "Latest" msgstr "Последняя" @@ -416,6 +419,9 @@ msgstr "Путь должен содержать хотя бы одну дире msgid "Path must end with cache.db" msgstr "Путь должен заканчиваться на cache.db" +msgid "Pending" +msgstr "Ожидает запуска" + msgid "Podkop" msgstr "Podkop" @@ -434,9 +440,6 @@ msgstr "Прокси-трафик не маршрутизируется чере msgid "Proxy traffic is routed via FakeIP" msgstr "Прокси-трафик направляется через FakeIP" -msgid "Queued" -msgstr "В очереди" - msgid "Regional options cannot be used together" msgstr "Нельзя использовать несколько региональных опций одновременно" @@ -617,6 +620,9 @@ msgstr "Трафик" msgid "Traffic Total" msgstr "Всего трафика" +msgid "Troubleshooting" +msgstr "Устранение неполадок" + msgid "TTL must be a positive number" msgstr "TTL должно быть положительным числом" @@ -677,6 +683,9 @@ msgstr "Ошибки валидации:" msgid "View logs" msgstr "Посмотреть логи" +msgid "Visit Wiki" +msgstr "Перейти в wiki" + msgid "Warning: %s cannot be used together with %s. Previous selections have been removed." msgstr "Предупреждение: %s нельзя использовать вместе с %s. Предыдущие варианты были удалены." diff --git a/luci-app-podkop/po/templates/podkop.pot b/luci-app-podkop/po/templates/podkop.pot index 2b6b460..e72e2a9 100644 --- a/luci-app-podkop/po/templates/podkop.pot +++ b/luci-app-podkop/po/templates/podkop.pot @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: PODKOP\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-23 16:08+0300\n" -"PO-Revision-Date: 2025-10-23 16:08+0300\n" +"POT-Creation-Date: 2025-10-23 17:00+0300\n" +"PO-Revision-Date: 2025-10-23 17:00+0300\n" "Last-Translator: divocat \n" "Language-Team: LANGUAGE \n" "Language: \n" @@ -101,10 +101,6 @@ msgstr "" msgid "Checks failed" msgstr "" -#: src/podkop/tabs/diagnostic/helpers/getMeta.ts:20 -msgid "Checks partially passed" -msgstr "" - #: src/podkop/tabs/diagnostic/helpers/getMeta.ts:13 msgid "Checks passed" msgstr "" @@ -222,6 +218,10 @@ msgstr "" msgid "DNS server address cannot be empty" msgstr "" +#: src/podkop/tabs/diagnostic/partials/renderWikiDisclaimer.ts:26 +msgid "Do not panic, everything can be fixed, just..." +msgstr "" + #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:166 msgid "Domain Resolver" msgstr "" @@ -312,12 +312,12 @@ msgstr "" msgid "Failed to copy!" msgstr "" -#: src/podkop/tabs/diagnostic/initController.ts:225 -#: src/podkop/tabs/diagnostic/initController.ts:229 -#: src/podkop/tabs/diagnostic/initController.ts:259 -#: src/podkop/tabs/diagnostic/initController.ts:263 -#: src/podkop/tabs/diagnostic/initController.ts:297 -#: src/podkop/tabs/diagnostic/initController.ts:301 +#: src/podkop/tabs/diagnostic/initController.ts:226 +#: src/podkop/tabs/diagnostic/initController.ts:230 +#: src/podkop/tabs/diagnostic/initController.ts:260 +#: src/podkop/tabs/diagnostic/initController.ts:264 +#: src/podkop/tabs/diagnostic/initController.ts:298 +#: src/podkop/tabs/diagnostic/initController.ts:302 msgid "Failed to execute!" msgstr "" @@ -333,7 +333,7 @@ msgstr "" msgid "Get global check" msgstr "" -#: src/podkop/tabs/diagnostic/initController.ts:220 +#: src/podkop/tabs/diagnostic/initController.ts:221 msgid "Global check" msgstr "" @@ -478,7 +478,11 @@ msgstr "" msgid "IP address 0.0.0.0 is not allowed" msgstr "" -#: src/podkop/tabs/diagnostic/initController.ts:427 +#: src/podkop/tabs/diagnostic/helpers/getMeta.ts:20 +msgid "Issues detected" +msgstr "" + +#: src/podkop/tabs/diagnostic/initController.ts:452 msgid "Latest" msgstr "" @@ -545,7 +549,7 @@ msgstr "" msgid "Outbound JSON must contain at least \"type\", \"server\" and \"server_port\" fields" msgstr "" -#: src/podkop/tabs/diagnostic/initController.ts:417 +#: src/podkop/tabs/diagnostic/initController.ts:442 msgid "Outdated" msgstr "" @@ -569,6 +573,13 @@ msgstr "" msgid "Path must end with cache.db" msgstr "" +#: src/podkop/tabs/diagnostic/diagnostic.store.ts:95 +#: src/podkop/tabs/diagnostic/diagnostic.store.ts:103 +#: src/podkop/tabs/diagnostic/diagnostic.store.ts:111 +#: src/podkop/tabs/diagnostic/diagnostic.store.ts:119 +msgid "Pending" +msgstr "" + #: src/podkop/tabs/dashboard/initController.ts:340 msgid "Podkop" msgstr "" @@ -593,13 +604,6 @@ msgstr "" msgid "Proxy traffic is routed via FakeIP" msgstr "" -#: src/podkop/tabs/diagnostic/diagnostic.store.ts:95 -#: src/podkop/tabs/diagnostic/diagnostic.store.ts:103 -#: src/podkop/tabs/diagnostic/diagnostic.store.ts:111 -#: src/podkop/tabs/diagnostic/diagnostic.store.ts:119 -msgid "Queued" -msgstr "" - #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:245 msgid "Regional options cannot be used together" msgstr "" @@ -733,7 +737,7 @@ msgstr "" msgid "Settings" msgstr "" -#: src/podkop/tabs/diagnostic/initController.ts:288 +#: src/podkop/tabs/diagnostic/initController.ts:289 #: src/podkop/tabs/diagnostic/partials/renderAvailableActions.ts:116 msgid "Show sing-box config" msgstr "" @@ -843,6 +847,10 @@ msgstr "" msgid "Traffic Total" msgstr "" +#: src/podkop/tabs/diagnostic/partials/renderWikiDisclaimer.ts:25 +msgid "Troubleshooting" +msgstr "" + #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/settings.js:80 msgid "TTL must be a positive number" msgstr "" @@ -860,13 +868,13 @@ msgstr "" msgid "UDP over TCP" msgstr "" -#: src/podkop/tabs/diagnostic/initController.ts:36 #: src/podkop/tabs/diagnostic/initController.ts:37 #: src/podkop/tabs/diagnostic/initController.ts:38 #: src/podkop/tabs/diagnostic/initController.ts:39 #: src/podkop/tabs/diagnostic/initController.ts:40 #: src/podkop/tabs/diagnostic/initController.ts:41 -#: src/podkop/tabs/diagnostic/initController.ts:391 +#: src/podkop/tabs/diagnostic/initController.ts:42 +#: src/podkop/tabs/diagnostic/initController.ts:416 msgid "unknown" msgstr "" @@ -879,7 +887,7 @@ msgstr "" msgid "Uplink" msgstr "" -#: src/validators/validateProxyUrl.ts:27 +#: src/validators/validateProxyUrl.ts:29 msgid "URL must start with vless://, ss://, trojan://, or socks4/5://" msgstr "" @@ -940,11 +948,15 @@ msgstr "" msgid "Validation errors:" msgstr "" -#: src/podkop/tabs/diagnostic/initController.ts:254 +#: src/podkop/tabs/diagnostic/initController.ts:255 #: src/podkop/tabs/diagnostic/partials/renderAvailableActions.ts:107 msgid "View logs" msgstr "" +#: src/podkop/tabs/diagnostic/partials/renderWikiDisclaimer.ts:31 +msgid "Visit Wiki" +msgstr "" + #: ../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:247 msgid "Warning: %s cannot be used together with %s. Previous selections have been removed." msgstr "" From 9a389c47bf721e688b52ce97173b446d5709e900 Mon Sep 17 00:00:00 2001 From: divocat Date: Thu, 23 Oct 2025 20:02:49 +0300 Subject: [PATCH 6/9] fix: actualize locales --- fe-app-podkop/locales/podkop.pot | 4 ++-- fe-app-podkop/locales/podkop.ru.po | 4 ++-- .../podkop/tabs/diagnostic/partials/renderWikiDisclaimer.ts | 2 +- .../htdocs/luci-static/resources/view/podkop/main.js | 2 +- luci-app-podkop/po/ru/podkop.po | 4 ++-- luci-app-podkop/po/templates/podkop.pot | 4 ++-- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/fe-app-podkop/locales/podkop.pot b/fe-app-podkop/locales/podkop.pot index e72e2a9..58a5852 100644 --- a/fe-app-podkop/locales/podkop.pot +++ b/fe-app-podkop/locales/podkop.pot @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: PODKOP\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-23 17:00+0300\n" -"PO-Revision-Date: 2025-10-23 17:00+0300\n" +"POT-Creation-Date: 2025-10-23 17:02+0300\n" +"PO-Revision-Date: 2025-10-23 17:02+0300\n" "Last-Translator: divocat \n" "Language-Team: LANGUAGE \n" "Language: \n" diff --git a/fe-app-podkop/locales/podkop.ru.po b/fe-app-podkop/locales/podkop.ru.po index 4c9f731..bf0c36a 100644 --- a/fe-app-podkop/locales/podkop.ru.po +++ b/fe-app-podkop/locales/podkop.ru.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: PODKOP\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-23 20:00+0300\n" -"PO-Revision-Date: 2025-10-23 20:00+0300\n" +"POT-Creation-Date: 2025-10-23 20:02+0300\n" +"PO-Revision-Date: 2025-10-23 20:02+0300\n" "Last-Translator: divocat\n" "Language-Team: none\n" "Language: ru\n" diff --git a/fe-app-podkop/src/podkop/tabs/diagnostic/partials/renderWikiDisclaimer.ts b/fe-app-podkop/src/podkop/tabs/diagnostic/partials/renderWikiDisclaimer.ts index 61e34d2..9511e80 100644 --- a/fe-app-podkop/src/podkop/tabs/diagnostic/partials/renderWikiDisclaimer.ts +++ b/fe-app-podkop/src/podkop/tabs/diagnostic/partials/renderWikiDisclaimer.ts @@ -31,7 +31,7 @@ export function renderWikiDisclaimer(kind: 'default' | 'error' | 'warning') { text: _('Visit Wiki'), onClick: () => window.open( - 'https://podkop.net/docs/troubleshooting/', + 'https://podkop.net/docs/troubleshooting/?utm_source=podkop', '_blank', 'noopener,noreferrer', ), diff --git a/luci-app-podkop/htdocs/luci-static/resources/view/podkop/main.js b/luci-app-podkop/htdocs/luci-static/resources/view/podkop/main.js index 88812a8..be0f13d 100644 --- a/luci-app-podkop/htdocs/luci-static/resources/view/podkop/main.js +++ b/luci-app-podkop/htdocs/luci-static/resources/view/podkop/main.js @@ -3675,7 +3675,7 @@ function renderWikiDisclaimer(kind) { classNames: ["cbi-button-save"], text: _("Visit Wiki"), onClick: () => window.open( - "https://podkop.net/docs/troubleshooting/", + "https://podkop.net/docs/troubleshooting/?utm_source=podkop", "_blank", "noopener,noreferrer" ) diff --git a/luci-app-podkop/po/ru/podkop.po b/luci-app-podkop/po/ru/podkop.po index 4c9f731..bf0c36a 100644 --- a/luci-app-podkop/po/ru/podkop.po +++ b/luci-app-podkop/po/ru/podkop.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: PODKOP\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-23 20:00+0300\n" -"PO-Revision-Date: 2025-10-23 20:00+0300\n" +"POT-Creation-Date: 2025-10-23 20:02+0300\n" +"PO-Revision-Date: 2025-10-23 20:02+0300\n" "Last-Translator: divocat\n" "Language-Team: none\n" "Language: ru\n" diff --git a/luci-app-podkop/po/templates/podkop.pot b/luci-app-podkop/po/templates/podkop.pot index e72e2a9..58a5852 100644 --- a/luci-app-podkop/po/templates/podkop.pot +++ b/luci-app-podkop/po/templates/podkop.pot @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: PODKOP\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-23 17:00+0300\n" -"PO-Revision-Date: 2025-10-23 17:00+0300\n" +"POT-Creation-Date: 2025-10-23 17:02+0300\n" +"PO-Revision-Date: 2025-10-23 17:02+0300\n" "Last-Translator: divocat \n" "Language-Team: LANGUAGE \n" "Language: \n" From ac258c53c057b8276233c34907922f4ae053b06c Mon Sep 17 00:00:00 2001 From: divocat Date: Thu, 23 Oct 2025 20:05:55 +0300 Subject: [PATCH 7/9] fix: alert displaying --- .../htdocs/luci-static/resources/view/podkop/section.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js b/luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js index 54f5bd3..585771d 100644 --- a/luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js +++ b/luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js @@ -241,7 +241,7 @@ function createSectionContent(section) { (v) => v === lastSelected || !main.REGIONAL_OPTIONS.includes(v), ); notifications.push( - E("p", { class: "alert-message warning" }, [ + E("p", {}, [ E("strong", {}, _("Regional options cannot be used together")), E("br"), _( From 2918487845ca6e7d8b76b064d56971c0f472b7db Mon Sep 17 00:00:00 2001 From: divocat Date: Thu, 23 Oct 2025 20:33:18 +0300 Subject: [PATCH 8/9] feat: add custom port support to dns --- .../src/validators/tests/validateDns.test.js | 13 ++++++++++++- fe-app-podkop/src/validators/validateDns.ts | 7 +++++-- .../luci-static/resources/view/podkop/main.js | 6 ++++-- 3 files changed, 21 insertions(+), 5 deletions(-) diff --git a/fe-app-podkop/src/validators/tests/validateDns.test.js b/fe-app-podkop/src/validators/tests/validateDns.test.js index e0543ab..bd105b1 100644 --- a/fe-app-podkop/src/validators/tests/validateDns.test.js +++ b/fe-app-podkop/src/validators/tests/validateDns.test.js @@ -3,7 +3,18 @@ import { validateDNS } from '../validateDns.js'; import { invalidIPs, validIPs } from './validateIp.test'; import { invalidDomains, validDomains } from './validateDomain.test'; -const validDns = [...validIPs, ...validDomains]; +export const additionalValidDns = [ + ['Google DNS (port 53)', '8.8.8.8:53'], + ['Google DNS (port 5353)', '8.8.8.8:5353'], + ['Cloudflare DNS (port 853)', '1.1.1.1:853'], + ['Cloudflare domain (port 853)', 'cloudflare-dns.com:853'], + ['DoH IP', '1.1.1.1/dns-query'], + ['DoH IP with port 443', '1.1.1.1:443/dns-query'], + ['DoH domain', 'cloudflare-dns.com/dns-query'], + ['DoH domain with port 443', 'cloudflare-dns.com:443/dns-query'], +]; + +const validDns = [...validIPs, ...validDomains, ...additionalValidDns]; const invalidDns = [...invalidIPs, ...invalidDomains]; diff --git a/fe-app-podkop/src/validators/validateDns.ts b/fe-app-podkop/src/validators/validateDns.ts index 260ec18..1952a73 100644 --- a/fe-app-podkop/src/validators/validateDns.ts +++ b/fe-app-podkop/src/validators/validateDns.ts @@ -7,11 +7,14 @@ export function validateDNS(value: string): ValidationResult { return { valid: false, message: _('DNS server address cannot be empty') }; } - if (validateIPV4(value).valid) { + const cleanedValueWithoutPort = value.replace(/:(\d+)(?=\/|$)/, ''); + const cleanedIpWithoutPath = cleanedValueWithoutPort.split('/')[0]; + + if (validateIPV4(cleanedIpWithoutPath).valid) { return { valid: true, message: _('Valid') }; } - if (validateDomain(value).valid) { + if (validateDomain(cleanedValueWithoutPort).valid) { return { valid: true, message: _('Valid') }; } diff --git a/luci-app-podkop/htdocs/luci-static/resources/view/podkop/main.js b/luci-app-podkop/htdocs/luci-static/resources/view/podkop/main.js index be0f13d..bcf89bc 100644 --- a/luci-app-podkop/htdocs/luci-static/resources/view/podkop/main.js +++ b/luci-app-podkop/htdocs/luci-static/resources/view/podkop/main.js @@ -40,10 +40,12 @@ function validateDNS(value) { if (!value) { return { valid: false, message: _("DNS server address cannot be empty") }; } - if (validateIPV4(value).valid) { + const cleanedValueWithoutPort = value.replace(/:(\d+)(?=\/|$)/, ""); + const cleanedIpWithoutPath = cleanedValueWithoutPort.split("/")[0]; + if (validateIPV4(cleanedIpWithoutPath).valid) { return { valid: true, message: _("Valid") }; } - if (validateDomain(value).valid) { + if (validateDomain(cleanedValueWithoutPort).valid) { return { valid: true, message: _("Valid") }; } return { From 21ecfbbeca4b7b65768dff595e8af589073d1ac1 Mon Sep 17 00:00:00 2001 From: divocat Date: Thu, 23 Oct 2025 20:43:46 +0300 Subject: [PATCH 9/9] fix: correct types on ru translations --- fe-app-podkop/locales/calls.json | 6 +++--- fe-app-podkop/locales/podkop.pot | 10 +++++----- fe-app-podkop/locales/podkop.ru.po | 6 +++--- luci-app-podkop/po/ru/podkop.po | 6 +++--- luci-app-podkop/po/templates/podkop.pot | 10 +++++----- 5 files changed, 19 insertions(+), 19 deletions(-) diff --git a/fe-app-podkop/locales/calls.json b/fe-app-podkop/locales/calls.json index 15a92ea..847ad5c 100644 --- a/fe-app-podkop/locales/calls.json +++ b/fe-app-podkop/locales/calls.json @@ -580,7 +580,7 @@ "call": "Invalid DNS server format. Examples: 8.8.8.8 or dns.example.com or dns.example.com/nicedns for DoH", "key": "Invalid DNS server format. Examples: 8.8.8.8 or dns.example.com or dns.example.com/nicedns for DoH", "places": [ - "src/validators/validateDns.ts:20" + "src/validators/validateDns.ts:23" ] }, { @@ -1571,8 +1571,8 @@ "call": "Valid", "key": "Valid", "places": [ - "src/validators/validateDns.ts:11", - "src/validators/validateDns.ts:15", + "src/validators/validateDns.ts:14", + "src/validators/validateDns.ts:18", "src/validators/validateDomain.ts:13", "src/validators/validateDomain.ts:30", "src/validators/validateIp.ts:8", diff --git a/fe-app-podkop/locales/podkop.pot b/fe-app-podkop/locales/podkop.pot index 58a5852..54e8965 100644 --- a/fe-app-podkop/locales/podkop.pot +++ b/fe-app-podkop/locales/podkop.pot @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: PODKOP\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-23 17:02+0300\n" -"PO-Revision-Date: 2025-10-23 17:02+0300\n" +"POT-Creation-Date: 2025-10-23 17:43+0300\n" +"PO-Revision-Date: 2025-10-23 17:43+0300\n" "Last-Translator: divocat \n" "Language-Team: LANGUAGE \n" "Language: \n" @@ -353,7 +353,7 @@ msgstr "" msgid "Interface monitoring for Bad WAN" msgstr "" -#: src/validators/validateDns.ts:20 +#: src/validators/validateDns.ts:23 msgid "Invalid DNS server format. Examples: 8.8.8.8 or dns.example.com or dns.example.com/nicedns for DoH" msgstr "" @@ -927,8 +927,8 @@ msgstr "" msgid "User Subnets List" msgstr "" -#: src/validators/validateDns.ts:11 -#: src/validators/validateDns.ts:15 +#: src/validators/validateDns.ts:14 +#: src/validators/validateDns.ts:18 #: src/validators/validateDomain.ts:13 #: src/validators/validateDomain.ts:30 #: src/validators/validateIp.ts:8 diff --git a/fe-app-podkop/locales/podkop.ru.po b/fe-app-podkop/locales/podkop.ru.po index bf0c36a..c2caea2 100644 --- a/fe-app-podkop/locales/podkop.ru.po +++ b/fe-app-podkop/locales/podkop.ru.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: PODKOP\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-23 20:02+0300\n" -"PO-Revision-Date: 2025-10-23 20:02+0300\n" +"POT-Creation-Date: 2025-10-23 20:43+0300\n" +"PO-Revision-Date: 2025-10-23 20:43+0300\n" "Last-Translator: divocat\n" "Language-Team: none\n" "Language: ru\n" @@ -600,7 +600,7 @@ msgid "Table exist" msgstr "Таблица существует" msgid "Test latency" -msgstr "Тестировние задержки" +msgstr "Тестирование задержки" msgid "Text List" msgstr "Текстовый список" diff --git a/luci-app-podkop/po/ru/podkop.po b/luci-app-podkop/po/ru/podkop.po index bf0c36a..c2caea2 100644 --- a/luci-app-podkop/po/ru/podkop.po +++ b/luci-app-podkop/po/ru/podkop.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: PODKOP\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-23 20:02+0300\n" -"PO-Revision-Date: 2025-10-23 20:02+0300\n" +"POT-Creation-Date: 2025-10-23 20:43+0300\n" +"PO-Revision-Date: 2025-10-23 20:43+0300\n" "Last-Translator: divocat\n" "Language-Team: none\n" "Language: ru\n" @@ -600,7 +600,7 @@ msgid "Table exist" msgstr "Таблица существует" msgid "Test latency" -msgstr "Тестировние задержки" +msgstr "Тестирование задержки" msgid "Text List" msgstr "Текстовый список" diff --git a/luci-app-podkop/po/templates/podkop.pot b/luci-app-podkop/po/templates/podkop.pot index 58a5852..54e8965 100644 --- a/luci-app-podkop/po/templates/podkop.pot +++ b/luci-app-podkop/po/templates/podkop.pot @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: PODKOP\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-23 17:02+0300\n" -"PO-Revision-Date: 2025-10-23 17:02+0300\n" +"POT-Creation-Date: 2025-10-23 17:43+0300\n" +"PO-Revision-Date: 2025-10-23 17:43+0300\n" "Last-Translator: divocat \n" "Language-Team: LANGUAGE \n" "Language: \n" @@ -353,7 +353,7 @@ msgstr "" msgid "Interface monitoring for Bad WAN" msgstr "" -#: src/validators/validateDns.ts:20 +#: src/validators/validateDns.ts:23 msgid "Invalid DNS server format. Examples: 8.8.8.8 or dns.example.com or dns.example.com/nicedns for DoH" msgstr "" @@ -927,8 +927,8 @@ msgstr "" msgid "User Subnets List" msgstr "" -#: src/validators/validateDns.ts:11 -#: src/validators/validateDns.ts:15 +#: src/validators/validateDns.ts:14 +#: src/validators/validateDns.ts:18 #: src/validators/validateDomain.ts:13 #: src/validators/validateDomain.ts:30 #: src/validators/validateIp.ts:8