Showing
7 changed files
with
50 additions
and
33 deletions
| @@ -157,18 +157,27 @@ class _FriendEditRemarkDialogState extends State<FriendEditRemarkDialog> { | @@ -157,18 +157,27 @@ class _FriendEditRemarkDialogState extends State<FriendEditRemarkDialog> { | ||
| 157 | borderRadius: BorderRadius.circular(24.dp), | 157 | borderRadius: BorderRadius.circular(24.dp), |
| 158 | ), | 158 | ), |
| 159 | padding: EdgeInsets.symmetric(horizontal: 16.dp), | 159 | padding: EdgeInsets.symmetric(horizontal: 16.dp), |
| 160 | - child: Text( | ||
| 161 | - widget.confirmText, | ||
| 162 | - maxLines: 1, | ||
| 163 | - overflow: TextOverflow.ellipsis, | ||
| 164 | - textAlign: TextAlign.center, | ||
| 165 | - style: const TextStyle( | ||
| 166 | - color: Colors.white, | ||
| 167 | - fontSize: 14, | ||
| 168 | - fontWeight: FontWeight.w500, | ||
| 169 | - height: 1.2, | ||
| 170 | - ), | ||
| 171 | - ), | 160 | + child: _isSubmitting |
| 161 | + ? SizedBox( | ||
| 162 | + width: 18.dp, | ||
| 163 | + height: 18.dp, | ||
| 164 | + child: const CircularProgressIndicator( | ||
| 165 | + color: Colors.white, | ||
| 166 | + strokeWidth: 2, | ||
| 167 | + ), | ||
| 168 | + ) | ||
| 169 | + : Text( | ||
| 170 | + widget.confirmText, | ||
| 171 | + maxLines: 1, | ||
| 172 | + overflow: TextOverflow.ellipsis, | ||
| 173 | + textAlign: TextAlign.center, | ||
| 174 | + style: const TextStyle( | ||
| 175 | + color: Colors.white, | ||
| 176 | + fontSize: 14, | ||
| 177 | + fontWeight: FontWeight.w500, | ||
| 178 | + height: 1.2, | ||
| 179 | + ), | ||
| 180 | + ), | ||
| 172 | ), | 181 | ), |
| 173 | ), | 182 | ), |
| 174 | ); | 183 | ); |
| @@ -546,20 +546,20 @@ class _TrendMetric extends StatelessWidget { | @@ -546,20 +546,20 @@ class _TrendMetric extends StatelessWidget { | ||
| 546 | crossAxisAlignment: CrossAxisAlignment.start, | 546 | crossAxisAlignment: CrossAxisAlignment.start, |
| 547 | children: [ | 547 | children: [ |
| 548 | Text(label, | 548 | Text(label, |
| 549 | - style: const TextStyle(color: Color(0xFF78787D), fontSize: 11)), | 549 | + style: const TextStyle(color: Color(0xFF78787D), fontSize: 12)), |
| 550 | const SizedBox(height: 3), | 550 | const SizedBox(height: 3), |
| 551 | Row( | 551 | Row( |
| 552 | crossAxisAlignment: CrossAxisAlignment.end, | 552 | crossAxisAlignment: CrossAxisAlignment.end, |
| 553 | children: [ | 553 | children: [ |
| 554 | Text(context.l10n.hrvTrendDayValue(value), | 554 | Text(context.l10n.hrvTrendDayValue(value), |
| 555 | style: const TextStyle( | 555 | style: const TextStyle( |
| 556 | - fontSize: 25, fontWeight: FontWeight.w600, height: 1)), | 556 | + fontSize: 26, fontWeight: FontWeight.w600, height: 1)), |
| 557 | if (context.l10n.hrvTrendDayUnit.isNotEmpty) | 557 | if (context.l10n.hrvTrendDayUnit.isNotEmpty) |
| 558 | Padding( | 558 | Padding( |
| 559 | padding: const EdgeInsets.only(left: 4, bottom: 2), | 559 | padding: const EdgeInsets.only(left: 4, bottom: 2), |
| 560 | child: Text(context.l10n.hrvTrendDayUnit, | 560 | child: Text(context.l10n.hrvTrendDayUnit, |
| 561 | style: const TextStyle( | 561 | style: const TextStyle( |
| 562 | - fontSize: 11, fontWeight: FontWeight.w500)), | 562 | + fontSize: 12, fontWeight: FontWeight.w500)), |
| 563 | ), | 563 | ), |
| 564 | ], | 564 | ], |
| 565 | ), | 565 | ), |
| @@ -579,7 +579,7 @@ class _TrendMetric extends StatelessWidget { | @@ -579,7 +579,7 @@ class _TrendMetric extends StatelessWidget { | ||
| 579 | Flexible( | 579 | Flexible( |
| 580 | child: Text( | 580 | child: Text( |
| 581 | comparison, | 581 | comparison, |
| 582 | - style: TextStyle(color: comparisonColor, fontSize: 10), | 582 | + style: TextStyle(color: comparisonColor, fontSize: 12), |
| 583 | ), | 583 | ), |
| 584 | ), | 584 | ), |
| 585 | ], | 585 | ], |
| @@ -847,7 +847,7 @@ class _DistributionCard extends StatelessWidget { | @@ -847,7 +847,7 @@ class _DistributionCard extends StatelessWidget { | ||
| 847 | ), | 847 | ), |
| 848 | const SizedBox(height: 28), | 848 | const SizedBox(height: 28), |
| 849 | SizedBox( | 849 | SizedBox( |
| 850 | - width: 216, | 850 | + width: 230, |
| 851 | child: _DistributionGrid(report: report), | 851 | child: _DistributionGrid(report: report), |
| 852 | ), | 852 | ), |
| 853 | const SizedBox(height: 20), | 853 | const SizedBox(height: 20), |
| @@ -877,14 +877,14 @@ class _DistributionGrid extends StatelessWidget { | @@ -877,14 +877,14 @@ class _DistributionGrid extends StatelessWidget { | ||
| 877 | Widget build(BuildContext context) { | 877 | Widget build(BuildContext context) { |
| 878 | return LayoutBuilder( | 878 | return LayoutBuilder( |
| 879 | builder: (context, constraints) { | 879 | builder: (context, constraints) { |
| 880 | - const spacing = 16.0; | 880 | + const spacing = 14.0; |
| 881 | return Wrap( | 881 | return Wrap( |
| 882 | spacing: spacing, | 882 | spacing: spacing, |
| 883 | - runSpacing: 16, | 883 | + runSpacing: 19, |
| 884 | children: [ | 884 | children: [ |
| 885 | for (final level in HrvStressLevel.values) | 885 | for (final level in HrvStressLevel.values) |
| 886 | SizedBox( | 886 | SizedBox( |
| 887 | - width: 100, | 887 | + width: 105, |
| 888 | child: _DistributionItem(level: level, report: report), | 888 | child: _DistributionItem(level: level, report: report), |
| 889 | ), | 889 | ), |
| 890 | ], | 890 | ], |
| @@ -72,19 +72,23 @@ class PremiumActivatedView extends GetView<PremiumActivatedController> { | @@ -72,19 +72,23 @@ class PremiumActivatedView extends GetView<PremiumActivatedController> { | ||
| 72 | SizedBox(height: 150.h), | 72 | SizedBox(height: 150.h), |
| 73 | const _FloatingPremiumIcon(), | 73 | const _FloatingPremiumIcon(), |
| 74 | SizedBox(height: 84.h), | 74 | SizedBox(height: 84.h), |
| 75 | - Text( | ||
| 76 | - context.l10n.premiumActivatedTitle, | ||
| 77 | - style: const TextStyle( | ||
| 78 | - fontSize: 20, | ||
| 79 | - color: Color(0xFF0F0F11), | ||
| 80 | - fontWeight: FontWeightExt.semibold), | ||
| 81 | - textAlign: TextAlign.center, | 75 | + Padding( |
| 76 | + padding: const EdgeInsets.symmetric(horizontal: 24.0), | ||
| 77 | + child: Text( | ||
| 78 | + context.l10n.premiumActivatedTitle, | ||
| 79 | + style: const TextStyle( | ||
| 80 | + fontSize: 20, | ||
| 81 | + color: Color(0xFF0F0F11), | ||
| 82 | + fontWeight: FontWeightExt.semibold), | ||
| 83 | + textAlign: TextAlign.center, | ||
| 84 | + ), | ||
| 82 | ), | 85 | ), |
| 83 | SizedBox(height: 8), | 86 | SizedBox(height: 8), |
| 84 | Padding( | 87 | Padding( |
| 85 | padding: const EdgeInsets.symmetric(horizontal: 24.0), | 88 | padding: const EdgeInsets.symmetric(horizontal: 24.0), |
| 86 | child: Text(context.l10n.premiumActivatedDescription, | 89 | child: Text(context.l10n.premiumActivatedDescription, |
| 87 | - style: const TextStyle(fontSize: 14, color: Color(0xFF0F0F11)), | 90 | + style: |
| 91 | + const TextStyle(fontSize: 14, color: Color(0xFF0F0F11)), | ||
| 88 | textAlign: TextAlign.center), | 92 | textAlign: TextAlign.center), |
| 89 | ), | 93 | ), |
| 90 | Expanded(child: Container()), | 94 | Expanded(child: Container()), |
| @@ -340,8 +340,9 @@ class PurchaseController extends GetxController { | @@ -340,8 +340,9 @@ class PurchaseController extends GetxController { | ||
| 340 | } | 340 | } |
| 341 | 341 | ||
| 342 | PurchasePlan _buildPlan(PayProduct product, [AppleProductInfo? appleInfo]) { | 342 | PurchasePlan _buildPlan(PayProduct product, [AppleProductInfo? appleInfo]) { |
| 343 | + var productName = appleInfo?.productName ?? _nonEmpty(product.name) ?? ''; | ||
| 343 | return PurchasePlan( | 344 | return PurchasePlan( |
| 344 | - title: _nonEmpty(product.name) ?? '', | 345 | + title: productName, |
| 345 | subtitle: _planSubtitle(product, appleInfo), | 346 | subtitle: _planSubtitle(product, appleInfo), |
| 346 | price: appleInfo == null ? '' : _displayPrice(appleInfo), | 347 | price: appleInfo == null ? '' : _displayPrice(appleInfo), |
| 347 | badge: _nonEmpty(product.content?.label) ?? '', | 348 | badge: _nonEmpty(product.content?.label) ?? '', |
| @@ -20,8 +20,11 @@ class ReportDateFormatter { | @@ -20,8 +20,11 @@ class ReportDateFormatter { | ||
| 20 | static String yearMonthDay(DateTime date, String localeName) => | 20 | static String yearMonthDay(DateTime date, String localeName) => |
| 21 | DateFormat.yMMMd(localeName).format(date); | 21 | DateFormat.yMMMd(localeName).format(date); |
| 22 | 22 | ||
| 23 | + /// Uses the same locale-aware month/day formatting as [monthDay], then | ||
| 24 | + /// appends the abbreviated weekday. This preserves locale-specific date | ||
| 25 | + /// literals (for example, the Chinese "日"). | ||
| 23 | static String monthDayWithWeekday(DateTime date, String localeName) => | 26 | static String monthDayWithWeekday(DateTime date, String localeName) => |
| 24 | - DateFormat('MMMd · EEE', localeName).format(date); | 27 | + '${monthDay(date, localeName)} · ${DateFormat.E(localeName).format(date)}'; |
| 25 | 28 | ||
| 26 | static String pickerYear(int value, String localeName) => | 29 | static String pickerYear(int value, String localeName) => |
| 27 | year(DateTime(value), localeName); | 30 | year(DateTime(value), localeName); |
| @@ -679,7 +679,7 @@ | @@ -679,7 +679,7 @@ | ||
| 679 | "purchaseCurrencySymbol": "¥", | 679 | "purchaseCurrencySymbol": "¥", |
| 680 | "purchaseProductInfoUnavailable": "Product information is unavailable. Please try again later.", | 680 | "purchaseProductInfoUnavailable": "Product information is unavailable. Please try again later.", |
| 681 | "purchaseOrderInfoUnavailable": "Order information is unavailable. Please try again later.", | 681 | "purchaseOrderInfoUnavailable": "Order information is unavailable. Please try again later.", |
| 682 | - "purchaseMonthlyUnitPrice": "Only {unitPrice} per month", | 682 | + "purchaseMonthlyUnitPrice": "Only {unitPrice}/month", |
| 683 | "purchaseApplePaymentInvalidOrder": "Invalid UUID format.", | 683 | "purchaseApplePaymentInvalidOrder": "Invalid UUID format.", |
| 684 | "purchaseApplePaymentProductNotFound": "Failed to find product by product ID.", | 684 | "purchaseApplePaymentProductNotFound": "Failed to find product by product ID.", |
| 685 | "purchaseApplePaymentCancelled": "The user cancelled the payment.", | 685 | "purchaseApplePaymentCancelled": "The user cancelled the payment.", |
| @@ -1070,4 +1070,4 @@ | @@ -1070,4 +1070,4 @@ | ||
| 1070 | "cannotUseCurrentPassword": "You can't use the current password", | 1070 | "cannotUseCurrentPassword": "You can't use the current password", |
| 1071 | "thisEmailIsAlreadyLinkedToAnotherAccountPleaseUseADifferentEmail": "This email is already linked to another account. Please use a different email.", | 1071 | "thisEmailIsAlreadyLinkedToAnotherAccountPleaseUseADifferentEmail": "This email is already linked to another account. Please use a different email.", |
| 1072 | "loggedOutTokenInvalid": "Logged Out" | 1072 | "loggedOutTokenInvalid": "Logged Out" |
| 1073 | -} | ||
| 1073 | +} |
| @@ -1968,7 +1968,7 @@ class AppLocalizationsEn extends AppLocalizations { | @@ -1968,7 +1968,7 @@ class AppLocalizationsEn extends AppLocalizations { | ||
| 1968 | 1968 | ||
| 1969 | @override | 1969 | @override |
| 1970 | String purchaseMonthlyUnitPrice(String unitPrice) { | 1970 | String purchaseMonthlyUnitPrice(String unitPrice) { |
| 1971 | - return 'Only $unitPrice per month'; | 1971 | + return 'Only $unitPrice/month'; |
| 1972 | } | 1972 | } |
| 1973 | 1973 | ||
| 1974 | @override | 1974 | @override |
-
Please register or login to post a comment