From e977ed63fb715dca65ae22a00398c2fffba38cb3 Mon Sep 17 00:00:00 2001 From: Dirk Brenken Date: Sat, 28 Jun 2025 22:15:44 +0200 Subject: [PATCH] luci-app-banip: sync with update 1.5.6-6 Signed-off-by: Dirk Brenken (cherry picked from commit fd4cce9b61588973a07d1ef2788419062d51445b) --- .../resources/view/banip/setreport.js | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/applications/luci-app-banip/htdocs/luci-static/resources/view/banip/setreport.js b/applications/luci-app-banip/htdocs/luci-static/resources/view/banip/setreport.js index 13fab6042b..1148c73a30 100644 --- a/applications/luci-app-banip/htdocs/luci-static/resources/view/banip/setreport.js +++ b/applications/luci-app-banip/htdocs/luci-static/resources/view/banip/setreport.js @@ -23,11 +23,10 @@ function handleAction(report, ev) { ]) ]), E('div', { 'class': 'left', 'style': 'display:flex; flex-direction:column' }, [ - '\xa0', E('h5', _('Result')), E('textarea', { 'id': 'result', - 'style': 'width: 100% !important; padding: 5px; font-family: monospace', + 'style': 'width: 100% !important; margin-top:.5em; padding: 5px; font-family: monospace', 'readonly': 'readonly', 'wrap': 'off', 'rows': 20 @@ -36,6 +35,7 @@ function handleAction(report, ev) { E('div', { 'class': 'right' }, [ E('button', { 'class': 'btn cbi-button', + 'style': 'float:none; margin-right:.4em;', 'click': ui.hideModal }, _('Cancel')), ' ', @@ -106,11 +106,10 @@ function handleAction(report, ev) { ]), ]), E('div', { 'class': 'left', 'style': 'display:flex; flex-direction:column' }, [ - '\xa0', E('h5', _('Result')), E('textarea', { 'id': 'result', - 'style': 'width: 100% !important; padding: 5px; font-family: monospace', + 'style': 'width: 100% !important; margin-top:.5em; padding: 5px; font-family: monospace', 'readonly': 'readonly', 'wrap': 'off', 'rows': 20 @@ -119,6 +118,7 @@ function handleAction(report, ev) { E('div', { 'class': 'right' }, [ E('button', { 'class': 'btn cbi-button', + 'style': 'float:none; margin-right:.4em;', 'click': ui.hideModal }, _('Cancel')), ' ', @@ -244,9 +244,9 @@ return view.extend({ const page = E('div', { 'class': 'cbi-map', 'id': 'cbimap' }, [ E('div', { 'class': 'cbi-section' }, [ - E('p', _('This report shows the latest NFT Set statistics, press the \'Refresh\' button to get a new one. \ + E('p', { 'style': 'margin-bottom:1em;' }, + _('This report shows the latest NFT Set statistics, press the \'Refresh\' button to get a new one. \ You can also display the specific content of Sets, search for suspicious IPs and finally, these IPs can also be displayed on a map.')), - E('p', '\xa0'), E('div', { 'class': 'cbi-value' }, [ E('div', { 'class': 'cbi-value-title', 'style': 'margin-bottom:-5px;width:230px;font-weight:bold;' }, _('Timestamp')), E('div', { 'class': 'cbi-value-title', 'id': 'start', 'style': 'margin-bottom:-5px;color:#37c;font-weight:bold;' }, content?.[0]?.timestamp || '-') @@ -339,7 +339,11 @@ return view.extend({ }, [_('Refresh')]) ]) ]); - if (uci.get('banip', 'global', 'ban_nftcount') === '1' && uci.get('banip', 'global', 'ban_map') === '1') { + if (uci.get('banip', 'global', 'ban_nftcount') === '1' + && uci.get('banip', 'global', 'ban_map') === '1' + && (uci.get('banip', 'global', 'ban_allowlistonly') !== '1' + || (uci.get('banip', 'global', 'ban_feedin') || "").includes("allowlist") + || (uci.get('banip', 'global', 'ban_feedout') || "").includes("allowlist"))) { const btn = page.querySelector('#btnMap'); if (btn) { btn.removeAttribute('disabled'); -- 2.30.2