mirror of
https://github.com/JGeek00/adguard-home-manager.git
synced 2025-05-04 20:30:35 +00:00
Changed allowed and blocked lists and added remove client
This commit is contained in:
parent
f678401fa8
commit
9f248d18a1
8 changed files with 227 additions and 27 deletions
|
@ -5,20 +5,20 @@ ClientsAllowedBlocked allowedBlockedFromJson(String str) => ClientsAllowedBlocke
|
|||
String allowedBlockedToJson(ClientsAllowedBlocked data) => json.encode(data.toJson());
|
||||
|
||||
class ClientsAllowedBlocked {
|
||||
List<String> allowedClients;
|
||||
List<String> disallowedClients;
|
||||
List<String> blockedHosts;
|
||||
|
||||
ClientsAllowedBlocked({
|
||||
required this.allowedClients,
|
||||
required this.disallowedClients,
|
||||
required this.blockedHosts,
|
||||
});
|
||||
|
||||
final List<String> allowedClients;
|
||||
final List<String> disallowedClients;
|
||||
final List<String> blockedHosts;
|
||||
|
||||
factory ClientsAllowedBlocked.fromJson(Map<String, dynamic> json) => ClientsAllowedBlocked(
|
||||
allowedClients: List<String>.from(json["allowed_clients"].map((x) => x)),
|
||||
disallowedClients: List<String>.from(json["disallowed_clients"].map((x) => x)),
|
||||
blockedHosts: List<String>.from(json["blocked_hosts"].map((x) => x)),
|
||||
allowedClients: json["allowed_clients"] != null ? List<String>.from(json["allowed_clients"].map((x) => x)) : [],
|
||||
disallowedClients: json["disallowed_clients"] != null ? List<String>.from(json["disallowed_clients"].map((x) => x)) : [],
|
||||
blockedHosts: json["blocked_hosts"] != null ? List<String>.from(json["blocked_hosts"].map((x) => x)) : [],
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue