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_VERSION:=1.0.0
|
||||
PKG_RELEASE:=5
|
||||
PKG_RELEASE:=6
|
||||
PKG_ARCH:=all
|
||||
PKG_LICENSE:=Apache-2.0
|
||||
PKG_MAINTAINER:=CyberMind <contact@cybermind.fr>
|
||||
|
||||
@ -285,11 +285,15 @@ return view.extend({
|
||||
_('Install via adguardhomectl'))
|
||||
]),
|
||||
E('div', { 'class': 'proxy-actions', 'style': 'display: flex; gap: 0.5rem;' }, [
|
||||
E('button', {
|
||||
'class': 'btn cbi-button',
|
||||
'click': L.bind(this.handleAdGuardToggle, this),
|
||||
'disabled': !adguard.installed
|
||||
}, adguard.enabled ? _('Disable') : _('Enable')),
|
||||
adguard.installed ?
|
||||
E('button', {
|
||||
'class': 'btn cbi-button',
|
||||
'click': L.bind(this.handleAdGuardToggle, this)
|
||||
}, adguard.enabled ? _('Disable') : _('Enable')) :
|
||||
E('button', {
|
||||
'class': 'btn cbi-button',
|
||||
'disabled': 'disabled'
|
||||
}, _('Not Installed')),
|
||||
adguard.running ? E('a', {
|
||||
'class': 'btn cbi-button',
|
||||
'href': 'http://' + window.location.hostname + ':' + (adguard.port || 3000),
|
||||
@ -314,18 +318,23 @@ return view.extend({
|
||||
E('div', {}, cdnListeningText),
|
||||
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', {
|
||||
'class': 'btn cbi-button',
|
||||
'click': L.bind(this.handleCdnCacheToggle, this),
|
||||
'disabled': !cdnCache.installed
|
||||
'click': L.bind(this.handleCdnCacheToggle, this)
|
||||
}, cdnCache.enabled ? _('Disable') : _('Enable')),
|
||||
E('button', {
|
||||
'class': 'btn cbi-button',
|
||||
'click': L.bind(this.handleCdnCacheRestart, this),
|
||||
'disabled': !cdnCache.installed
|
||||
'click': L.bind(this.handleCdnCacheRestart, this)
|
||||
}, _('Restart'))
|
||||
])
|
||||
] : [
|
||||
E('button', {
|
||||
'class': 'btn cbi-button',
|
||||
'disabled': 'disabled'
|
||||
}, _('Not Installed'))
|
||||
]
|
||||
)
|
||||
]),
|
||||
// WPAD Card
|
||||
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_VERSION:=1.0.0
|
||||
PKG_RELEASE:=5
|
||||
PKG_RELEASE:=6
|
||||
PKG_ARCH:=all
|
||||
|
||||
PKG_LICENSE:=MIT
|
||||
|
||||
@ -601,6 +601,14 @@ return view.extend({
|
||||
}, [
|
||||
E('span', { 'style': 'font-size: 24px; margin-bottom: 4px;' }, '\u{2699}\uFE0F'),
|
||||
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 work_path '/srv/adguardhome/work'
|
||||
option conf_path '/srv/adguardhome/conf'
|
||||
option port '3000'
|
||||
option dns_port '53'
|
||||
option port '3003'
|
||||
option dns_port '5353'
|
||||
option timezone 'UTC'
|
||||
|
||||
Loading…
Reference in New Issue
Block a user