Commit 34d92c229ec8324febf3ae036fd4019f6a146559

Authored by 常守达
1 parent fe5ada11

fix(today):帮助页

... ... @@ -76,11 +76,11 @@ class HelpView extends GetView<HelpController> {
return [
(
title: l10n.todayFaqLinkNoData,
body: const [
'1、 确定苹果手表系统在10.0以上,手机系统在14以上,系统版本可在【关于本机】内查看。',
'2、确认是否开启所有权限:手机【健康】-【共享】-【app】-【DoubleFeel】-【打开所有权限】',
'3、确认设备是否处于省电模式、低电量状态或手表佩戴未贴紧,以上情况会影响手表数据采集。',
'如以上均检查无问题,可以在【意见反馈】-【联系我们】中提交相关问题,我们看到后会第一时间回复。',
body: [
l10n.helpNoDataReason1,
l10n.helpNoDataReason2,
l10n.helpNoDataReason3,
l10n.helpNoDataReasonFooter,
],
),
(
... ...
... ... @@ -319,6 +319,9 @@ class TodayController extends GetMaterialController {
} else {
Get.to(NoHealthDataPage(
onRefresh: requestHealthAuthorization,
onHelp: () {
Get.toNamed(Routes.HELP);
},
));
}
}
... ...
... ... @@ -2,6 +2,7 @@ import 'package:doublefeel_flutter/app/modules/user_onboarding/views/user_onboar
import 'package:doublefeel_flutter/app/modules/user_onboarding/widget/guide_common_scaffold.dart';
import 'package:doublefeel_flutter/app/modules/user_onboarding/widget/onboarding_common_widgets.dart';
import 'package:doublefeel_flutter/core/theme/app_theme.dart';
import 'package:doublefeel_flutter/l10n/l10n_extensions.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:get/get.dart';
... ... @@ -13,8 +14,6 @@ class NoHealthDataPage extends StatelessWidget {
this.onHelp,
});
static const _placeholderColor = Color(0xFFD9D9D9);
final VoidCallback? onRefresh;
final VoidCallback? onHelp;
... ... @@ -44,11 +43,10 @@ class NoHealthDataPage extends StatelessWidget {
children: [
const _PageHeading(),
const SizedBox(height: 24),
const _InfoCard(
_InfoCard(
path: 'assets/images/common/ic_apple_watch.png',
title: '错误1:Apple Watch 数据不可用',
body:
'看起来你在过去 12 个月内没有使用 Apple Watch。如果你刚开始使用 Apple Watch 并已启用所有数据权限,这条信息可能仍会出现。请继续佩戴 Apple Watch 以允许数据采集,或在首页手动添加 HRV 数据。',
title: context.l10n.noHealthDataError1Title,
body: context.l10n.noHealthDataError1Body,
),
const SizedBox(height: 12),
const _AuthorizationCard(),
... ... @@ -65,7 +63,7 @@ class NoHealthDataPage extends StatelessWidget {
vertical: 4,
),
child: Text(
'需要帮助?',
context.l10n.noHealthDataNeedHelp,
style: TextStyle(
color: context.colors.primary,
fontSize: 12,
... ... @@ -126,7 +124,7 @@ class _TopBar extends StatelessWidget {
onTap: onRefresh,
child: Center(
child: Text(
'刷新',
context.l10n.noHealthDataRefresh,
style: TextStyle(
color: context.colors.primary,
fontSize: 14,
... ... @@ -153,7 +151,7 @@ class _PageHeading extends StatelessWidget {
Padding(
padding: EdgeInsets.symmetric(horizontal: 21),
child: Text(
'无心率数据可用',
context.l10n.noHealthDataHeadingTitle,
textAlign: TextAlign.center,
style: TextStyle(
color: Color(0xFF14121E),
... ... @@ -167,7 +165,7 @@ class _PageHeading extends StatelessWidget {
Padding(
padding: EdgeInsets.symmetric(horizontal: 8),
child: Text(
'DoubleFeel无法从 Apple Health 获取你的 HRV 数据。请按照提示授予权限,然后点击右上角“刷新”继续。',
context.l10n.noHealthDataHeadingBody,
textAlign: TextAlign.center,
style: TextStyle(
color: context.colors.textPrimary,
... ... @@ -253,7 +251,7 @@ class _AuthorizationCard extends StatelessWidget {
),
SizedBox(height: 10),
Text(
'错误 2:健康数据访问未授权',
context.l10n.noHealthDataError2Title,
style: TextStyle(
color: Colors.black,
fontSize: 16,
... ... @@ -263,7 +261,7 @@ class _AuthorizationCard extends StatelessWidget {
),
SizedBox(height: 6),
Text(
'DoubleFeel 需要访问 Apple Health 数据的权限,以提供压力统计、提醒和建议。如果未授权,部分功能可能无法正常使用。\n\n请放心,所有健康数据仅存储在本地,不会上传。\n\n要启用权限,请按提示操作,并在 iOS 设置中选择 允许所有 → 健康 → DoubleFeel。',
context.l10n.noHealthDataError2Body,
style: TextStyle(
color: context.colors.textSecondary,
fontSize: 12,
... ... @@ -323,7 +321,7 @@ class _SystemIssueCard extends StatelessWidget {
),
SizedBox(height: 10),
Text(
'错误 3:系统问题',
context.l10n.noHealthDataError3Title,
style: TextStyle(
color: Colors.black,
fontSize: 16,
... ... @@ -333,14 +331,7 @@ class _SystemIssueCard extends StatelessWidget {
),
SizedBox(height: 6),
Text(
'根据用户反馈,我们发现 HRV 或心率数据可能缺失的两个原因:\n\n'
'1. Apple Watch 未连接\n'
' · 如果你的 Apple Watch 长时间未佩戴,心率数据可能无法采集。\n'
' · 请检查 iOS 健康 App → “我的手表”,确认最近的心率数据是否在佩戴 Apple Watch 时记录。\n'
' · 如果没有,请尝试佩戴 Apple Watch 进行数据采集,并打开 Apple 支持的心率功能。\n\n'
'2. 过去 30 天的心率或 HRV 数据缺失\n'
' · 打开 iOS 健康 App → 浏览 → “心率” 或 “HRV” → “未找到数据”,确认是否缺失。\n'
' · 如果数据缺失,请重新佩戴手表,并重启 iPhone 和 Apple Watch 后,再次打开 DoubleFeel。',
context.l10n.noHealthDataError3Body,
style: TextStyle(
color: context.colors.textSecondary,
fontSize: 12,
... ... @@ -373,19 +364,6 @@ class _CardShell extends StatelessWidget {
}
}
class _IconPlaceholder extends StatelessWidget {
const _IconPlaceholder();
@override
Widget build(BuildContext context) {
return Container(
width: 56,
height: 56,
color: NoHealthDataPage._placeholderColor,
);
}
}
class NoHealthDataNoPermissionPage extends StatelessWidget {
const NoHealthDataNoPermissionPage({
super.key,
... ... @@ -403,7 +381,7 @@ class NoHealthDataNoPermissionPage extends StatelessWidget {
child: GuideCommonScaffold(
onBackPressed: Get.back,
bottom: OnboardingBottomButton(
label: '前往开启',
label: context.l10n.noHealthDataGoToSettings,
enabled: true,
onPressed: () {
onRequest?.call();
... ...
... ... @@ -563,5 +563,20 @@
"cellPhoneNumber": "Cell phone number",
"todayOnWeeklyCalendar": "today",
"hrvTrendForThatDay": "HRV Trend for That Day",
"todaySAverageHrv": "Today's Average HRV"
"todaySAverageHrv": "Today's Average HRV",
"helpNoDataReason1": "1. Ensure your Apple Watch is on watchOS 10.0+ and iPhone is on iOS 14+. The system version can be checked in [Settings] -> [General] -> [About].",
"helpNoDataReason2": "2. Confirm if all permissions are enabled: iPhone [Health] -> [Sharing] -> [Apps] -> [DoubleFeel] -> [Turn On All].",
"helpNoDataReason3": "3. Confirm if devices are in power-saving mode, low battery status, or if the watch is not worn snugly, as these conditions affect watch data collection.",
"helpNoDataReasonFooter": "If all checks are correct and the issue persists, you can submit the problem in [Feedback] -> [Contact Us]. We will reply as soon as possible.",
"noHealthDataNeedHelp": "Need help?",
"noHealthDataRefresh": "Refresh",
"noHealthDataHeadingTitle": "No Heart Rate Data Available",
"noHealthDataHeadingBody": "DoubleFeel is unable to retrieve your HRV data from Apple Health. Please follow the instructions to grant permissions, then tap 'Refresh' in the top right to continue.",
"noHealthDataError1Title": "Error 1: Apple Watch Data Unavailable",
"noHealthDataError1Body": "It looks like you haven't used your Apple Watch in the past 12 months. If you just started using it and have enabled all data permissions, this message might still appear. Please continue to wear your Apple Watch to allow data collection, or add HRV data manually on the homepage.",
"noHealthDataError2Title": "Error 2: Health Data Access Unauthorized",
"noHealthDataError2Body": "DoubleFeel requires access to Apple Health data to provide stress stats, alerts, and recommendations. If not authorized, some features may not work properly.\n\nRest assured, all health data is only stored locally and will not be uploaded.\n\nTo enable permissions, follow the prompt and select Allow All -> Health -> DoubleFeel in iOS Settings.",
"noHealthDataError3Title": "Error 3: System Issue",
"noHealthDataError3Body": "Based on user feedback, we found two reasons why HRV or heart rate data might be missing:\n\n1. Apple Watch not connected\n · If your Apple Watch has not been worn for a long time, heart rate data may not be collected.\n · Please check iOS Health App -> 'My Watch' to confirm if recent heart rate data was recorded while wearing the Apple Watch.\n · If not, please try wearing your Apple Watch for data collection and turn on the heart rate feature supported by Apple.\n\n2. Heart rate or HRV data missing in the past 30 days\n · Open iOS Health App -> Browse -> 'Heart Rate' or 'HRV' -> 'No Data Found' to confirm if it's missing.\n · If data is missing, please wear the watch again, restart your iPhone and Apple Watch, then open DoubleFeel again.",
"noHealthDataGoToSettings": "Go to Settings"
}
\ No newline at end of file
... ...
... ... @@ -851,5 +851,20 @@
"cellPhoneNumber": "手机号",
"todayOnWeeklyCalendar": "今",
"hrvTrendForThatDay": "该日HRV趋势",
"todaySAverageHrv": "今日平均HRV"
"todaySAverageHrv": "今日平均HRV",
"helpNoDataReason1": "1、 确定苹果手表系统在10.0以上,手机系统在14以上,系统版本可在【关于本机】内查看。",
"helpNoDataReason2": "2、确认是否开启所有权限:手机【健康】-【共享】-【app】-【DoubleFeel】-【打开所有权限】",
"helpNoDataReason3": "3、确认设备是否处于省电模式、低电量状态或手表佩戴未贴紧,以上情况会影响手表数据采集。",
"helpNoDataReasonFooter": "如以上均检查无问题,可以在【意见反馈】-【联系我们】中提交相关问题,我们看到后会第一时间回复。",
"noHealthDataNeedHelp": "需要帮助?",
"noHealthDataRefresh": "刷新",
"noHealthDataHeadingTitle": "无心率数据可用",
"noHealthDataHeadingBody": "DoubleFeel无法从 Apple Health 获取你的 HRV 数据。请按照提示授予权限,然后点击右上角“刷新”继续。",
"noHealthDataError1Title": "错误1:Apple Watch 数据不可用",
"noHealthDataError1Body": "看起来你在过去 12 个月内没有使用 Apple Watch。如果你刚开始使用 Apple Watch 并已启用所有数据权限,这条信息可能仍会出现。请继续佩戴 Apple Watch 以允许数据采集,或在首页手动添加 HRV 数据。",
"noHealthDataError2Title": "错误 2:健康数据访问未授权",
"noHealthDataError2Body": "DoubleFeel 需要访问 Apple Health 数据的权限,以提供压力统计、提醒和建议。如果未授权,部分功能可能无法正常使用。\n\n请放心,所有健康数据仅存储在本地,不会上传。\n\n要启用权限,请按提示操作,并在 iOS 设置中选择 允许所有 → 健康 → DoubleFeel。",
"noHealthDataError3Title": "错误 3:系统问题",
"noHealthDataError3Body": "根据用户反馈,我们发现 HRV 或心率数据可能缺失的两个原因:\n\n1. Apple Watch 未连接\n · 如果你的 Apple Watch 长时间未佩戴,心率数据可能无法采集。\n · 请检查 iOS 健康 App → “我的手表”,确认最近的心率数据是否在佩戴 Apple Watch 时记录。\n · 如果没有,请尝试佩戴 Apple Watch 进行数据采集,并打开 Apple 支持的心率功能。\n\n2. 过去 30 天的心率或 HRV 数据缺失\n · 打开 iOS 健康 App → 浏览 → “心率” 或 “HRV” → “未找到数据”,确认是否缺失。\n · 如果数据缺失,请重新佩戴手表,并重启 iPhone 和 Apple Watch 后,再次打开 DoubleFeel。",
"noHealthDataGoToSettings": "前往开启"
}
\ No newline at end of file
... ...
... ... @@ -3338,6 +3338,96 @@ abstract class AppLocalizations {
/// In zh, this message translates to:
/// **'今日平均HRV'**
String get todaySAverageHrv;
/// No description provided for @helpNoDataReason1.
///
/// In zh, this message translates to:
/// **'1、 确定苹果手表系统在10.0以上,手机系统在14以上,系统版本可在【关于本机】内查看。'**
String get helpNoDataReason1;
/// No description provided for @helpNoDataReason2.
///
/// In zh, this message translates to:
/// **'2、确认是否开启所有权限:手机【健康】-【共享】-【app】-【DoubleFeel】-【打开所有权限】'**
String get helpNoDataReason2;
/// No description provided for @helpNoDataReason3.
///
/// In zh, this message translates to:
/// **'3、确认设备是否处于省电模式、低电量状态或手表佩戴未贴紧,以上情况会影响手表数据采集。'**
String get helpNoDataReason3;
/// No description provided for @helpNoDataReasonFooter.
///
/// In zh, this message translates to:
/// **'如以上均检查无问题,可以在【意见反馈】-【联系我们】中提交相关问题,我们看到后会第一时间回复。'**
String get helpNoDataReasonFooter;
/// No description provided for @noHealthDataNeedHelp.
///
/// In zh, this message translates to:
/// **'需要帮助?'**
String get noHealthDataNeedHelp;
/// No description provided for @noHealthDataRefresh.
///
/// In zh, this message translates to:
/// **'刷新'**
String get noHealthDataRefresh;
/// No description provided for @noHealthDataHeadingTitle.
///
/// In zh, this message translates to:
/// **'无心率数据可用'**
String get noHealthDataHeadingTitle;
/// No description provided for @noHealthDataHeadingBody.
///
/// In zh, this message translates to:
/// **'DoubleFeel无法从 Apple Health 获取你的 HRV 数据。请按照提示授予权限,然后点击右上角“刷新”继续。'**
String get noHealthDataHeadingBody;
/// No description provided for @noHealthDataError1Title.
///
/// In zh, this message translates to:
/// **'错误1:Apple Watch 数据不可用'**
String get noHealthDataError1Title;
/// No description provided for @noHealthDataError1Body.
///
/// In zh, this message translates to:
/// **'看起来你在过去 12 个月内没有使用 Apple Watch。如果你刚开始使用 Apple Watch 并已启用所有数据权限,这条信息可能仍会出现。请继续佩戴 Apple Watch 以允许数据采集,或在首页手动添加 HRV 数据。'**
String get noHealthDataError1Body;
/// No description provided for @noHealthDataError2Title.
///
/// In zh, this message translates to:
/// **'错误 2:健康数据访问未授权'**
String get noHealthDataError2Title;
/// No description provided for @noHealthDataError2Body.
///
/// In zh, this message translates to:
/// **'DoubleFeel 需要访问 Apple Health 数据的权限,以提供压力统计、提醒和建议。如果未授权,部分功能可能无法正常使用。\n\n请放心,所有健康数据仅存储在本地,不会上传。\n\n要启用权限,请按提示操作,并在 iOS 设置中选择 允许所有 → 健康 → DoubleFeel。'**
String get noHealthDataError2Body;
/// No description provided for @noHealthDataError3Title.
///
/// In zh, this message translates to:
/// **'错误 3:系统问题'**
String get noHealthDataError3Title;
/// No description provided for @noHealthDataError3Body.
///
/// In zh, this message translates to:
/// **'根据用户反馈,我们发现 HRV 或心率数据可能缺失的两个原因:\n\n1. Apple Watch 未连接\n · 如果你的 Apple Watch 长时间未佩戴,心率数据可能无法采集。\n · 请检查 iOS 健康 App → “我的手表”,确认最近的心率数据是否在佩戴 Apple Watch 时记录。\n · 如果没有,请尝试佩戴 Apple Watch 进行数据采集,并打开 Apple 支持的心率功能。\n\n2. 过去 30 天的心率或 HRV 数据缺失\n · 打开 iOS 健康 App → 浏览 → “心率” 或 “HRV” → “未找到数据”,确认是否缺失。\n · 如果数据缺失,请重新佩戴手表,并重启 iPhone 和 Apple Watch 后,再次打开 DoubleFeel。'**
String get noHealthDataError3Body;
/// No description provided for @noHealthDataGoToSettings.
///
/// In zh, this message translates to:
/// **'前往开启'**
String get noHealthDataGoToSettings;
}
class _AppLocalizationsDelegate
... ...
... ... @@ -1859,4 +1859,58 @@ class AppLocalizationsEn extends AppLocalizations {
@override
String get todaySAverageHrv => 'Today\'s Average HRV';
@override
String get helpNoDataReason1 =>
'1. Ensure your Apple Watch is on watchOS 10.0+ and iPhone is on iOS 14+. The system version can be checked in [Settings] -> [General] -> [About].';
@override
String get helpNoDataReason2 =>
'2. Confirm if all permissions are enabled: iPhone [Health] -> [Sharing] -> [Apps] -> [DoubleFeel] -> [Turn On All].';
@override
String get helpNoDataReason3 =>
'3. Confirm if devices are in power-saving mode, low battery status, or if the watch is not worn snugly, as these conditions affect watch data collection.';
@override
String get helpNoDataReasonFooter =>
'If all checks are correct and the issue persists, you can submit the problem in [Feedback] -> [Contact Us]. We will reply as soon as possible.';
@override
String get noHealthDataNeedHelp => 'Need help?';
@override
String get noHealthDataRefresh => 'Refresh';
@override
String get noHealthDataHeadingTitle => 'No Heart Rate Data Available';
@override
String get noHealthDataHeadingBody =>
'DoubleFeel is unable to retrieve your HRV data from Apple Health. Please follow the instructions to grant permissions, then tap \'Refresh\' in the top right to continue.';
@override
String get noHealthDataError1Title => 'Error 1: Apple Watch Data Unavailable';
@override
String get noHealthDataError1Body =>
'It looks like you haven\'t used your Apple Watch in the past 12 months. If you just started using it and have enabled all data permissions, this message might still appear. Please continue to wear your Apple Watch to allow data collection, or add HRV data manually on the homepage.';
@override
String get noHealthDataError2Title =>
'Error 2: Health Data Access Unauthorized';
@override
String get noHealthDataError2Body =>
'DoubleFeel requires access to Apple Health data to provide stress stats, alerts, and recommendations. If not authorized, some features may not work properly.\n\nRest assured, all health data is only stored locally and will not be uploaded.\n\nTo enable permissions, follow the prompt and select Allow All -> Health -> DoubleFeel in iOS Settings.';
@override
String get noHealthDataError3Title => 'Error 3: System Issue';
@override
String get noHealthDataError3Body =>
'Based on user feedback, we found two reasons why HRV or heart rate data might be missing:\n\n1. Apple Watch not connected\n · If your Apple Watch has not been worn for a long time, heart rate data may not be collected.\n · Please check iOS Health App -> \'My Watch\' to confirm if recent heart rate data was recorded while wearing the Apple Watch.\n · If not, please try wearing your Apple Watch for data collection and turn on the heart rate feature supported by Apple.\n\n2. Heart rate or HRV data missing in the past 30 days\n · Open iOS Health App -> Browse -> \'Heart Rate\' or \'HRV\' -> \'No Data Found\' to confirm if it\'s missing.\n · If data is missing, please wear the watch again, restart your iPhone and Apple Watch, then open DoubleFeel again.';
@override
String get noHealthDataGoToSettings => 'Go to Settings';
}
... ...
... ... @@ -1760,4 +1760,56 @@ class AppLocalizationsZh extends AppLocalizations {
@override
String get todaySAverageHrv => '今日平均HRV';
@override
String get helpNoDataReason1 =>
'1、 确定苹果手表系统在10.0以上,手机系统在14以上,系统版本可在【关于本机】内查看。';
@override
String get helpNoDataReason2 =>
'2、确认是否开启所有权限:手机【健康】-【共享】-【app】-【DoubleFeel】-【打开所有权限】';
@override
String get helpNoDataReason3 => '3、确认设备是否处于省电模式、低电量状态或手表佩戴未贴紧,以上情况会影响手表数据采集。';
@override
String get helpNoDataReasonFooter =>
'如以上均检查无问题,可以在【意见反馈】-【联系我们】中提交相关问题,我们看到后会第一时间回复。';
@override
String get noHealthDataNeedHelp => '需要帮助?';
@override
String get noHealthDataRefresh => '刷新';
@override
String get noHealthDataHeadingTitle => '无心率数据可用';
@override
String get noHealthDataHeadingBody =>
'DoubleFeel无法从 Apple Health 获取你的 HRV 数据。请按照提示授予权限,然后点击右上角“刷新”继续。';
@override
String get noHealthDataError1Title => '错误1:Apple Watch 数据不可用';
@override
String get noHealthDataError1Body =>
'看起来你在过去 12 个月内没有使用 Apple Watch。如果你刚开始使用 Apple Watch 并已启用所有数据权限,这条信息可能仍会出现。请继续佩戴 Apple Watch 以允许数据采集,或在首页手动添加 HRV 数据。';
@override
String get noHealthDataError2Title => '错误 2:健康数据访问未授权';
@override
String get noHealthDataError2Body =>
'DoubleFeel 需要访问 Apple Health 数据的权限,以提供压力统计、提醒和建议。如果未授权,部分功能可能无法正常使用。\n\n请放心,所有健康数据仅存储在本地,不会上传。\n\n要启用权限,请按提示操作,并在 iOS 设置中选择 允许所有 → 健康 → DoubleFeel。';
@override
String get noHealthDataError3Title => '错误 3:系统问题';
@override
String get noHealthDataError3Body =>
'根据用户反馈,我们发现 HRV 或心率数据可能缺失的两个原因:\n\n1. Apple Watch 未连接\n · 如果你的 Apple Watch 长时间未佩戴,心率数据可能无法采集。\n · 请检查 iOS 健康 App → “我的手表”,确认最近的心率数据是否在佩戴 Apple Watch 时记录。\n · 如果没有,请尝试佩戴 Apple Watch 进行数据采集,并打开 Apple 支持的心率功能。\n\n2. 过去 30 天的心率或 HRV 数据缺失\n · 打开 iOS 健康 App → 浏览 → “心率” 或 “HRV” → “未找到数据”,确认是否缺失。\n · 如果数据缺失,请重新佩戴手表,并重启 iPhone 和 Apple Watch 后,再次打开 DoubleFeel。';
@override
String get noHealthDataGoToSettings => '前往开启';
}
... ...