Commit 298978903b34b08da24dc62b80b507e0e0b57496

Authored by 常守达
1 parent ccc6eada

feat(hw): 鸿蒙版文案修改

1 import 'package:doublefeel_flutter/app/utils/assets_helper.dart'; 1 import 'package:doublefeel_flutter/app/utils/assets_helper.dart';
  2 +import 'package:doublefeel_flutter/app/utils/platform_compact.dart';
2 import 'package:doublefeel_flutter/core/services/thinking_data_service.dart'; 3 import 'package:doublefeel_flutter/core/services/thinking_data_service.dart';
3 import 'package:doublefeel_flutter/core/theme/app_theme.dart'; 4 import 'package:doublefeel_flutter/core/theme/app_theme.dart';
4 import 'package:doublefeel_flutter/l10n/l10n_extensions.dart'; 5 import 'package:doublefeel_flutter/l10n/l10n_extensions.dart';
@@ -119,7 +120,7 @@ class _HrvInstructionCard extends StatelessWidget { @@ -119,7 +120,7 @@ class _HrvInstructionCard extends StatelessWidget {
119 alignment: Alignment.topCenter, 120 alignment: Alignment.topCenter,
120 children: [ 121 children: [
121 Container( 122 Container(
122 - constraints: const BoxConstraints(minHeight: 438), 123 + constraints: BoxConstraints(minHeight: isOhos() ? 388 : 438),
123 margin: const EdgeInsets.only(top: 110), 124 margin: const EdgeInsets.only(top: 110),
124 padding: const EdgeInsets.fromLTRB(20, 78, 20, 20), 125 padding: const EdgeInsets.fromLTRB(20, 78, 20, 20),
125 decoration: BoxDecoration( 126 decoration: BoxDecoration(
@@ -128,47 +129,97 @@ class _HrvInstructionCard extends StatelessWidget { @@ -128,47 +129,97 @@ class _HrvInstructionCard extends StatelessWidget {
128 ), 129 ),
129 child: Column( 130 child: Column(
130 crossAxisAlignment: CrossAxisAlignment.start, 131 crossAxisAlignment: CrossAxisAlignment.start,
131 - children: [  
132 - Text(  
133 - l10n.todayHrvMeasurementIntro,  
134 - style: TextStyle(  
135 - color: context.colors.textSecondary,  
136 - fontSize: 13,  
137 - height: 17 / 12,  
138 - fontWeight: FontWeight.w400,  
139 - ),  
140 - ),  
141 - const SizedBox(height: 18),  
142 - _InstructionStep(text: l10n.todayHrvMeasurementStep1),  
143 - const SizedBox(height: 8),  
144 - _InstructionStep(text: l10n.todayHrvMeasurementStep2),  
145 - const SizedBox(height: 8),  
146 - _InstructionStep(text: l10n.todayHrvMeasurementStep3),  
147 - const SizedBox(height: 8),  
148 - _InstructionStep(text: l10n.todayHrvMeasurementStep4),  
149 - const SizedBox(height: 8),  
150 - _InstructionStep(text: l10n.todayHrvMeasurementStep5),  
151 - const SizedBox(height: 16),  
152 - Text(  
153 - l10n.todayHrvMeasurementHint,  
154 - style: TextStyle(  
155 - color: context.colors.textSecondary,  
156 - fontSize: 13,  
157 - height: 17 / 12,  
158 - fontWeight: FontWeight.w400,  
159 - ),  
160 - ),  
161 - const SizedBox(height: 8),  
162 - Text(  
163 - l10n.todayHrvMeasurementWarning,  
164 - style: TextStyle(  
165 - color: context.colors.warning,  
166 - fontSize: 13,  
167 - height: 17 / 12,  
168 - fontWeight: FontWeight.w400,  
169 - ),  
170 - ),  
171 - ], 132 + children: isOhos()
  133 + ? [
  134 + Center(
  135 + child: Text(
  136 + '操作步骤',
  137 + style: TextStyle(
  138 + color: const Color(0xFF0F0F11),
  139 + fontSize: 16,
  140 + fontWeight: FontWeight.w600,
  141 + ),
  142 + ),
  143 + ),
  144 + SizedBox(height: 20),
  145 + Text(
  146 + '华为手表通常会在一天中自动更新压力和 HRV 数据。如果你希望立即手动触发一次新的测量,可以参考以下方法:',
  147 + style: TextStyle(
  148 + fontSize: 12,
  149 + fontFamily: 'HarmonyOS Sans SC',
  150 + fontWeight: FontWeight.w400,
  151 + color: context.colors.textSecondary,
  152 + ),
  153 + ),
  154 + const SizedBox(height: 12),
  155 + _InstructionStep(text: '1、戴紧智能手表,坐下来,保持心境平和'),
  156 + const SizedBox(height: 12),
  157 + _InstructionStep(
  158 + text:
  159 + '2、在手机上打开华为运动健康,在健康页下滑找到“情绪健康”板块,进入后点击最下方的“测量压力”'),
  160 + const SizedBox(height: 12),
  161 + _InstructionStep(text: '3、保持平稳的呼吸,等待1-3分钟'),
  162 + const SizedBox(height: 16),
  163 + Text(
  164 + '提示:数据源来自华为运动健康,在测量之后可能存在延迟或是数据未能同步的情况。如若出现上述情况,请重新测量并等待数据读取。',
  165 + style: TextStyle(
  166 + fontSize: 12,
  167 + fontFamily: 'HarmonyOS Sans SC',
  168 + fontWeight: FontWeight.w400,
  169 + color: context.colors.textSecondary,
  170 + ),
  171 + ),
  172 + const SizedBox(height: 16),
  173 + Text(
  174 + '注意:需打开健康里的权限,同时关闭省电模式。',
  175 + style: TextStyle(
  176 + color: context.colors.warning,
  177 + fontSize: 12,
  178 + fontWeight: FontWeight.w400,
  179 + ),
  180 + )
  181 + ]
  182 + : [
  183 + Text(
  184 + l10n.todayHrvMeasurementIntro,
  185 + style: TextStyle(
  186 + color: context.colors.textSecondary,
  187 + fontSize: 13,
  188 + height: 17 / 12,
  189 + fontWeight: FontWeight.w400,
  190 + ),
  191 + ),
  192 + const SizedBox(height: 18),
  193 + _InstructionStep(text: l10n.todayHrvMeasurementStep1),
  194 + const SizedBox(height: 8),
  195 + _InstructionStep(text: l10n.todayHrvMeasurementStep2),
  196 + const SizedBox(height: 8),
  197 + _InstructionStep(text: l10n.todayHrvMeasurementStep3),
  198 + const SizedBox(height: 8),
  199 + _InstructionStep(text: l10n.todayHrvMeasurementStep4),
  200 + const SizedBox(height: 8),
  201 + _InstructionStep(text: l10n.todayHrvMeasurementStep5),
  202 + const SizedBox(height: 16),
  203 + Text(
  204 + l10n.todayHrvMeasurementHint,
  205 + style: TextStyle(
  206 + color: context.colors.textSecondary,
  207 + fontSize: 13,
  208 + height: 17 / 12,
  209 + fontWeight: FontWeight.w400,
  210 + ),
  211 + ),
  212 + const SizedBox(height: 8),
  213 + Text(
  214 + l10n.todayHrvMeasurementWarning,
  215 + style: TextStyle(
  216 + color: context.colors.warning,
  217 + fontSize: 13,
  218 + height: 17 / 12,
  219 + fontWeight: FontWeight.w400,
  220 + ),
  221 + ),
  222 + ],
172 ), 223 ),
173 ), 224 ),
174 Image.asset( 225 Image.asset(
1 import 'package:doublefeel_flutter/app/modules/home/widgets/today/realtime_stress_explanation_bottom_sheet.dart'; 1 import 'package:doublefeel_flutter/app/modules/home/widgets/today/realtime_stress_explanation_bottom_sheet.dart';
  2 +import 'package:doublefeel_flutter/app/utils/platform_compact.dart';
2 import 'package:doublefeel_flutter/core/theme/app_theme.dart'; 3 import 'package:doublefeel_flutter/core/theme/app_theme.dart';
3 import 'package:doublefeel_flutter/l10n/l10n_extensions.dart'; 4 import 'package:doublefeel_flutter/l10n/l10n_extensions.dart';
4 import 'package:flutter/material.dart'; 5 import 'package:flutter/material.dart';
@@ -95,12 +96,23 @@ class HrvPrincipleExplanationBottomSheet extends StatelessWidget { @@ -95,12 +96,23 @@ class HrvPrincipleExplanationBottomSheet extends StatelessWidget {
95 _InfoCard( 96 _InfoCard(
96 title: l10n.todayHrvPrincipleHowMeasureTitle, 97 title: l10n.todayHrvPrincipleHowMeasureTitle,
97 children: [ 98 children: [
98 - _InfoText(  
99 - l10n.todayHrvPrincipleHowMeasureDescription1,  
100 - ),  
101 - _InfoText(  
102 - l10n.todayHrvPrincipleHowMeasureDescription2,  
103 - ), 99 + ...isOhos()
  100 + ? [
  101 + _InfoText(
  102 + '当你佩戴智能手表时,系统会自动采集你的心率与 HRV(心率变异性)等健康数据,并同步至华为健康。',
  103 + ),
  104 + _InfoText(
  105 + 'DoubleFeel 会基于这些数据,分析你的身体压力与恢复状态。',
  106 + ),
  107 + ]
  108 + : [
  109 + _InfoText(
  110 + l10n.todayHrvPrincipleHowMeasureDescription1,
  111 + ),
  112 + _InfoText(
  113 + l10n.todayHrvPrincipleHowMeasureDescription2,
  114 + )
  115 + ],
104 _InfoText( 116 _InfoText(
105 l10n.todayHrvPrincipleHowMeasureDescription3, 117 l10n.todayHrvPrincipleHowMeasureDescription3,
106 ), 118 ),
@@ -137,7 +149,7 @@ class HrvPrincipleExplanationBottomSheet extends StatelessWidget { @@ -137,7 +149,7 @@ class HrvPrincipleExplanationBottomSheet extends StatelessWidget {
137 ], 149 ],
138 ), 150 ),
139 const SizedBox(height: 12), 151 const SizedBox(height: 12),
140 - const _FaqLinksCard(), 152 + if (!isOhos()) const _FaqLinksCard(),
141 ], 153 ],
142 ), 154 ),
143 ), 155 ),
@@ -49,8 +49,12 @@ class NoHealthDataPage extends StatelessWidget { @@ -49,8 +49,12 @@ class NoHealthDataPage extends StatelessWidget {
49 path: isOhos() 49 path: isOhos()
50 ? 'assets/images/common/ic_hw_watch.png' 50 ? 'assets/images/common/ic_hw_watch.png'
51 : 'assets/images/common/ic_apple_watch.webp', 51 : 'assets/images/common/ic_apple_watch.webp',
52 - title: context.l10n.noHealthDataError1Title,  
53 - body: context.l10n.noHealthDataError1Body, 52 + title: isOhos()
  53 + ? '错误1:智能手表数据不可用'
  54 + : context.l10n.noHealthDataError1Title,
  55 + body: isOhos()
  56 + ? '看起来你最近没有正常使用只能手表,或手表尚未完成健康数据同步。如果你刚刚开启了压力、HRV 或心率权限,这种情况可能会出现。
请继续佩戴并连接智能手表,保持「华为运动健康」后台运行,等待新的健康数据同步;或在首页手动触发一次压力测试'
  57 + : context.l10n.noHealthDataError1Body,
54 ), 58 ),
55 const SizedBox(height: 12), 59 const SizedBox(height: 12),
56 const _AuthorizationCard(), 60 const _AuthorizationCard(),
@@ -155,7 +159,7 @@ class _PageHeading extends StatelessWidget { @@ -155,7 +159,7 @@ class _PageHeading extends StatelessWidget {
155 Padding( 159 Padding(
156 padding: EdgeInsets.symmetric(horizontal: 21), 160 padding: EdgeInsets.symmetric(horizontal: 21),
157 child: Text( 161 child: Text(
158 - context.l10n.noHealthDataHeadingTitle, 162 + isOhos() ? '无健康数据可用' : context.l10n.noHealthDataHeadingTitle,
159 textAlign: TextAlign.center, 163 textAlign: TextAlign.center,
160 style: TextStyle( 164 style: TextStyle(
161 color: Color(0xFF14121E), 165 color: Color(0xFF14121E),
@@ -169,7 +173,9 @@ class _PageHeading extends StatelessWidget { @@ -169,7 +173,9 @@ class _PageHeading extends StatelessWidget {
169 Padding( 173 Padding(
170 padding: EdgeInsets.symmetric(horizontal: 8), 174 padding: EdgeInsets.symmetric(horizontal: 8),
171 child: Text( 175 child: Text(
172 - context.l10n.noHealthDataHeadingBody, 176 + isOhos()
  177 + ? 'DoubleFeel 无法从「华为运动健康」获取你的 HRV 或压力数据。请按照下方步骤完成授权,然后点击右上角“刷新”继续。'
  178 + : context.l10n.noHealthDataHeadingBody,
173 textAlign: TextAlign.center, 179 textAlign: TextAlign.center,
174 style: TextStyle( 180 style: TextStyle(
175 color: context.colors.textPrimary, 181 color: context.colors.textPrimary,
@@ -267,7 +273,9 @@ class _AuthorizationCard extends StatelessWidget { @@ -267,7 +273,9 @@ class _AuthorizationCard extends StatelessWidget {
267 ), 273 ),
268 SizedBox(height: 6), 274 SizedBox(height: 6),
269 Text( 275 Text(
270 - context.l10n.noHealthDataError2Body, 276 + isOhos()
  277 + ? 'DoubleFeel 需要访问华为运动健康数据,才能读取你的压力、HRV 与睡眠信息,否则部分功能可能无法正常使用。请放心,所有健康数据仅保存在本地,不会上传。'
  278 + : context.l10n.noHealthDataError2Body,
271 style: TextStyle( 279 style: TextStyle(
272 color: context.colors.textSecondary, 280 color: context.colors.textSecondary,
273 fontSize: 12, 281 fontSize: 12,
@@ -277,7 +285,7 @@ class _AuthorizationCard extends StatelessWidget { @@ -277,7 +285,7 @@ class _AuthorizationCard extends StatelessWidget {
277 ), 285 ),
278 ], 286 ],
279 ), 287 ),
280 - SizedBox(height: 37), 288 + SizedBox(height: 17),
281 Image.asset( 289 Image.asset(
282 assetCompatPath('assets/images/permission/apple_privacy_cn.png', 290 assetCompatPath('assets/images/permission/apple_privacy_cn.png',
283 useOhosDir: true), 291 useOhosDir: true),
@@ -341,7 +349,18 @@ class _SystemIssueCard extends StatelessWidget { @@ -341,7 +349,18 @@ class _SystemIssueCard extends StatelessWidget {
341 ), 349 ),
342 SizedBox(height: 6), 350 SizedBox(height: 6),
343 Text( 351 Text(
344 - context.l10n.noHealthDataError3Body, 352 + isOhos()
  353 + ? '''
  354 +根据用户反馈,我们发现 HRV 或压力数据可能缺失的两个原因:
  355 +
  356 +1. 智能手表未正常连接
  357 +• 如果你的华为手表长时间未连接,HRV、压力或心率数据可能无法同步。
  358 +• 请打开「华为运动健康 App」→「设备」,确认手表已连接并同步正常。
  359 +• 如果仍有问题,请尝试重新连接手表,并保持蓝牙开启与后台同步权限开启。
  360 +
  361 +2. 最近健康数据缺失\n• 打开「华为运动健康 App」查看“压力”、“心率”或“睡眠”数据是否正常更新。\n• 如果最近长时间没有新数据,请继续佩戴手表,并尝试手动进行一次压力测试或呼吸训练。\n• 如果数据仍未恢复,请重启手表与手机后,再重新打开 DoubleFeel。
  362 +'''
  363 + : context.l10n.noHealthDataError3Body,
345 style: TextStyle( 364 style: TextStyle(
346 color: context.colors.textSecondary, 365 color: context.colors.textSecondary,
347 fontSize: 12, 366 fontSize: 12,
1 import 'package:doublefeel_flutter/app/modules/home/widgets/today/hrv_principle_explanation_bottom_sheet.dart'; 1 import 'package:doublefeel_flutter/app/modules/home/widgets/today/hrv_principle_explanation_bottom_sheet.dart';
  2 +import 'package:doublefeel_flutter/app/utils/platform_compact.dart';
2 import 'package:doublefeel_flutter/core/theme/app_theme.dart'; 3 import 'package:doublefeel_flutter/core/theme/app_theme.dart';
3 import 'package:doublefeel_flutter/l10n/l10n_extensions.dart'; 4 import 'package:doublefeel_flutter/l10n/l10n_extensions.dart';
4 import 'package:flutter/material.dart'; 5 import 'package:flutter/material.dart';
@@ -138,13 +139,25 @@ class RealtimeStressExplanationBottomSheet extends StatelessWidget { @@ -138,13 +139,25 @@ class RealtimeStressExplanationBottomSheet extends StatelessWidget {
138 title: l10n.todayRealtimeStressLowBetterTitle, 139 title: l10n.todayRealtimeStressLowBetterTitle,
139 children: [ 140 children: [
140 _InfoText(l10n.todayRealtimeStressLowBetterNo), 141 _InfoText(l10n.todayRealtimeStressLowBetterNo),
  142 + SizedBox(
  143 + height: 12,
  144 + ),
141 _InfoText(l10n.todayRealtimeStressLowBetterType), 145 _InfoText(l10n.todayRealtimeStressLowBetterType),
  146 + SizedBox(
  147 + height: 12,
  148 + ),
142 _InfoText( 149 _InfoText(
143 l10n.todayRealtimeStressLowBetterExample, 150 l10n.todayRealtimeStressLowBetterExample,
144 ), 151 ),
  152 + SizedBox(
  153 + height: 12,
  154 + ),
145 _InfoText( 155 _InfoText(
146 l10n.todayRealtimeStressLowBetterHighStress, 156 l10n.todayRealtimeStressLowBetterHighStress,
147 ), 157 ),
  158 + SizedBox(
  159 + height: 12,
  160 + ),
148 _InfoText(l10n.todayRealtimeStressLowBetterTrend), 161 _InfoText(l10n.todayRealtimeStressLowBetterTrend),
149 ], 162 ],
150 ), 163 ),
@@ -152,23 +165,42 @@ class RealtimeStressExplanationBottomSheet extends StatelessWidget { @@ -152,23 +165,42 @@ class RealtimeStressExplanationBottomSheet extends StatelessWidget {
152 _InfoCard( 165 _InfoCard(
153 title: l10n.todayRealtimeStressScenarioTitle, 166 title: l10n.todayRealtimeStressScenarioTitle,
154 children: [ 167 children: [
155 - _InfoText(  
156 - l10n.todayRealtimeStressScenarioHrvDefault,  
157 - ),  
158 - _InfoText(  
159 - l10n.todayRealtimeStressScenarioRegionLimit, 168 + ...isOhos()
  169 + ? [
  170 + _InfoText(
  171 + '在华为穿戴设备的默认设置下,HRV 通常会在静息、睡眠或低活动状态下自动更新。',
  172 + ),
  173 + _InfoText(
  174 + '由于不同设备型号、系统策略与佩戴状态不同,HRV 的更新频率可能会存在差异。',
  175 + )
  176 + ]
  177 + : [
  178 + _InfoText(
  179 + l10n.todayRealtimeStressScenarioHrvDefault,
  180 + ),
  181 + _InfoText(
  182 + l10n.todayRealtimeStressScenarioRegionLimit,
  183 + )
  184 + ],
  185 + SizedBox(
  186 + height: 12,
160 ), 187 ),
161 _InfoText(l10n.todayRealtimeStressScenarioIntro), 188 _InfoText(l10n.todayRealtimeStressScenarioIntro),
162 - _InfoText(  
163 - l10n.todayRealtimeStressScenarioUpdateEvery6Min), 189 + isOhos()
  190 + ? _InfoText('· 实时压力每 6 分钟更新一次')
  191 + : _InfoText(
  192 + l10n.todayRealtimeStressScenarioUpdateEvery6Min),
164 _InfoText(l10n.todayRealtimeStressScenarioTimely), 193 _InfoText(l10n.todayRealtimeStressScenarioTimely),
165 _InfoText( 194 _InfoText(
166 l10n.todayRealtimeStressScenarioConsistentTrend), 195 l10n.todayRealtimeStressScenarioConsistentTrend),
  196 + SizedBox(
  197 + height: 12,
  198 + ),
167 _InfoText(l10n.todayRealtimeStressScenarioSummary), 199 _InfoText(l10n.todayRealtimeStressScenarioSummary),
168 ], 200 ],
169 ), 201 ),
170 const SizedBox(height: 12), 202 const SizedBox(height: 12),
171 - const _FaqLinksCard(), 203 + if (!isOhos()) const _FaqLinksCard(),
172 ], 204 ],
173 ), 205 ),
174 ), 206 ),
1 import 'package:doublefeel_flutter/app/modules/home/widgets/today/hrv_principle_explanation_bottom_sheet.dart'; 1 import 'package:doublefeel_flutter/app/modules/home/widgets/today/hrv_principle_explanation_bottom_sheet.dart';
2 import 'package:doublefeel_flutter/app/modules/home/widgets/today/realtime_stress_explanation_bottom_sheet.dart'; 2 import 'package:doublefeel_flutter/app/modules/home/widgets/today/realtime_stress_explanation_bottom_sheet.dart';
  3 +import 'package:doublefeel_flutter/app/utils/platform_compact.dart';
3 import 'package:doublefeel_flutter/core/theme/app_theme.dart'; 4 import 'package:doublefeel_flutter/core/theme/app_theme.dart';
4 import 'package:doublefeel_flutter/l10n/l10n_extensions.dart'; 5 import 'package:doublefeel_flutter/l10n/l10n_extensions.dart';
5 import 'package:flutter/material.dart'; 6 import 'package:flutter/material.dart';
@@ -147,28 +148,60 @@ class StressStatusExplanationBottomSheet extends StatelessWidget { @@ -147,28 +148,60 @@ class StressStatusExplanationBottomSheet extends StatelessWidget {
147 ], 148 ],
148 ), 149 ),
149 const SizedBox(height: 12), 150 const SizedBox(height: 12),
150 - _InfoCard(  
151 - title: l10n.todayStressStatusAppWatchDifferenceTitle,  
152 - children: [  
153 - _InfoText(l10n.todayStressStatusAppWatchDifferenceApp),  
154 - _InfoText(l10n.todayStressStatusAppWatchDifferenceWatch),  
155 - ],  
156 - ), 151 + isOhos()
  152 + ? _InfoCard(
  153 + title: '手机 App 与智能师表显示的压力状态有什么区别?',
  154 + children: [
  155 + _InfoText(
  156 + '手机 App 首页显示的是当天的综合压力状态,会综合分析 HRV、静息心率与整日身体趋势。'),
  157 + _InfoText('智能手表显示的通常是最近一次测量得到的即时身体状态,更适合快速查看当前变化。'),
  158 + _InfoText('由于不同设备的数据采样频率不同,手机与穿戴设备中的状态可能会存在短暂差异。'),
  159 + ],
  160 + )
  161 + : _InfoCard(
  162 + title: l10n.todayStressStatusAppWatchDifferenceTitle,
  163 + children: [
  164 + _InfoText(
  165 + l10n.todayStressStatusAppWatchDifferenceApp),
  166 + _InfoText(
  167 + l10n.todayStressStatusAppWatchDifferenceWatch),
  168 + ],
  169 + ),
157 const SizedBox(height: 12), 170 const SizedBox(height: 12),
158 _InfoCard( 171 _InfoCard(
159 title: l10n.todayStressStatusWaitingDataTitle, 172 title: l10n.todayStressStatusWaitingDataTitle,
160 children: [ 173 children: [
161 _InfoText(l10n.todayStressStatusWaitingDataDescription1), 174 _InfoText(l10n.todayStressStatusWaitingDataDescription1),
162 - _InfoText(l10n.todayStressStatusWaitingDataDescription2),  
163 - _InfoText(l10n.todayStressStatusWaitingDataReasonsIntro),  
164 - _InfoText(l10n.todayStressStatusWaitingDataReason1),  
165 - _InfoText(l10n.todayStressStatusWaitingDataReason2),  
166 - _InfoText(l10n.todayStressStatusWaitingDataReason3),  
167 - _InfoText(l10n.todayStressStatusWaitingDataReason4), 175 + ...isOhos()
  176 + ? [
  177 + _InfoText('请继续佩戴智能手表,并等待系统自动采集数据。'),
  178 + _InfoText(l10n
  179 + .todayStressStatusWaitingDataReasonsIntro),
  180 + _InfoText('1. HRV 数据采样不足'),
  181 + _InfoText('2. 缺少静息心率数据'),
  182 + _InfoText('3. 穿戴设备佩戴时间较短'),
  183 + _InfoText('4. 华为健康数据权限未开启'),
  184 + _InfoText('5. 当前处于运动或高活动状态'),
  185 + _InfoText('6. 设备暂未同步最新健康数据'),
  186 + ]
  187 + : [
  188 + _InfoText(l10n
  189 + .todayStressStatusWaitingDataDescription2),
  190 + _InfoText(l10n
  191 + .todayStressStatusWaitingDataReasonsIntro),
  192 + _InfoText(
  193 + l10n.todayStressStatusWaitingDataReason1),
  194 + _InfoText(
  195 + l10n.todayStressStatusWaitingDataReason2),
  196 + _InfoText(
  197 + l10n.todayStressStatusWaitingDataReason3),
  198 + _InfoText(
  199 + l10n.todayStressStatusWaitingDataReason4),
  200 + ]
168 ], 201 ],
169 ), 202 ),
170 const SizedBox(height: 12), 203 const SizedBox(height: 12),
171 - const _FaqLinksCard(), 204 + if (!isOhos()) const _FaqLinksCard(),
172 ], 205 ],
173 ), 206 ),
174 ), 207 ),
  1 +import 'package:doublefeel_flutter/app/utils/platform_compact.dart';
1 import 'package:doublefeel_flutter/app/widget/circular_gradient_progress/combine.dart'; 2 import 'package:doublefeel_flutter/app/widget/circular_gradient_progress/combine.dart';
2 import 'package:doublefeel_flutter/core/theme/app_theme.dart'; 3 import 'package:doublefeel_flutter/core/theme/app_theme.dart';
3 import 'package:doublefeel_flutter/l10n/l10n_extensions.dart'; 4 import 'package:doublefeel_flutter/l10n/l10n_extensions.dart';
@@ -144,21 +145,23 @@ class TodaySleepCard extends StatelessWidget { @@ -144,21 +145,23 @@ class TodaySleepCard extends StatelessWidget {
144 width: 50, 145 width: 50,
145 height: 50, 146 height: 50,
146 margin: EdgeInsets.only(right: 6, left: 4), 147 margin: EdgeInsets.only(right: 6, left: 4),
147 - child: CircularGradientCombineWidget(  
148 - size: 50,  
149 - duration: const Duration(seconds: 1),  
150 - sweepAngles: [sleepDurationProgress, sleepScoreProgress],  
151 - backgroundColors: const [  
152 - Color(0xFFF3F3F3),  
153 - Color(0xFFF3F3F3),  
154 - ],  
155 - gradientColors: [  
156 - [context.colors.primary],  
157 - [context.colors.chartBlue],  
158 - ],  
159 - centerCircleSizeRatio: 0.3,  
160 - gapRatio: 0.1,  
161 - interpolatedColorRatio: 1), 148 + child: isOhos()
  149 + ? SizedBox()
  150 + : CircularGradientCombineWidget(
  151 + size: 50,
  152 + duration: const Duration(seconds: 1),
  153 + sweepAngles: [sleepDurationProgress, sleepScoreProgress],
  154 + backgroundColors: const [
  155 + Color(0xFFF3F3F3),
  156 + Color(0xFFF3F3F3),
  157 + ],
  158 + gradientColors: [
  159 + [context.colors.primary],
  160 + [context.colors.chartBlue],
  161 + ],
  162 + centerCircleSizeRatio: 0.3,
  163 + gapRatio: 0.1,
  164 + interpolatedColorRatio: 1),
162 ), 165 ),
163 ); 166 );
164 }), 167 }),
@@ -322,39 +325,43 @@ class TodayActivityCard extends StatelessWidget { @@ -322,39 +325,43 @@ class TodayActivityCard extends StatelessWidget {
322 margin: EdgeInsets.only(right: 6, left: 4), 325 margin: EdgeInsets.only(right: 6, left: 4),
323 child: Stack( 326 child: Stack(
324 children: [ 327 children: [
325 - Container(  
326 - decoration: BoxDecoration(  
327 - shape: BoxShape.circle,  
328 - color: context.colors.textPrimary,  
329 - ),  
330 - ),  
331 - CircularGradientCombineWidget(  
332 - size: 50,  
333 - duration: const Duration(seconds: 1),  
334 - centerCircleSizeRatio: 0.2,  
335 - gapRatio: 0.06,  
336 - sweepAngles: [  
337 - activityProgress,  
338 - exerciseProgress,  
339 - standProgress  
340 - ],  
341 - backgroundColors: [  
342 - context.colors.chartPink.withOpacity(0.4),  
343 - context.colors.chartGreen.withOpacity(0.3),  
344 - context.colors.chartBlue.withOpacity(0.4),  
345 - ],  
346 - gradientColors: [  
347 - [  
348 - context.colors.chartPink,  
349 - ],  
350 - [  
351 - context.colors.chartGreen,  
352 - ],  
353 - [  
354 - context.colors.chartBlue,  
355 - ],  
356 - ],  
357 - ), 328 + isOhos()
  329 + ? SizedBox()
  330 + : Container(
  331 + decoration: BoxDecoration(
  332 + shape: BoxShape.circle,
  333 + color: context.colors.textPrimary,
  334 + ),
  335 + ),
  336 + isOhos()
  337 + ? SizedBox()
  338 + : CircularGradientCombineWidget(
  339 + size: 50,
  340 + duration: const Duration(seconds: 1),
  341 + centerCircleSizeRatio: 0.2,
  342 + gapRatio: 0.06,
  343 + sweepAngles: [
  344 + activityProgress,
  345 + exerciseProgress,
  346 + standProgress
  347 + ],
  348 + backgroundColors: [
  349 + context.colors.chartPink.withOpacity(0.4),
  350 + context.colors.chartGreen.withOpacity(0.3),
  351 + context.colors.chartBlue.withOpacity(0.4),
  352 + ],
  353 + gradientColors: [
  354 + [
  355 + context.colors.chartPink,
  356 + ],
  357 + [
  358 + context.colors.chartGreen,
  359 + ],
  360 + [
  361 + context.colors.chartBlue,
  362 + ],
  363 + ],
  364 + ),
358 ], 365 ],
359 ), 366 ),
360 ), 367 ),
@@ -171,7 +171,6 @@ class LoginController extends GetxController { @@ -171,7 +171,6 @@ class LoginController extends GetxController {
171 } 171 }
172 } 172 }
173 173
174 -  
175 void onGoogleLoginPressed() async { 174 void onGoogleLoginPressed() async {
176 try { 175 try {
177 final result = await LoadingService.instance.run(() async { 176 final result = await LoadingService.instance.run(() async {
@@ -199,7 +198,6 @@ class LoginController extends GetxController { @@ -199,7 +198,6 @@ class LoginController extends GetxController {
199 return; 198 return;
200 } 199 }
201 try { 200 try {
202 -  
203 // final code = await LoadingService.instance.run( 201 // final code = await LoadingService.instance.run(
204 // () => WeChatHostApi().requestAuthorizationCode(), 202 // () => WeChatHostApi().requestAuthorizationCode(),
205 // type: LoadingType.circular, 203 // type: LoadingType.circular,
@@ -224,7 +222,6 @@ class LoginController extends GetxController { @@ -224,7 +222,6 @@ class LoginController extends GetxController {
224 } 222 }
225 } 223 }
226 224
227 -  
228 void onDebugPressed() { 225 void onDebugPressed() {
229 Get.toNamed(AppRoutes.debugEnvironment); 226 Get.toNamed(AppRoutes.debugEnvironment);
230 } 227 }
@@ -20,7 +20,10 @@ List<Widget> buildUserOnboardingPages(BuildContext context, @@ -20,7 +20,10 @@ List<Widget> buildUserOnboardingPages(BuildContext context,
20 final l10n = context.l10n; 20 final l10n = context.l10n;
21 21
22 return [ 22 return [
23 - _IntroPage(title: l10n.onboardingIntroTitle), 23 + _IntroPage(
  24 + title: isOhos()
  25 + ? 'DoubleFeel是专为智能手表打造的健康陪伴app'
  26 + : l10n.onboardingIntroTitle),
24 _SelectionPage( 27 _SelectionPage(
25 pageIndex: 1, 28 pageIndex: 1,
26 title: l10n.onboardingStateQuestion, 29 title: l10n.onboardingStateQuestion,
@@ -137,7 +140,10 @@ class _IntroPage extends StatelessWidget { @@ -137,7 +140,10 @@ class _IntroPage extends StatelessWidget {
137 horizontalPadding: 0, 140 horizontalPadding: 0,
138 child: Column( 141 child: Column(
139 children: [ 142 children: [
140 - OnboardingTitleText(title), 143 + OnboardingTitleText(
  144 + title,
  145 + maxWidth: 301,
  146 + ),
141 const SizedBox(height: 12), 147 const SizedBox(height: 12),
142 Image.asset( 148 Image.asset(
143 assetCompatPath( 149 assetCompatPath(
@@ -584,7 +590,10 @@ class HealthPermissionPage extends StatelessWidget { @@ -584,7 +590,10 @@ class HealthPermissionPage extends StatelessWidget {
584 return OnboardingPageScrollBody( 590 return OnboardingPageScrollBody(
585 child: Column( 591 child: Column(
586 children: [ 592 children: [
587 - OnboardingTitleText(l10n.onboardingHealthPermissionTitle), 593 + OnboardingTitleText(
  594 + isOhos() ? '允许访问健康数据' : l10n.onboardingHealthPermissionTitle,
  595 + maxWidth: 301,
  596 + ),
588 const SizedBox(height: 12), 597 const SizedBox(height: 12),
589 Padding( 598 Padding(
590 padding: const EdgeInsets.symmetric(horizontal: 8), 599 padding: const EdgeInsets.symmetric(horizontal: 8),
@@ -634,9 +643,11 @@ class _NotificationPermissionPage extends StatelessWidget { @@ -634,9 +643,11 @@ class _NotificationPermissionPage extends StatelessWidget {
634 child: Column( 643 child: Column(
635 children: [ 644 children: [
636 OnboardingTitleText( 645 OnboardingTitleText(
637 - l10n.onboardingNotificationSubtitle.isNotEmpty  
638 - ? '${l10n.onboardingNotificationTitle}\n${l10n.onboardingNotificationSubtitle}'  
639 - : l10n.onboardingNotificationTitle, 646 + isOhos()
  647 + ? '开启通知\n及时了解身体每一次异动'
  648 + : (l10n.onboardingNotificationSubtitle.isNotEmpty
  649 + ? '${l10n.onboardingNotificationTitle}\n${l10n.onboardingNotificationSubtitle}'
  650 + : l10n.onboardingNotificationTitle),
640 maxWidth: 320, 651 maxWidth: 320,
641 ), 652 ),
642 const SizedBox(height: 12), 653 const SizedBox(height: 12),
@@ -645,7 +656,9 @@ class _NotificationPermissionPage extends StatelessWidget { @@ -645,7 +656,9 @@ class _NotificationPermissionPage extends StatelessWidget {
645 child: Padding( 656 child: Padding(
646 padding: const EdgeInsets.symmetric(horizontal: 8), 657 padding: const EdgeInsets.symmetric(horizontal: 8),
647 child: OnboardingBodyText( 658 child: OnboardingBodyText(
648 - l10n.onboardingNotificationBody, 659 + isOhos()
  660 + ? '智能手表数据更新后会及时提醒你,帮助你及时行动,改善压力状态'
  661 + : l10n.onboardingNotificationBody,
649 fontSize: 14, 662 fontSize: 14,
650 ), 663 ),
651 ), 664 ),