mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-17 13:53:52 +02:00
Last updated dropdown
This commit is contained in:
@@ -434,7 +434,6 @@ async function getBundleDateSize(ref) {
|
||||
const instanceStore = useInstanceStore();
|
||||
const { currentInstanceWorld, currentInstanceLocation } =
|
||||
storeToRefs(instanceStore);
|
||||
const bundleSizes = {};
|
||||
const bundleJson = {};
|
||||
for (let i = ref.unityPackages.length - 1; i > -1; i--) {
|
||||
const unityPackage = ref.unityPackages[i];
|
||||
@@ -453,7 +452,7 @@ async function getBundleDateSize(ref) {
|
||||
}
|
||||
|
||||
const platform = unityPackage.platform;
|
||||
if (bundleSizes[platform]) {
|
||||
if (bundleJson[platform]) {
|
||||
continue;
|
||||
}
|
||||
const assetUrl = unityPackage.assetUrl;
|
||||
@@ -488,34 +487,22 @@ async function getBundleDateSize(ref) {
|
||||
json._totalTextureUsage = `${(json.avatarStats.totalTextureUsage / 1048576).toFixed(2)} MB`;
|
||||
}
|
||||
bundleJson[platform] = json;
|
||||
const createdAt = json.created_at;
|
||||
const fileSize = `${(json.fileSize / 1048576).toFixed(2)} MB`;
|
||||
bundleSizes[platform] = {
|
||||
createdAt,
|
||||
fileSize
|
||||
};
|
||||
|
||||
if (avatarDialog.value.id === ref.id) {
|
||||
// update avatar dialog
|
||||
avatarDialog.value.bundleSizes[platform] = bundleSizes[platform];
|
||||
avatarDialog.value.lastUpdated = createdAt;
|
||||
avatarDialog.value.fileAnalysis = bundleJson;
|
||||
avatarDialog.value.fileAnalysis[platform] = json;
|
||||
}
|
||||
// update world dialog
|
||||
if (worldDialog.value.id === ref.id) {
|
||||
worldDialog.value.bundleSizes[platform] = bundleSizes[platform];
|
||||
worldDialog.value.lastUpdated = createdAt;
|
||||
worldDialog.value.fileAnalysis = bundleJson;
|
||||
worldDialog.value.fileAnalysis[platform] = json;
|
||||
}
|
||||
// update player list
|
||||
if (currentInstanceLocation.value.worldId === ref.id) {
|
||||
currentInstanceWorld.value.bundleSizes[platform] =
|
||||
bundleSizes[platform];
|
||||
currentInstanceWorld.value.lastUpdated = createdAt;
|
||||
currentInstanceWorld.value.fileAnalysis[platform] = json;
|
||||
}
|
||||
}
|
||||
|
||||
return bundleSizes;
|
||||
return bundleJson;
|
||||
}
|
||||
|
||||
// #region | App: Random unsorted app methods, data structs, API functions, and an API feedback/file analysis event
|
||||
|
||||
Reference in New Issue
Block a user