mirror of
https://mirror.ghproxy.com/https://github.com/StarCitizenToolBox/app.git
synced 2024-12-23 07:43:42 +08:00
增加权限提示
This commit is contained in:
parent
52591f4899
commit
70f5b301c3
@ -162,6 +162,9 @@ class HomeUIModel extends BaseUIModel {
|
||||
VoidCallback? doCheck() {
|
||||
if (isChecking) return null;
|
||||
return () async {
|
||||
if (!AppConf.isRunningAdmin) {
|
||||
await showToast(context!, "因微软商店版本权限限制,若功能异常请 关闭盒子,右键 '以管理员身份运行'。");
|
||||
}
|
||||
isChecking = true;
|
||||
lastScreenInfo = "正在分析...";
|
||||
await _statCheck();
|
||||
@ -357,7 +360,7 @@ class HomeUIModel extends BaseUIModel {
|
||||
["explorer.exe", "/select,\"$rsiLauncherInstalledPath\""]);
|
||||
}
|
||||
|
||||
onMenuTap(String key) {
|
||||
onMenuTap(String key) async {
|
||||
switch (key) {
|
||||
case "auto_check":
|
||||
doCheck()?.call();
|
||||
@ -367,6 +370,9 @@ class HomeUIModel extends BaseUIModel {
|
||||
showToast(context!, "该功能需要一个有效的安装位置");
|
||||
return;
|
||||
}
|
||||
if (!AppConf.isRunningAdmin) {
|
||||
await showToast(context!, "因微软商店版本权限限制,若功能异常请 关闭盒子,右键 '以管理员身份运行'。");
|
||||
}
|
||||
showDialog(
|
||||
context: context!,
|
||||
dismissWithEsc: false,
|
||||
@ -381,6 +387,9 @@ class HomeUIModel extends BaseUIModel {
|
||||
showToast(context!, "该功能需要一个有效的安装位置");
|
||||
return;
|
||||
}
|
||||
if (!AppConf.isRunningAdmin) {
|
||||
await showToast(context!, "因微软商店版本权限限制,若功能异常请 关闭盒子,右键 '以管理员身份运行'。");
|
||||
}
|
||||
AnalyticsApi.touch("performance_launch");
|
||||
BaseUIContainer(
|
||||
uiCreate: () => PerformanceUI(),
|
||||
|
@ -211,6 +211,9 @@ class ToolsUIModel extends BaseUIModel {
|
||||
showToast(context!, "该功能需要一个有效的游戏安装目录");
|
||||
return;
|
||||
}
|
||||
if (!AppConf.isRunningAdmin) {
|
||||
await showToast(context!, "因微软商店版本权限限制,若功能异常请 关闭盒子,右键 '以管理员身份运行'。");
|
||||
}
|
||||
working = true;
|
||||
try {
|
||||
final eacPath = "$scInstalledPath\\EasyAntiCheat";
|
||||
@ -289,7 +292,8 @@ class ToolsUIModel extends BaseUIModel {
|
||||
}
|
||||
|
||||
openDir(path) async {
|
||||
await Process.run(SystemHelper.powershellPath, ["explorer.exe", "/select,\"$path\""]);
|
||||
await Process.run(
|
||||
SystemHelper.powershellPath, ["explorer.exe", "/select,\"$path\""]);
|
||||
}
|
||||
|
||||
Future _showSystemInfo() async {
|
||||
@ -350,6 +354,10 @@ class ToolsUIModel extends BaseUIModel {
|
||||
"P4k 是星际公民的核心游戏文件,高达近 100GB,盒子提供的离线下载是为了帮助一些p4k文件下载超级慢的用户。"
|
||||
"\n\n接下来会弹窗询问您保存位置(可以选择星际公民文件夹也可以选择别处),下载完成后请确保 P4K 文件夹位于 LIVE 文件夹内,之后使用星际公民启动器校验更新即可。");
|
||||
|
||||
if (!AppConf.isRunningAdmin) {
|
||||
await showToast(context!, "因微软商店版本权限限制,若功能异常请 关闭盒子,右键 '以管理员身份运行'。");
|
||||
}
|
||||
|
||||
AnalyticsApi.touch("p4k_download");
|
||||
final r = await showDialog(
|
||||
context: context!,
|
||||
|
Loading…
Reference in New Issue
Block a user