mirror of
https://github.com/itdoginfo/podkop.git
synced 2025-12-06 11:36:50 +03:00
feat: add download_lists_via_proxy_section
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
'require form';
|
'require form';
|
||||||
|
'require uci';
|
||||||
'require baseclass';
|
'require baseclass';
|
||||||
'require tools.widgets as widgets';
|
'require tools.widgets as widgets';
|
||||||
'require view.podkop.main as main';
|
'require view.podkop.main as main';
|
||||||
@@ -204,6 +205,33 @@ function createSettingsContent(section) {
|
|||||||
o.default = '0';
|
o.default = '0';
|
||||||
o.rmempty = false;
|
o.rmempty = false;
|
||||||
|
|
||||||
|
o = section.option(
|
||||||
|
form.ListValue,
|
||||||
|
'download_lists_via_proxy_section',
|
||||||
|
_('Download Lists via specific proxy section'),
|
||||||
|
_('Downloading all lists via specific Proxy/VPN'),
|
||||||
|
);
|
||||||
|
|
||||||
|
o.rmempty = false;
|
||||||
|
o.depends('download_lists_via_proxy', '1');
|
||||||
|
|
||||||
|
o.load = function () {
|
||||||
|
const sections = this.map?.data?.state?.values?.podkop ?? {};
|
||||||
|
|
||||||
|
this.keylist = [];
|
||||||
|
this.vallist = [];
|
||||||
|
|
||||||
|
for (const secName in sections) {
|
||||||
|
const sec = sections[secName];
|
||||||
|
if (sec['.type'] === 'section') {
|
||||||
|
this.keylist.push(secName);
|
||||||
|
this.vallist.push(secName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return Promise.resolve();
|
||||||
|
};
|
||||||
|
|
||||||
o = section.option(
|
o = section.option(
|
||||||
form.Flag,
|
form.Flag,
|
||||||
'dont_touch_dhcp',
|
'dont_touch_dhcp',
|
||||||
|
|||||||
Reference in New Issue
Block a user