mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-19 14:53:50 +02:00
Fixes
This commit is contained in:
@@ -5,6 +5,7 @@ using System.Globalization;
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using NLog;
|
using NLog;
|
||||||
|
|
||||||
@@ -32,6 +33,7 @@ namespace VRCX
|
|||||||
private DateTime tillDate;
|
private DateTime tillDate;
|
||||||
public bool VrcClosedGracefully;
|
public bool VrcClosedGracefully;
|
||||||
private readonly ConcurrentQueue<string> m_LogQueue = new ConcurrentQueue<string>(); // for electron
|
private readonly ConcurrentQueue<string> m_LogQueue = new ConcurrentQueue<string>(); // for electron
|
||||||
|
private static readonly Regex CleanId = new("[^a-zA-Z0-9_\\-~:()]", RegexOptions.Compiled);
|
||||||
|
|
||||||
// NOTE
|
// NOTE
|
||||||
// FileSystemWatcher() is unreliable
|
// FileSystemWatcher() is unreliable
|
||||||
@@ -371,6 +373,7 @@ namespace VRCX
|
|||||||
return true;
|
return true;
|
||||||
|
|
||||||
var location = line.Substring(lineOffset);
|
var location = line.Substring(lineOffset);
|
||||||
|
location = CleanId.Replace(location, string.Empty);
|
||||||
|
|
||||||
AppendLog(new[]
|
AppendLog(new[]
|
||||||
{
|
{
|
||||||
@@ -447,7 +450,8 @@ namespace VRCX
|
|||||||
if (lineOffset >= line.Length)
|
if (lineOffset >= line.Length)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
logContext.LocationDestination = line.Substring(lineOffset);
|
var locationDestination = line.Substring(lineOffset);
|
||||||
|
logContext.LocationDestination = CleanId.Replace(locationDestination, string.Empty);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -495,8 +499,8 @@ namespace VRCX
|
|||||||
fileInfo.Name,
|
fileInfo.Name,
|
||||||
ConvertLogTimeToISO8601(line),
|
ConvertLogTimeToISO8601(line),
|
||||||
"player-joined",
|
"player-joined",
|
||||||
userInfo.DisplayName ?? string.Empty,
|
userInfo.DisplayName,
|
||||||
userInfo.UserId ?? string.Empty
|
userInfo.UserId
|
||||||
});
|
});
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@@ -1351,14 +1355,15 @@ namespace VRCX
|
|||||||
|
|
||||||
var inventoryIdIndex = info.IndexOf("inv_", StringComparison.Ordinal);
|
var inventoryIdIndex = info.IndexOf("inv_", StringComparison.Ordinal);
|
||||||
var inventoryId = info.Substring(inventoryIdIndex);
|
var inventoryId = info.Substring(inventoryIdIndex);
|
||||||
|
inventoryId = CleanId.Replace(inventoryId, string.Empty);
|
||||||
|
|
||||||
AppendLog(new[]
|
AppendLog(new[]
|
||||||
{
|
{
|
||||||
fileInfo.Name,
|
fileInfo.Name,
|
||||||
ConvertLogTimeToISO8601(line),
|
ConvertLogTimeToISO8601(line),
|
||||||
"sticker-spawn",
|
"sticker-spawn",
|
||||||
userId ?? string.Empty,
|
userId,
|
||||||
displayName ?? string.Empty,
|
displayName,
|
||||||
inventoryId
|
inventoryId
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1400,21 +1405,22 @@ namespace VRCX
|
|||||||
return new string[][] { };
|
return new string[][] { };
|
||||||
}
|
}
|
||||||
|
|
||||||
private static (string? DisplayName, string? UserId) ParseUserInfo(string userInfo)
|
private static (string DisplayName, string UserId) ParseUserInfo(string userInfo)
|
||||||
{
|
{
|
||||||
string? userDisplayName;
|
string userDisplayName;
|
||||||
string? userId;
|
string userId;
|
||||||
|
|
||||||
int pos = userInfo.LastIndexOf(" (", StringComparison.Ordinal);
|
var pos = userInfo.LastIndexOf(" (", StringComparison.Ordinal);
|
||||||
if (pos >= 0)
|
if (pos >= 0)
|
||||||
{
|
{
|
||||||
userDisplayName = userInfo.Substring(0, pos);
|
userDisplayName = userInfo.Substring(0, pos);
|
||||||
userId = userInfo.Substring(pos + 2, userInfo.LastIndexOf(')') - (pos + 2));
|
userId = userInfo.Substring(pos + 2, userInfo.LastIndexOf(')') - (pos + 2));
|
||||||
|
userId = CleanId.Replace(userId, string.Empty);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
userDisplayName = userInfo;
|
userDisplayName = userInfo;
|
||||||
userId = null;
|
userId = string.Empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (userDisplayName, userId);
|
return (userDisplayName, userId);
|
||||||
|
|||||||
@@ -247,9 +247,15 @@ namespace VRCX
|
|||||||
|
|
||||||
public void SetCookies(string cookies)
|
public void SetCookies(string cookies)
|
||||||
{
|
{
|
||||||
using (var stream = new MemoryStream(Convert.FromBase64String(cookies)))
|
try
|
||||||
{
|
{
|
||||||
CookieContainer.Add(System.Text.Json.JsonSerializer.Deserialize<CookieCollection>(stream));
|
using var stream = new MemoryStream(Convert.FromBase64String(cookies));
|
||||||
|
var data = System.Text.Json.JsonSerializer.Deserialize<CookieCollection>(stream);
|
||||||
|
CookieContainer.Add(data);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
Logger.Error($"Failed to set cookies: {e.Message}");
|
||||||
}
|
}
|
||||||
|
|
||||||
_cookieDirty = true; // force cookies to be saved for lastUserLoggedIn
|
_cookieDirty = true; // force cookies to be saved for lastUserLoggedIn
|
||||||
|
|||||||
@@ -143,12 +143,18 @@ async function checkVRChatCache(ref) {
|
|||||||
return { Item1: -1, Item2: false, Item3: '' };
|
return { Item1: -1, Item2: false, Item3: '' };
|
||||||
}
|
}
|
||||||
|
|
||||||
return AssetBundleManager.CheckVRChatCache(
|
try {
|
||||||
id,
|
return AssetBundleManager.CheckVRChatCache(
|
||||||
version,
|
id,
|
||||||
variant,
|
version,
|
||||||
variantVersion
|
variant,
|
||||||
);
|
variantVersion
|
||||||
|
);
|
||||||
|
} catch (err) {
|
||||||
|
console.error('Failed reading VRChat cache size:', err);
|
||||||
|
toast.error(`Failed reading VRChat cache size: ${err}`);
|
||||||
|
return { Item1: -1, Item2: false, Item3: '' };
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -961,7 +961,7 @@ export const useNotificationStore = defineStore('Notification', () => {
|
|||||||
fileId,
|
fileId,
|
||||||
fileVersion
|
fileVersion
|
||||||
);
|
);
|
||||||
} else if (imageUrl) {
|
} else if (imageUrl && imageUrl.startsWith('http')) {
|
||||||
fileVersion = imageUrl.split('/').pop(); // 1416226261.thumbnail-500.png
|
fileVersion = imageUrl.split('/').pop(); // 1416226261.thumbnail-500.png
|
||||||
fileId = fileVersion.split('.').shift(); // 1416226261
|
fileId = fileVersion.split('.').shift(); // 1416226261
|
||||||
imageLocation = await AppApi.GetImage(
|
imageLocation = await AppApi.GetImage(
|
||||||
|
|||||||
@@ -211,7 +211,7 @@ export const useAppearanceSettingsStore = defineStore(
|
|||||||
JSON.stringify(TRUST_COLOR_DEFAULTS)
|
JSON.stringify(TRUST_COLOR_DEFAULTS)
|
||||||
),
|
),
|
||||||
configRepository.getBool('VRCX_notificationIconDot', true),
|
configRepository.getBool('VRCX_notificationIconDot', true),
|
||||||
configRepository.getBool('VRCX_navIsCollapsed', true),
|
configRepository.getBool('VRCX_navIsCollapsed', false),
|
||||||
configRepository.getBool('VRCX_dataTableStriped', false),
|
configRepository.getBool('VRCX_dataTableStriped', false),
|
||||||
configRepository.getBool('VRCX_showPointerOnHover', false),
|
configRepository.getBool('VRCX_showPointerOnHover', false),
|
||||||
configRepository.getString(
|
configRepository.getString(
|
||||||
|
|||||||
@@ -296,6 +296,7 @@
|
|||||||
<EditInviteMessageDialog
|
<EditInviteMessageDialog
|
||||||
v-model:isEditInviteMessagesDialogVisible="isEditInviteMessagesDialogVisible"
|
v-model:isEditInviteMessagesDialogVisible="isEditInviteMessagesDialogVisible"
|
||||||
@close="isEditInviteMessagesDialogVisible = false" />
|
@close="isEditInviteMessagesDialogVisible = false" />
|
||||||
|
<RegistryBackupDialog />
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -332,6 +333,7 @@
|
|||||||
const ExportDiscordNamesDialog = defineAsyncComponent(() => import('./dialogs/ExportDiscordNamesDialog.vue'));
|
const ExportDiscordNamesDialog = defineAsyncComponent(() => import('./dialogs/ExportDiscordNamesDialog.vue'));
|
||||||
const ExportFriendsListDialog = defineAsyncComponent(() => import('./dialogs/ExportFriendsListDialog.vue'));
|
const ExportFriendsListDialog = defineAsyncComponent(() => import('./dialogs/ExportFriendsListDialog.vue'));
|
||||||
const ExportAvatarsListDialog = defineAsyncComponent(() => import('./dialogs/ExportAvatarsListDialog.vue'));
|
const ExportAvatarsListDialog = defineAsyncComponent(() => import('./dialogs/ExportAvatarsListDialog.vue'));
|
||||||
|
const RegistryBackupDialog = defineAsyncComponent(() => import('../Settings/dialogs/RegistryBackupDialog.vue'));
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|||||||
Reference in New Issue
Block a user