mirror of
https://ghfast.top/https://github.com/StarCitizenToolBox/app.git
synced 2025-06-28 07:54:44 +08:00
feat: networkGameChannels Support
This commit is contained in:
28
lib/common/conf/conf.dart
Normal file
28
lib/common/conf/conf.dart
Normal file
@ -0,0 +1,28 @@
|
||||
class ConstConf {
|
||||
static const String appVersion = "2.13.3";
|
||||
static const int appVersionCode = 61;
|
||||
static const String appVersionDate = "2024-11-23";
|
||||
static const _gameChannels = [
|
||||
"LIVE",
|
||||
"4.0_PREVIEW",
|
||||
"PTU",
|
||||
"EPTU",
|
||||
"TECH-PREVIEW",
|
||||
"HOTFIX"
|
||||
];
|
||||
static const isMSE =
|
||||
String.fromEnvironment("MSE", defaultValue: "false") == "true";
|
||||
static const dohAddress = "https://223.6.6.6/resolve";
|
||||
static const inputMethodServerPort = 59399;
|
||||
}
|
||||
|
||||
class AppConf {
|
||||
static List<String>? _networkGameChannels;
|
||||
|
||||
static setNetworkChannels(List<String>? channels) {
|
||||
_networkGameChannels = channels;
|
||||
}
|
||||
|
||||
static List<String> get gameChannels =>
|
||||
_networkGameChannels ?? ConstConf._gameChannels;
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
class ConstConf {
|
||||
static const String appVersion = "2.13.3";
|
||||
static const int appVersionCode = 61;
|
||||
static const String appVersionDate = "2024-11-23";
|
||||
static const gameChannels = ["LIVE", "4.0_PREVIEW","PTU", "EPTU", "TECH-PREVIEW", "HOTFIX"];
|
||||
static const isMSE =
|
||||
String.fromEnvironment("MSE", defaultValue: "false") == "true";
|
||||
static const dohAddress = "https://223.6.6.6/resolve";
|
||||
static const inputMethodServerPort = 59399;
|
||||
}
|
@ -2,7 +2,7 @@ import 'dart:convert';
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:hive/hive.dart';
|
||||
import 'package:starcitizen_doctor/common/conf/const_conf.dart';
|
||||
import 'package:starcitizen_doctor/common/conf/conf.dart';
|
||||
import 'package:starcitizen_doctor/common/utils/log.dart';
|
||||
|
||||
class SCLoggerHelper {
|
||||
@ -108,7 +108,7 @@ class SCLoggerHelper {
|
||||
}
|
||||
|
||||
static String getGameChannelID(String installPath) {
|
||||
for (var value in ConstConf.gameChannels) {
|
||||
for (var value in AppConf.gameChannels) {
|
||||
if (installPath.endsWith("\\$value")) {
|
||||
return value;
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:starcitizen_doctor/common/conf/const_conf.dart';
|
||||
import 'package:starcitizen_doctor/common/conf/conf.dart';
|
||||
import 'package:starcitizen_doctor/common/io/rs_http.dart';
|
||||
import 'package:starcitizen_doctor/common/utils/log.dart';
|
||||
import 'package:starcitizen_doctor/data/doh_client_response_data.dart';
|
||||
|
@ -1,7 +1,7 @@
|
||||
import 'dart:convert';
|
||||
import 'dart:typed_data';
|
||||
|
||||
import 'package:starcitizen_doctor/common/conf/const_conf.dart';
|
||||
import 'package:starcitizen_doctor/common/conf/conf.dart';
|
||||
import 'package:starcitizen_doctor/common/rust/api/http_api.dart' as rust_http;
|
||||
import 'package:starcitizen_doctor/common/rust/api/http_api.dart';
|
||||
import 'package:starcitizen_doctor/common/rust/http_package.dart';
|
||||
|
Reference in New Issue
Block a user