mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-06 14:46:04 +02:00
Fix user profile badges and random errors
This commit is contained in:
+10
-1
@@ -119,15 +119,24 @@ export const useAuthStore = defineStore('Auth', () => {
|
||||
loginForm.value.lastUserLoggedIn = lastUserLoggedIn;
|
||||
try {
|
||||
const credentials = JSON.parse(savedCredentials || '{}');
|
||||
// fix goofy typo
|
||||
let edited = false;
|
||||
for (const userId in credentials) {
|
||||
// fix goofy typo
|
||||
if (credentials[userId].loginParmas) {
|
||||
credentials[userId].loginParams =
|
||||
credentials[userId].loginParmas;
|
||||
delete credentials[userId].loginParmas;
|
||||
edited = true;
|
||||
}
|
||||
// fix missing fields
|
||||
if (!credentials[userId].loginParams.endpoint) {
|
||||
credentials[userId].loginParams.endpoint = '';
|
||||
edited = true;
|
||||
}
|
||||
if (!credentials[userId].loginParams.websocket) {
|
||||
credentials[userId].loginParams.websocket = '';
|
||||
edited = true;
|
||||
}
|
||||
}
|
||||
if (edited) {
|
||||
await configRepository.setString(
|
||||
|
||||
@@ -597,7 +597,10 @@ export const useGameLogStore = defineStore('GameLog', () => {
|
||||
console.error('Missing userId:', gameLog.displayName);
|
||||
} else if (userId === userStore.currentUser.id) {
|
||||
// skip
|
||||
} else if (friendStore.friends.has(userId)) {
|
||||
} else if (
|
||||
friendStore.friends.has(userId) &&
|
||||
typeof ref !== 'undefined'
|
||||
) {
|
||||
locationStore.lastLocation.friendList.set(userId, userMap);
|
||||
if (
|
||||
ref.location !== locationStore.lastLocation.location &&
|
||||
|
||||
@@ -364,7 +364,7 @@ export const useInstanceStore = defineStore('Instance', () => {
|
||||
}
|
||||
if (
|
||||
userStore.userDialog.visible &&
|
||||
userStore.userDialog.ref.$location.tag === ref.id
|
||||
userStore.userDialog.ref?.$location.tag === ref.id
|
||||
) {
|
||||
userStore.applyUserDialogLocation();
|
||||
}
|
||||
|
||||
+2
-2
@@ -561,7 +561,7 @@ export const useUserStore = defineStore('User', () => {
|
||||
}
|
||||
}
|
||||
for (const prop in json) {
|
||||
if (typeof ref[prop] !== 'undefined') {
|
||||
if (typeof json[prop] !== 'undefined') {
|
||||
ref[prop] = json[prop];
|
||||
}
|
||||
}
|
||||
@@ -1732,7 +1732,7 @@ export const useUserStore = defineStore('User', () => {
|
||||
}
|
||||
}
|
||||
for (const prop in json) {
|
||||
if (typeof ref[prop] !== 'undefined') {
|
||||
if (typeof json[prop] !== 'undefined') {
|
||||
ref[prop] = json[prop];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user