feat: Donation page

This commit is contained in:
xkeyC 2025-03-01 13:42:30 +08:00
parent d65eb82ece
commit 721ba6a3c2
10 changed files with 4613 additions and 3314 deletions

View File

@ -47,8 +47,10 @@ MessageLookupByLibrary? _findExact(String localeName) {
/// User programs should call this before using [localeName] for messages.
Future<bool> initializeMessages(String localeName) {
var availableLocale = Intl.verifiedLocale(
localeName, (locale) => _deferredLibraries[locale] != null,
onFailure: (_) => null);
localeName,
(locale) => _deferredLibraries[locale] != null,
onFailure: (_) => null,
);
if (availableLocale == null) {
return new SynchronousFuture(false);
}
@ -68,8 +70,11 @@ bool _messagesExistFor(String locale) {
}
MessageLookupByLibrary? _findGeneratedMessagesFor(String locale) {
var actualLocale =
Intl.verifiedLocale(locale, _messagesExistFor, onFailure: (_) => null);
var actualLocale = Intl.verifiedLocale(
locale,
_messagesExistFor,
onFailure: (_) => null,
);
if (actualLocale == null) return null;
return _findExact(actualLocale);
}

File diff suppressed because it is too large Load Diff

View File

@ -41,104 +41,122 @@ class MessageLookup extends MessageLookupByLibrary {
final messages = _notInlinedMessages(_notInlinedMessages);
static Map<String, Function> _notInlinedMessages(_) => <String, Function>{
"about_action_email":
MessageLookupByLibrary.simpleMessage("メール: xkeyc@qq.com"),
"about_action_open_source":
MessageLookupByLibrary.simpleMessage("オープンソース"),
"about_analytics_install_translation":
MessageLookupByLibrary.simpleMessage("日本語化インストール"),
"about_action_email": MessageLookupByLibrary.simpleMessage(
"メール: xkeyc@qq.com",
),
"about_action_open_source": MessageLookupByLibrary.simpleMessage("オープンソース"),
"about_analytics_install_translation": MessageLookupByLibrary.simpleMessage(
"日本語化インストール",
),
"about_analytics_launch": MessageLookupByLibrary.simpleMessage("起動"),
"about_analytics_launch_game":
MessageLookupByLibrary.simpleMessage("ゲームを起動"),
"about_analytics_p4k_redirection":
MessageLookupByLibrary.simpleMessage("P4Kダウンロード"),
"about_analytics_total_users":
MessageLookupByLibrary.simpleMessage("利用者数"),
"about_analytics_units_times":
MessageLookupByLibrary.simpleMessage(""),
"about_analytics_launch_game": MessageLookupByLibrary.simpleMessage(
"ゲームを起動",
),
"about_analytics_p4k_redirection": MessageLookupByLibrary.simpleMessage(
"P4Kダウンロード",
),
"about_analytics_total_users": MessageLookupByLibrary.simpleMessage("利用者数"),
"about_analytics_units_times": MessageLookupByLibrary.simpleMessage(""),
"about_analytics_units_user": MessageLookupByLibrary.simpleMessage(""),
"about_check_update": MessageLookupByLibrary.simpleMessage("更新チェック"),
"about_disclaimer": MessageLookupByLibrary.simpleMessage(
"これは Star Citizen の非公式ツールです、Cloud Imperium Games LLC の所有ではない。 本ソフトウェアのホストまたは使用者によって作成されていないすべての情報は、それぞれの所有者に帰属します。 \nStar Citizen®、Roberts Space Industries®、Cloud Imperium® は Cloud Imperium Rights LLC のトレードマーク。"),
"about_info_latest_version":
MessageLookupByLibrary.simpleMessage("すでに最新バージョンだ!"),
"about_online_feedback":
MessageLookupByLibrary.simpleMessage("フィードバック"),
"これは Star Citizen の非公式ツールです、Cloud Imperium Games LLC の所有ではない。 本ソフトウェアのホストまたは使用者によって作成されていないすべての情報は、それぞれの所有者に帰属します。 \nStar Citizen®、Roberts Space Industries®、Cloud Imperium® は Cloud Imperium Rights LLC のトレードマーク。",
),
"about_info_latest_version": MessageLookupByLibrary.simpleMessage(
"すでに最新バージョンだ!",
),
"about_online_feedback": MessageLookupByLibrary.simpleMessage("フィードバック"),
"action_close": MessageLookupByLibrary.simpleMessage("クローズ"),
"action_open_folder": MessageLookupByLibrary.simpleMessage("フォルダを開く"),
"app_index_version_info": m2,
"app_language_code": MessageLookupByLibrary.simpleMessage("ja"),
"app_language_name": MessageLookupByLibrary.simpleMessage("日本語"),
"downloader_action_cancel_all":
MessageLookupByLibrary.simpleMessage("すべてキャンセル"),
"downloader_action_cancel_download":
MessageLookupByLibrary.simpleMessage("ダウンロードをキャンセル"),
"downloader_action_cancel_all": MessageLookupByLibrary.simpleMessage(
"すべてキャンセル",
),
"downloader_action_cancel_download": MessageLookupByLibrary.simpleMessage(
"ダウンロードをキャンセル",
),
"downloader_action_confirm_cancel_all_tasks":
MessageLookupByLibrary.simpleMessage("すべてのタスクのキャンセルを確認する?"),
"downloader_action_confirm_cancel_download":
MessageLookupByLibrary.simpleMessage("ダウンロードのキャンセルを確認しますか?"),
"downloader_action_continue_download":
MessageLookupByLibrary.simpleMessage("ダウンロードを続ける"),
"downloader_action_options":
MessageLookupByLibrary.simpleMessage("オプション"),
"downloader_action_pause_all":
MessageLookupByLibrary.simpleMessage("すべて一時停止"),
"downloader_action_pause_download":
MessageLookupByLibrary.simpleMessage("ダウンロードの一時停止"),
"downloader_action_resume_all":
MessageLookupByLibrary.simpleMessage("すべて復元"),
"downloader_action_continue_download": MessageLookupByLibrary.simpleMessage(
"ダウンロードを続ける",
),
"downloader_action_options": MessageLookupByLibrary.simpleMessage("オプション"),
"downloader_action_pause_all": MessageLookupByLibrary.simpleMessage(
"すべて一時停止",
),
"downloader_action_pause_download": MessageLookupByLibrary.simpleMessage(
"ダウンロードの一時停止",
),
"downloader_action_resume_all": MessageLookupByLibrary.simpleMessage(
"すべて復元",
),
"downloader_info_deleted": MessageLookupByLibrary.simpleMessage("削除済み"),
"downloader_info_download_completed":
MessageLookupByLibrary.simpleMessage("ダウンロード完了"),
"downloader_info_download_failed":
MessageLookupByLibrary.simpleMessage("ダウンロード失敗"),
"downloader_info_download_completed": MessageLookupByLibrary.simpleMessage(
"ダウンロード完了",
),
"downloader_info_download_failed": MessageLookupByLibrary.simpleMessage(
"ダウンロード失敗",
),
"downloader_info_download_upload_speed": m19,
"downloader_info_downloaded": m20,
"downloader_info_downloading": m21,
"downloader_info_downloading_status":
MessageLookupByLibrary.simpleMessage("ダウンロード中..."),
"downloader_info_downloading_status": MessageLookupByLibrary.simpleMessage(
"ダウンロード中...",
),
"downloader_info_manual_file_deletion_note":
MessageLookupByLibrary.simpleMessage(
"ダウンロードしたファイルが不要になった場合は、手動で削除する必要があります。"),
"downloader_info_no_download_tasks":
MessageLookupByLibrary.simpleMessage("ダウンロードタスクなし"),
"ダウンロードしたファイルが不要になった場合は、手動で削除する必要があります。",
),
"downloader_info_no_download_tasks": MessageLookupByLibrary.simpleMessage(
"ダウンロードタスクなし",
),
"downloader_info_paused": MessageLookupByLibrary.simpleMessage("一時停止中"),
"downloader_info_status": m22,
"downloader_info_total_size": m23,
"downloader_info_uploaded": m24,
"downloader_info_verifying": m25,
"downloader_info_waiting": MessageLookupByLibrary.simpleMessage("待機中"),
"downloader_speed_limit_settings":
MessageLookupByLibrary.simpleMessage("速度制限設定"),
"downloader_title_downloading":
MessageLookupByLibrary.simpleMessage("ダウンロード中"),
"downloader_speed_limit_settings": MessageLookupByLibrary.simpleMessage(
"速度制限設定",
),
"downloader_title_downloading": MessageLookupByLibrary.simpleMessage(
"ダウンロード中",
),
"downloader_title_ended": MessageLookupByLibrary.simpleMessage("終了"),
"home_action_login_rsi_account":
MessageLookupByLibrary.simpleMessage("RSI アカウントログイン"),
"home_action_one_click_launch":
MessageLookupByLibrary.simpleMessage("ワンクリック起動"),
"home_holiday_countdown":
MessageLookupByLibrary.simpleMessage("祝日カウントダウン"),
"home_holiday_countdown_disclaimer":
MessageLookupByLibrary.simpleMessage(
"* 上記の祝日は手作業で収集・管理されているため、誤りがある可能性があります、フィードバックは歓迎する!!"),
"home_action_login_rsi_account": MessageLookupByLibrary.simpleMessage(
"RSI アカウントログイン",
),
"home_action_one_click_launch": MessageLookupByLibrary.simpleMessage(
"ワンクリック起動",
),
"home_holiday_countdown": MessageLookupByLibrary.simpleMessage("祝日カウントダウン"),
"home_holiday_countdown_disclaimer": MessageLookupByLibrary.simpleMessage(
"* 上記の祝日は手作業で収集・管理されているため、誤りがある可能性があります、フィードバックは歓迎する!!",
),
"home_login_action_title_box_one_click_launch":
MessageLookupByLibrary.simpleMessage("ボックスワンクリック起動"),
"home_login_action_title_need_webview2_runtime":
MessageLookupByLibrary.simpleMessage("WebView2 Runtime のインストールが必要"),
"home_login_info_action_ignore":
MessageLookupByLibrary.simpleMessage("無視する"),
"home_login_info_action_ignore": MessageLookupByLibrary.simpleMessage(
"無視する",
),
"home_login_info_game_version_outdated":
MessageLookupByLibrary.simpleMessage("ゲームバージョンが古すぎる"),
"home_login_info_one_click_launch_description":
MessageLookupByLibrary.simpleMessage(
"この機能は、ゲームをより便利に起動するのに役立ちます。\n\nアカウントのセキュリティを確保するため、この機能はローカライズブラウザを使用してログイン状態を保持し、パスワード情報を保存しません(自動入力オンの場合を除く)。\n\nこの機能を使用してアカウントにログインする際は、SCToolBox が信頼できるソースからダウンロードされていることを確認してください。"),
"この機能は、ゲームをより便利に起動するのに役立ちます。\n\nアカウントのセキュリティを確保するため、この機能はローカライズブラウザを使用してログイン状態を保持し、パスワード情報を保存しません(自動入力オンの場合を除く)。\n\nこの機能を使用してアカウントにログインする際は、SCToolBox が信頼できるソースからダウンロードされていることを確認してください。",
),
"home_login_info_rsi_server_report": m35,
"home_login_title_launching_game":
MessageLookupByLibrary.simpleMessage("ゲーム起動中..."),
"home_login_title_welcome_back":
MessageLookupByLibrary.simpleMessage("お帰りなさい!"),
"home_title_logging_in":
MessageLookupByLibrary.simpleMessage("ログイン中...")
"home_login_title_launching_game": MessageLookupByLibrary.simpleMessage(
"ゲーム起動中...",
),
"home_login_title_welcome_back": MessageLookupByLibrary.simpleMessage(
"お帰りなさい!",
),
"home_title_logging_in": MessageLookupByLibrary.simpleMessage("ログイン中..."),
};
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -18,15 +18,18 @@ class S {
static S? _current;
static S get current {
assert(_current != null,
'No instance of S was loaded. Try to initialize the S delegate before accessing S.current.');
assert(
_current != null,
'No instance of S was loaded. Try to initialize the S delegate before accessing S.current.',
);
return _current!;
}
static const AppLocalizationDelegate delegate = AppLocalizationDelegate();
static Future<S> load(Locale locale) {
final name = (locale.countryCode?.isEmpty ?? false)
final name =
(locale.countryCode?.isEmpty ?? false)
? locale.languageCode
: locale.toString();
final localeName = Intl.canonicalizedLocale(name);
@ -41,8 +44,10 @@ class S {
static S of(BuildContext context) {
final instance = S.maybeOf(context);
assert(instance != null,
'No instance of S present in the widget tree. Did you add S.delegate in localizationsDelegates?');
assert(
instance != null,
'No instance of S present in the widget tree. Did you add S.delegate in localizationsDelegates?',
);
return instance!;
}
@ -62,12 +67,7 @@ class S {
/// `en`
String get app_language_code {
return Intl.message(
'en',
name: 'app_language_code',
desc: '',
args: [],
);
return Intl.message('en', name: 'app_language_code', desc: '', args: []);
}
/// `SCToolBox V {v0} {v1}`
@ -382,12 +382,7 @@ class S {
/// `Close`
String get action_close {
return Intl.message(
'Close',
name: 'action_close',
desc: '',
args: [],
);
return Intl.message('Close', name: 'action_close', desc: '', args: []);
}
/// `Speed limit setting`
@ -1602,7 +1597,12 @@ class S {
/// `The game exits normally\nexitCode = {v0}\nstdout = {v1}\nstderr = {v2}\n\nDiagnostic information: {v3}\n{v4}`
String home_action_info_abnormal_game_exit(
Object v0, Object v1, Object v2, Object v3, Object v4) {
Object v0,
Object v1,
Object v2,
Object v3,
Object v4,
) {
return Intl.message(
'The game exits normally\nexitCode = $v0\nstdout = $v1\nstderr = $v2\n\nDiagnostic information: $v3\n$v4',
name: 'home_action_info_abnormal_game_exit',
@ -3053,7 +3053,12 @@ class S {
/// `System: {v0}\n\nProcessor: {v1}\n\nMemory size: {v2} gb\n\nGraphics card information:\n{v3}\n\nStorage information:\n{v4}\n\n`
String tools_action_info_system_info_content(
Object v0, Object v1, Object v2, Object v3, Object v4) {
Object v0,
Object v1,
Object v2,
Object v3,
Object v4,
) {
return Intl.message(
'System: $v0\n\nProcessor: $v1\n\nMemory size: $v2 gb\n\nGraphics card information:\n$v3\n\nStorage information:\n$v4\n\n',
name: 'tools_action_info_system_info_content',
@ -3424,12 +3429,7 @@ class S {
/// `Hint`
String get app_common_tip {
return Intl.message(
'Hint',
name: 'app_common_tip',
desc: '',
args: [],
);
return Intl.message('Hint', name: 'app_common_tip', desc: '', args: []);
}
/// `I understand`
@ -4654,7 +4654,8 @@ class S {
/// `Read the RSI Launcher information failure: {v0}`
String tools_rsi_launcher_enhance_msg_error_get_launcher_info_error_with_args(
Object v0) {
Object v0,
) {
return Intl.message(
'Read the RSI Launcher information failure: $v0',
name:
@ -5303,6 +5304,176 @@ class S {
args: [],
);
}
/// `Thank you for using SC Toolbox, I am its developer xkeyC.\nThe toolbox is committed to open source and providing free services to all players. Providing free services is a challenging task, and I would be grateful if you consider buying me a drink.\nThe donated funds will be used for server expenses, development of new features, and improving the motivation for software maintenance.`
String get support_dev_thanks_message {
return Intl.message(
'Thank you for using SC Toolbox, I am its developer xkeyC.\nThe toolbox is committed to open source and providing free services to all players. Providing free services is a challenging task, and I would be grateful if you consider buying me a drink.\nThe donated funds will be used for server expenses, development of new features, and improving the motivation for software maintenance.',
name: 'support_dev_thanks_message',
desc: '',
args: [],
);
}
/// `Thank you for using SC Toolbox, I am its developer xkeyC.\nThe toolbox is committed to open source and providing free services to all players.`
String get support_dev_thanks_message_part1 {
return Intl.message(
'Thank you for using SC Toolbox, I am its developer xkeyC.\nThe toolbox is committed to open source and providing free services to all players.',
name: 'support_dev_thanks_message_part1',
desc: '',
args: [],
);
}
/// `Providing free services is a challenging task, and I would be grateful if you consider buying me a drink.\nThe donated funds will be used for server expenses, development of new features, and improving the motivation for software maintenance.`
String get support_dev_thanks_message_part2 {
return Intl.message(
'Providing free services is a challenging task, and I would be grateful if you consider buying me a drink.\nThe donated funds will be used for server expenses, development of new features, and improving the motivation for software maintenance.',
name: 'support_dev_thanks_message_part2',
desc: '',
args: [],
);
}
/// `If you haven't registered the game or filled in a referral code yet, please consider using mine: STAR-3YXS-SWTC. Thank you for reading this far.`
String get support_dev_referral_code_message {
return Intl.message(
'If you haven\'t registered the game or filled in a referral code yet, please consider using mine: STAR-3YXS-SWTC. Thank you for reading this far.',
name: 'support_dev_referral_code_message',
desc: '',
args: [],
);
}
/// `Support the Developer`
String get support_dev_title {
return Intl.message(
'Support the Developer',
name: 'support_dev_title',
desc: '',
args: [],
);
}
/// `You can also star my project on GitHub`
String get support_dev_github_star_message {
return Intl.message(
'You can also star my project on GitHub',
name: 'support_dev_github_star_message',
desc: '',
args: [],
);
}
/// `Star Project`
String get support_dev_github_star_button {
return Intl.message(
'Star Project',
name: 'support_dev_github_star_button',
desc: '',
args: [],
);
}
/// `In-game Currency`
String get support_dev_in_game_currency_title {
return Intl.message(
'In-game Currency',
name: 'support_dev_in_game_currency_title',
desc: '',
args: [],
);
}
/// `Game ID: xkeyC`
String get support_dev_in_game_id {
return Intl.message(
'Game ID: xkeyC',
name: 'support_dev_in_game_id',
desc: '',
args: [],
);
}
/// `Game ID copied`
String get support_dev_in_game_id_copied {
return Intl.message(
'Game ID copied',
name: 'support_dev_in_game_id_copied',
desc: '',
args: [],
);
}
/// `Copy`
String get support_dev_copy_button {
return Intl.message(
'Copy',
name: 'support_dev_copy_button',
desc: '',
args: [],
);
}
/// `You can send me aUEC in the game as support, which will help me get a better gaming experience in limited time`
String get support_dev_in_game_currency_message {
return Intl.message(
'You can send me aUEC in the game as support, which will help me get a better gaming experience in limited time',
name: 'support_dev_in_game_currency_message',
desc: '',
args: [],
);
}
/// `Alipay`
String get support_dev_alipay {
return Intl.message(
'Alipay',
name: 'support_dev_alipay',
desc: '',
args: [],
);
}
/// `WeChat`
String get support_dev_wechat {
return Intl.message(
'WeChat',
name: 'support_dev_wechat',
desc: '',
args: [],
);
}
/// `* Please note: Donations are voluntary gifts, and you will not receive any additional benefits in software experience.`
String get support_dev_donation_disclaimer {
return Intl.message(
'* Please note: Donations are voluntary gifts, and you will not receive any additional benefits in software experience.',
name: 'support_dev_donation_disclaimer',
desc: '',
args: [],
);
}
/// `Back`
String get support_dev_back_button {
return Intl.message(
'Back',
name: 'support_dev_back_button',
desc: '',
args: [],
);
}
/// `Scroll down for more`
String get support_dev_scroll_hint {
return Intl.message(
'Scroll down for more',
name: 'support_dev_scroll_hint',
desc: '',
args: [],
);
}
}
class AppLocalizationDelegate extends LocalizationsDelegate<S> {

View File

@ -1007,5 +1007,22 @@
"input_method_support_updated_to_version": "Community input method support has been updated to: {v0}",
"input_method_auto_translate": "Bilingual translation:",
"input_method_auto_translate_dialog_title": "Enable bilingual translation?",
"input_method_auto_translate_dialog_title_content": "After use, you will use Google translation service to add English copies to your input content, which may lead to lagging response. If the function is abnormal, please close it. \n\nThe text will be forwarded to Google server, please refer to Google's privacy policy."
"input_method_auto_translate_dialog_title_content": "After use, you will use Google translation service to add English copies to your input content, which may lead to lagging response. If the function is abnormal, please close it. \n\nThe text will be forwarded to Google server, please refer to Google's privacy policy.",
"support_dev_thanks_message": "Thank you for using SC Toolbox, I am its developer xkeyC.\nThe toolbox is committed to open source and providing free services to all players. Providing free services is a challenging task, and I would be grateful if you consider buying me a drink.\nThe donated funds will be used for server expenses, development of new features, and improving the motivation for software maintenance.",
"support_dev_thanks_message_part1": "Thank you for using SC Toolbox, I am its developer xkeyC.\nThe toolbox is committed to open source and providing free services to all players.",
"support_dev_thanks_message_part2": "Providing free services is a challenging task, and I would be grateful if you consider buying me a drink.\nThe donated funds will be used for server expenses, development of new features, and improving the motivation for software maintenance.",
"support_dev_referral_code_message": "If you haven't registered the game or filled in a referral code yet, please consider using mine: STAR-3YXS-SWTC. Thank you for reading this far.",
"support_dev_title": "Support the Developer",
"support_dev_github_star_message": "You can also star my project on GitHub",
"support_dev_github_star_button": "Star Project",
"support_dev_in_game_currency_title": "In-game Currency",
"support_dev_in_game_id": "Game ID: xkeyC",
"support_dev_in_game_id_copied": "Game ID copied",
"support_dev_copy_button": "Copy",
"support_dev_in_game_currency_message": "You can send me aUEC in the game as support, which will help me get a better gaming experience in limited time",
"support_dev_alipay": "Alipay",
"support_dev_wechat": "WeChat",
"support_dev_donation_disclaimer": "* Please note: Donations are voluntary gifts, and you will not receive any additional benefits in software experience.",
"support_dev_back_button": "Back",
"support_dev_scroll_hint": "Scroll down for more"
}

View File

@ -840,5 +840,20 @@
"input_method_support_updated_to_version": "社区输入法支持已更新到:{v0}",
"input_method_auto_translate": "双语翻译:",
"input_method_auto_translate_dialog_title": "启用双语翻译?",
"input_method_auto_translate_dialog_title_content": "启用后,将使用 Google 翻译服务为您的输入内容增加英文副本,可能会导致响应滞后,若功能异常请关闭。\n\n文本将转发给 Google 服务器,请参阅 Google 的隐私政策。"
"input_method_auto_translate_dialog_title_content": "启用后,将使用 Google 翻译服务为您的输入内容增加英文副本,可能会导致响应滞后,若功能异常请关闭。\n\n文本将转发给 Google 服务器,请参阅 Google 的隐私政策。",
"support_dev_thanks_message": "感谢您使用 SC汉化盒子我是其开发者 xkeyC\n汉化盒子致力于开放源代码并为各位玩家提供免费的服务无偿的服务是一项充满挑战的工作若您考虑给我送点饮料钱我将不胜感激。\n捐赠的资金将用于服务器支出、新功能的开发以及提高软件维护的积极性。",
"support_dev_referral_code_message": "如果您还没有注册游戏或填写邀请码,可以考虑我的: STAR-3YXS-SWTC ,感谢你看到这里",
"support_dev_title": "支持开发者",
"support_dev_github_star_message": "您也可以在 GitHub 上给我的项目点个 Star",
"support_dev_github_star_button": "Star 项目",
"support_dev_in_game_currency_title": "游戏内货币",
"support_dev_in_game_id": "游戏ID: xkeyC",
"support_dev_in_game_id_copied": "游戏ID已复制",
"support_dev_copy_button": "复制",
"support_dev_in_game_currency_message": "您可以在游戏中向我发送 aUEC 作为支持,这将会帮助我在有限的时间里获得更好的游戏体验",
"support_dev_alipay": "支付宝",
"support_dev_wechat": "微信",
"support_dev_donation_disclaimer": "* 请注意:捐赠是无偿赠与,您不会在软件体验上获得额外好处。",
"support_dev_back_button": "返回",
"support_dev_scroll_hint": "下滑查看更多"
}

View File

@ -840,5 +840,22 @@
"input_method_support_updated_to_version": "社區輸入法支持已更新到:{v0}",
"input_method_auto_translate": "雙語翻譯:",
"input_method_auto_translate_dialog_title": "啟用雙語翻譯?",
"input_method_auto_translate_dialog_title_content": "啟用後,將使用 Google 翻譯服務為您的輸入內容增加英文副本,可能會導致響應滯後,若功能異常請關閉。 \n\n文本將轉發給 Google 服務器,請參閱 Google 的隱私政策。"
"input_method_auto_translate_dialog_title_content": "啟用後,將使用 Google 翻譯服務為您的輸入內容增加英文副本,可能會導致響應滯後,若功能異常請關閉。 \n\n文本將轉發給 Google 服務器,請參閱 Google 的隱私政策。",
"support_dev_thanks_message": "感謝您使用 SC工具箱我是其開發者 xkeyC\n工具箱致力於開放原始碼並為各位玩家提供免費的服務無償的服務是一項充滿挑戰的工作若您考慮給我送點飲料錢我將不勝感激。\n捐贈的資金將用於伺服器支出、新功能的開發以及提高軟體維護的積極性。",
"support_dev_thanks_message_part1": "感謝您使用 SC工具箱我是其開發者 xkeyC\n工具箱致力於開放原始碼並為各位玩家提供免費的服務",
"support_dev_thanks_message_part2": "無償的服務是一項充滿挑戰的工作,若您考慮給我送點飲料錢,我將不勝感激。\n捐贈的資金將用於伺服器支出、新功能的開發以及提高軟體維護的積極性。",
"support_dev_referral_code_message": "如果您還沒有註冊遊戲或填寫邀請碼,可以考慮我的: STAR-3YXS-SWTC ,感謝你看到這裡",
"support_dev_title": "支持開發者",
"support_dev_github_star_message": "您也可以在 GitHub 上給我的專案點個 Star",
"support_dev_github_star_button": "Star 專案",
"support_dev_in_game_currency_title": "遊戲內貨幣",
"support_dev_in_game_id": "遊戲ID: xkeyC",
"support_dev_in_game_id_copied": "遊戲ID已複製",
"support_dev_copy_button": "複製",
"support_dev_in_game_currency_message": "您可以在遊戲中向我發送 aUEC 作為支持,這將會幫助我在有限的時間裡獲得更好的遊戲體驗",
"support_dev_alipay": "支付寶",
"support_dev_wechat": "微信",
"support_dev_donation_disclaimer": "* 請注意:捐贈是無償贈與,您不會在軟體體驗上獲得額外好處。",
"support_dev_back_button": "返回",
"support_dev_scroll_hint": "下滑查看更多"
}

View File

@ -1,7 +1,9 @@
import 'package:fluent_ui/fluent_ui.dart';
import 'package:flutter/services.dart';
import 'package:flutter_hooks/flutter_hooks.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:qr_flutter/qr_flutter.dart';
import 'package:starcitizen_doctor/api/analytics.dart';
import 'package:starcitizen_doctor/app.dart';
import 'package:starcitizen_doctor/common/conf/conf.dart';
@ -16,8 +18,23 @@ class AboutUI extends HookConsumerWidget {
@override
Widget build(BuildContext context, WidgetRef ref) {
final isTipTextCn = useState(false);
final pageCtrl = usePageController();
return Center(
return PageView(
scrollDirection: Axis.vertical,
controller: pageCtrl,
children: [
_makeAbout(context, ref, isTipTextCn, pageCtrl),
_makeDonate(context, ref, pageCtrl),
],
);
}
Widget _makeAbout(BuildContext context, WidgetRef ref,
ValueNotifier<bool> isTipTextCn, PageController pageCtrl) {
return Stack(
children: [
Center(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
@ -96,6 +113,319 @@ class AboutUI extends HookConsumerWidget {
const SizedBox(height: 12),
],
),
),
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,
];
return Container(
width: double.infinity,
padding: const EdgeInsets.symmetric(horizontal: 24),
child: Column(
children: [
const SizedBox(height: 8),
makeNavButton(pageCtrl, 0),
const SizedBox(height: 12),
Text(
S.current.support_dev_title,
style: const TextStyle(fontSize: 24, fontWeight: FontWeight.bold),
),
const SizedBox(height: 32),
//
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
ClipRRect(
borderRadius: BorderRadius.circular(25),
child: CacheNetImage(
url:
"https://git.scbox.xkeyc.cn/avatars/56a93334e892ba48f4fab453b8205624d661e4f7748cdb52bed47e5dc0c85de5?size=512",
width: 50,
height: 50,
fit: BoxFit.cover,
),
),
const SizedBox(width: 12),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
for (var i = 0; i < bubbleMessages.length; i++)
Padding(
padding: const EdgeInsets.only(bottom: 8),
child: SelectionArea(
child: ChatBubble(message: bubbleMessages[i])),
),
],
),
),
],
),
const SizedBox(height: 32),
//
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
_donationMethodButton(
context: context,
title: 'WeChat',
icon: FontAwesomeIcons.weixin,
isSelected: donationTypeNotifier.value == 'wechat',
color: const Color(0xFF07C160),
onTap: () => donationTypeNotifier.value = 'wechat',
),
_donationMethodButton(
context: context,
title: 'AliPay',
icon: FontAwesomeIcons.alipay,
isSelected: donationTypeNotifier.value == 'alipay',
color: const Color(0xFF1677FF),
onTap: () => donationTypeNotifier.value = 'alipay',
),
_donationMethodButton(
context: context,
title: 'QQ',
icon: FontAwesomeIcons.qq,
isSelected: donationTypeNotifier.value == 'qq',
color: const Color(0xFF12B7F5),
onTap: () => donationTypeNotifier.value = 'qq',
),
_donationMethodButton(
context: context,
title: 'aUEC',
icon: FontAwesomeIcons.gamepad,
isSelected: donationTypeNotifier.value == 'uec',
color: const Color(0xFFFFD700),
onTap: () => donationTypeNotifier.value = 'uec',
),
_donationMethodButton(
context: context,
title: 'GitHub',
icon: FontAwesomeIcons.github,
isSelected: donationTypeNotifier.value == 'github',
color: Colors.white,
onTap: () => donationTypeNotifier.value = 'github',
),
],
),
const SizedBox(height: 24),
//
Container(
constraints: BoxConstraints(minHeight: 300),
child: AnimatedSwitcher(
duration: const Duration(milliseconds: 300),
transitionBuilder: (Widget child, Animation<double> animation) {
return FadeTransition(opacity: animation, child: child);
},
child: _buildDonationQRCode(donationTypeNotifier.value, context),
),
),
const SizedBox(height: 48),
],
),
);
}
Widget _donationMethodButton({
required BuildContext context,
required String title,
required IconData icon,
required bool isSelected,
required Color color,
required VoidCallback onTap,
}) {
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())),
padding: WidgetStateProperty.all(
EdgeInsets.symmetric(horizontal: 16, vertical: 8)),
),
onPressed: onTap,
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Icon(icon, color: color, size: 24),
const SizedBox(height: 4),
Text(title, style: TextStyle(fontSize: 12)),
],
),
),
);
}
Widget _buildDonationQRCode(String type, BuildContext context) {
// GitHub
if (type == 'github') {
return Column(
mainAxisAlignment: MainAxisAlignment.center,
key: ValueKey('github'),
children: [
SizedBox(height: 28),
const Icon(FontAwesomeIcons.github, size: 64),
const SizedBox(height: 32),
Text(S.current.support_dev_github_star_message),
const SizedBox(height: 32),
Button(
onPressed: () {
launchUrlString("https://github.com/StarCitizenToolBox/app");
},
child: Padding(
padding: const EdgeInsets.all(8),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
const Icon(FontAwesomeIcons.github),
const SizedBox(width: 12),
Text(S.current.support_dev_github_star_button),
],
),
),
),
],
);
}
// UEC
if (type == 'uec') {
return Column(
key: ValueKey('uec'),
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)),
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(S.current.support_dev_in_game_id,
style: TextStyle(fontSize: 16)),
const SizedBox(width: 12),
Button(
onPressed: () {
// ${S.current.support_dev_copy_button}ID到剪贴板
Clipboard.setData(ClipboardData(text: "xkeyC"));
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,
),
],
);
}
//
String qrData;
String title;
switch (type) {
case 'alipay':
qrData = DonationQrCodeData.alipay;
title = S.current.support_dev_alipay;
break;
case 'wechat':
qrData = DonationQrCodeData.wechat;
title = S.current.support_dev_wechat;
break;
case 'qq':
qrData = DonationQrCodeData.qq;
title = "QQ";
break;
default:
qrData = "";
title = "";
break;
}
return Column(
key: ValueKey(type),
children: [
Text(title,
style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold)),
const SizedBox(height: 16),
Container(
width: 200,
height: 200,
padding: const EdgeInsets.all(16),
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),
),
],
);
}
Widget makeNavButton(PageController pageCtrl, int pageIndex) {
return IconButton(
icon: Row(
mainAxisSize: MainAxisSize.min,
children: [
Icon(
pageIndex == 0
? FluentIcons.chevron_up
: FluentIcons.chevron_down,
size: 12),
SizedBox(width: 8),
Text(pageIndex == 0
? S.current.support_dev_back_button
: S.current.support_dev_scroll_hint),
],
),
onPressed: () => pageCtrl.animateToPage(pageIndex,
duration: const Duration(milliseconds: 300), curve: Curves.ease),
);
}
@ -285,3 +615,38 @@ class AboutUI extends HookConsumerWidget {
}
}
}
class ChatBubble extends StatelessWidget {
final String message;
const ChatBubble({super.key, required this.message});
@override
Widget build(BuildContext context) {
return Container(
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 10),
decoration: BoxDecoration(
color:
FluentTheme.of(context).accentColor.withAlpha((255.0 * .2).round()),
borderRadius: BorderRadius.only(
topLeft: Radius.circular(4),
topRight: Radius.circular(18),
bottomLeft: Radius.circular(18),
bottomRight: Radius.circular(18),
),
),
child: Text(
message,
style: TextStyle(fontSize: 14),
),
);
}
}
class DonationQrCodeData {
static const alipay = "https://qr.alipay.com/tsx16308c4uai0ticmz4j96";
static const wechat =
"wxp://f2f0J40rTCX7Vt79yooWNbiqH3U6UmwGJkqjcAYnrv9OZVzKyS5_W6trp8mo3KP-CTQ5";
static const qq =
"https://i.qianbao.qq.com/wallet/sqrcode.htm?m=tenpay&f=wallet&a=1&u=3334969096&n=xkeyC&ac=CAEQiK6etgwY8ZuKvgYyGOa1geWKqOaRiuS9jee7j-iQpeaUtuasvjgBQiAzY2Y4NWY3MDI1MWUxYWEwMGYyN2Q0OTM4Y2U2ODFlMw%3D%3D_xxx_sign";
}