diff --git a/src-electron/main.js b/src-electron/main.js index f57c6e78..de9d26f6 100644 --- a/src-electron/main.js +++ b/src-electron/main.js @@ -58,7 +58,7 @@ const startup = args.includes('--startup'); const noUpdater = args.includes('--no-updater') || fs.existsSync(path.join(rootDir, '.no-updater')); -if (process.defaultApp) { +if (process.defaultApp && process.platform !== 'win32') { if (process.argv.length >= 2) { app.setAsDefaultProtocolClient(VRCX_URI_PREFIX, process.execPath, [ path.resolve(process.argv[1]) diff --git a/src/shared/utils/location.js b/src/shared/utils/location.js index 9ba19d1f..4c717b3f 100644 --- a/src/shared/utils/location.js +++ b/src/shared/utils/location.js @@ -145,7 +145,7 @@ function parseLocation(tag) { } function getFriendsLocations(friendsArr) { - const locaationStore = useLocationStore(); + const locationStore = useLocationStore(); // prevent the instance title display as "Traveling". if (!friendsArr?.length) { return ''; @@ -161,8 +161,8 @@ function getFriendsLocations(friendsArr) { } } for (const friend of friendsArr) { - if (locaationStore.lastLocation.friendList.has(friend.id)) { - return locaationStore.lastLocation.location; + if (locationStore.lastLocation.friendList.has(friend.id)) { + return locationStore.lastLocation.location; } } return friendsArr[0].ref?.location; diff --git a/src/stores/group.js b/src/stores/group.js index 00d4bb57..77773da6 100644 --- a/src/stores/group.js +++ b/src/stores/group.js @@ -273,16 +273,18 @@ export const useGroupStore = defineStore('Group', () => { groupChange(ref, `Role ${roleName} removed`); } } - for (const roleId of newRoleIds) { - if (!oldRoleIds.includes(roleId)) { - let roleName = ''; - const role = newRoles.find( - (fineRole) => fineRole.id === roleId - ); - if (role) { - roleName = role.name; + if (typeof newRoles !== 'undefined') { + for (const roleId of newRoleIds) { + if (!oldRoleIds.includes(roleId)) { + let roleName = ''; + const role = newRoles.find( + (fineRole) => fineRole.id === roleId + ); + if (role) { + roleName = role.name; + } + groupChange(ref, `Role ${roleName} added`); } - groupChange(ref, `Role ${roleName} added`); } } } diff --git a/src/stores/search.js b/src/stores/search.js index 42228533..bacdd460 100644 --- a/src/stores/search.js +++ b/src/stores/search.js @@ -266,7 +266,10 @@ export const useSearchStore = defineStore('Search', () => { ) { userStore.showUserDialog(input); return true; - } else if (input.substring(0, 5) === 'avtr_') { + } else if ( + input.substring(0, 5) === 'avtr_' || + input.substring(0, 2) === 'b_' + ) { avatarStore.showAvatarDialog(input); return true; } else if (input.substring(0, 4) === 'grp_') { @@ -316,7 +319,11 @@ export const useSearchStore = defineStore('Search', () => { return true; } } - } else if (input.substring(0, 5) === 'wrld_') { + } else if ( + input.substring(0, 5) === 'wrld_' || + input.substring(0, 4) === 'wld_' || + input.substring(0, 2) === 'o_' + ) { // a bit hacky, but supports weird malformed inputs cut out from url, why not if (input.indexOf('&instanceId=') >= 0) { input = `https://vrchat.com/home/launch?worldId=${input}`; diff --git a/src/stores/vrcx.js b/src/stores/vrcx.js index f74f6161..0a1e77d1 100644 --- a/src/stores/vrcx.js +++ b/src/stores/vrcx.js @@ -565,7 +565,12 @@ export const useVrcxStore = defineStore('Vrcx', () => { let shouldFocusWindow = true; switch (command) { case 'world': - searchStore.directAccessWorld(input.replace('world/', '')); + if ( + !searchStore.directAccessWorld(input.replace('world/', '')) + ) { + // fallback for mangled world ids + worldStore.showWorldDialog(commandArg); + } break; case 'avatar': avatarStore.showAvatarDialog(commandArg); diff --git a/src/stores/vrcxUpdater.js b/src/stores/vrcxUpdater.js index 824fcd7d..7efbee4c 100644 --- a/src/stores/vrcxUpdater.js +++ b/src/stores/vrcxUpdater.js @@ -204,6 +204,9 @@ export const useVRCXUpdaterStore = defineStore('VRCXUpdater', () => { } }); json = JSON.parse(response.data); + } catch (error) { + console.error('Failed to check for VRCX update', error); + return; } finally { checkingForVRCXUpdate.value = false; } @@ -280,6 +283,9 @@ export const useVRCXUpdaterStore = defineStore('VRCXUpdater', () => { } }); json = JSON.parse(response.data); + } catch (error) { + console.error('Failed to check for VRCX update', error); + return; } finally { checkingForVRCXUpdate.value = false; }