diff --git a/client/lib/l10n/app_text.dart b/client/lib/l10n/app_text.dart index 1a9e6b9..17db0e0 100644 --- a/client/lib/l10n/app_text.dart +++ b/client/lib/l10n/app_text.dart @@ -45,6 +45,7 @@ abstract class AppText { String get quotaToday; String get minutes; String get quotaFree; + String get planFreeTag; // 额度卡右上短标签「免费版」(不含「每日10分钟」,避免挤占行宽) String get watchAd; String get adUnlocked; // 免费版 10 分钟卡控 + 看广告加时(累加式) diff --git a/client/lib/l10n/strings_en.dart b/client/lib/l10n/strings_en.dart index 7d97b84..3efdf73 100644 --- a/client/lib/l10n/strings_en.dart +++ b/client/lib/l10n/strings_en.dart @@ -53,6 +53,8 @@ class StringsEn extends AppText { @override String get quotaFree => 'Free · 10 min/day'; @override + String get planFreeTag => 'Free'; + @override String get watchAd => 'Watch ad to start'; @override String get adUnlocked => 'Unlocked for today'; diff --git a/client/lib/l10n/strings_zh.dart b/client/lib/l10n/strings_zh.dart index 5081a4e..11222d0 100644 --- a/client/lib/l10n/strings_zh.dart +++ b/client/lib/l10n/strings_zh.dart @@ -52,6 +52,8 @@ class StringsZh extends AppText { @override String get quotaFree => '免费版 · 每日 10 分钟'; @override + String get planFreeTag => '免费版'; + @override String get watchAd => '看广告开始使用'; @override String get adUnlocked => '已解锁 · 今日可用'; diff --git a/client/lib/widgets/quota_card.dart b/client/lib/widgets/quota_card.dart index 83f008f..9449b3b 100644 --- a/client/lib/widgets/quota_card.dart +++ b/client/lib/widgets/quota_card.dart @@ -77,21 +77,25 @@ class QuotaCard extends StatelessWidget { Row(children: [ Icon(PangolinIcons.clock, size: 15, color: exhausted ? c.danger : c.accent), const SizedBox(width: 7), - Flexible( - child: Text(label, - overflow: TextOverflow.ellipsis, - style: PangolinText.caption.copyWith(color: c.fg2, fontWeight: FontWeight.w600, fontSize: 12)), - ), + // 标签固定、绝不省略(此前用 Flexible 让「今日剩余」被挤成「今日…」)。 + Text(label, + style: PangolinText.caption.copyWith(color: c.fg2, fontWeight: FontWeight.w600, fontSize: 12)), if (value.isNotEmpty) ...[ const SizedBox(width: 7), - Text(value, - style: PangolinText.mono.copyWith(color: c.fg1, fontSize: 14, fontWeight: FontWeight.w600)), + // 数值可作为最后收缩项(极端窄屏/三位数分钟才会省略)。 + Flexible( + child: Text(value, + overflow: TextOverflow.ellipsis, + style: PangolinText.mono.copyWith(color: c.fg1, fontSize: 14, fontWeight: FontWeight.w600)), + ), ], + const SizedBox(width: 8), const Spacer(), + // 短标签「免费版」——每日额度由卡片本身表达,不再挤进右上角。 Container( padding: const EdgeInsets.symmetric(horizontal: 9, vertical: 3), decoration: BoxDecoration(color: c.bgSubtle, borderRadius: BorderRadius.circular(PangolinRadius.full)), - child: Text(t.quotaFree, + child: Text(t.planFreeTag, style: PangolinText.caption.copyWith(color: c.fg3, fontWeight: FontWeight.w600, fontSize: 10.5)), ), ]), diff --git a/client/pubspec.yaml b/client/pubspec.yaml index 7fcad2b..eb23059 100644 --- a/client/pubspec.yaml +++ b/client/pubspec.yaml @@ -1,7 +1,7 @@ name: pangolin_vpn description: 穿山甲 · Pangolin — 极简、稳定、跨平台网络加速客户端。 publish_to: "none" -version: 1.0.44+45 +version: 1.0.45+46 environment: sdk: ^3.5.0 diff --git a/client/test/golden/goldens/quota_exhausted_dark.png b/client/test/golden/goldens/quota_exhausted_dark.png index 9c3f978..fb38683 100644 Binary files a/client/test/golden/goldens/quota_exhausted_dark.png and b/client/test/golden/goldens/quota_exhausted_dark.png differ diff --git a/client/test/golden/goldens/quota_exhausted_light.png b/client/test/golden/goldens/quota_exhausted_light.png index 62243a6..547dbbb 100644 Binary files a/client/test/golden/goldens/quota_exhausted_light.png and b/client/test/golden/goldens/quota_exhausted_light.png differ diff --git a/client/test/golden/goldens/quota_low_dark.png b/client/test/golden/goldens/quota_low_dark.png index 32b77a0..60ca44a 100644 Binary files a/client/test/golden/goldens/quota_low_dark.png and b/client/test/golden/goldens/quota_low_dark.png differ diff --git a/client/test/golden/goldens/quota_low_light.png b/client/test/golden/goldens/quota_low_light.png index 43243da..73cf10a 100644 Binary files a/client/test/golden/goldens/quota_low_light.png and b/client/test/golden/goldens/quota_low_light.png differ diff --git a/client/windows/installer/pangolin.iss b/client/windows/installer/pangolin.iss index c73bbc1..7ec787d 100644 --- a/client/windows/installer/pangolin.iss +++ b/client/windows/installer/pangolin.iss @@ -3,7 +3,7 @@ ; 前置: 先在 client/ 跑 `flutter build windows`(Release),产物在 ; ..\..\build\windows\x64\runner\Release #define MyAppName "穿山甲 Pangolin" -#define MyAppVersion "1.0.44" +#define MyAppVersion "1.0.45" #define MyAppPublisher "Pangolin" #define MyAppExeName "pangolin_vpn.exe" #define BuildDir "..\..\build\windows\x64\runner\Release"