mirror of
https://github.com/JGeek00/adguard-home-manager.git
synced 2025-06-05 06:10:17 +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 {
|
void connect() async {
|
||||||
|
setState(() => isConnecting = true);
|
||||||
|
|
||||||
Server serverObj = Server(
|
Server serverObj = Server(
|
||||||
id: uuid.v4(),
|
id: uuid.v4(),
|
||||||
name: nameController.text,
|
name: nameController.text,
|
||||||
|
@ -140,7 +142,6 @@ class _AddServerModalState extends State<AddServerModal> {
|
||||||
: null,
|
: null,
|
||||||
runningOnHa: homeAssistant
|
runningOnHa: homeAssistant
|
||||||
);
|
);
|
||||||
setState(() => isConnecting = true);
|
|
||||||
|
|
||||||
final result = homeAssistant == true
|
final result = homeAssistant == true
|
||||||
? await loginHA(serverObj)
|
? await loginHA(serverObj)
|
||||||
|
@ -211,10 +212,11 @@ class _AddServerModalState extends State<AddServerModal> {
|
||||||
else {
|
else {
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
}
|
}
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void edit() async {
|
void edit() async {
|
||||||
|
setState(() => isConnecting = true);
|
||||||
|
|
||||||
final Server serverObj = Server(
|
final Server serverObj = Server(
|
||||||
id: widget.server!.id,
|
id: widget.server!.id,
|
||||||
name: nameController.text,
|
name: nameController.text,
|
||||||
|
@ -286,7 +288,6 @@ class _AddServerModalState extends State<AddServerModal> {
|
||||||
else {
|
else {
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
}
|
}
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget actions() {
|
Widget actions() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue