diff --git a/assets/ic_hk_fps.png b/assets/ic_hk_fps.png new file mode 100644 index 0000000..c027676 Binary files /dev/null and b/assets/ic_hk_fps.png differ diff --git a/lib/generated/intl/messages_en.dart b/lib/generated/intl/messages_en.dart index 6bc150d..d86eda9 100644 --- a/lib/generated/intl/messages_en.dart +++ b/lib/generated/intl/messages_en.dart @@ -1402,6 +1402,11 @@ class MessageLookup extends MessageLookupByLibrary { "support_dev_github_star_message": MessageLookupByLibrary.simpleMessage( "You can also give my project a Star on GitHub", ), + "support_dev_hk_fps_transfer_id_copied": + MessageLookupByLibrary.simpleMessage("FPS ID copied"), + "support_dev_hk_fps_transfer_title": MessageLookupByLibrary.simpleMessage( + "Hong Kong FPS", + ), "support_dev_in_game_currency_message": MessageLookupByLibrary.simpleMessage( "You can send aUEC to me in the game as support, which will help me get a better gaming experience in limited time", ), diff --git a/lib/generated/intl/messages_ja.dart b/lib/generated/intl/messages_ja.dart index 2c84331..132dc00 100644 --- a/lib/generated/intl/messages_ja.dart +++ b/lib/generated/intl/messages_ja.dart @@ -1264,6 +1264,11 @@ class MessageLookup extends MessageLookupByLibrary { "support_dev_github_star_message": MessageLookupByLibrary.simpleMessage( "GitHubで私のプロジェクトにスターを付けることもできます", ), + "support_dev_hk_fps_transfer_id_copied": + MessageLookupByLibrary.simpleMessage("FPS IDがコピーされました"), + "support_dev_hk_fps_transfer_title": MessageLookupByLibrary.simpleMessage( + "Hong Kong FPS", + ), "support_dev_in_game_currency_message": MessageLookupByLibrary.simpleMessage( "ゲーム内でaUECを送信してサポートすることができます。これは限られた時間の中で私がより良いゲーム体験を得るのに役立ちます", diff --git a/lib/generated/intl/messages_ru.dart b/lib/generated/intl/messages_ru.dart index 6fb7085..95802f9 100644 --- a/lib/generated/intl/messages_ru.dart +++ b/lib/generated/intl/messages_ru.dart @@ -1430,6 +1430,11 @@ class MessageLookup extends MessageLookupByLibrary { "support_dev_github_star_message": MessageLookupByLibrary.simpleMessage( "Вы также можете поставить звезду моему проекту на GitHub", ), + "support_dev_hk_fps_transfer_id_copied": + MessageLookupByLibrary.simpleMessage("FPS ID скопирован"), + "support_dev_hk_fps_transfer_title": MessageLookupByLibrary.simpleMessage( + "Hong Kong FPS", + ), "support_dev_in_game_currency_message": MessageLookupByLibrary.simpleMessage( "Вы можете отправить мне aUEC в игре в качестве поддержки, это поможет мне получить лучший игровой опыт в ограниченное время", ), diff --git a/lib/generated/intl/messages_zh_CN.dart b/lib/generated/intl/messages_zh_CN.dart index ad43956..35c18f4 100644 --- a/lib/generated/intl/messages_zh_CN.dart +++ b/lib/generated/intl/messages_zh_CN.dart @@ -1209,6 +1209,11 @@ class MessageLookup extends MessageLookupByLibrary { "support_dev_github_star_message": MessageLookupByLibrary.simpleMessage( "您也可以在 GitHub 上给我的项目点个 Star", ), + "support_dev_hk_fps_transfer_id_copied": + MessageLookupByLibrary.simpleMessage("FPS ID 已复制"), + "support_dev_hk_fps_transfer_title": MessageLookupByLibrary.simpleMessage( + "香港 FPS 轉數快", + ), "support_dev_in_game_currency_message": MessageLookupByLibrary.simpleMessage( "您可以在游戏中向我发送 aUEC 作为支持,这将会帮助我在有限的时间里获得更好的游戏体验", diff --git a/lib/generated/intl/messages_zh_TW.dart b/lib/generated/intl/messages_zh_TW.dart index 9c03c6f..6e9f1cd 100644 --- a/lib/generated/intl/messages_zh_TW.dart +++ b/lib/generated/intl/messages_zh_TW.dart @@ -1215,6 +1215,11 @@ class MessageLookup extends MessageLookupByLibrary { "support_dev_github_star_message": MessageLookupByLibrary.simpleMessage( "您也可以在 GitHub 上給我的專案點個 Star", ), + "support_dev_hk_fps_transfer_id_copied": + MessageLookupByLibrary.simpleMessage("FPS ID 已複製"), + "support_dev_hk_fps_transfer_title": MessageLookupByLibrary.simpleMessage( + "香港 FPS 轉數快", + ), "support_dev_in_game_currency_message": MessageLookupByLibrary.simpleMessage( "您可以在遊戲中向我發送 aUEC 作為支持,這將會幫助我在有限的時間裡獲得更好的遊戲體驗", diff --git a/lib/generated/l10n.dart b/lib/generated/l10n.dart index f9496e5..188f5ec 100644 --- a/lib/generated/l10n.dart +++ b/lib/generated/l10n.dart @@ -5400,6 +5400,26 @@ class S { ); } + /// `Hong Kong FPS` + String get support_dev_hk_fps_transfer_title { + return Intl.message( + 'Hong Kong FPS', + name: 'support_dev_hk_fps_transfer_title', + desc: '', + args: [], + ); + } + + /// `FPS ID copied` + String get support_dev_hk_fps_transfer_id_copied { + return Intl.message( + 'FPS ID copied', + name: 'support_dev_hk_fps_transfer_id_copied', + desc: '', + args: [], + ); + } + /// `Alipay` String get support_dev_alipay { return Intl.message( diff --git a/lib/l10n/intl_en.arb b/lib/l10n/intl_en.arb index 0dc1c40..5da7887 100644 --- a/lib/l10n/intl_en.arb +++ b/lib/l10n/intl_en.arb @@ -1071,6 +1071,10 @@ "@support_dev_copy_button": {}, "support_dev_in_game_currency_message": "You can send aUEC to me in the game as support, which will help me get a better gaming experience in limited time", "@support_dev_in_game_currency_message": {}, + "support_dev_hk_fps_transfer_title": "Hong Kong FPS", + "@support_dev_hk_fps_transfer_title": {}, + "support_dev_hk_fps_transfer_id_copied": "FPS ID copied", + "@support_dev_hk_fps_transfer_id_copied": {}, "support_dev_alipay": "Alipay", "@support_dev_alipay": {}, "support_dev_wechat": "WeChat", diff --git a/lib/l10n/intl_ja.arb b/lib/l10n/intl_ja.arb index 7846c3d..f4caf3a 100644 --- a/lib/l10n/intl_ja.arb +++ b/lib/l10n/intl_ja.arb @@ -1071,6 +1071,10 @@ "@support_dev_copy_button": {}, "support_dev_in_game_currency_message": "ゲーム内でaUECを送信してサポートすることができます。これは限られた時間の中で私がより良いゲーム体験を得るのに役立ちます", "@support_dev_in_game_currency_message": {}, + "support_dev_hk_fps_transfer_title": "Hong Kong FPS", + "@support_dev_hk_fps_transfer_title": {}, + "support_dev_hk_fps_transfer_id_copied": "FPS IDがコピーされました", + "@support_dev_hk_fps_transfer_id_copied": {}, "support_dev_alipay": "Alipay", "@support_dev_alipay": {}, "support_dev_wechat": "WeChat", diff --git a/lib/l10n/intl_ru.arb b/lib/l10n/intl_ru.arb index 0f2e1ce..70935d0 100644 --- a/lib/l10n/intl_ru.arb +++ b/lib/l10n/intl_ru.arb @@ -1071,6 +1071,10 @@ "@support_dev_copy_button": {}, "support_dev_in_game_currency_message": "Вы можете отправить мне aUEC в игре в качестве поддержки, это поможет мне получить лучший игровой опыт в ограниченное время", "@support_dev_in_game_currency_message": {}, + "support_dev_hk_fps_transfer_title": "Hong Kong FPS", + "@support_dev_hk_fps_transfer_title": {}, + "support_dev_hk_fps_transfer_id_copied": "FPS ID скопирован", + "@support_dev_hk_fps_transfer_id_copied": {}, "support_dev_alipay": "Alipay", "@support_dev_alipay": {}, "support_dev_wechat": "WeChat", diff --git a/lib/l10n/intl_zh_CN.arb b/lib/l10n/intl_zh_CN.arb index fc7bdbc..d0ea8f5 100644 --- a/lib/l10n/intl_zh_CN.arb +++ b/lib/l10n/intl_zh_CN.arb @@ -851,6 +851,8 @@ "support_dev_in_game_id_copied": "游戏ID已复制", "support_dev_copy_button": "复制", "support_dev_in_game_currency_message": "您可以在游戏中向我发送 aUEC 作为支持,这将会帮助我在有限的时间里获得更好的游戏体验", + "support_dev_hk_fps_transfer_title": "香港 FPS 轉數快", + "support_dev_hk_fps_transfer_id_copied": "FPS ID 已复制", "support_dev_alipay": "支付宝", "support_dev_wechat": "微信", "support_dev_donation_disclaimer": "* 请注意:捐赠是无偿赠与,您不会在软件体验上获得额外好处。", diff --git a/lib/l10n/intl_zh_TW.arb b/lib/l10n/intl_zh_TW.arb index a500730..56ddbf4 100644 --- a/lib/l10n/intl_zh_TW.arb +++ b/lib/l10n/intl_zh_TW.arb @@ -853,6 +853,8 @@ "support_dev_in_game_id_copied": "遊戲ID已複製", "support_dev_copy_button": "複製", "support_dev_in_game_currency_message": "您可以在遊戲中向我發送 aUEC 作為支持,這將會幫助我在有限的時間裡獲得更好的遊戲體驗", + "support_dev_hk_fps_transfer_title": "香港 FPS 轉數快", + "support_dev_hk_fps_transfer_id_copied": "FPS ID 已複製", "support_dev_alipay": "支付寶", "support_dev_wechat": "微信", "support_dev_donation_disclaimer": "* 請注意:捐贈是無償贈與,您不會在軟體體驗上獲得額外好處。", diff --git a/lib/ui/about/about_ui.dart b/lib/ui/about/about_ui.dart index 9cdf671..c7e0611 100644 --- a/lib/ui/about/about_ui.dart +++ b/lib/ui/about/about_ui.dart @@ -23,10 +23,7 @@ class AboutUI extends HookConsumerWidget { return PageView( scrollDirection: Axis.vertical, controller: pageCtrl, - children: [ - _makeAbout(context, ref, isTipTextCn, pageCtrl), - _makeDonate(context, ref, pageCtrl), - ], + children: [_makeAbout(context, ref, isTipTextCn, pageCtrl), _makeDonate(context, ref, pageCtrl)], ); } @@ -41,20 +38,22 @@ class AboutUI extends HookConsumerWidget { const SizedBox(height: 32), Image.asset("assets/app_logo.png", width: 128, height: 128), const SizedBox(height: 6), - Text(S.current.app_index_version_info(ConstConf.appVersion, ConstConf.isMSE ? "" : " Dev"), - style: const TextStyle(fontSize: 18)), + Text( + S.current.app_index_version_info(ConstConf.appVersion, ConstConf.isMSE ? "" : " Dev"), + style: const TextStyle(fontSize: 18), + ), const SizedBox(height: 12), Button( - onPressed: () => _onCheckUpdate(context, ref), - child: Padding( - padding: const EdgeInsets.all(4), - child: Text(S.current.about_check_update), - )), + onPressed: () => _onCheckUpdate(context, ref), + child: Padding(padding: const EdgeInsets.all(4), child: Text(S.current.about_check_update)), + ), const SizedBox(height: 32), Container( margin: const EdgeInsets.all(24), - decoration: - BoxDecoration(color: FluentTheme.of(context).cardColor, borderRadius: BorderRadius.circular(12)), + decoration: BoxDecoration( + color: FluentTheme.of(context).cardColor, + borderRadius: BorderRadius.circular(12), + ), child: Padding( padding: const EdgeInsets.all(24), child: Column( @@ -80,8 +79,9 @@ class AboutUI extends HookConsumerWidget { child: Container( width: MediaQuery.of(context).size.width * .35, decoration: BoxDecoration( - color: FluentTheme.of(context).cardColor.withValues(alpha: .06), - borderRadius: BorderRadius.circular(12)), + color: FluentTheme.of(context).cardColor.withValues(alpha: .06), + borderRadius: BorderRadius.circular(12), + ), child: IconButton( icon: Padding( padding: const EdgeInsets.all(3), @@ -104,24 +104,14 @@ class AboutUI extends HookConsumerWidget { ], ), ), - Positioned( - bottom: 12, - left: 0, - right: 0, - child: Center( - child: makeNavButton(pageCtrl, 1), - ), - ), + Positioned(bottom: 12, left: 0, right: 0, child: Center(child: makeNavButton(pageCtrl, 1))), ], ); } Widget _makeDonate(BuildContext context, WidgetRef ref, PageController pageCtrl) { final donationTypeNotifier = useState('alipay'); - final bubbleMessages = [ - S.current.support_dev_thanks_message, - S.current.support_dev_referral_code_message, - ]; + final bubbleMessages = [S.current.support_dev_thanks_message, S.current.support_dev_referral_code_message]; return Container( width: double.infinity, @@ -132,10 +122,7 @@ class AboutUI extends HookConsumerWidget { makeNavButton(pageCtrl, 0), const SizedBox(height: 12), - Text( - S.current.support_dev_title, - style: const TextStyle(fontSize: 24, fontWeight: FontWeight.bold), - ), + Text(S.current.support_dev_title, style: const TextStyle(fontSize: 24, fontWeight: FontWeight.bold)), const SizedBox(height: 32), // 聊天头像和气泡消息 @@ -198,6 +185,15 @@ class AboutUI extends HookConsumerWidget { color: const Color(0xFF12B7F5), onTap: () => donationTypeNotifier.value = 'qq', ), + _donationMethodButton( + context: context, + title: 'FPS', + icon: FontAwesomeIcons.dollarSign, + iconWidget: Image.asset("assets/ic_hk_fps.png", width: 24, height: 24), + isSelected: donationTypeNotifier.value == 'fps', + color: const Color(0xFFFF6B6B), + onTap: () => donationTypeNotifier.value = 'fps', + ), _donationMethodButton( context: context, title: 'aUEC', @@ -244,21 +240,24 @@ class AboutUI extends HookConsumerWidget { required bool isSelected, required Color color, required VoidCallback onTap, + Widget? iconWidget, }) { return Padding( padding: const EdgeInsets.symmetric(horizontal: 8), child: Button( style: ButtonStyle( - backgroundColor: WidgetStateProperty.resolveWith((states) => isSelected - ? ButtonThemeData.buttonColor(context, states).withAlpha((255.0 * 0.08).round()) - : ButtonThemeData.buttonColor(context, states).withAlpha((255.0 * 0.005).round())), + backgroundColor: WidgetStateProperty.resolveWith( + (states) => isSelected + ? ButtonThemeData.buttonColor(context, states).withAlpha((255.0 * 0.08).round()) + : ButtonThemeData.buttonColor(context, states).withAlpha((255.0 * 0.005).round()), + ), padding: WidgetStateProperty.all(EdgeInsets.symmetric(horizontal: 16, vertical: 8)), ), onPressed: onTap, child: Column( mainAxisSize: MainAxisSize.min, children: [ - Icon(icon, color: color, size: 24), + iconWidget ?? Icon(icon, color: color, size: 24), const SizedBox(height: 4), Text(title, style: TextStyle(fontSize: 12)), ], @@ -299,6 +298,45 @@ class AboutUI extends HookConsumerWidget { ); } + // 香港 FPS 转数快特殊处理 + if (type == 'fps') { + return Column( + key: ValueKey('fps'), + children: [ + Image.asset("assets/ic_hk_fps.png", width: 128, height: 128), + const SizedBox(height: 16), + Text( + S.current.support_dev_hk_fps_transfer_title, + style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold), + ), + const SizedBox(height: 8), + Container( + padding: const EdgeInsets.all(16), + decoration: BoxDecoration( + color: FluentTheme.of(context).cardColor.withAlpha((255 * .1).round()), + borderRadius: BorderRadius.circular(8), + ), + child: Row( + mainAxisSize: MainAxisSize.min, + children: [ + Text("FPS ID: 122289838", style: TextStyle(fontSize: 16)), + const SizedBox(width: 12), + Button( + onPressed: () { + Clipboard.setData(const ClipboardData(text: "122289838")); + showToast(context, S.current.support_dev_hk_fps_transfer_id_copied); + }, + child: Text(S.current.support_dev_copy_button), + ), + ], + ), + ), + const SizedBox(height: 22), + Text(S.current.support_dev_in_game_currency_message, textAlign: TextAlign.start), + ], + ); + } + // UEC 游戏内捐赠也特殊处理 if (type == 'uec') { return Column( @@ -306,8 +344,10 @@ class AboutUI extends HookConsumerWidget { children: [ Image.asset("assets/sc_logo.png", width: 128, height: 128), const SizedBox(height: 16), - Text(S.current.support_dev_in_game_currency_title, - style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold)), + Text( + S.current.support_dev_in_game_currency_title, + style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold), + ), const SizedBox(height: 8), Container( padding: const EdgeInsets.all(16), @@ -327,15 +367,12 @@ class AboutUI extends HookConsumerWidget { showToast(context, S.current.support_dev_in_game_id_copied); }, child: Text(S.current.support_dev_copy_button), - ) + ), ], ), ), const SizedBox(height: 22), - Text( - S.current.support_dev_in_game_currency_message, - textAlign: TextAlign.start, - ), + Text(S.current.support_dev_in_game_currency_message, textAlign: TextAlign.start), ], ); } @@ -373,17 +410,11 @@ class AboutUI extends HookConsumerWidget { width: 200, height: 200, padding: const EdgeInsets.all(16), - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(8), - ), + decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(8)), child: QrImageView(data: qrData), ), const SizedBox(height: 16), - Text( - S.current.support_dev_donation_disclaimer, - style: TextStyle(fontSize: 16), - ), + Text(S.current.support_dev_donation_disclaimer, style: TextStyle(fontSize: 16)), ], ); } @@ -452,7 +483,8 @@ class AboutUI extends HookConsumerWidget { ), onPressed: () { launchUrlString( - "https://qm.qq.com/cgi-bin/qm/qr?k=TdyR3QU-x77OeD0NQ5w--F0uiNxPq-Tn&jump_from=webapi&authKey=m8s5GhF/7bRCvm5vI4aNl7RQEx5KOViwkzzIl54K+u9w2hzFpr9N/3avG4W/HaVS"); + "https://qm.qq.com/cgi-bin/qm/qr?k=TdyR3QU-x77OeD0NQ5w--F0uiNxPq-Tn&jump_from=webapi&authKey=m8s5GhF/7bRCvm5vI4aNl7RQEx5KOViwkzzIl54K+u9w2hzFpr9N/3avG4W/HaVS", + ); }, ), const SizedBox(width: 24), @@ -520,8 +552,11 @@ class AboutUI extends HookConsumerWidget { GridItemAnimator( index: buildIndex++, child: makeAnalyticsItem( - context: context, name: item["Type"] as String, value: item["Count"] as int), - ) + context: context, + name: item["Type"] as String, + value: item["Count"] as int, + ), + ), ], ); }, @@ -535,31 +570,26 @@ class AboutUI extends HookConsumerWidget { "firstLaunch": S.current.about_analytics_total_users, "install_localization": S.current.about_analytics_install_translation, "performance_apply": S.current.about_analytics_performance_optimization, - "p4k_download": S.current.about_analytics_p4k_redirection + "p4k_download": S.current.about_analytics_p4k_redirection, }; return Container( padding: const EdgeInsets.all(12), margin: const EdgeInsets.only(left: 18, right: 18), decoration: BoxDecoration( - color: FluentTheme.of(context).cardColor.withValues(alpha: .06), borderRadius: BorderRadius.circular(12)), + color: FluentTheme.of(context).cardColor.withValues(alpha: .06), + borderRadius: BorderRadius.circular(12), + ), child: Column( children: [ - Text( - names[name] ?? name, - style: TextStyle(fontSize: 13, color: Colors.white.withValues(alpha: .6)), - ), + Text(names[name] ?? name, style: TextStyle(fontSize: 13, color: Colors.white.withValues(alpha: .6))), const SizedBox(height: 4), Row( crossAxisAlignment: CrossAxisAlignment.end, children: [ - FlowNumberText( - targetValue: value, - style: const TextStyle( - fontSize: 20, - ), - ), + FlowNumberText(targetValue: value, style: const TextStyle(fontSize: 20)), Text( - " ${name == "firstLaunch" ? S.current.about_analytics_units_user : S.current.about_analytics_units_times}"), + " ${name == "firstLaunch" ? S.current.about_analytics_units_user : S.current.about_analytics_units_times}", + ), ], ), ], @@ -599,10 +629,7 @@ class ChatBubble extends StatelessWidget { bottomRight: Radius.circular(18), ), ), - child: Text( - message, - style: TextStyle(fontSize: 14), - ), + child: Text(message, style: TextStyle(fontSize: 14)), ); } }