Random fixes

This commit is contained in:
Natsumi
2025-10-20 13:22:22 +11:00
parent b4cafe2f3d
commit 97ef396ec9
16 changed files with 79 additions and 22 deletions
+1 -1
View File
@@ -185,7 +185,7 @@
const friendsInCurrentInstance = lastLocation.value.friendList;
for (const friend of friendsInCurrentInstance.values()) {
const ctx = friends.value.get(friend.userId);
if (typeof ctx.ref === 'undefined') {
if (typeof ctx?.ref === 'undefined') {
continue;
}
D.friendsInInstance.push(ctx);
+1 -1
View File
@@ -594,7 +594,7 @@
const friendsInCurrentInstance = lastLocation.value.friendList;
for (const friend of friendsInCurrentInstance.values()) {
const ctx = friends.value.get(friend.userId);
if (typeof ctx.ref === 'undefined') {
if (typeof ctx?.ref === 'undefined') {
continue;
}
D.friendsInInstance.push(ctx);
@@ -249,7 +249,7 @@
style="margin-left: 5px"
@click="showBioDialog"></el-button>
</div>
<div v-if="translationApi" style="float: right">
<div v-if="translationApi && userDialog.ref.bio" style="float: right">
<el-button type="text" size="small" style="margin-left: 5px" @click="translateBio"
><i class="ri-translate-2"></i
></el-button>
+1 -1
View File
@@ -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();
}
+14 -5
View File
@@ -397,6 +397,10 @@ export const useVrcxStore = defineStore('Vrcx', () => {
location.worldId,
advancedSettingsStore.screenshotHelperModifyFilename
);
if (!newPath) {
console.error('Failed to add screenshot metadata', path);
return;
}
console.log('Screenshot metadata added', newPath);
}
if (advancedSettingsStore.screenshotHelperCopyToClipboard) {
@@ -618,11 +622,16 @@ export const useVrcxStore = defineStore('Vrcx', () => {
async function backupVrcRegistry(name) {
let regJson;
if (WINDOWS) {
regJson = await AppApi.GetVRChatRegistry();
} else {
regJson = await AppApi.GetVRChatRegistryJson();
regJson = JSON.parse(regJson);
try {
if (WINDOWS) {
regJson = await AppApi.GetVRChatRegistry();
} else {
regJson = await AppApi.GetVRChatRegistryJson();
regJson = JSON.parse(regJson);
}
} catch (e) {
console.error('Failed to get VRChat registry for backup:', e);
return;
}
const newBackup = {
name,
+18
View File
@@ -200,6 +200,15 @@ export const useVRCXUpdaterStore = defineStore('VRCXUpdater', () => {
} finally {
checkingForVRCXUpdate.value = false;
}
if (response.status !== 200) {
ElMessage({
message: t('message.vrcx_updater.failed', {
message: `${response.status} ${response.data}`
}),
type: 'error'
});
return;
}
pendingVRCXUpdate.value = false;
const json = JSON.parse(response.data);
if (AppDebug.debugWebRequests) {
@@ -263,6 +272,15 @@ export const useVRCXUpdaterStore = defineStore('VRCXUpdater', () => {
} finally {
checkingForVRCXUpdate.value = false;
}
if (response.status !== 200) {
ElMessage({
message: t('message.vrcx_updater.failed', {
message: `${response.status} ${response.data}`
}),
type: 'error'
});
return;
}
const json = JSON.parse(response.data);
if (AppDebug.debugWebRequests) {
console.log(json, response);
@@ -170,7 +170,7 @@
t(props.isLocalFavorite ? 'view.favorite.copy_tooltip' : 'view.favorite.move_tooltip')
);
const smallThumbnail = computed(
() => localFavFakeRef.value.thumbnailImageUrl.replace('256', '128') || localFavFakeRef.value.thumbnailImageUrl
() => localFavFakeRef.value.thumbnailImageUrl?.replace('256', '128') || localFavFakeRef.value.thumbnailImageUrl
);
const favoriteGroupName = computed(() => {
if (typeof props.group === 'string') {
@@ -68,6 +68,6 @@
defineEmits(['click']);
const smallThumbnail = computed(() => {
return props.favorite.thumbnailImageUrl.replace('256', '128') || props.favorite.thumbnailImageUrl;
return props.favorite.thumbnailImageUrl?.replace('256', '128') || props.favorite.thumbnailImageUrl;
});
</script>
@@ -162,7 +162,7 @@
);
const smallThumbnail = computed(() => {
const url = localFavFakeRef.value.thumbnailImageUrl.replace('256', '128');
const url = localFavFakeRef.value.thumbnailImageUrl?.replace('256', '128');
return url || localFavFakeRef.value.thumbnailImageUrl;
});
+2 -2
View File
@@ -670,7 +670,7 @@
}
function setProfilePicOverride(fileId) {
if (!currentUser.value.$isVRCPlus) {
if (!isLocalUserVrcPlusSupporter.value) {
ElMessage({
message: 'VRCPlus required',
type: 'error'
@@ -773,7 +773,7 @@
}
function setVRCPlusIcon(fileId) {
if (!currentUser.value.$isVRCPlus) {
if (!isLocalUserVrcPlusSupporter.value) {
ElMessage({
message: 'VRCPlus required',
type: 'error'