From 4d31eaf1848822b86f68dbc9e7984a5df08de632 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B5=85=E5=BF=B5?= Date: Wed, 23 Sep 2026 11:32:02 +0800 Subject: [PATCH] =?UTF-8?q?fix(app):=20poster=20sheet=20close=20button=20?= =?UTF-8?q?=E2=80=94=20header=20row=20with=20explicit=20close=20(drag-down?= =?UTF-8?q?=20not=20obvious=20on=20long=20sheet)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Code --- apps/mobile/lib/l10n/app_en.arb | 3 ++- apps/mobile/lib/l10n/app_localizations.dart | 6 ++++++ .../mobile/lib/l10n/app_localizations_en.dart | 3 +++ .../mobile/lib/l10n/app_localizations_zh.dart | 3 +++ apps/mobile/lib/l10n/app_zh.arb | 3 ++- apps/mobile/lib/pages/share_qr_dialog.dart | 19 ++++++++++++++++++- 6 files changed, 34 insertions(+), 3 deletions(-) diff --git a/apps/mobile/lib/l10n/app_en.arb b/apps/mobile/lib/l10n/app_en.arb index d371bc4..ffb1158 100644 --- a/apps/mobile/lib/l10n/app_en.arb +++ b/apps/mobile/lib/l10n/app_en.arb @@ -426,5 +426,6 @@ "sharePosterMode": "Generate QR poster", "posterDownload": "Download poster image", "posterSaved": "Poster saved to gallery", - "posterSaveFailed": "Failed to save poster" + "posterSaveFailed": "Failed to save poster", + "close": "Close" } diff --git a/apps/mobile/lib/l10n/app_localizations.dart b/apps/mobile/lib/l10n/app_localizations.dart index 5c3d934..726c6c6 100644 --- a/apps/mobile/lib/l10n/app_localizations.dart +++ b/apps/mobile/lib/l10n/app_localizations.dart @@ -2011,6 +2011,12 @@ abstract class AppLocalizations { /// In zh, this message translates to: /// **'海报保存失败'** String get posterSaveFailed; + + /// No description provided for @close. + /// + /// In zh, this message translates to: + /// **'关闭'** + String get close; } class _AppLocalizationsDelegate diff --git a/apps/mobile/lib/l10n/app_localizations_en.dart b/apps/mobile/lib/l10n/app_localizations_en.dart index ce77ffd..16627e3 100644 --- a/apps/mobile/lib/l10n/app_localizations_en.dart +++ b/apps/mobile/lib/l10n/app_localizations_en.dart @@ -1028,4 +1028,7 @@ class AppLocalizationsEn extends AppLocalizations { @override String get posterSaveFailed => 'Failed to save poster'; + + @override + String get close => 'Close'; } diff --git a/apps/mobile/lib/l10n/app_localizations_zh.dart b/apps/mobile/lib/l10n/app_localizations_zh.dart index d8ecd30..000b055 100644 --- a/apps/mobile/lib/l10n/app_localizations_zh.dart +++ b/apps/mobile/lib/l10n/app_localizations_zh.dart @@ -995,4 +995,7 @@ class AppLocalizationsZh extends AppLocalizations { @override String get posterSaveFailed => '海报保存失败'; + + @override + String get close => '关闭'; } diff --git a/apps/mobile/lib/l10n/app_zh.arb b/apps/mobile/lib/l10n/app_zh.arb index 3a2b1db..41fef11 100644 --- a/apps/mobile/lib/l10n/app_zh.arb +++ b/apps/mobile/lib/l10n/app_zh.arb @@ -426,5 +426,6 @@ "sharePosterMode": "生成二维码海报", "posterDownload": "下载海报图", "posterSaved": "海报已保存到相册", - "posterSaveFailed": "海报保存失败" + "posterSaveFailed": "海报保存失败", + "close": "关闭" } diff --git a/apps/mobile/lib/pages/share_qr_dialog.dart b/apps/mobile/lib/pages/share_qr_dialog.dart index 7698085..df83349 100644 --- a/apps/mobile/lib/pages/share_qr_dialog.dart +++ b/apps/mobile/lib/pages/share_qr_dialog.dart @@ -52,7 +52,8 @@ typedef ShareLauncher = Future Function(String text); final shareLauncherProvider = Provider( // share_plus 11:SharePlus.instance.share(旧 Share.share 已废弃)。 - (ref) => (text) async => SharePlus.instance.share( + (ref) => + (text) async => SharePlus.instance.share( ShareParams(text: text, subject: text.split('\n').first), ), ); @@ -332,6 +333,22 @@ class _PosterSheetState extends ConsumerState<_PosterSheet> { child: Column( mainAxisSize: MainAxisSize.min, children: [ + // ── 头行:标题 + 显式关闭(海报较长时下拉手势不明显)── + Row( + children: [ + Expanded( + child: Text( + l10n.sharePosterMode, + style: theme.textTheme.titleMedium, + ), + ), + IconButton( + tooltip: l10n.close, + icon: const Icon(Icons.close), + onPressed: () => Navigator.of(context).pop(), + ), + ], + ), // ── 海报(整块 RepaintBoundary;下载即渲染此区域)── RepaintBoundary( key: _posterKey,