luci-app-ruantiblock: fixed service.js.

This commit is contained in:
gSpot
2025-04-30 18:35:48 +03:00
parent 53dfb1ffeb
commit f1839c9388
4 changed files with 29 additions and 4 deletions
+1 -1
View File
@@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-ruantiblock
PKG_VERSION:=2.1.6
PKG_RELEASE:=1
PKG_RELEASE:=2
LUCI_TITLE:=LuCI support for ruantiblock
LUCI_DEPENDS:=+ruantiblock
LUCI_PKGARCH:=all
@@ -32,7 +32,7 @@ return view.extend({
dnsmasqCfgDirsSelect: null,
cancelButton : E('button', {
cancelButton : E('button', {
'id' : 'btn_cancel',
'class': btn_style_neutral,
'click': ui.hideModal,
@@ -64,6 +64,21 @@ return view.extend({
};
};
if(this.currentDnsmasqCfgDir) {
let match = false;
for(let i of available_cfg_dirs) {
if(i[1] == this.currentDnsmasqCfgDir) {
match = true;
break;
};
};
if(!match) {
available_cfg_dirs.unshift(
[ `${this.currentDnsmasqCfgDir} [ UCI ]`, this.currentDnsmasqCfgDir ]
);
};
};
this.dnsmasqCfgDirsSelect = E('select', {
'id' : 'dnsmasq_confdirs_list',
'class': "cbi-input-select",