From a6605cf2da82706675d1f897367ada8c1591ad28 Mon Sep 17 00:00:00 2001 From: xkeyC <3334969096@qq.com> Date: Thu, 19 Oct 2023 19:44:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=9C=8D=E5=8A=A1=E5=99=A8?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E5=9B=BE=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/ui/home/home_ui.dart | 22 +++++++++++----------- lib/ui/home/home_ui_model.dart | 4 ++++ 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/lib/ui/home/home_ui.dart b/lib/ui/home/home_ui.dart index 0ed3356..8a713e1 100644 --- a/lib/ui/home/home_ui.dart +++ b/lib/ui/home/home_ui.dart @@ -232,17 +232,17 @@ class HomeUI extends BaseUI { for (final item in model.scServerStatus ?? []) Row( children: [ - Center( - child: Icon( - item["status"] == "ok" - ? FontAwesomeIcons.circleCheck - : FluentIcons.error, - color: (item["status"] == - "operational" || - item["status"] == "ok") - ? Colors.green - : Colors.red, - size: 18, + SizedBox( + height: 14, + child: Center( + child: Icon( + FontAwesomeIcons.solidCircle, + color: + model.isRSIServerStatusOK(item) + ? Colors.green + : Colors.red, + size: 12, + ), ), ), const SizedBox(width: 3), diff --git a/lib/ui/home/home_ui_model.dart b/lib/ui/home/home_ui_model.dart index b6f008b..5197236 100644 --- a/lib/ui/home/home_ui_model.dart +++ b/lib/ui/home/home_ui_model.dart @@ -465,4 +465,8 @@ class HomeUIModel extends BaseUIModel { isRsiLauncherStarting = false; notifyListeners(); } + + bool isRSIServerStatusOK(Map map) { + return (map["status"] == "ok" || map["status"] == "operational"); + } }