mirror of
https://github.com/gSpotx2f/ruantiblock_openwrt.git
synced 2026-05-14 22:50:58 +00:00
luci-app: Support for luci-theme-openwrt-2020
This commit is contained in:
@@ -11,7 +11,7 @@ LUCI_APP=1
|
|||||||
OWRT_VERSION="current"
|
OWRT_VERSION="current"
|
||||||
RUAB_VERSION="0.9.0-3"
|
RUAB_VERSION="0.9.0-3"
|
||||||
RUAB_MOD_LUA_VERSION="0.9.0-3"
|
RUAB_MOD_LUA_VERSION="0.9.0-3"
|
||||||
RUAB_LUCI_APP_VERSION="0.9.0-8"
|
RUAB_LUCI_APP_VERSION="0.9.0-9"
|
||||||
BASE_URL="https://github.com/gSpotx2f/packages-openwrt/raw/master"
|
BASE_URL="https://github.com/gSpotx2f/packages-openwrt/raw/master"
|
||||||
PKG_DIR="/tmp"
|
PKG_DIR="/tmp"
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_VERSION:=0.9.0-8
|
PKG_VERSION:=0.9.0-9
|
||||||
LUCI_TITLE:=LuCI support for ruantiblock
|
LUCI_TITLE:=LuCI support for ruantiblock
|
||||||
LUCI_DEPENDS:=+ruantiblock
|
LUCI_DEPENDS:=+ruantiblock
|
||||||
LUCI_PKGARCH:=all
|
LUCI_PKGARCH:=all
|
||||||
|
|||||||
@@ -102,65 +102,64 @@ return view.extend({
|
|||||||
ipset = null;
|
ipset = null;
|
||||||
if(data) {
|
if(data) {
|
||||||
if(data.status === 'enabled') {
|
if(data.status === 'enabled') {
|
||||||
update_status = E('div', { 'class': 'table' });
|
update_status = E('table', { 'class': 'table' });
|
||||||
|
|
||||||
if(data.last_blacklist_update.status) {
|
if(data.last_blacklist_update.status) {
|
||||||
update_status.append(
|
update_status.append(
|
||||||
E('div', { 'class': 'tr' }, [
|
E('tr', { 'class': 'tr' }, [
|
||||||
E('div', { 'class': 'td left', 'style': 'min-width:33%' },
|
E('td', { 'class': 'td left', 'style': 'min-width:33%' },
|
||||||
_('Last blacklist update') + ':'),
|
_('Last blacklist update') + ':'),
|
||||||
E('div', { 'class': 'td left',
|
E('td', { 'class': 'td left',
|
||||||
'id': 'last_blacklist_update.date' },
|
'id': 'last_blacklist_update.date' },
|
||||||
data.last_blacklist_update.date),
|
data.last_blacklist_update.date),
|
||||||
]),
|
]),
|
||||||
E('div', { 'class': 'tr' }, [
|
E('tr', { 'class': 'tr' }, [
|
||||||
E('div', { 'class': 'td left' }, 'IP:'),
|
E('td', { 'class': 'td left' }, 'IP:'),
|
||||||
E('div', { 'class': 'td left',
|
E('td', { 'class': 'td left',
|
||||||
'id': 'last_blacklist_update.ip' },
|
'id': 'last_blacklist_update.ip' },
|
||||||
data.last_blacklist_update.ip),
|
data.last_blacklist_update.ip),
|
||||||
]),
|
]),
|
||||||
E('div', { 'class': 'tr' }, [
|
E('tr', { 'class': 'tr' }, [
|
||||||
E('div', { 'class': 'td left' }, 'CIDR:'),
|
E('td', { 'class': 'td left' }, 'CIDR:'),
|
||||||
E('div', { 'class': 'td left',
|
E('td', { 'class': 'td left',
|
||||||
'id': 'last_blacklist_update.cidr' },
|
'id': 'last_blacklist_update.cidr' },
|
||||||
data.last_blacklist_update.cidr),
|
data.last_blacklist_update.cidr),
|
||||||
]),
|
]),
|
||||||
E('div', { 'class': 'tr' }, [
|
E('tr', { 'class': 'tr' }, [
|
||||||
E('div', { 'class': 'td left' }, 'FQDN:'),
|
E('td', { 'class': 'td left' }, 'FQDN:'),
|
||||||
E('div', { 'class': 'td left',
|
E('td', { 'class': 'td left',
|
||||||
'id': 'last_blacklist_update.fqdn' },
|
'id': 'last_blacklist_update.fqdn' },
|
||||||
data.last_blacklist_update.fqdn),
|
data.last_blacklist_update.fqdn),
|
||||||
])
|
])
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
update_status.append(
|
update_status.append(
|
||||||
E('div', { 'class': 'tr' }, [
|
E('tr', { 'class': 'tr' }, [
|
||||||
E('div', { 'class': 'td left' },
|
E('td', { 'class': 'td left' },
|
||||||
_('Last blacklist update')),
|
_('Last blacklist update')),
|
||||||
E('div', { 'class': 'td left' }, _('No data')),
|
E('td', { 'class': 'td left' }, _('No data')),
|
||||||
])
|
])
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
if(data.iptables) {
|
if(data.iptables) {
|
||||||
let table_iptables = E('div', { 'class': 'table' }, [
|
let table_iptables = E('table', { 'class': 'table' }, [
|
||||||
E('div', { 'class': 'tr table-titles' }, [
|
E('tr', { 'class': 'tr table-titles' }, [
|
||||||
E('div', { 'class': 'th left', 'style': 'min-width:33%' },
|
E('th', { 'class': 'th left', 'style': 'min-width:33%' },
|
||||||
_('Match-set')),
|
_('Match-set')),
|
||||||
E('div', { 'class': 'th left' }, _('Bytes')),
|
E('th', { 'class': 'th left' }, _('Bytes')),
|
||||||
]),
|
]),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
for(let [k, v] of Object.entries(data.iptables)) {
|
for(let [k, v] of Object.entries(data.iptables)) {
|
||||||
if(k === '_dummy') continue;
|
if(k === '_dummy') continue;
|
||||||
|
|
||||||
table_iptables.append(
|
table_iptables.append(
|
||||||
E('div', { 'class': 'tr' }, [
|
E('tr', { 'class': 'tr' }, [
|
||||||
E('div', {
|
E('td', {
|
||||||
'class' : 'td left',
|
'class' : 'td left',
|
||||||
'data-title': _('Match-set'),
|
'data-title': _('Match-set'),
|
||||||
}, k),
|
}, k),
|
||||||
E('div', {
|
E('td', {
|
||||||
'class' : 'td left',
|
'class' : 'td left',
|
||||||
'id' : 'iptables.' + k,
|
'id' : 'iptables.' + k,
|
||||||
'data-title': _('Bytes'),
|
'data-title': _('Bytes'),
|
||||||
@@ -176,13 +175,13 @@ return view.extend({
|
|||||||
};
|
};
|
||||||
|
|
||||||
if(data.ipset) {
|
if(data.ipset) {
|
||||||
let table_ipset = E('div', { 'class': 'table' },
|
let table_ipset = E('table', { 'class': 'table' },
|
||||||
E('div', { 'class': 'tr table-titles' }, [
|
E('tr', { 'class': 'tr table-titles' }, [
|
||||||
E('div', { 'class': 'th left', 'style': 'min-width:33%' },
|
E('th', { 'class': 'th left', 'style': 'min-width:33%' },
|
||||||
_('Name')),
|
_('Name')),
|
||||||
E('div', { 'class': 'th left' },
|
E('th', { 'class': 'th left' },
|
||||||
_('Size in memory')),
|
_('Size in memory')),
|
||||||
E('div', { 'class': 'th left' },
|
E('th', { 'class': 'th left' },
|
||||||
_('Number of entries')),
|
_('Number of entries')),
|
||||||
])
|
])
|
||||||
);
|
);
|
||||||
@@ -191,17 +190,17 @@ return view.extend({
|
|||||||
if(k === '_dummy') continue;
|
if(k === '_dummy') continue;
|
||||||
|
|
||||||
table_ipset.append(
|
table_ipset.append(
|
||||||
E('div', { 'class': 'tr' }, [
|
E('tr', { 'class': 'tr' }, [
|
||||||
E('div', {
|
E('td', {
|
||||||
'class': 'td left',
|
'class': 'td left',
|
||||||
'data-title': _('Name'),
|
'data-title': _('Name'),
|
||||||
}, k),
|
}, k),
|
||||||
E('div', {
|
E('td', {
|
||||||
'class' : 'td left',
|
'class' : 'td left',
|
||||||
'id' : 'ipset.' + k + '.' + '0',
|
'id' : 'ipset.' + k + '.' + '0',
|
||||||
'data-title': _('Size in memory'),
|
'data-title': _('Size in memory'),
|
||||||
}, v[0]),
|
}, v[0]),
|
||||||
E('div', {
|
E('td', {
|
||||||
'class' : 'td left',
|
'class' : 'td left',
|
||||||
'id' : 'ipset.' + k + '.' + '1',
|
'id' : 'ipset.' + k + '.' + '1',
|
||||||
'data-title': _('Number of entries'),
|
'data-title': _('Number of entries'),
|
||||||
|
|||||||
@@ -129,45 +129,45 @@ return baseclass.extend({
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
app_status_label = this.infoLabelError;
|
app_status_label = this.infoLabelError;
|
||||||
return `<div class="table">
|
return `<table class="table">
|
||||||
<div class="tr">
|
<tr class="tr">
|
||||||
<div class="td left" style="min-width:33%%">
|
<td class="td left" style="min-width:33%%">
|
||||||
${_('Status')}:
|
${_('Status')}:
|
||||||
</div>
|
</td>
|
||||||
<div class="td left">
|
<td class="td left">
|
||||||
${app_status_label}
|
${app_status_label}
|
||||||
</div>
|
</td>
|
||||||
</div>
|
</tr>
|
||||||
</div>`
|
</table>`
|
||||||
};
|
};
|
||||||
|
|
||||||
return `<div class="table">
|
return `<table class="table">
|
||||||
<div class="tr">
|
<tr class="tr">
|
||||||
<div class="td left" style="min-width:33%%">
|
<td class="td left" style="min-width:33%%">
|
||||||
${_('Status')}:
|
${_('Status')}:
|
||||||
</div>
|
</td>
|
||||||
<div class="td left%s">
|
<td class="td left%s">
|
||||||
%s %s %s
|
%s %s %s
|
||||||
</div>
|
</td>
|
||||||
</div>
|
</tr>
|
||||||
<div class="tr">
|
<tr class="tr">
|
||||||
<div class="td left">
|
<td class="td left">
|
||||||
${_('Proxy mode')}:
|
${_('Proxy mode')}:
|
||||||
</div>
|
</td>
|
||||||
<div class="td left">
|
<td class="td left">
|
||||||
%s
|
%s
|
||||||
</div>
|
</td>
|
||||||
</div>
|
</tr>
|
||||||
<div class="tr">
|
<tr class="tr">
|
||||||
<div class="td left">
|
<td class="td left">
|
||||||
${_('Blacklist update mode')}:
|
${_('Blacklist update mode')}:
|
||||||
</div>
|
</td>
|
||||||
<div class="td left">
|
<td class="td left">
|
||||||
%s
|
%s
|
||||||
</div>
|
</td>
|
||||||
</div>
|
</tr>
|
||||||
%s
|
%s
|
||||||
</div>
|
</table>
|
||||||
`.format(
|
`.format(
|
||||||
spinning,
|
spinning,
|
||||||
app_status_label,
|
app_status_label,
|
||||||
@@ -179,16 +179,16 @@ return baseclass.extend({
|
|||||||
(proxy_mode == 1) ? 'Tor' : 'VPN',
|
(proxy_mode == 1) ? 'Tor' : 'VPN',
|
||||||
(!bllist_module || bllist_module === '') ? _('user entries only') : bllist_mode,
|
(!bllist_module || bllist_module === '') ? _('user entries only') : bllist_mode,
|
||||||
(!bllist_module || bllist_module === '') ? '' :
|
(!bllist_module || bllist_module === '') ? '' :
|
||||||
`<div class="tr">
|
`<tr class="tr">
|
||||||
<div class="td left">
|
<td class="td left">
|
||||||
${_('Blacklist source')}:
|
${_('Blacklist source')}:
|
||||||
</div>
|
</td>
|
||||||
<div class="td left">
|
<td class="td left">
|
||||||
<span style="cursor:help; border-bottom:1px dotted" data-tooltip="${this.blacklistSources[bllist_source]}">
|
<span style="cursor:help; border-bottom:1px dotted" data-tooltip="${this.blacklistSources[bllist_source]}">
|
||||||
${bllist_source}
|
${bllist_source}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</td>
|
||||||
</div>`
|
</tr>`
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ msgid "Disabled"
|
|||||||
msgstr "Отключено"
|
msgstr "Отключено"
|
||||||
|
|
||||||
msgid "Dismiss"
|
msgid "Dismiss"
|
||||||
msgstr "Отмена"
|
msgstr "Закрыть"
|
||||||
|
|
||||||
msgid "Download error"
|
msgid "Download error"
|
||||||
msgstr "Ошибка загрузки"
|
msgstr "Ошибка загрузки"
|
||||||
|
|||||||
Reference in New Issue
Block a user