diff --git a/src/components/dialogs/AvatarDialog/AvatarDialog.vue b/src/components/dialogs/AvatarDialog/AvatarDialog.vue
index d7e5626d..8d96bc82 100644
--- a/src/components/dialogs/AvatarDialog/AvatarDialog.vue
+++ b/src/components/dialogs/AvatarDialog/AvatarDialog.vue
@@ -54,9 +54,9 @@
>{{ avatarDialog.platformInfo.pc.performanceRating }}
{{ avatarDialog.bundleSizes['standalonewindows'].fileSize }}{{ avatarDialog.fileAnalysis.standalonewindows._fileSize }}
@@ -72,9 +72,9 @@
>{{ avatarDialog.platformInfo.android.performanceRating }}
{{ avatarDialog.bundleSizes['android'].fileSize }}{{ avatarDialog.fileAnalysis.android._fileSize }}
@@ -90,9 +90,9 @@
>{{ avatarDialog.platformInfo.ios.performanceRating }}
{{ avatarDialog.bundleSizes['ios'].fileSize }}{{ avatarDialog.fileAnalysis.ios._fileSize }}
@@ -447,13 +447,24 @@
- {{ t('dialog.avatar.info.last_updated') }}
-
-
@@ -506,7 +517,7 @@
show-icon />
- {{ worldDialog.bundleSizes['standalonewindows'].fileSize }}
+ {{ worldDialog.fileAnalysis.standalonewindows._fileSize }}
@@ -74,9 +74,9 @@
style="margin-right: 5px; margin-top: 5px">
- {{ worldDialog.bundleSizes['android'].fileSize }}
+ {{ worldDialog.fileAnalysis.android._fileSize }}
@@ -88,9 +88,9 @@
style="margin-right: 5px; margin-top: 5px">
- {{ worldDialog.bundleSizes['ios'].fileSize }}
+ {{ worldDialog.fileAnalysis.ios._fileSize }}
@@ -566,13 +566,24 @@
-
+
{{ t('dialog.world.info.last_updated') }}
-
-
@@ -712,7 +723,7 @@
show-icon />
-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
diff --git a/src/stores/avatar.js b/src/stores/avatar.js
index a5ea799e..a024ae5d 100644
--- a/src/stores/avatar.js
+++ b/src/stores/avatar.js
@@ -56,11 +56,9 @@ export const useAvatarStore = defineStore('Avatar', () => {
isPC: false,
isQuest: false,
isIos: false,
- bundleSizes: {},
platformInfo: {},
galleryImages: [],
galleryLoading: false,
- lastUpdated: '',
inCache: false,
cacheSize: '',
cacheLocked: false,
@@ -202,8 +200,6 @@ export const useAvatarStore = defineStore('Avatar', () => {
D.isIos = false;
D.hasImposter = false;
D.imposterVersion = '';
- D.lastUpdated = '';
- D.bundleSizes = {};
D.platformInfo = {};
D.galleryImages = [];
D.galleryLoading = true;
@@ -247,10 +243,8 @@ export const useAvatarStore = defineStore('Avatar', () => {
break;
}
}
- if (Object.keys(D.bundleSizes).length === 0) {
- getBundleDateSize(ref).then((bundleSizes) => {
- D.bundleSizes = bundleSizes;
- });
+ if (Object.keys(D.fileAnalysis).length === 0) {
+ getBundleDateSize(ref);
}
})
.catch((err) => {
diff --git a/src/stores/instance.js b/src/stores/instance.js
index 38cf2395..4cb1e0cd 100644
--- a/src/stores/instance.js
+++ b/src/stores/instance.js
@@ -101,8 +101,7 @@ export const useInstanceStore = defineStore('Instance', () => {
focusViewDisabled: false,
inCache: false,
cacheSize: '',
- bundleSizes: {},
- lastUpdated: ''
+ fileAnalysis: {}
});
/** @type {import('vue').Ref} */
@@ -386,8 +385,7 @@ export const useInstanceStore = defineStore('Instance', () => {
focusViewDisabled: false,
inCache: false,
cacheSize: '',
- bundleSizes: {},
- lastUpdated: ''
+ fileAnalysis: {}
};
currentInstanceLocation.value = {};
} else if (instanceId !== currentInstanceLocation.value.tag) {
@@ -401,8 +399,7 @@ export const useInstanceStore = defineStore('Instance', () => {
focusViewDisabled: false,
inCache: false,
cacheSize: '',
- bundleSizes: {},
- lastUpdated: ''
+ fileAnalysis: {}
};
L = parseLocation(instanceId);
currentInstanceLocation.value = L;
@@ -439,17 +436,7 @@ export const useInstanceStore = defineStore('Instance', () => {
error
);
});
- getBundleDateSize(args.ref)
- .then((bundleSizes) => {
- currentInstanceWorld.value.bundleSizes =
- bundleSizes;
- })
- .catch((error) => {
- console.error(
- 'Error fetching bundle sizes:',
- error
- );
- });
+ getBundleDateSize(args.ref);
return args;
})
.catch((error) => {
diff --git a/src/stores/world.js b/src/stores/world.js
index e91befe2..a4a1f092 100644
--- a/src/stores/world.js
+++ b/src/stores/world.js
@@ -46,8 +46,6 @@ export const useWorldStore = defineStore('World', () => {
avatarScalingDisabled: false,
focusViewDisabled: false,
rooms: [],
- bundleSizes: {},
- lastUpdated: '',
inCache: false,
cacheSize: '',
cacheLocked: false,
@@ -96,8 +94,6 @@ export const useWorldStore = defineStore('World', () => {
L.shortName = shortName;
D.id = L.worldId;
D.$location = L;
- D.bundleSizes = {};
- D.lastUpdated = '';
D.loading = true;
D.inCache = false;
D.cacheSize = '';
@@ -331,10 +327,8 @@ export const useWorldStore = defineStore('World', () => {
});
}
}
- if (Object.keys(worldDialog.bundleSizes).length === 0) {
- getBundleDateSize(ref).then((bundleSizes) => {
- worldDialog.bundleSizes = bundleSizes;
- });
+ if (Object.keys(worldDialog.fileAnalysis).length === 0) {
+ getBundleDateSize(ref);
}
}
if (favoriteStore.localWorldFavoritesList.includes(ref.id)) {
diff --git a/src/views/PlayerList/PlayerList.vue b/src/views/PlayerList/PlayerList.vue
index f1de8ea8..5e8e5651 100644
--- a/src/views/PlayerList/PlayerList.vue
+++ b/src/views/PlayerList/PlayerList.vue
@@ -61,9 +61,9 @@
{{ currentInstanceWorld.bundleSizes['standalonewindows'].fileSize }}{{ currentInstanceWorld.fileAnalysis.standalonewindows._fileSize }}
@@ -71,9 +71,9 @@
{{ currentInstanceWorld.bundleSizes['android'].fileSize }}{{ currentInstanceWorld.fileAnalysis.android._fileSize }}
@@ -81,9 +81,9 @@
{{ currentInstanceWorld.bundleSizes['ios'].fileSize }}{{ currentInstanceWorld.fileAnalysis.ios._fileSize }}
@@ -129,7 +129,10 @@
{{ t('dialog.world.info.last_updated') }}
{{
- formatDateFilter(currentInstanceWorld.lastUpdated, 'long')
+ formatDateFilter(
+ currentInstanceWorld.fileAnalysis.standalonewindows?.created_at,
+ 'long'
+ )
}}