Clean up and fix avatar dialog "Share" button

This commit is contained in:
Natsumi
2025-05-24 00:31:38 +10:00
parent c6b88c74cd
commit 029aa1c43d
4 changed files with 18 additions and 25 deletions
+16 -14
View File
@@ -1436,25 +1436,30 @@ console.log(`isLinux: ${LINUX}`);
var ref = this.cachedAvatars.get(json.id);
if (typeof ref === 'undefined') {
ref = {
id: '',
name: '',
description: '',
acknowledgements: '',
authorId: '',
authorName: '',
tags: [],
assetUrl: '',
assetUrlObject: {},
created_at: '',
description: '',
featured: false,
highestPrice: null,
id: '',
imageUrl: '',
thumbnailImageUrl: '',
lock: false,
lowestPrice: null,
name: '',
productId: null,
publishedListings: [],
releaseStatus: '',
searchable: false,
styles: [],
version: 0,
unityPackages: [],
tags: [],
thumbnailImageUrl: '',
unityPackageUrl: '',
unityPackageUrlObject: {},
created_at: '',
unityPackages: [],
updated_at: '',
featured: false,
version: 0,
...json
};
this.cachedAvatars.set(ref.id, ref);
@@ -13841,14 +13846,11 @@ console.log(`isLinux: ${LINUX}`);
};
};
//
$app.methods.languageClass = function (key) {
return languageClass(key);
};
// #endregion
// #region | Electron
if (LINUX) {
+1
View File
@@ -228,6 +228,7 @@ export default class extends baseClass {
hideContentFilterSettings: false,
homeLocation: '',
id: '',
isAdult: true,
isBoopingEnabled: false,
isFriend: false,
last_activity: '',
@@ -696,7 +696,7 @@
showAvatarDialog(D.id);
break;
case 'Share':
copyToClipboard(D.id);
copyAvatarUrl(D.id);
break;
case 'Rename':
promptRenameAvatar(D);
@@ -1057,9 +1057,6 @@
}
}
}
if (!assetUrl) {
assetUrl = D.ref.assetUrl;
}
const fileId = extractFileId(assetUrl);
const version = parseInt(extractFileVersion(assetUrl), 10);
if (!fileId || !version) {
-7
View File
@@ -112,9 +112,6 @@ async function checkVRChatCache(ref) {
break;
}
}
if (!assetUrl) {
assetUrl = ref.assetUrl;
}
var id = extractFileId(assetUrl);
var version = parseInt(extractFileVersion(assetUrl), 10);
var variantVersion = parseInt(extractVariantVersion(assetUrl), 10);
@@ -266,8 +263,6 @@ async function getBundleLocation(input) {
break;
}
}
} else if ($app.avatarDialog.visible && $app.avatarDialog.ref.assetUrl) {
assetUrl = $app.avatarDialog.ref.assetUrl;
} else if (
$app.worldDialog.visible &&
$app.worldDialog.ref.unityPackages.length > 0
@@ -283,8 +278,6 @@ async function getBundleLocation(input) {
break;
}
}
} else if ($app.worldDialog.visible && $app.worldDialog.ref.assetUrl) {
assetUrl = $app.worldDialog.ref.assetUrl;
}
if (!assetUrl) {
return null;