✨ Sync 2026-11-13 18:01:15
Merge-upstream / merge (push) Waiting to run

This commit is contained in:
github-actions[bot] committed 2026-11-13 18:01:15 +08:00
1 parent d058aabfe4
commit 9fdb7b4eff
7 files changed
+99 -99

No files matched your search

@@ -509,17 +509,17 @@ const CBIGridSection = form.GridSection.extend({
return loadDefaultLabel.apply(this, arguments);
},
renderSectionAdd(extra_class) {
renderSectionAdd(/* ... */) {
const prefmt = this.hm_prefmt || '%s';
const LC = this.hm_lowcase_only;
let el = form.GridSection.prototype.renderSectionAdd.call(this, extra_class),
nameEl = el.querySelector('.cbi-section-create-name');
let node = form.GridSection.prototype.renderSectionAdd.apply(this, arguments),
nameEl = node.querySelector('.cbi-section-create-name');
nameEl.placeholder = _('Specify a ID');
ui.addValidator(nameEl, 'uciname', true, (v) => {
let button = el.querySelector('.cbi-section-create > .cbi-button-add');
let button = node.querySelector('.cbi-section-create > .cbi-button-add');
if (!v) {
button.disabled = true;
@@ -539,7 +539,7 @@ const CBIGridSection = form.GridSection.extend({
}
}, 'blur', 'keyup');
return el;
return node;
},
handleAdd(ev, name) {
@@ -551,11 +551,11 @@ const CBIGridSection = form.GridSection.extend({
const CBIListValue = form.ListValue.extend({
renderWidget(/* ... */) {
let frameEl = form.ListValue.prototype.renderWidget.apply(this, arguments);
let node = form.ListValue.prototype.renderWidget.apply(this, arguments);
frameEl.querySelector('select').style["min-width"] = '10em';
node.querySelector('select').style["min-width"] = '10em';
return frameEl;
return node;
}
});
@@ -567,7 +567,7 @@ const CBIDynamicList = form.DynamicList.extend({ // @less_25_12
const choices = this.transformChoices();
const items = L.toArray(value);
const widget = new UIDynamicList(items, choices, {
const node = new UIDynamicList(items, choices, {
id: this.cbid(section_id),
sort: this.keylist,
allowduplicates: this.allowduplicates,
@@ -578,7 +578,7 @@ const CBIDynamicList = form.DynamicList.extend({ // @less_25_12
disabled: (this.readonly != null) ? this.readonly : this.map.readonly
});
return widget.render();
return node.render();
}
});
@@ -586,11 +586,11 @@ const CBIStaticList = form.DynamicList.extend({
__name__: 'CBI.StaticList',
renderWidget(/* ... */) {
let El = (less_25_12 ? CBIDynamicList : form.DynamicList).prototype.renderWidget.apply(this, arguments); // @less_25_12
let node = (less_25_12 ? CBIDynamicList : form.DynamicList).prototype.renderWidget.apply(this, arguments); // @less_25_12
El.querySelector('.add-item ul > li[data-value="-"]')?.remove();
node.querySelector('.add-item ul > li[data-value="-"]')?.remove();
return El;
return node;
}
});
@@ -615,8 +615,8 @@ const CBIGroupListValue = CBIListValue.extend({
__name__: 'CBI.GroupListValue',
renderWidget(section_id, option_index, cfgvalue) {
const frameEl = CBIListValue.prototype.renderWidget.apply(this, arguments);
const select = frameEl.querySelector('select');
const node = CBIListValue.prototype.renderWidget.apply(this, arguments);
const select = node.querySelector('select');
const options = Array.from(select.options);
Object.keys(this.grplist).forEach((label) => {
@@ -628,7 +628,7 @@ const CBIGroupListValue = CBIListValue.extend({
});
select.value = (cfgvalue != null) ? cfgvalue : this.default;
return frameEl;
return node;
},
value(key, val) {
@@ -649,8 +649,8 @@ const CBIGroupDynamicList = (less_25_12 ? CBIDynamicList : form.DynamicList).ext
__name__: 'CBI.GroupDynamicList',
renderWidget(section_id, option_index, cfgvalue) {
const frameEl = (less_25_12 ? CBIDynamicList : form.DynamicList).prototype.renderWidget.apply(this, arguments); // @less_25_12
const select = frameEl.querySelector('ul');
const node = (less_25_12 ? CBIDynamicList : form.DynamicList).prototype.renderWidget.apply(this, arguments); // @less_25_12
const select = node.querySelector('ul');
const optLis = Array.from(select.querySelectorAll('li'));
Object.keys(this.grplist).forEach((label) => {
@@ -667,7 +667,7 @@ const CBIGroupDynamicList = (less_25_12 ? CBIDynamicList : form.DynamicList).ext
select.insertBefore(groupLi, firstLi);
});
return frameEl;
return node;
},
value: CBIGroupListValue.prototype.value
@@ -677,11 +677,11 @@ const CBIGroupStaticList = CBIGroupDynamicList.extend({
__name__: 'CBI.GroupStaticList',
renderWidget(/* ... */) {
let El = CBIGroupDynamicList.prototype.renderWidget.apply(this, arguments);
let node = CBIGroupDynamicList.prototype.renderWidget.apply(this, arguments);
El.querySelector('.add-item ul > li[data-value="-"]')?.remove();
node.querySelector('.add-item ul > li[data-value="-"]')?.remove();
return El;
return node;
}
});
@@ -699,11 +699,11 @@ const CBIRichMultiValue = form.MultiValue.extend({
const CBITextValue = form.TextValue.extend({
renderWidget(/* ... */) {
let frameEl = form.TextValue.prototype.renderWidget.apply(this, arguments);
let node = form.TextValue.prototype.renderWidget.apply(this, arguments);
frameEl.querySelector('textarea').style.fontFamily = monospacefonts.join(',');
node.querySelector('textarea').style.fontFamily = monospacefonts.join(',');
return frameEl;
return node;
}
});
@@ -1377,7 +1377,7 @@ function loadChoicesGetMap(uciconfig, sectiontype, options = {}) {
return values;
}
function renderStatus(ElId, isRunning, instance, noGlobal) {
function renderStatus(elemId, isRunning, instance, noGlobal) {
const visible = isRunning && (isRunning.http || isRunning.https);
return E([
@@ -1385,7 +1385,7 @@ function renderStatus(ElId, isRunning, instance, noGlobal) {
class: 'cbi-button cbi-button-apply' + (noGlobal ? ' hidden' : ''),
click: ui.createHandlerFn(this, handleReload, instance)
}, [ _('Reload') ]),
updateStatus(E('span', { id: ElId, style: 'border: unset; font-style: italic; font-weight: bold' }), isRunning ? true : false),
updateStatus(E('span', { id: elemId, style: 'border: unset; font-style: italic; font-weight: bold' }), isRunning ? true : false),
E('a', {
class: 'cbi-button cbi-button-apply %s'.format(visible ? '' : 'hidden'),
href: visible ? getDashURL(isRunning) : '',
@@ -1394,24 +1394,24 @@ function renderStatus(ElId, isRunning, instance, noGlobal) {
}, [ _('Open Dashboard') ])
]);
}
function updateStatus(El, isRunning, instance, noGlobal) {
if (El) {
El.style.color = isRunning ? 'green' : 'red';
El.innerHTML = ' %s%s '.format(noGlobal ? instance + ' ' : '', isRunning ? _('Running') : _('Not Running'));
function updateStatus(node, isRunning, instance, noGlobal) {
if (node) {
node.style.color = isRunning ? 'green' : 'red';
node.innerHTML = ' %s%s '.format(noGlobal ? instance + ' ' : '', isRunning ? _('Running') : _('Not Running'));
/* Dashboard button */
if (El.nextSibling?.localName === 'a')
if (node.nextSibling?.localName === 'a')
getClashAPI(instance).then((res) => {
let visible = isRunning && (res.http || res.https);
if (visible) {
El.nextSibling.classList.remove('hidden');
node.nextSibling.classList.remove('hidden');
} else
El.nextSibling.classList.add('hidden');
node.nextSibling.classList.add('hidden');
El.nextSibling.href = visible ? getDashURL(Object.assign(res, isRunning)) : '';
node.nextSibling.href = visible ? getDashURL(Object.assign(res, isRunning)) : '';
});
}
return El;
return node;
}
function getDashURL(isRunning) {
const tls = isRunning.https ? 's' : '';
@@ -1508,7 +1508,7 @@ function renderResDownload(section_id) {
const url = uci.get(this.config, section_id, 'url');
const header = uci.get(this.config, section_id, 'header');
let El = E([
let node = E([
E('button', {
class: 'cbi-button cbi-button-add',
disabled: (type !== 'http') || null,
@@ -1527,14 +1527,14 @@ function renderResDownload(section_id) {
}, [ _('🡇') ]) //🗘
]);
return El;
return node;
}
function renderResLink(section_id) {
const section_type = this.section.sectiontype;
const type = uci.get(this.config, section_id, 'type');
let El = E([
let node = E([
E('span', {
title: this.readonly ? this.readonly : null
}, [
@@ -1549,7 +1549,7 @@ function renderResLink(section_id) {
])
]);
return El;
return node;
}
function handleGenKey(section_id, option) {
@@ -749,11 +749,11 @@ function renderRules(s, uciconfig) {
o = s.option(form.DummyValue, 'entry', _('Entry'));
o.renderWidget = function(/* ... */) {
let El = form.DummyValue.prototype.renderWidget.apply(this, arguments);
let node = form.DummyValue.prototype.renderWidget.apply(this, arguments);
El.firstChild.innerText = new RulesEntry(El.querySelector('input').value).toString('mihomo');
node.firstChild.innerText = new RulesEntry(node.querySelector('input').value).toString('mihomo');
return El;
return node;
}
o.load = function(section_id) {
const value = this.super('load', section_id);
@@ -1025,15 +1025,15 @@ return view.extend({
return o.render();
}
ss.renderSectionAdd = function(/* ... */) {
let el = hm.GridSection.prototype.renderSectionAdd.apply(this, arguments);
let node = hm.GridSection.prototype.renderSectionAdd.apply(this, arguments);
el.appendChild(E('button', {
node.appendChild(E('button', {
'class': 'cbi-button cbi-button-add',
'title': _('mihomo config'),
'click': ui.createHandlerFn(this, 'handleYamlImport')
}, [ _('Import mihomo config') ]));
return el;
return node;
}
/* Import mihomo config end */
@@ -1326,15 +1326,15 @@ return view.extend({
return o.render();
}
ss.renderSectionAdd = function(/* ... */) {
let el = hm.GridSection.prototype.renderSectionAdd.apply(this, arguments);
let node = hm.GridSection.prototype.renderSectionAdd.apply(this, arguments);
el.appendChild(E('button', {
node.appendChild(E('button', {
'class': 'cbi-button cbi-button-add',
'title': _('mihomo config'),
'click': ui.createHandlerFn(this, 'handleYamlImport')
}, [ _('Import mihomo config') ]));
return el;
return node;
}
/* Import mihomo config end */
@@ -1416,15 +1416,15 @@ return view.extend({
return o.render();
}
ss.renderSectionAdd = function(/* ... */) {
let el = hm.GridSection.prototype.renderSectionAdd.apply(this, arguments);
let node = hm.GridSection.prototype.renderSectionAdd.apply(this, arguments);
el.appendChild(E('button', {
node.appendChild(E('button', {
'class': 'cbi-button cbi-button-add',
'title': _('mihomo config'),
'click': ui.createHandlerFn(this, 'handleYamlImport')
}, [ _('Import mihomo config') ]));
return el;
return node;
}
/* Import mihomo config end */
@@ -1558,15 +1558,15 @@ return view.extend({
return o.render();
}
ss.renderSectionAdd = function(/* ... */) {
let el = hm.GridSection.prototype.renderSectionAdd.apply(this, arguments);
let node = hm.GridSection.prototype.renderSectionAdd.apply(this, arguments);
el.appendChild(E('button', {
node.appendChild(E('button', {
'class': 'cbi-button cbi-button-add',
'title': _('mihomo config'),
'click': ui.createHandlerFn(this, 'handleYamlImport')
}, [ _('Import mihomo config') ]));
return el;
return node;
}
/* Import mihomo config end */
@@ -1732,15 +1732,15 @@ return view.extend({
return o.render();
}
ss.renderSectionAdd = function(/* ... */) {
let el = hm.GridSection.prototype.renderSectionAdd.apply(this, arguments);
let node = hm.GridSection.prototype.renderSectionAdd.apply(this, arguments);
el.appendChild(E('button', {
node.appendChild(E('button', {
'class': 'cbi-button cbi-button-add',
'title': _('mihomo config'),
'click': ui.createHandlerFn(this, 'handleYamlImport')
}, [ _('Import mihomo config') ]));
return el;
return node;
}
/* Import mihomo config end */
@@ -1788,15 +1788,15 @@ return view.extend({
return o.render();
}
ss.renderSectionAdd = function(/* ... */) {
let el = hm.GridSection.prototype.renderSectionAdd.apply(this, arguments);
let node = hm.GridSection.prototype.renderSectionAdd.apply(this, arguments);
el.appendChild(E('button', {
node.appendChild(E('button', {
'class': 'cbi-button cbi-button-add',
'title': _('mihomo config'),
'click': ui.createHandlerFn(this, 'handleYamlImport')
}, [ _('Import mihomo config') ]));
return el;
return node;
}
/* Import mihomo config end */
@@ -77,7 +77,7 @@ function handleResUpdate(type, repo) {
});
}
function renderResVersion(El, type, repo) {
function renderResVersion(node, type, repo) {
return L.resolveDefault(callResVersion(type, repo), {}).then((res) => {
let resEl = E([
E('button', {
@@ -87,23 +87,23 @@ function renderResVersion(El, type, repo) {
updateResVersion(E('span', { style: 'border: unset; font-weight: bold; align-items: center' }), res.version)
]);
if (El) {
El.appendChild(resEl);
El.lastChild.style.display = 'flex';
if (node) {
node.appendChild(resEl);
node.lastChild.style.display = 'flex';
} else
El = resEl;
node = resEl;
return El;
return node;
});
}
function updateResVersion(El, version) {
if (El) {
El.style.color = version ? 'green' : 'red';
El.innerHTML = ' %s'.format(version || _('not found'));
function updateResVersion(node, version) {
if (node) {
node.style.color = version ? 'green' : 'red';
node.innerHTML = ' %s'.format(version || _('not found'));
}
return El;
return node;
}
return view.extend({
@@ -239,7 +239,7 @@ return view.extend({
so.renderWidget = function(section_id, option_index, cfgvalue) {
const cval = new URL(cfgvalue || this.default);
//console.info(cval.toString());
let El = form.Value.prototype.renderWidget.call(this, section_id, option_index, cval.host);
let node = form.Value.prototype.renderWidget.call(this, section_id, option_index, cval.host);
let resEl = E('div', { 'class': 'control-group' }, [
E('select', {
@@ -278,13 +278,13 @@ return view.extend({
return true;
}, 'change');
let newEl = E('div', { style: 'font-weight: bold; align-items: center; display: flex' }, []);
if (El) {
newEl.appendChild(E([El, resEl]));
let new_node = E('div', { style: 'font-weight: bold; align-items: center; display: flex' }, []);
if (node) {
new_node.appendChild(E([node, resEl]));
} else
newEl.appendChild(resEl);
new_node.appendChild(resEl);
return newEl;
return new_node;
}
}
so.onchange = function(ev, section_id, value) {
@@ -344,12 +344,12 @@ return view.extend({
so.value.apply(so, repo);
})
so.renderWidget = function(/* ... */) {
let El = form.ListValue.prototype.renderWidget.apply(this, arguments);
let node = form.ListValue.prototype.renderWidget.apply(this, arguments);
El.classList.add('control-group');
El.firstChild.style.width = '10em';
node.classList.add('control-group');
node.firstChild.style.width = '10em';
return renderResVersion.call(this, El, 'dashboard', this.default);
return renderResVersion.call(this, node, 'dashboard', this.default);
}
so.onchange = function(ev, section_id, value) {
this.default = value;
@@ -237,15 +237,15 @@ return view.extend({
ss.hm_lowcase_only = true;
/* Remove idle files start */
ss.renderSectionAdd = function(/* ... */) {
let el = hm.GridSection.prototype.renderSectionAdd.apply(this, arguments);
let node = hm.GridSection.prototype.renderSectionAdd.apply(this, arguments);
el.appendChild(E('button', {
node.appendChild(E('button', {
'class': 'cbi-button cbi-button-add',
'title': _('Remove idles'),
'click': ui.createHandlerFn(this, hm.handleRemoveIdles)
}, [ _('Remove idles') ]));
return el;
return node;
}
/* Remove idle files end */
@@ -2312,21 +2312,21 @@ return view.extend({
return o.render();
}
ss.renderSectionAdd = function(/* ... */) {
let el = hm.GridSection.prototype.renderSectionAdd.apply(this, arguments);
let node = hm.GridSection.prototype.renderSectionAdd.apply(this, arguments);
el.appendChild(E('button', {
node.appendChild(E('button', {
'class': 'cbi-button cbi-button-add',
'title': _('mihomo config'),
'click': ui.createHandlerFn(this, 'handleYamlImport')
}, [ _('Import mihomo config') ]));
el.appendChild(E('button', {
node.appendChild(E('button', {
'class': 'cbi-button cbi-button-add',
'title': _('Remove idles'),
'click': ui.createHandlerFn(this, hm.handleRemoveIdles)
}, [ _('Remove idles') ]));
return el;
return node;
}
/* Import mihomo config and Remove idle files end */
@@ -251,27 +251,27 @@ return view.extend({
return o.render();
}
s.renderSectionAdd = function(/* ... */) {
let el = hm.GridSection.prototype.renderSectionAdd.apply(this, arguments);
let node = hm.GridSection.prototype.renderSectionAdd.apply(this, arguments);
el.appendChild(E('button', {
node.appendChild(E('button', {
'class': 'cbi-button cbi-button-add',
'title': _('mihomo config'),
'click': ui.createHandlerFn(this, 'handleYamlImport')
}, [ _('Import mihomo config') ]));
el.appendChild(E('button', {
node.appendChild(E('button', {
'class': 'cbi-button cbi-button-add',
'title': _('Import rule-set links'),
'click': ui.createHandlerFn(this, 'handleLinkImport')
}, [ _('Import rule-set links') ]));
el.appendChild(E('button', {
node.appendChild(E('button', {
'class': 'cbi-button cbi-button-add',
'title': _('Remove idles'),
'click': ui.createHandlerFn(this, hm.handleRemoveIdles)
}, [ _('Remove idles') ]));
return el;
return node;
}
/* Import mihomo config and Import rule-set links and Remove idle files end */
+2 -2
View File
@@ -1,8 +1,8 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-trafficctl
PKG_VERSION:=1.30.4
PKG_RELEASE:=31
PKG_VERSION:=1.30.5
PKG_RELEASE:=32
PKG_LICENSE:=Apache-2.0
PKG_MAINTAINER:=Denis Iusupov <yusdyr@gmail.com>
+3 -3
View File
@@ -7,8 +7,8 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=quickstart-netpolicy
PKG_VERSION:=fastnet-runtime-v0.8.9
PKG_RELEASE:=1
PKG_VERSION:=0.2.1-rc20261113
PKG_RELEASE:=2
NETPOLICY_TARGET_x86_64:=x86_64-unknown-linux-musl
NETPOLICY_TARGET_aarch64:=aarch64-unknown-linux-musl
NETPOLICY_TARGET:=$(NETPOLICY_TARGET_$(ARCH))
@@ -20,7 +20,7 @@ PKG_HASH:=skip
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
ifeq ($(CONFIG_USE_APK),y)
PKG_VERSION:=fastnet-runtime-v0.8.9
PKG_VERSION:=$(subst -rc,_rc,$(PKG_VERSION))
endif
PKG_BUILD_PARALLEL:=1