mirror of
https://mirror.ghproxy.com/https://github.com/StarCitizenToolBox/app.git
synced 2024-12-22 18:43:43 +08:00
bugfix
This commit is contained in:
parent
d905f8c13e
commit
6a6360540b
@ -287,8 +287,7 @@ async function getRSILauncherToken(channelId) {
|
||||
let libraryData = (await libraryR.json())["data"]
|
||||
|
||||
// get user avatar
|
||||
let $avatarElement = $(".c-account-sidebar__profile-metas-avatar");
|
||||
let avatarUrl = $avatarElement.css("background-image");
|
||||
let avatarUrl = $(".a-avatarButton__image").attr("src");
|
||||
|
||||
//post message
|
||||
window.chrome.webview.postMessage({
|
||||
|
@ -8,8 +8,8 @@ class SystemHelper {
|
||||
|
||||
static initPowershellPath() async {
|
||||
try {
|
||||
var result = await Process.run(powershellPath, ["echo", "ping"]);
|
||||
if (!result.stdout.toString().startsWith("ping") &&
|
||||
var result = await Process.run(powershellPath, ["echo", "pong"]);
|
||||
if (!result.stdout.toString().startsWith("pong") &&
|
||||
powershellPath == "powershell.exe") {
|
||||
throw "powershell check failed";
|
||||
}
|
||||
|
@ -63,10 +63,13 @@ class HomeGameLoginUIModel extends _$HomeGameLoginUIModel {
|
||||
final webToken = data["webToken"];
|
||||
final releaseInfo = data["releaseInfo"];
|
||||
final libraryData = RsiGameLibraryData.fromJson(data["libraryData"]);
|
||||
final avatarUrl = data["avatar"]
|
||||
var avatarUrl = data["avatar"]
|
||||
?.toString()
|
||||
.replaceAll("url(\"", "")
|
||||
.replaceAll("\")", "");
|
||||
if (avatarUrl?.startsWith("/") ?? false) {
|
||||
avatarUrl = "https://robertsspaceindustries.com$avatarUrl";
|
||||
}
|
||||
final Map<String, dynamic> payload = Jwt.parseJwt(authToken!);
|
||||
final nickname = payload["nickname"] ?? "";
|
||||
|
||||
|
@ -297,7 +297,7 @@ class LocalizationUIModel extends _$LocalizationUIModel {
|
||||
for (var value
|
||||
in (element.rawContent?.readString() ?? "").split("\n")) {
|
||||
final tv = value.trim();
|
||||
if (tv.isNotEmpty) globalIni.writeln(tv);
|
||||
if (tv.isNotEmpty) globalIni.writeln(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -92,8 +92,9 @@ class SettingsUIModel extends _$SettingsUIModel {
|
||||
if (r == null || r.files.firstOrNull?.path == null) return;
|
||||
final fileName = r.files.first.path!;
|
||||
dPrint(fileName);
|
||||
final fileNameRegExp =
|
||||
RegExp(r"^(.*\\StarCitizen\\.*\\)Bin64\\StarCitizen\.exe$");
|
||||
final fileNameRegExp = RegExp(
|
||||
r"^(.*\\StarCitizen\\.*\\)Bin64\\StarCitizen\.exe$",
|
||||
caseSensitive: false);
|
||||
if (fileNameRegExp.hasMatch(fileName)) {
|
||||
RegExp pathRegex = RegExp(r"\\[^\\]+\\Bin64\\StarCitizen\.exe$");
|
||||
String extractedPath = fileName.replaceFirst(pathRegex, '');
|
||||
|
Loading…
Reference in New Issue
Block a user