mirror of
https://github.com/JGeek00/adguard-home-manager.git
synced 2025-05-04 20:30:35 +00:00
Bug fixes
This commit is contained in:
parent
d43398e6e8
commit
97d113f162
4 changed files with 30 additions and 28 deletions
|
@ -46,7 +46,7 @@ class DnsInfo {
|
|||
factory DnsInfo.fromJson(Map<String, dynamic> json) => DnsInfo(
|
||||
upstreamDns: json["upstream_dns"] != null ? List<String>.from(json["upstream_dns"].map((x) => x)) : [],
|
||||
upstreamDnsFile: json["upstream_dns_file"],
|
||||
bootstrapDns: List<String>.from(json["bootstrap_dns"].map((x) => x)),
|
||||
bootstrapDns: json["bootstrap_dns"] != null ? List<String>.from(json["bootstrap_dns"].map((x) => x)) : [],
|
||||
protectionEnabled: json["protection_enabled"],
|
||||
ratelimit: json["ratelimit"],
|
||||
blockingMode: json["blocking_mode"],
|
||||
|
|
|
@ -334,7 +334,7 @@ class _LogsState extends State<Logs> {
|
|||
tooltip: AppLocalizations.of(context)!.filters,
|
||||
)
|
||||
: const SizedBox(),
|
||||
IconButton(
|
||||
if (statusProvider.serverStatus != null) IconButton(
|
||||
tooltip: AppLocalizations.of(context)!.settings,
|
||||
onPressed: () => {
|
||||
if (width > 700 || !(Platform.isAndroid || Platform.isIOS)) {
|
||||
|
|
|
@ -59,7 +59,7 @@ class _DhcpScreenState extends State<DhcpScreen> {
|
|||
if (dhcpProvider.dhcp != null) {
|
||||
setState(() {
|
||||
if (dhcpProvider.dhcp!.dhcpStatus.interfaceName != null && dhcpProvider.dhcp!.dhcpStatus.interfaceName != '') {
|
||||
selectedInterface = dhcpProvider.dhcp!.networkInterfaces.firstWhere((iface) => iface.name == dhcpProvider.dhcp!.dhcpStatus.interfaceName);
|
||||
try {selectedInterface = dhcpProvider.dhcp!.networkInterfaces.firstWhere((iface) => iface.name == dhcpProvider.dhcp!.dhcpStatus.interfaceName);} catch (_) {}
|
||||
enabled = dhcpProvider.dhcp!.dhcpStatus.enabled;
|
||||
ipv4StartRangeController.text = dhcpProvider.dhcp!.dhcpStatus.v4.rangeStart;
|
||||
ipv4EndRangeController.text = dhcpProvider.dhcp!.dhcpStatus.v4.rangeEnd ?? '';
|
||||
|
|
|
@ -103,6 +103,7 @@ class _EncryptionSettingsWidgetState extends State<EncryptionSettingsWidget> {
|
|||
if (result['result'] == 'success') {
|
||||
await checkValidDataApi(data: result['data'].toJson());
|
||||
|
||||
if (mounted) {
|
||||
setState(() {
|
||||
enabled = result['data'].enabled;
|
||||
domainNameController.text = result['data'].serverName ?? '';
|
||||
|
@ -130,6 +131,7 @@ class _EncryptionSettingsWidgetState extends State<EncryptionSettingsWidget> {
|
|||
loadStatus = 1;
|
||||
});
|
||||
}
|
||||
}
|
||||
else {
|
||||
widget.appConfigProvider.addLog(result['log']);
|
||||
setState(() => loadStatus = 2);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue