增加权限提示

This commit is contained in:
2023-11-10 22:10:27 +08:00
parent 52591f4899
commit 70f5b301c3
2 changed files with 19 additions and 2 deletions

View File

@ -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!,