fix: Button clickability, AdGuard ports, Tor Shield links
- Fix disabled buttons in Network Tweaks using conditional rendering - Change AdGuard Home ports to avoid conflicts (web: 3003, dns: 5353) - Add DNS & Proxy link from Tor Shield to Network Tweaks Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
c7f98d3706
commit
5c2e4c31a7
@ -5,7 +5,7 @@ include $(TOPDIR)/rules.mk
|
|||||||
|
|
||||||
PKG_NAME:=luci-app-network-tweaks
|
PKG_NAME:=luci-app-network-tweaks
|
||||||
PKG_VERSION:=1.0.0
|
PKG_VERSION:=1.0.0
|
||||||
PKG_RELEASE:=5
|
PKG_RELEASE:=6
|
||||||
PKG_ARCH:=all
|
PKG_ARCH:=all
|
||||||
PKG_LICENSE:=Apache-2.0
|
PKG_LICENSE:=Apache-2.0
|
||||||
PKG_MAINTAINER:=CyberMind <contact@cybermind.fr>
|
PKG_MAINTAINER:=CyberMind <contact@cybermind.fr>
|
||||||
|
|||||||
@ -285,11 +285,15 @@ return view.extend({
|
|||||||
_('Install via adguardhomectl'))
|
_('Install via adguardhomectl'))
|
||||||
]),
|
]),
|
||||||
E('div', { 'class': 'proxy-actions', 'style': 'display: flex; gap: 0.5rem;' }, [
|
E('div', { 'class': 'proxy-actions', 'style': 'display: flex; gap: 0.5rem;' }, [
|
||||||
E('button', {
|
adguard.installed ?
|
||||||
'class': 'btn cbi-button',
|
E('button', {
|
||||||
'click': L.bind(this.handleAdGuardToggle, this),
|
'class': 'btn cbi-button',
|
||||||
'disabled': !adguard.installed
|
'click': L.bind(this.handleAdGuardToggle, this)
|
||||||
}, adguard.enabled ? _('Disable') : _('Enable')),
|
}, adguard.enabled ? _('Disable') : _('Enable')) :
|
||||||
|
E('button', {
|
||||||
|
'class': 'btn cbi-button',
|
||||||
|
'disabled': 'disabled'
|
||||||
|
}, _('Not Installed')),
|
||||||
adguard.running ? E('a', {
|
adguard.running ? E('a', {
|
||||||
'class': 'btn cbi-button',
|
'class': 'btn cbi-button',
|
||||||
'href': 'http://' + window.location.hostname + ':' + (adguard.port || 3000),
|
'href': 'http://' + window.location.hostname + ':' + (adguard.port || 3000),
|
||||||
@ -314,18 +318,23 @@ return view.extend({
|
|||||||
E('div', {}, cdnListeningText),
|
E('div', {}, cdnListeningText),
|
||||||
E('div', {}, cdnCache.installed ? _('nginx proxy installed') : _('Not installed'))
|
E('div', {}, cdnCache.installed ? _('nginx proxy installed') : _('Not installed'))
|
||||||
]),
|
]),
|
||||||
E('div', { 'class': 'proxy-actions', 'style': 'display: flex; gap: 0.5rem;' }, [
|
E('div', { 'class': 'proxy-actions', 'style': 'display: flex; gap: 0.5rem;' },
|
||||||
|
cdnCache.installed ? [
|
||||||
E('button', {
|
E('button', {
|
||||||
'class': 'btn cbi-button',
|
'class': 'btn cbi-button',
|
||||||
'click': L.bind(this.handleCdnCacheToggle, this),
|
'click': L.bind(this.handleCdnCacheToggle, this)
|
||||||
'disabled': !cdnCache.installed
|
|
||||||
}, cdnCache.enabled ? _('Disable') : _('Enable')),
|
}, cdnCache.enabled ? _('Disable') : _('Enable')),
|
||||||
E('button', {
|
E('button', {
|
||||||
'class': 'btn cbi-button',
|
'class': 'btn cbi-button',
|
||||||
'click': L.bind(this.handleCdnCacheRestart, this),
|
'click': L.bind(this.handleCdnCacheRestart, this)
|
||||||
'disabled': !cdnCache.installed
|
|
||||||
}, _('Restart'))
|
}, _('Restart'))
|
||||||
])
|
] : [
|
||||||
|
E('button', {
|
||||||
|
'class': 'btn cbi-button',
|
||||||
|
'disabled': 'disabled'
|
||||||
|
}, _('Not Installed'))
|
||||||
|
]
|
||||||
|
)
|
||||||
]),
|
]),
|
||||||
// WPAD Card
|
// WPAD Card
|
||||||
E('div', { 'class': 'proxy-card', 'style': 'background: #16213e; border-radius: 8px; padding: 1rem; border: 1px solid #333;' }, [
|
E('div', { 'class': 'proxy-card', 'style': 'background: #16213e; border-radius: 8px; padding: 1rem; border: 1px solid #333;' }, [
|
||||||
|
|||||||
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
|||||||
|
|
||||||
PKG_NAME:=luci-app-tor-shield
|
PKG_NAME:=luci-app-tor-shield
|
||||||
PKG_VERSION:=1.0.0
|
PKG_VERSION:=1.0.0
|
||||||
PKG_RELEASE:=5
|
PKG_RELEASE:=6
|
||||||
PKG_ARCH:=all
|
PKG_ARCH:=all
|
||||||
|
|
||||||
PKG_LICENSE:=MIT
|
PKG_LICENSE:=MIT
|
||||||
|
|||||||
@ -601,6 +601,14 @@ return view.extend({
|
|||||||
}, [
|
}, [
|
||||||
E('span', { 'style': 'font-size: 24px; margin-bottom: 4px;' }, '\u{2699}\uFE0F'),
|
E('span', { 'style': 'font-size: 24px; margin-bottom: 4px;' }, '\u{2699}\uFE0F'),
|
||||||
E('span', {}, _('Settings'))
|
E('span', {}, _('Settings'))
|
||||||
|
]),
|
||||||
|
E('a', {
|
||||||
|
'class': 'tor-btn',
|
||||||
|
'style': 'display: flex; flex-direction: column; align-items: center; padding: 16px; border-radius: 12px; text-decoration: none; background: linear-gradient(135deg, #0891b2 0%, #06b6d4 100%);',
|
||||||
|
'href': L.url('admin', 'services', 'network-tweaks')
|
||||||
|
}, [
|
||||||
|
E('span', { 'style': 'font-size: 24px; margin-bottom: 4px;' }, '\u{1F310}'),
|
||||||
|
E('span', {}, _('DNS & Proxy'))
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
|
|||||||
@ -3,6 +3,6 @@ config adguardhome 'main'
|
|||||||
option image 'adguard/adguardhome:latest'
|
option image 'adguard/adguardhome:latest'
|
||||||
option work_path '/srv/adguardhome/work'
|
option work_path '/srv/adguardhome/work'
|
||||||
option conf_path '/srv/adguardhome/conf'
|
option conf_path '/srv/adguardhome/conf'
|
||||||
option port '3000'
|
option port '3003'
|
||||||
option dns_port '53'
|
option dns_port '5353'
|
||||||
option timezone 'UTC'
|
option timezone 'UTC'
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user