增加查看log的选项

This commit is contained in:
xkeyC 2024-03-01 21:05:05 +08:00
parent e7016ccfe2
commit e90bce2c1c
2 changed files with 9 additions and 0 deletions

View File

@ -60,6 +60,11 @@ class SettingUI extends BaseUI<SettingUIModel> {
"使用镜像服务器加速访问 Dps Uex 等工具网站,若访问异常请关闭该功能。 为保护账户安全任何情况下都不会加速RSI官网。",
onSwitch: model.onChangeToolSiteMirror,
switchStatus: model.isEnableToolSiteMirrors),
const SizedBox(height: 12),
makeSettingsItem(
const Icon(FluentIcons.document_set, size: 20), "查看log",
onTap: () => model.showLogs(),
subTitle: "查看汉化盒子的 log 文件,以定位盒子的 bug"),
],
),
);

View File

@ -190,4 +190,8 @@ class SettingUIModel extends BaseUIModel {
await userBox.put("isEnableToolSiteMirrors", isEnableToolSiteMirrors);
notifyListeners();
}
showLogs() async {
SystemHelper.openDir(AppConf.appLogFile?.absolute.path);
}
}