Last updated dropdown

This commit is contained in:
Natsumi
2026-02-05 16:41:33 +13:00
committed by pa
parent 33c8d97403
commit ecce12a9fc
7 changed files with 71 additions and 83 deletions

View File

@@ -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