Skip to content

Commit

Permalink
Update UI for fetching statistics dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
Pavel401 committed Jun 9, 2024
1 parent dadd00a commit 4b7571b
Showing 1 changed file with 30 additions and 9 deletions.
39 changes: 30 additions & 9 deletions lib/taskserver/ntaskserver.dart
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,27 @@ class _ManageTaskServerState extends State<ManageTaskServer> {
barrierDismissible: false,
builder: (context) {
return Utils.showAlertDialog(
title: const Text('Fetching statistics...'),
content: const Column(
title: Text(
'Fetching statistics...',
style: TextStyle(
color: AppSettings.isDarkMode
? TaskWarriorColors.white
: TaskWarriorColors.black,
),
),
content: Column(
mainAxisSize: MainAxisSize.min,
children: [
CircularProgressIndicator(),
SizedBox(height: 16),
Text('Please wait...'),
const CircularProgressIndicator(),
const SizedBox(height: 16),
Text(
'Please wait...',
style: TextStyle(
color: AppSettings.isDarkMode
? TaskWarriorColors.white
: TaskWarriorColors.black,
),
),
],
),
);
Expand Down Expand Up @@ -140,15 +154,22 @@ class _ManageTaskServerState extends State<ManageTaskServer> {
),
actions: [
ElevatedButton(
style: ButtonStyle(
backgroundColor: WidgetStateProperty.all<Color>(
AppSettings.isDarkMode
? TaskWarriorColors.kLightSecondaryBackgroundColor
: TaskWarriorColors.ksecondaryBackgroundColor,
),
),
onPressed: () {
Navigator.of(context).pop();
},
child: Text(
'Ok',
style: TextStyle(
color: AppSettings.isDarkMode
? TaskWarriorColors.white
: TaskWarriorColors.black,
? TaskWarriorColors.black
: TaskWarriorColors.white,
),
),
),
Expand Down Expand Up @@ -505,10 +526,10 @@ class _ManageTaskServerState extends State<ManageTaskServer> {
style: ButtonStyle(
backgroundColor: AppSettings
.isDarkMode
? MaterialStateProperty.all<
? WidgetStateProperty.all<
Color>(
TaskWarriorColors.black)
: MaterialStateProperty.all<
: WidgetStateProperty.all<
Color>(
TaskWarriorColors
.white)),
Expand Down

0 comments on commit 4b7571b

Please sign in to comment.