mirror of
https://github.com/JGeek00/adguard-home-manager.git
synced 2025-06-08 15:47:47 +00:00
Fixed edit client upstreams
This commit is contained in:
parent
c25e3375e6
commit
1e8e0d7ff0
1 changed files with 16 additions and 8 deletions
|
@ -84,6 +84,10 @@ class _ClientModalState extends State<ClientModal> {
|
||||||
enableSafeSearch = widget.client!.safesearchEnabled;
|
enableSafeSearch = widget.client!.safesearchEnabled;
|
||||||
useGlobalSettingsServices = widget.client!.useGlobalBlockedServices;
|
useGlobalSettingsServices = widget.client!.useGlobalBlockedServices;
|
||||||
blockedServices = widget.client!.blockedServices;
|
blockedServices = widget.client!.blockedServices;
|
||||||
|
upstreamServers = widget.client!.upstreams.map((e) => {
|
||||||
|
'id': uuid.v4(),
|
||||||
|
'controller': TextEditingController(text: e)
|
||||||
|
}).toList();
|
||||||
}
|
}
|
||||||
super.initState();
|
super.initState();
|
||||||
}
|
}
|
||||||
|
@ -584,7 +588,9 @@ class _ClientModalState extends State<ClientModal> {
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: MediaQuery.of(context).size.width - 108,
|
width: editMode == true
|
||||||
|
? MediaQuery.of(context).size.width - 108
|
||||||
|
: MediaQuery.of(context).size.width - 40,
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
enabled: editMode,
|
enabled: editMode,
|
||||||
controller: controller['controller'],
|
controller: controller['controller'],
|
||||||
|
@ -600,6 +606,7 @@ class _ClientModalState extends State<ClientModal> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
if (editMode == true) ...[
|
||||||
const SizedBox(width: 20),
|
const SizedBox(width: 20),
|
||||||
IconButton(
|
IconButton(
|
||||||
onPressed: () => setState(
|
onPressed: () => setState(
|
||||||
|
@ -607,6 +614,7 @@ class _ClientModalState extends State<ClientModal> {
|
||||||
),
|
),
|
||||||
icon: const Icon(Icons.remove_circle_outline_outlined)
|
icon: const Icon(Icons.remove_circle_outline_outlined)
|
||||||
)
|
)
|
||||||
|
]
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue