mirror of
https://mirror.ghproxy.com/https://github.com/StarCitizenToolBox/app.git
synced 2024-12-23 00:33:42 +08:00
ui optimization
This commit is contained in:
parent
6a6360540b
commit
8c6c980bb8
@ -719,8 +719,8 @@ class MessageLookup extends MessageLookupByLibrary {
|
||||
"localization_info_remove_incompatible_translation_params":
|
||||
MessageLookupByLibrary.simpleMessage(
|
||||
"Whether to remove incompatible Localization parameters"),
|
||||
"localization_info_translation_status":
|
||||
MessageLookupByLibrary.simpleMessage("Localization status"),
|
||||
"localization_info_translation":
|
||||
MessageLookupByLibrary.simpleMessage("Game localization"),
|
||||
"localization_info_unavailable":
|
||||
MessageLookupByLibrary.simpleMessage("Unavailable"),
|
||||
"localization_info_update_time": m40,
|
||||
|
@ -646,8 +646,8 @@ class MessageLookup extends MessageLookupByLibrary {
|
||||
"localization_info_note": MessageLookupByLibrary.simpleMessage("备注:"),
|
||||
"localization_info_remove_incompatible_translation_params":
|
||||
MessageLookupByLibrary.simpleMessage("是否移除不兼容的汉化参数"),
|
||||
"localization_info_translation_status":
|
||||
MessageLookupByLibrary.simpleMessage("汉化状态"),
|
||||
"localization_info_translation":
|
||||
MessageLookupByLibrary.simpleMessage("游戏汉化"),
|
||||
"localization_info_unavailable":
|
||||
MessageLookupByLibrary.simpleMessage("不可用"),
|
||||
"localization_info_update_time": m40,
|
||||
|
@ -649,8 +649,8 @@ class MessageLookup extends MessageLookupByLibrary {
|
||||
"localization_info_note": MessageLookupByLibrary.simpleMessage("備註:"),
|
||||
"localization_info_remove_incompatible_translation_params":
|
||||
MessageLookupByLibrary.simpleMessage("是否移除不相容的翻譯參數"),
|
||||
"localization_info_translation_status":
|
||||
MessageLookupByLibrary.simpleMessage("翻譯狀態"),
|
||||
"localization_info_translation":
|
||||
MessageLookupByLibrary.simpleMessage("遊戲翻譯"),
|
||||
"localization_info_unavailable":
|
||||
MessageLookupByLibrary.simpleMessage("無法使用"),
|
||||
"localization_info_update_time": m40,
|
||||
|
@ -1661,11 +1661,11 @@ class S {
|
||||
);
|
||||
}
|
||||
|
||||
/// `Localization status`
|
||||
String get localization_info_translation_status {
|
||||
/// `Game localization`
|
||||
String get localization_info_translation {
|
||||
return Intl.message(
|
||||
'Localization status',
|
||||
name: 'localization_info_translation_status',
|
||||
'Game localization',
|
||||
name: 'localization_info_translation',
|
||||
desc: '',
|
||||
args: [],
|
||||
);
|
||||
|
@ -323,8 +323,8 @@
|
||||
"@home_action_info_warning": {},
|
||||
"localization_info_machine_translation_warning": "You are using the game built -in text. The official text is currently a machine translation (as of 3.21.0), and it is recommended that you install community Localization below.",
|
||||
"@localization_info_machine_translation_warning": {},
|
||||
"localization_info_translation_status": "Localization status",
|
||||
"@localization_info_translation_status": {},
|
||||
"localization_info_translation": "Game localization",
|
||||
"@localization_info_translation": {},
|
||||
"localization_info_enabled": "Enable ({v0}):",
|
||||
"@localization_info_enabled": {},
|
||||
"localization_info_installed_version": "The installed version: {v0}",
|
||||
|
@ -322,8 +322,8 @@
|
||||
"@home_action_info_warning": {},
|
||||
"localization_info_machine_translation_warning": "您正在使用游戏内置文本,官方文本目前为机器翻译(截至3.21.0),建议您在下方安装社区汉化。",
|
||||
"@localization_info_machine_translation_warning": {},
|
||||
"localization_info_translation_status": "汉化状态",
|
||||
"@localization_info_translation_status": {},
|
||||
"localization_info_translation": "游戏汉化",
|
||||
"@localization_info_translation": {},
|
||||
"localization_info_enabled": "启用({v0}):",
|
||||
"@localization_info_enabled": {},
|
||||
"localization_info_installed_version": "已安装版本:{v0}",
|
||||
|
@ -322,8 +322,8 @@
|
||||
"@home_action_info_warning": {},
|
||||
"localization_info_machine_translation_warning": "您目前正在使用遊戲內建翻譯文件,官方內建文件截止至 3.21.0 都是機器翻譯,建議安裝下方提供的社群翻譯或是來自其他來源的社群翻譯文件。",
|
||||
"@localization_info_machine_translation_warning": {},
|
||||
"localization_info_translation_status": "翻譯狀態",
|
||||
"@localization_info_translation_status": {},
|
||||
"localization_info_translation": "遊戲翻譯",
|
||||
"@localization_info_translation": {},
|
||||
"localization_info_enabled": "啟用({v0}):",
|
||||
"@localization_info_enabled": {},
|
||||
"localization_info_installed_version": "已安裝:{v0}",
|
||||
|
@ -7,7 +7,6 @@ import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:starcitizen_doctor/api/analytics.dart';
|
||||
import 'package:starcitizen_doctor/common/helper/system_helper.dart';
|
||||
import 'package:starcitizen_doctor/ui/tools/tools_ui_model.dart';
|
||||
import 'package:starcitizen_doctor/widgets/widgets.dart';
|
||||
import 'package:url_launcher/url_launcher_string.dart';
|
||||
@ -168,15 +167,6 @@ class HomeUI extends HookConsumerWidget {
|
||||
),
|
||||
)),
|
||||
const SizedBox(width: 12),
|
||||
Button(
|
||||
onPressed: () =>
|
||||
SystemHelper.openDir("${homeState.scInstalledPath}"),
|
||||
child: const Padding(
|
||||
padding: EdgeInsets.all(6),
|
||||
child: Icon(FluentIcons.folder_open),
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 12),
|
||||
Button(
|
||||
onPressed: model.reScanPath,
|
||||
child: const Padding(
|
||||
|
@ -77,8 +77,9 @@ class LocalizationDialogUI extends HookConsumerWidget {
|
||||
}),
|
||||
),
|
||||
),
|
||||
makeToolsListContainer(context, model, state),
|
||||
makeListContainer(
|
||||
S.current.localization_info_translation_status,
|
||||
S.current.localization_info_translation,
|
||||
[
|
||||
if (state.patchStatus == null)
|
||||
makeLoading(context)
|
||||
@ -140,30 +141,41 @@ class LocalizationDialogUI extends HookConsumerWidget {
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
],
|
||||
context),
|
||||
makeListContainer(
|
||||
S.current.localization_info_community_translation,
|
||||
[
|
||||
const SizedBox(height: 12),
|
||||
Container(
|
||||
color: Colors.white.withOpacity(.1),
|
||||
height: 1,
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
if (state.apiLocalizationData == null)
|
||||
makeLoading(context)
|
||||
else if (state.apiLocalizationData!.isEmpty)
|
||||
Center(
|
||||
child: Text(
|
||||
S.current.localization_info_no_translation_available,
|
||||
S.current
|
||||
.localization_info_no_translation_available,
|
||||
style: TextStyle(
|
||||
fontSize: 13,
|
||||
color: Colors.white.withOpacity(.8)),
|
||||
),
|
||||
)
|
||||
else
|
||||
for (final item in state.apiLocalizationData!.entries)
|
||||
makeRemoteList(context, model, item, state),
|
||||
AlignedGridView.count(
|
||||
crossAxisCount: 2,
|
||||
crossAxisSpacing: 12,
|
||||
mainAxisSpacing: 12,
|
||||
itemBuilder: (BuildContext context, int index) {
|
||||
final item = state.apiLocalizationData!.entries
|
||||
.elementAt(index);
|
||||
return makeRemoteList(context, model, item, state);
|
||||
},
|
||||
shrinkWrap: true,
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
itemCount: state.apiLocalizationData?.length ?? 0,
|
||||
)
|
||||
],
|
||||
context,
|
||||
gridViewMode: true),
|
||||
makeToolsListContainer(context, model, state),
|
||||
],
|
||||
context),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
@ -220,7 +220,14 @@ class ToolsUI extends HookConsumerWidget {
|
||||
padding: EdgeInsets.all(6),
|
||||
child: Icon(FluentIcons.folder_open),
|
||||
),
|
||||
onPressed: () => model.openDir(state.scInstalledPath))
|
||||
onPressed: () {
|
||||
if (state.scInstalledPath.trim().isEmpty) {
|
||||
showToast(context,
|
||||
S.current.tools_action_info_star_citizen_not_found);
|
||||
return;
|
||||
}
|
||||
model.openDir(state.scInstalledPath);
|
||||
})
|
||||
],
|
||||
);
|
||||
}
|
||||
@ -258,7 +265,16 @@ class ToolsUI extends HookConsumerWidget {
|
||||
padding: EdgeInsets.all(6),
|
||||
child: Icon(FluentIcons.folder_open),
|
||||
),
|
||||
onPressed: () => model.openDir(state.rsiLauncherInstalledPath))
|
||||
onPressed: () {
|
||||
if (state.scInstalledPath.trim().isEmpty) {
|
||||
showToast(
|
||||
context,
|
||||
S.current
|
||||
.tools_rsi_launcher_enhance_msg_error_launcher_notfound);
|
||||
return;
|
||||
}
|
||||
model.openDir(state.rsiLauncherInstalledPath);
|
||||
})
|
||||
],
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user