mirror of
https://mirror.ghproxy.com/https://github.com/StarCitizenToolBox/app.git
synced 2024-12-23 06:33:43 +08:00
This commit is contained in:
parent
9ddce61b49
commit
9ab6f6056c
@ -22,4 +22,6 @@ class URLConf {
|
|||||||
static const rssTextUrl1 = "$_rssHomeUrl/bilibili/user/article/40102960";
|
static const rssTextUrl1 = "$_rssHomeUrl/bilibili/user/article/40102960";
|
||||||
static const rssTextUrl2 =
|
static const rssTextUrl2 =
|
||||||
"$_rssHomeUrl/baidu/tieba/user/%E7%81%AC%E7%81%ACG%E7%81%AC%E7%81%AC&";
|
"$_rssHomeUrl/baidu/tieba/user/%E7%81%AC%E7%81%ACG%E7%81%AC%E7%81%AC&";
|
||||||
|
|
||||||
|
static const feedbackUrl = "https://txc.qq.com/products/614843";
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||||
import 'package:starcitizen_doctor/base/ui.dart';
|
import 'package:starcitizen_doctor/base/ui.dart';
|
||||||
import 'package:starcitizen_doctor/common/conf/app_conf.dart';
|
import 'package:starcitizen_doctor/common/conf/app_conf.dart';
|
||||||
|
import 'package:starcitizen_doctor/common/conf/url_conf.dart';
|
||||||
import 'package:url_launcher/url_launcher_string.dart';
|
import 'package:url_launcher/url_launcher_string.dart';
|
||||||
|
|
||||||
import 'about_ui_model.dart';
|
import 'about_ui_model.dart';
|
||||||
@ -59,7 +60,7 @@ class AboutUI extends BaseUI<AboutUIModel> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
launchUrlString("https://txc.qq.com/products/614843");
|
launchUrlString(URLConf.feedbackUrl);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
const SizedBox(width: 24),
|
const SizedBox(width: 24),
|
||||||
|
@ -64,18 +64,35 @@ class LocalizationUI extends BaseUI<LocalizationUIModel> {
|
|||||||
Text("已安装版本:${model.patchStatus?.value}"),
|
Text("已安装版本:${model.patchStatus?.value}"),
|
||||||
const Spacer(),
|
const Spacer(),
|
||||||
if (model.patchStatus?.value != "游戏内置")
|
if (model.patchStatus?.value != "游戏内置")
|
||||||
Button(
|
Row(
|
||||||
onPressed: model.doDelIniFile(),
|
children: [
|
||||||
child: const Padding(
|
Button(
|
||||||
padding: EdgeInsets.all(4),
|
onPressed: model.goFeedback,
|
||||||
child: Row(
|
child: const Padding(
|
||||||
children: [
|
padding: EdgeInsets.all(4),
|
||||||
Icon(FluentIcons.delete),
|
child: Row(
|
||||||
SizedBox(width: 6),
|
children: [
|
||||||
Text("删除"),
|
Icon(FluentIcons.feedback),
|
||||||
],
|
SizedBox(width: 6),
|
||||||
),
|
Text("汉化反馈"),
|
||||||
)),
|
],
|
||||||
|
),
|
||||||
|
)),
|
||||||
|
const SizedBox(width: 16),
|
||||||
|
Button(
|
||||||
|
onPressed: model.doDelIniFile(),
|
||||||
|
child: const Padding(
|
||||||
|
padding: EdgeInsets.all(4),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Icon(FluentIcons.delete),
|
||||||
|
SizedBox(width: 6),
|
||||||
|
Text("卸载汉化"),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)),
|
||||||
|
],
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
AnimatedSize(
|
AnimatedSize(
|
||||||
|
@ -11,6 +11,7 @@ import 'package:starcitizen_doctor/common/conf/app_conf.dart';
|
|||||||
import 'package:starcitizen_doctor/common/conf/url_conf.dart';
|
import 'package:starcitizen_doctor/common/conf/url_conf.dart';
|
||||||
import 'package:starcitizen_doctor/common/helper/system_helper.dart';
|
import 'package:starcitizen_doctor/common/helper/system_helper.dart';
|
||||||
import 'package:starcitizen_doctor/data/sc_localization_data.dart';
|
import 'package:starcitizen_doctor/data/sc_localization_data.dart';
|
||||||
|
import 'package:url_launcher/url_launcher_string.dart';
|
||||||
|
|
||||||
class LocalizationUIModel extends BaseUIModel {
|
class LocalizationUIModel extends BaseUIModel {
|
||||||
final String scInstallPath;
|
final String scInstallPath;
|
||||||
@ -273,9 +274,9 @@ class LocalizationUIModel extends BaseUIModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
VoidCallback? doDelIniFile() {
|
VoidCallback? doDelIniFile() {
|
||||||
final iniFile = File(
|
|
||||||
"${scDataDir.absolute.path}\\Localization\\$selectedLanguage\\global.ini");
|
|
||||||
return () async {
|
return () async {
|
||||||
|
final iniFile = File(
|
||||||
|
"${scDataDir.absolute.path}\\Localization\\$selectedLanguage\\global.ini");
|
||||||
if (await iniFile.exists()) await iniFile.delete();
|
if (await iniFile.exists()) await iniFile.delete();
|
||||||
await updateLangCfg(false);
|
await updateLangCfg(false);
|
||||||
await _updateStatus();
|
await _updateStatus();
|
||||||
@ -372,7 +373,7 @@ class LocalizationUIModel extends BaseUIModel {
|
|||||||
for (var element in AppConf.gameChannels) {
|
for (var element in AppConf.gameChannels) {
|
||||||
if (v.key.contains("StarCitizen\\$element")) {
|
if (v.key.contains("StarCitizen\\$element")) {
|
||||||
return MapEntry(element, true);
|
return MapEntry(element, true);
|
||||||
}else {
|
} else {
|
||||||
return const MapEntry("", true);
|
return const MapEntry("", true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -380,4 +381,8 @@ class LocalizationUIModel extends BaseUIModel {
|
|||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void goFeedback() {
|
||||||
|
launchUrlString(URLConf.feedbackUrl);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user