mirror of
https://mirror.ghproxy.com/https://github.com/StarCitizenToolBox/app.git
synced 2024-12-23 07:43:42 +08:00
修复服务器状态图标
This commit is contained in:
parent
02b2ba4d15
commit
a6605cf2da
@ -232,17 +232,17 @@ class HomeUI extends BaseUI<HomeUIModel> {
|
|||||||
for (final item in model.scServerStatus ?? [])
|
for (final item in model.scServerStatus ?? [])
|
||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
Center(
|
SizedBox(
|
||||||
|
height: 14,
|
||||||
|
child: Center(
|
||||||
child: Icon(
|
child: Icon(
|
||||||
item["status"] == "ok"
|
FontAwesomeIcons.solidCircle,
|
||||||
? FontAwesomeIcons.circleCheck
|
color:
|
||||||
: FluentIcons.error,
|
model.isRSIServerStatusOK(item)
|
||||||
color: (item["status"] ==
|
|
||||||
"operational" ||
|
|
||||||
item["status"] == "ok")
|
|
||||||
? Colors.green
|
? Colors.green
|
||||||
: Colors.red,
|
: Colors.red,
|
||||||
size: 18,
|
size: 12,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(width: 3),
|
const SizedBox(width: 3),
|
||||||
|
@ -465,4 +465,8 @@ class HomeUIModel extends BaseUIModel {
|
|||||||
isRsiLauncherStarting = false;
|
isRsiLauncherStarting = false;
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool isRSIServerStatusOK(Map map) {
|
||||||
|
return (map["status"] == "ok" || map["status"] == "operational");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user