mirror of
https://github.com/JGeek00/adguard-home-manager.git
synced 2025-04-21 22:39:11 +00:00
Added loading indicator edit connection
This commit is contained in:
parent
4b03dbeb18
commit
9e57b57ddf
1 changed files with 4 additions and 3 deletions
|
@ -126,6 +126,8 @@ class _AddServerModalState extends State<AddServerModal> {
|
|||
}
|
||||
|
||||
void connect() async {
|
||||
setState(() => isConnecting = true);
|
||||
|
||||
Server serverObj = Server(
|
||||
id: uuid.v4(),
|
||||
name: nameController.text,
|
||||
|
@ -140,7 +142,6 @@ class _AddServerModalState extends State<AddServerModal> {
|
|||
: null,
|
||||
runningOnHa: homeAssistant
|
||||
);
|
||||
setState(() => isConnecting = true);
|
||||
|
||||
final result = homeAssistant == true
|
||||
? await loginHA(serverObj)
|
||||
|
@ -211,10 +212,11 @@ class _AddServerModalState extends State<AddServerModal> {
|
|||
else {
|
||||
Navigator.pop(context);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
void edit() async {
|
||||
setState(() => isConnecting = true);
|
||||
|
||||
final Server serverObj = Server(
|
||||
id: widget.server!.id,
|
||||
name: nameController.text,
|
||||
|
@ -286,7 +288,6 @@ class _AddServerModalState extends State<AddServerModal> {
|
|||
else {
|
||||
Navigator.pop(context);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
Widget actions() {
|
||||
|
|
Loading…
Add table
Reference in a new issue