From 5f354d3d5389147a318b0fe5d0c37e76f6a8cd4f Mon Sep 17 00:00:00 2001 From: actions-user Date: Sun, 7 Dec 2025 00:11:00 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=A6=84=20Sync=202025-12-07=2000:11:00?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../luasrc/controller/passwall.lua | 10 +++ .../view/passwall/node_list/node_list.htm | 81 +++++++++++++++---- .../.dev/docs/changelog/v0.9.0_beta.md | 17 ++++ luci-theme-aurora/Makefile | 4 +- openwrt-bandix/Makefile | 6 +- 5 files changed, 97 insertions(+), 21 deletions(-) create mode 100644 luci-theme-aurora/.dev/docs/changelog/v0.9.0_beta.md diff --git a/luci-app-passwall/luasrc/controller/passwall.lua b/luci-app-passwall/luasrc/controller/passwall.lua index 0c7400d..6b5ed12 100644 --- a/luci-app-passwall/luasrc/controller/passwall.lua +++ b/luci-app-passwall/luasrc/controller/passwall.lua @@ -85,6 +85,7 @@ function index() entry({"admin", "services", appname, "reassign_group"}, call("reassign_group")).leaf = true entry({"admin", "services", appname, "get_node"}, call("get_node")).leaf = true entry({"admin", "services", appname, "save_node_order"}, call("save_node_order")).leaf = true + entry({"admin", "services", appname, "save_node_list_opt"}, call("save_node_list_opt")).leaf = true entry({"admin", "services", appname, "update_rules"}, call("update_rules")).leaf = true entry({"admin", "services", appname, "subscribe_del_node"}, call("subscribe_del_node")).leaf = true entry({"admin", "services", appname, "subscribe_del_all"}, call("subscribe_del_all")).leaf = true @@ -655,6 +656,15 @@ function reassign_group() http_write_json({ status = "ok" }) end +function save_node_list_opt() + local option = http.formvalue("option") or "" + local value = http.formvalue("value") or "" + if option ~= "" then + api.sh_uci_set(appname, "@global_other[0]", option, value, true) + end + http_write_json({ status = "ok" }) +end + function update_rules() local update = http.formvalue("update") luci.sys.call("lua /usr/share/passwall/rule_update.lua log '" .. update .. "' > /dev/null 2>&1 &") diff --git a/luci-app-passwall/luasrc/view/passwall/node_list/node_list.htm b/luci-app-passwall/luasrc/view/passwall/node_list/node_list.htm index 494c091..707452e 100644 --- a/luci-app-passwall/luasrc/view/passwall/node_list/node_list.htm +++ b/luci-app-passwall/luasrc/view/passwall/node_list/node_list.htm @@ -160,6 +160,11 @@ table td, .table .td { background-color: rgba(131, 191, 255, 0.7) !important; box-shadow: 0 4px 6px rgba(0,0,0,0.1); } + +/* hide save button */ +.cbi-page-actions { + display: none !important; +} <% if api.is_js_luci() then -%> @@ -215,7 +220,7 @@ table td, .table .td { //" let show_node_info = "<%=api.uci_get_type("global_other", "show_node_info", "0")%>" - + var node_list = []; var ajax = { @@ -552,7 +557,7 @@ table td, .table .td { ); } } - + function ping_node(cbi_id, dom, type) { var full = get_address_full(cbi_id); if ((type == "icmp" && full.address != "" ) || (type == "tcping" && full.address != "" && full.port != "")) { @@ -862,10 +867,10 @@ table td, .table .td { return str; } - XHR.get('<%=api.url("get_node")%>', null, - function(x, result) { + function loadNodeList() { + XHR.get('<%=api.url("get_node")%>', null, function(x, result) { var node_list = result - + var group_nodes = {} for (let i = 0; i < node_list.length; i++) { let _node = node_list[i] @@ -877,7 +882,7 @@ table td, .table .td { } group_nodes[_node.group].push(_node) } - + var tab_ul_html = '' tab_content_html += '' var tab_html = tab_ul_html + tab_content_html - + document.getElementById("node_list").innerHTML = tab_html - + for (let group in group_nodes) { cbi_t_add("passwall.nodes", group) } - + if (default_group) { cbi_t_switch("passwall.nodes", default_group) } @@ -983,12 +988,60 @@ table td, .table .td { } } } - + get_now_use_node(); pingAllNodes(); + }); + } + + loadNodeList(); + + //Node list option saving logic + document.addEventListener("DOMContentLoaded", function () { + function waitForElement(selector, callback) { + const el = document.querySelector(selector); + if (el) return callback(el); + const observer = new MutationObserver(() => { + const el = document.querySelector(selector); + if (el) { + observer.disconnect(); + callback(el); + } + }); + observer.observe(document.body, { childList: true, subtree: true }); } - ); + + function onChange(option, value) { + XHR.get('<%=api.url("save_node_list_opt")%>', { + option: option, + value: value + }, function(x) { + if (x && x.status == 200) { + document.getElementById("node_list").innerHTML = ""; + loadNodeList(); + } else { + alert("<%:Error%>"); + } + }); + } + + waitForElement('input[type="checkbox"][name*="passwall"][name*="show_node_info"]', function(el) { + el.addEventListener("change", () => { + el.blur(); + show_node_info = el.checked ? "1" : "0"; + onChange("show_node_info", show_node_info); + }); + }); + + waitForElement('select[name*="passwall"][name*="auto_detection_time"]', function(el) { + el.addEventListener("change", () => { + el.blur(); + auto_detection_time = el.value; + onChange("auto_detection_time", auto_detection_time); + }); + }); + }); //]]> diff --git a/luci-theme-aurora/.dev/docs/changelog/v0.9.0_beta.md b/luci-theme-aurora/.dev/docs/changelog/v0.9.0_beta.md new file mode 100644 index 0000000..b19c0d0 --- /dev/null +++ b/luci-theme-aurora/.dev/docs/changelog/v0.9.0_beta.md @@ -0,0 +1,17 @@ +## **What's Changed — v0.9.0_beta** + +### **New Features** + +- Added support for [luci-app-aurora-config](https://github.com/eamonxg/luci-app-aurora-config) to customize the theme. +- Reduced CSS bundle size to improve loading performance. + +--- + +### **Improvements & Fixes** + +- Fixed jitter issue on top-level menu hover in the mega menu (#23). +- Fixed table overflow issue in Mount Points (#24). +- Fixed progress text clipping on the Package page (#26). +- Applied semantic and status colors to buttons, tooltips, labels, and alert messages. +- Centered alert messages both horizontally and vertically, and adjusted the spinning icon offset. +- see the [full changelog](https://github.com/eamonxg/luci-theme-aurora/compare/v0.8.0_beta...v0.9.0_beta) diff --git a/luci-theme-aurora/Makefile b/luci-theme-aurora/Makefile index 724868c..2957115 100644 --- a/luci-theme-aurora/Makefile +++ b/luci-theme-aurora/Makefile @@ -8,8 +8,8 @@ include $(TOPDIR)/rules.mk LUCI_TITLE:=Aurora Theme (A modern browser theme built with Vite and Tailwind CSS) LUCI_DEPENDS:=+luci-base -PKG_VERSION:=0.8.10_beta -PKG_RELEASE:=20251205 +PKG_VERSION:=0.9.0_beta +PKG_RELEASE:=20251206 PKG_LICENSE:=Apache-2.0 LUCI_MINIFY_CSS:= diff --git a/openwrt-bandix/Makefile b/openwrt-bandix/Makefile index 47b2fbc..66bafe2 100644 --- a/openwrt-bandix/Makefile +++ b/openwrt-bandix/Makefile @@ -53,7 +53,7 @@ define Package/$(PKG_NAME)/install # 将配置文件安装到临时位置,由 postinst 决定是否复制到最终位置 $(INSTALL_DIR) $(1)/usr/share/bandix - $(INSTALL_CONF) ./files/bandix.config $(1)/usr/share/bandix/bandix.config.default + $(INSTALL_CONF) ./files/bandix.config $(1)/etc/config/bandix endef define Package/$(PKG_NAME)/conffiles @@ -63,10 +63,6 @@ endef define Package/$(PKG_NAME)/postinst #!/bin/sh if [ -z "$${IPKG_INSTROOT}" ]; then - # 检查配置文件是否存在,如果不存在才从默认配置复制 - if [ ! -f /etc/config/bandix ]; then - cp /usr/share/bandix/bandix.config.default /etc/config/bandix - fi # 添加到 sysupgrade.conf 以在系统升级时保留 if ! grep -q "^/usr/share/bandix$$" /etc/sysupgrade.conf; then