Commit 9c4410d26b0a50ff2353be16c05d203c8db9f9d0

Authored by 刘宏哲
1 parent ab7e1d33

feat(app): update ui

... ... @@ -23,6 +23,14 @@ class HealthReportSubjectScope extends InheritedWidget {
: context.l10n.reportOtherTitle(title);
}
static String waitingForData(BuildContext context) {
final scope =
context.dependOnInheritedWidgetOfExactType<HealthReportSubjectScope>();
return scope == null || scope.isSelf
? context.l10n.reportWaitingForData
: context.l10n.reportWaitingForOtherData;
}
@override
bool updateShouldNotify(HealthReportSubjectScope oldWidget) {
return oldWidget.isSelf != isSelf;
... ...
... ... @@ -176,11 +176,13 @@ class _DailyReportContent extends StatelessWidget {
SleepQualityRing(report: report),
const SizedBox(height: 16),
Text(
HealthReportSubjectScope.titleOf(
context,
quality.reportText,
possessive: false,
),
quality == SleepQualityLevel.unknown
? HealthReportSubjectScope.waitingForData(context)
: HealthReportSubjectScope.titleOf(
context,
quality.reportText,
possessive: false,
),
textAlign: TextAlign.center,
style: TextStyle(
color: Color(quality.qualityColorValue),
... ...
... ... @@ -296,6 +296,7 @@
"reportDatePickerMonthOption": "{month}",
"reportDatePickerDayOption": "{day}",
"reportWaitingForData": "Waiting for data",
"reportWaitingForOtherData": "Waiting for their data",
"reportNoData": "No data",
"reportNoDataToday": "No data for today",
"reportUnitDay": "days",
... ... @@ -698,4 +699,4 @@
"feedbackSubmitSuccessMessage": "Thank you for your feedback. If further communication is needed, we will contact you via the email address you left as soon as possible. Please keep an eye on your inbox.",
"feedbackSubmitSuccessConfirm": "OK",
"frequentMovement": "Frequent movement"
}
\ No newline at end of file
}
... ...
... ... @@ -437,6 +437,7 @@
}
},
"reportWaitingForData": "等待数据",
"reportWaitingForOtherData": "等待Ta的数据",
"reportNoData": "暂无数据",
"reportNoDataToday": "暂无本日数据",
"reportUnitDay": "天",
... ... @@ -782,7 +783,7 @@
"friendsWaitingForData": "等待数据",
"friendsSleepQuality": "睡眠质量",
"friendsTodaySteps": "今日步数",
"friendsSleepQualityExcellent": "睡很棒",
"friendsSleepQualityExcellent": "睡很棒",
"friendsSleepQualityNormal": "睡得不错",
"friendsSleepQualityAttention": "睡得差",
"friendsRemove": "删除Ta",
... ... @@ -1077,4 +1078,4 @@
"feedbackSubmitSuccessMessage": "谢谢您的反馈。如需进一步沟通,我们会尽快通过您留下的邮箱地址与您联系,请留意查收邮件。",
"feedbackSubmitSuccessConfirm": "好的",
"frequentMovement": "频繁移动"
}
\ No newline at end of file
}
... ...
... ... @@ -1875,6 +1875,12 @@ abstract class AppLocalizations {
/// **'等待数据'**
String get reportWaitingForData;
/// No description provided for @reportWaitingForOtherData.
///
/// In zh, this message translates to:
/// **'等待Ta的数据'**
String get reportWaitingForOtherData;
/// No description provided for @reportNoData.
///
/// In zh, this message translates to:
... ... @@ -2664,7 +2670,7 @@ abstract class AppLocalizations {
/// No description provided for @friendsSleepQualityExcellent.
///
/// In zh, this message translates to:
/// **'睡很棒'**
/// **'睡很棒'**
String get friendsSleepQualityExcellent;
/// No description provided for @friendsSleepQualityNormal.
... ...
... ... @@ -1029,6 +1029,9 @@ class AppLocalizationsEn extends AppLocalizations {
String get reportWaitingForData => 'Waiting for data';
@override
String get reportWaitingForOtherData => 'Waiting for their data';
@override
String get reportNoData => 'No data';
@override
... ...
... ... @@ -973,6 +973,9 @@ class AppLocalizationsZh extends AppLocalizations {
String get reportWaitingForData => '等待数据';
@override
String get reportWaitingForOtherData => '等待Ta的数据';
@override
String get reportNoData => '暂无数据';
@override
... ... @@ -1423,7 +1426,7 @@ class AppLocalizationsZh extends AppLocalizations {
String get friendsTodaySteps => '今日步数';
@override
String get friendsSleepQualityExcellent => '睡很棒';
String get friendsSleepQualityExcellent => '睡很棒';
@override
String get friendsSleepQualityNormal => '睡得不错';
... ...