update 2025-04-23 20:42:56

This commit is contained in:
kenzok8 2025-04-23 20:42:56 +08:00
parent d7f6966a6b
commit 01a97ccb52
5 changed files with 14 additions and 43 deletions

View File

@ -58,7 +58,7 @@ define Download/adguardhome-frontend
URL:=https://github.com/AdguardTeam/AdGuardHome/releases/download/v$(PKG_VERSION)/
URL_FILE:=AdGuardHome_frontend.tar.gz
FILE:=$(FRONTEND_FILE)
HASH:=470ecef6a019856a376ae661274ae3d60bbaaac2620bfc73fe8002d6dab7d96e
HASH:=69ff3444f06d9c872f38af5b1a90bfd2438bb278fc7aa654f2e72d92835aee7b
endef
define Build/Prepare

View File

@ -14,7 +14,6 @@ o = s:option(ListValue, "auto_detection_time", translate("Automatic detection de
o:value("0", translate("Close"))
o:value("icmp", "Ping")
o:value("tcping", "TCP Ping")
o.description = translate("To optimize performance, auto-detection is disabled when there are more than 30 nodes.")
o = s:option(Flag, "show_node_info", translate("Show server address and port"))
o.default = "0"
@ -24,24 +23,6 @@ s:append(Template(appname .. "/node_list/link_add_node"))
local auto_detection_time = m:get("@global_other[0]", "auto_detection_time") or "0"
local show_node_info = m:get("@global_other[0]", "show_node_info") or "0"
if auto_detection_time ~= "0" then
local node_count = 0
for k, e in ipairs(api.get_valid_nodes()) do
if e.node_type == "normal" then
node_count = node_count + 1
end
end
if node_count > 30 then auto_detection_time = "0" end
end
-- Pass the auto_detection_time global variable to the webpage
local o = s:option(DummyValue, "_auto_detection_time")
o.rawhtml = true
o.default = string.format([[
<script>
window.auto_detection_time = "%s";
</script>
]], auto_detection_time)
-- [[ Node List ]]--
s = m:section(TypedSection, "nodes")
@ -168,17 +149,13 @@ o = s:option(DummyValue, "ping", "Ping")
o.width = "8%"
o.rawhtml = true
o.cfgvalue = function(t, n)
local type = m:get(n, "type") or ""
local protocol = m:get(n, "protocol") or ""
if (type == "sing-box" or type == "Xray") and
(protocol == "_shunt" or protocol == "_balancing" or protocol == "_urltest" or protocol == "_iface") then
return string.format('<span class="ping_value" cbiid="%s">---</span>', n)
end
local result = "---"
if auto_detection_time ~= "icmp" then
return string.format('<span class="ping"><a href="javascript:void(0)" onclick="javascript:ping_node(\'%s\', this, \'icmp\')">%s</a></span>', n, translate("Test"))
result = string.format('<span class="ping"><a href="javascript:void(0)" onclick="javascript:ping_node(\'%s\', this, \'icmp\')">%s</a></span>', n, translate("Test"))
else
return string.format('<span class="ping_value" cbiid="%s">---</span>', n)
result = string.format('<span class="ping_value" cbiid="%s">---</span>', n)
end
return result
end
---- TCP Ping
@ -186,17 +163,13 @@ o = s:option(DummyValue, "tcping", "TCPing")
o.width = "8%"
o.rawhtml = true
o.cfgvalue = function(t, n)
local type = m:get(n, "type") or ""
local protocol = m:get(n, "protocol") or ""
if (type == "sing-box" or type == "Xray") and
(protocol == "_shunt" or protocol == "_balancing" or protocol == "_urltest" or protocol == "_iface") then
return string.format('<span class="tcping_value" cbiid="%s">---</span>', n)
end
local result = "---"
if auto_detection_time ~= "tcping" then
return string.format('<span class="ping"><a href="javascript:void(0)" onclick="javascript:ping_node(\'%s\', this, \'tcping\')">%s</a></span>', n, translate("Test"))
result = string.format('<span class="ping"><a href="javascript:void(0)" onclick="javascript:ping_node(\'%s\', this, \'tcping\')">%s</a></span>', n, translate("Test"))
else
return string.format('<span class="tcping_value" cbiid="%s">---</span>', n)
result = string.format('<span class="tcping_value" cbiid="%s">---</span>', n)
end
return result
end
o = s:option(DummyValue, "_url_test", translate("URL Test"))

View File

@ -46,7 +46,8 @@ table td, .table .td {
<script type="text/javascript">
//<![CDATA[
let auto_detection_time = "<%=api.uci_get_type("@global_other[0]", "auto_detection_time", "0")%>"
var node_list = {};
var node_count = 0;
@ -313,7 +314,7 @@ table td, .table .td {
/* 自动Ping */
function pingAllNodes() {
if (window.auto_detection_time == "icmp" || window.auto_detection_time == "tcping") {
if (auto_detection_time == "icmp" || auto_detection_time == "tcping") {
var nodes = [];
const ping_value = document.getElementsByClassName(auto_detection_time == "tcping" ? 'tcping_value' : 'ping_value');
for (var i = 0; i < ping_value.length; i++) {

View File

@ -634,9 +634,6 @@ msgstr "延迟"
msgid "Automatic detection delay"
msgstr "自动检测延迟"
msgid "To optimize performance, auto-detection is disabled when there are more than 30 nodes."
msgstr "为优化性能,超过 30 个节点不自动检测。"
msgid "Show server address and port"
msgstr "显示服务器地址和端口"

View File

@ -1,12 +1,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=geoview
PKG_VERSION:=0.1.7
PKG_VERSION:=0.1.6
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/snowie2000/geoview/tar.gz/$(PKG_VERSION)?
PKG_HASH:=3cc16cc92f3600c4f8ced4a2fe867610acdb8dfdf18f4181206d182c5f190148
PKG_HASH:=f6ce6943fd09ec2ab2794a5da1078ca9cae3ed83de98d4e6650f2d8b81d051ea
PKG_LICENSE:=Apache-2.0
PKG_LICENSE_FILES:=LICENSE