From ddfbcc5e589b62b3384e1768c0973789ad8dda2b Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Fri, 29 Nov 2024 23:30:40 +0800 Subject: [PATCH] =?UTF-8?q?:lipstick:=20Specialize=20details=20for=20?= =?UTF-8?q?=E5=A4=A7=E5=90=89=20and=20=E5=A4=A7=E5=87=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/translations/en.json | 2 ++ assets/translations/zh.json | 2 ++ lib/screens/home.dart | 41 +++++++++++++++++++++++++++++++------ 3 files changed, 39 insertions(+), 6 deletions(-) diff --git a/assets/translations/en.json b/assets/translations/en.json index b72a792..ec67311 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -261,6 +261,8 @@ "dailyCheckDetailTitle": "{}'s fortune details", "dailyCheckPositiveHint": "Good for {}", "dailyCheckNegativeHint": "Bad for {}", + "dailyCheckEverythingIsPositive": "Everything going to be awesome!", + "dailyCheckEverythingIsNegative": "Everything may be wrong...", "dailyCheckPositiveHint1": "Making friends", "dailyCheckPositiveHint1Description": "Friendship lasts forever", "dailyCheckPositiveHint2": "Drinking", diff --git a/assets/translations/zh.json b/assets/translations/zh.json index a4cb6fe..253c2b2 100644 --- a/assets/translations/zh.json +++ b/assets/translations/zh.json @@ -261,6 +261,8 @@ "dailyCheckDetailTitle": "{} 的运势详情", "dailyCheckPositiveHint": "宜 {}", "dailyCheckNegativeHint": "忌 {}", + "dailyCheckEverythingIsPositive": "诸事皆宜", + "dailyCheckEverythingIsNegative": "诸事不宜", "dailyCheckPositiveHint1": "交友", "dailyCheckPositiveHint1Description": "友谊地久天长", "dailyCheckPositiveHint2": "饮酒", diff --git a/lib/screens/home.dart b/lib/screens/home.dart index 9d2e6f1..dd0c9b7 100644 --- a/lib/screens/home.dart +++ b/lib/screens/home.dart @@ -198,13 +198,42 @@ class _HomeDashCheckInWidgetState extends State<_HomeDashCheckInWidget> { crossAxisAlignment: CrossAxisAlignment.start, mainAxisSize: MainAxisSize.min, children: [ - _buildDetailChunk(0, true), + if (_todayRecord?.resultTier != 0) + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + _buildDetailChunk(0, true), + const Gap(8), + _buildDetailChunk(1, true), + ], + ) + else + Text( + 'dailyCheckEverythingIsNegative', + style: Theme.of(context) + .textTheme + .titleMedium! + .copyWith(fontWeight: FontWeight.bold), + ).tr(), const Gap(8), - _buildDetailChunk(1, true), - const Gap(8), - _buildDetailChunk(2, false), - const Gap(8), - _buildDetailChunk(3, false), + if (_todayRecord?.resultTier != 4) + Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + _buildDetailChunk(2, false), + const Gap(8), + _buildDetailChunk(3, false), + ], + ) + else + Text( + 'dailyCheckEverythingIsPositive', + style: Theme.of(context) + .textTheme + .titleMedium! + .copyWith(fontWeight: FontWeight.bold), + ).tr(), ], ), actions: [