🦄 Sync 2025-12-07 00:11:00
This commit is contained in:
@@ -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 &")
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
</style>
|
||||
|
||||
<% if api.is_js_luci() then -%>
|
||||
@@ -215,7 +220,7 @@ table td, .table .td {
|
||||
//<![CDATA[
|
||||
let auto_detection_time = "<%=api.uci_get_type("global_other", "auto_detection_time", "0")%>"
|
||||
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 = '<ul class="cbi-tabmenu">'
|
||||
var tab_ul_li_html = ''
|
||||
var tab_content_html = '<fieldset class="cbi-section-node cbi-section-node-tabbed" id="cbi-passwall-nodes">'
|
||||
@@ -926,7 +931,7 @@ table td, .table .td {
|
||||
innerHTML = innerHTML.split("{{remarks_val}}").join(o["remarks"]);
|
||||
innerHTML = innerHTML.split("{{address_val}}").join(o["address"] || "");
|
||||
innerHTML = innerHTML.split("{{port_val}}").join(o["port"] || "");
|
||||
|
||||
|
||||
node_tr_html += innerHTML
|
||||
}
|
||||
_html = _html.split("{{node-tr}}").join(node_tr_html);
|
||||
@@ -937,7 +942,7 @@ table td, .table .td {
|
||||
if (group === "default") {
|
||||
group_name = "<%:default%>"
|
||||
}
|
||||
|
||||
|
||||
tab_ul_li_html +=
|
||||
'<li group_name="' + group + '" id="tab.passwall.nodes.' + group + '" class="cbi-tab">' +
|
||||
'<a onclick="this.blur(); return cbi_t_switch(\'passwall.nodes\', \'' + group + '\')" href="<%=REQUEST_URI%>?tab.passwall.nodes=' + group + '">' + group_name + " | " + "<font style='color: red'>" + group_nodes[group].length + '</font></a>' +
|
||||
@@ -947,17 +952,17 @@ table td, .table .td {
|
||||
'' + table_html +
|
||||
'</div>'
|
||||
}
|
||||
|
||||
|
||||
tab_ul_html += tab_ul_li_html + '</ul>'
|
||||
tab_content_html += '</fieldset>'
|
||||
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);
|
||||
});
|
||||
});
|
||||
});
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
|
||||
17
luci-theme-aurora/.dev/docs/changelog/v0.9.0_beta.md
Normal file
17
luci-theme-aurora/.dev/docs/changelog/v0.9.0_beta.md
Normal file
@@ -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)
|
||||
@@ -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:=
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user