feat: change history data field

This commit is contained in:
Simon Ding
2024-07-15 10:56:05 +08:00
parent f37a8eeb5f
commit b2c4b69d87
15 changed files with 178 additions and 142 deletions

View File

@@ -30,21 +30,25 @@ class ActivityPage extends ConsumerWidget {
DataCell(Text("${activity.sourceTitle}")),
DataCell(Text("${activity.date!.toLocal()}")),
DataCell(() {
if (activity.inBackgroud == true) {
if (activity.status == "uploading") {
return const MyProgressIndicator(
size: 20,
);
}
if (activity.completed != true && activity.progress == 0) {
}else if (activity.status == "fail") {
return const Icon(
Icons.close,
color: Colors.red,
);
} else if (activity.status == "success") {
return const Icon(
Icons.check,
color: Colors.green,
);
}
double p = activity.progress == null ? 0:activity.progress!.toDouble() / 100;
return MyProgressIndicator(
value: activity.progress!.toDouble() / 100,
value: p,
size: 20,
);
}()),