mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-17 13:53:52 +02:00
Small fixes
This commit is contained in:
@@ -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])
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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}`;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user