mirror of
https://mirror.ghproxy.com/https://github.com/StarCitizenToolBox/app.git
synced 2025-02-06 04:34:29 +08:00
fix
This commit is contained in:
parent
b2f8aa4ac4
commit
b8edc42666
@ -1,5 +1,3 @@
|
||||
import 'package:fluent_ui/fluent_ui.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:starcitizen_doctor/main.dart';
|
||||
import 'package:starcitizen_doctor/widgets/my_page_route.dart';
|
||||
@ -82,10 +80,6 @@ abstract class BaseUI<T extends BaseUIModel>
|
||||
|
||||
Widget? getFloatingActionButton(BuildContext context, T model) => null;
|
||||
|
||||
FloatingActionButtonLocation? getFloatingActionButtonLocation(
|
||||
BuildContext context, T model) =>
|
||||
null;
|
||||
|
||||
bool getDrawerEnableOpenDragGesture(BuildContext context, T model) => true;
|
||||
|
||||
Widget? getDrawer(BuildContext context, T model) => null;
|
||||
@ -148,32 +142,6 @@ abstract class BaseUI<T extends BaseUIModel>
|
||||
FocusManager.instance.primaryFocus?.unfocus();
|
||||
}
|
||||
|
||||
Widget errorBody(BuildContext context, Widget? child, T model) {
|
||||
if (model.uiErrorMsg.isNotEmpty) {
|
||||
// 全局错误信息
|
||||
return InkWell(
|
||||
child: Center(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Text(
|
||||
"Error",
|
||||
style: Theme.of(context).textTheme.bodyLarge,
|
||||
),
|
||||
const SizedBox(
|
||||
height: 6,
|
||||
),
|
||||
Text(model.uiErrorMsg),
|
||||
],
|
||||
)),
|
||||
onTap: () async {
|
||||
await model.onErrorReloadData();
|
||||
},
|
||||
);
|
||||
}
|
||||
if (child == null) return makeLoading(context);
|
||||
return child;
|
||||
}
|
||||
|
||||
// void updateStatusBarIconColor(BuildContext context) {
|
||||
// SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle(
|
||||
|
@ -1,4 +1,3 @@
|
||||
import 'package:flutter_tilt/flutter_tilt.dart';
|
||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||
import 'package:starcitizen_doctor/base/ui.dart';
|
||||
import 'package:starcitizen_doctor/common/conf/app_conf.dart';
|
||||
|
@ -72,17 +72,25 @@ class ToolsUIModel extends BaseUIModel {
|
||||
"以管理员身份运行RSI启动器,可能会解决一些问题。\n\n若设置了能效核心屏蔽参数,也会在此应用。",
|
||||
const Icon(FluentIcons.admin, size: 28),
|
||||
onTap: _adminRSILauncher,
|
||||
)
|
||||
),
|
||||
if (scInstalledPath != "")
|
||||
_ToolsItemData(
|
||||
"game_log_select",
|
||||
"游戏 Game.log 查看",
|
||||
"打开 Game.log 所在文件夹",
|
||||
const Icon(FontAwesomeIcons.bookBible, size: 28),
|
||||
onTap: _selectGameLog,
|
||||
),
|
||||
];
|
||||
isItemLoading = true;
|
||||
items.add(await _addShaderCard());
|
||||
notifyListeners();
|
||||
items.add(await _addPhotographyCard());
|
||||
notifyListeners();
|
||||
items.addAll(await _addLogCard());
|
||||
notifyListeners();
|
||||
items.addAll(await _addNvmePatchCard());
|
||||
notifyListeners();
|
||||
items.add(await _addShaderCard());
|
||||
notifyListeners();
|
||||
items.add(await _addPhotographyCard());
|
||||
// close loading
|
||||
isItemLoading = false;
|
||||
notifyListeners();
|
||||
@ -301,6 +309,10 @@ class ToolsUIModel extends BaseUIModel {
|
||||
working = false;
|
||||
}
|
||||
|
||||
Future<void> _selectGameLog() async {
|
||||
openDir("$scInstalledPath\\Game.log");
|
||||
}
|
||||
|
||||
Future<void> _selectLog() async {
|
||||
final path = await SCLoggerHelper.getLogFilePath();
|
||||
if (path == null) return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user