diff --git a/src/components/NavMenu.vue b/src/components/NavMenu.vue
index cf630798..1672ef94 100644
--- a/src/components/NavMenu.vue
+++ b/src/components/NavMenu.vue
@@ -28,7 +28,7 @@
:key="item.index"
:index="item.index"
:class="{ notify: notifiedMenus.includes(item.index) }">
-
+
{{ $t(item.tooltip) }}
diff --git a/src/components/dialogs/UserDialog/UserDialog.vue b/src/components/dialogs/UserDialog/UserDialog.vue
index 1a3fefbf..9876bf25 100644
--- a/src/components/dialogs/UserDialog/UserDialog.vue
+++ b/src/components/dialogs/UserDialog/UserDialog.vue
@@ -136,8 +136,9 @@
size="mini"
class="name"
:class="userDialog.ref.$trustClass"
- style="margin-right: 5px; margin-top: 5px"
- v-text="userDialog.ref.$trustLevel">
+ style="margin-right: 5px; margin-top: 5px">
+ {{ userDialog.ref.$trustLevel }}
+
+ >{{ userDialog.ref.$customTag }}
+ @click.native="setUserDialogWorldSorting(item)">
+ {{ t(item.name) }}
@@ -1543,8 +1545,8 @@
+ @click.native="setUserDialogWorldOrder(item)">
+ {{ t(item.name) }}
@@ -1669,13 +1671,11 @@
>
-
+
+ {{ t('dialog.user.avatars.sort_by_name') }}
-
+
+ {{ t('dialog.user.avatars.sort_by_update') }}
@@ -1695,17 +1695,14 @@
>
-
+
+ {{ t('dialog.user.avatars.all') }}
-
+
+ {{ t('dialog.user.avatars.public') }}
-
+
+ {{ t('dialog.user.avatars.private') }}
diff --git a/src/service/webapi.js b/src/service/webapi.js
index 40b5944f..06526cb8 100644
--- a/src/service/webapi.js
+++ b/src/service/webapi.js
@@ -14,7 +14,7 @@ class WebApiService {
}
/**
- * @param {string} options
+ * @param {any} options
* @returns {Promise<{status: number, data?: string}>}
*/
async execute(options) {
diff --git a/src/shared/utils/common.js b/src/shared/utils/common.js
index 502dcd10..ab66a72d 100644
--- a/src/shared/utils/common.js
+++ b/src/shared/utils/common.js
@@ -458,9 +458,6 @@ async function getBundleDateSize(ref) {
if (!fileId || !version) {
continue;
}
- console.log(
- `Fetching bundle size for ${platform} - fileId: ${fileId}, version: ${version}, variant: ${variant}`
- );
const args = await miscRequest.getFileAnalysis({
fileId,
version,
diff --git a/src/stores/game.js b/src/stores/game.js
index c966fa47..4a825b19 100644
--- a/src/stores/game.js
+++ b/src/stores/game.js
@@ -36,7 +36,7 @@ export const useGameStore = defineStore('Game', () => {
const state = reactive({
lastCrashedTime: null,
VRChatUsedCacheSize: '',
- VRChatTotalCacheSize: '',
+ VRChatTotalCacheSize: 0,
VRChatCacheSizeLoading: false,
isGameRunning: false,
isGameNoVR: true,
@@ -132,7 +132,7 @@ export const useGameStore = defineStore('Game', () => {
// check if relaunched less than 2mins ago (prvent crash loop)
if (
state.lastCrashedTime &&
- new Date() - state.lastCrashedTime < 120_000
+ new Date().getTime() - state.lastCrashedTime.getTime() < 120_000
) {
console.log('VRChat was recently crashed, not relaunching');
return;
@@ -200,7 +200,7 @@ export const useGameStore = defineStore('Game', () => {
userStore.currentUser.$previousAvatarSwapTime = Date.now();
} else {
await configRepository.setBool('isGameNoVR', state.isGameNoVR);
- userStore.currentUser.$online_for = '';
+ userStore.currentUser.$online_for = 0;
userStore.currentUser.$offline_for = Date.now();
instanceStore.removeAllQueuedInstances();
autoVRChatCacheManagement();
diff --git a/src/stores/group.js b/src/stores/group.js
index 357b5ad7..6ff51962 100644
--- a/src/stores/group.js
+++ b/src/stores/group.js
@@ -366,7 +366,7 @@ export const useGroupStore = defineStore('Group', () => {
/**
*
* @param {{ groupId: string }} params
- * @return { Promise<{json: any, params}> }
+ * @return { Promise<{posts: any, params}> }
*/
async function getAllGroupPosts(params) {
const n = 100;
diff --git a/src/stores/location.js b/src/stores/location.js
index 9404e052..1dc6f8c2 100644
--- a/src/stores/location.js
+++ b/src/stores/location.js
@@ -178,7 +178,7 @@ export const useLocationStore = defineStore('Location', () => {
photonStore.photonLobbyJointime = new Map();
photonStore.photonLobbyActivePortals = new Map();
photonStore.photonEvent7List = new Map();
- photonStore.photonLastEvent7List = '';
+ photonStore.photonLastEvent7List = 0;
photonStore.photonLastChatBoxMsg = new Map();
photonStore.moderationEventQueue = new Map();
if (photonStore.photonEventTable.data.length > 0) {
diff --git a/src/stores/notification.js b/src/stores/notification.js
index 8b15a366..56cc9c38 100644
--- a/src/stores/notification.js
+++ b/src/stores/notification.js
@@ -1225,7 +1225,7 @@ export const useNotificationStore = defineStore('Notification', () => {
/**
*
- * @param {string} noty
+ * @param {any} noty
* @param {string} message
* @param {string} image
*/
diff --git a/src/stores/photon.js b/src/stores/photon.js
index 78503e19..1500040c 100644
--- a/src/stores/photon.js
+++ b/src/stores/photon.js
@@ -137,7 +137,7 @@ export const usePhotonStore = defineStore('Photon', () => {
photonLobbyJointime: new Map(),
photonLobbyActivePortals: new Map(),
photonEvent7List: new Map(),
- photonLastEvent7List: '',
+ photonLastEvent7List: 0,
photonLastChatBoxMsg: new Map()
});
@@ -204,7 +204,7 @@ export const usePhotonStore = defineStore('Photon', () => {
}
});
- const photonLobbyActivePortal = computed({
+ const photonLobbyActivePortals = computed({
get: () => state.photonLobbyActivePortals,
set: (value) => {
state.photonLobbyActivePortals = value;
@@ -232,6 +232,13 @@ export const usePhotonStore = defineStore('Photon', () => {
}
});
+ const moderationEventQueue = computed({
+ get: () => state.moderationEventQueue,
+ set: (value) => {
+ state.moderationEventQueue = value;
+ }
+ });
+
async function initPhotonStates() {
const [
photonEventOverlay,
@@ -261,7 +268,7 @@ export const usePhotonStore = defineStore('Photon', () => {
configRepository.getInt('VRCX_photonLobbyTimeoutThreshold', 6000),
configRepository.getString(
'VRCX_photonOverlayMessageTimeout',
- 6000
+ (6000).toString()
),
configRepository.getString('VRCX_photonEventTypeFilter', '[]'),
configRepository.getString('VRCX_chatboxUserBlacklist')
@@ -316,7 +323,7 @@ export const usePhotonStore = defineStore('Photon', () => {
state.photonLobbyTimeoutThreshold = value;
configRepository.setString(
'VRCX_photonLobbyTimeoutThreshold',
- value
+ value.toString()
);
}
});
@@ -326,7 +333,7 @@ export const usePhotonStore = defineStore('Photon', () => {
state.photonOverlayMessageTimeout = value;
configRepository.setString(
'VRCX_photonOverlayMessageTimeout',
- value
+ value.toString()
);
}
});
@@ -1909,10 +1916,11 @@ export const usePhotonStore = defineStore('Photon', () => {
photonLobbyLastModeration,
photonLobbyTimeout,
photonLobbyJointime,
- photonLobbyActivePortal,
+ photonLobbyActivePortals,
photonEvent7List,
photonLastEvent7List,
photonLastChatBoxMsg,
+ moderationEventQueue,
setPhotonLoggingEnabled,
setPhotonEventOverlay,
diff --git a/src/stores/settings/advanced.js b/src/stores/settings/advanced.js
index 9b322b3f..ba2cc4f7 100644
--- a/src/stores/settings/advanced.js
+++ b/src/stores/settings/advanced.js
@@ -626,21 +626,25 @@ export const useAdvancedSettingsStore = defineStore('AdvancedSettings', () => {
distinguishCancelAndClose: true,
confirmButtonText: t('prompt.auto_clear_cache.ok'),
cancelButtonText: t('prompt.auto_clear_cache.cancel'),
- inputValue: vrcxStore.clearVRCXCacheFrequency / 3600 / 2,
+ inputValue: (
+ vrcxStore.clearVRCXCacheFrequency /
+ 3600 /
+ 2
+ ).toString(),
inputPattern: /\d+$/,
inputErrorMessage: t('prompt.auto_clear_cache.input_error'),
callback: async (action, instance) => {
if (
action === 'confirm' &&
instance.inputValue &&
- !isNaN(instance.inputValue)
+ !isNaN(parseInt(instance.inputValue, 10))
) {
vrcxStore.clearVRCXCacheFrequency = Math.trunc(
- Number(instance.inputValue) * 3600 * 2
+ parseInt(instance.inputValue, 10) * 3600 * 2
);
await configRepository.setString(
'VRCX_clearVRCXCacheFrequency',
- vrcxStore.clearVRCXCacheFrequency
+ vrcxStore.clearVRCXCacheFrequency.toString()
);
}
}
diff --git a/src/stores/updateLoop.js b/src/stores/updateLoop.js
index ff24761d..3e7fcb19 100644
--- a/src/stores/updateLoop.js
+++ b/src/stores/updateLoop.js
@@ -63,6 +63,13 @@ export const useUpdateLoopStore = defineStore('UpdateLoop', () => {
}
});
+ const ipcTimeout = computed({
+ get: () => state.ipcTimeout,
+ set: (value) => {
+ state.ipcTimeout = value;
+ }
+ });
+
async function updateLoop() {
const authStore = useAuthStore();
const userStore = useUserStore();
@@ -102,7 +109,7 @@ export const useUpdateLoopStore = defineStore('UpdateLoop', () => {
if (--state.nextAppUpdateCheck <= 0) {
state.nextAppUpdateCheck = 3600; // 1hour
if (vrcxUpdaterStore.autoUpdateVRCX !== 'Off') {
- vrcxUpdaterStore.checkForVRCXUpdate(uiStore.notifyMenu);
+ vrcxUpdaterStore.checkForVRCXUpdate();
}
}
if (--state.ipcTimeout <= 0) {
@@ -166,6 +173,7 @@ export const useUpdateLoopStore = defineStore('UpdateLoop', () => {
nextGroupInstanceRefresh,
nextCurrentUserRefresh,
nextDiscordUpdate,
+ ipcTimeout,
updateLoop
};
});
diff --git a/src/stores/user.js b/src/stores/user.js
index 26cc0ced..51adf765 100644
--- a/src/stores/user.js
+++ b/src/stores/user.js
@@ -224,11 +224,13 @@ export const useUserStore = defineStore('User', () => {
fileCreatedAt: ''
},
representedGroup: {
+ bannerId: '',
bannerUrl: '',
description: '',
discriminator: '',
groupId: '',
iconUrl: '',
+ id: '',
isRepresenting: false,
memberCount: 0,
memberVisibility: '',
@@ -236,7 +238,8 @@ export const useUserStore = defineStore('User', () => {
ownerId: '',
privacy: '',
shortCode: '',
- $thumbnailUrl: ''
+ $thumbnailUrl: '',
+ $memberId: ''
},
isRepresentedGroupLoading: false,
joinCount: 0,
@@ -775,10 +778,12 @@ export const useUserStore = defineStore('User', () => {
};
D.isRepresentedGroupLoading = true;
D.representedGroup = {
+ bannerId: '',
bannerUrl: '',
description: '',
discriminator: '',
groupId: '',
+ id: '',
iconUrl: '',
isRepresenting: false,
memberCount: 0,
@@ -787,7 +792,8 @@ export const useUserStore = defineStore('User', () => {
ownerId: '',
privacy: '',
shortCode: '',
- $thumbnailUrl: ''
+ $thumbnailUrl: '',
+ $memberId: ''
};
D.lastSeen = '';
D.joinCount = 0;
diff --git a/src/stores/vrcx.js b/src/stores/vrcx.js
index a19403a8..89e5c247 100644
--- a/src/stores/vrcx.js
+++ b/src/stores/vrcx.js
@@ -82,8 +82,8 @@ export const useVrcxStore = defineStore('Vrcx', () => {
debounce(saveVRCXWindowOption, 300)();
});
- window.electron.onWindowStateChange((event, state) => {
- state.windowState = state;
+ window.electron.onWindowStateChange((event, newState) => {
+ state.windowState = newState.windowState;
debounce(saveVRCXWindowOption, 300)();
});
@@ -121,10 +121,13 @@ export const useVrcxStore = defineStore('Vrcx', () => {
);
}
state.proxyServer = await VRCXStorage.Get('VRCX_ProxyServer');
- state.locationX = await VRCXStorage.Get('VRCX_LocationX');
- state.locationY = await VRCXStorage.Get('VRCX_LocationY');
- state.sizeWidth = await VRCXStorage.Get('VRCX_SizeWidth');
- state.sizeHeight = await VRCXStorage.Get('VRCX_SizeHeight');
+ state.locationX = parseInt(await VRCXStorage.Get('VRCX_LocationX'), 10);
+ state.locationY = parseInt(await VRCXStorage.Get('VRCX_LocationY'), 10);
+ state.sizeWidth = parseInt(await VRCXStorage.Get('VRCX_SizeWidth'), 10);
+ state.sizeHeight = parseInt(
+ await VRCXStorage.Get('VRCX_SizeHeight'),
+ 10
+ );
state.windowState = await VRCXStorage.Get('VRCX_WindowState');
state.maxTableSize = await configRepository.getInt(
@@ -381,10 +384,10 @@ export const useVrcxStore = defineStore('Vrcx', () => {
async function saveVRCXWindowOption() {
if (LINUX) {
- VRCXStorage.Set('VRCX_LocationX', state.locationX);
- VRCXStorage.Set('VRCX_LocationY', state.locationY);
- VRCXStorage.Set('VRCX_SizeWidth', state.sizeWidth);
- VRCXStorage.Set('VRCX_SizeHeight', state.sizeHeight);
+ VRCXStorage.Set('VRCX_LocationX', state.locationX.toString());
+ VRCXStorage.Set('VRCX_LocationY', state.locationY.toString());
+ VRCXStorage.Set('VRCX_SizeWidth', state.sizeWidth.toString());
+ VRCXStorage.Set('VRCX_SizeHeight', state.sizeHeight.toString());
VRCXStorage.Set('VRCX_WindowState', state.windowState);
VRCXStorage.Flush();
}
diff --git a/src/stores/vrcxUpdater.js b/src/stores/vrcxUpdater.js
index bfd908de..6496d6d7 100644
--- a/src/stores/vrcxUpdater.js
+++ b/src/stores/vrcxUpdater.js
@@ -177,6 +177,37 @@ export const useVRCXUpdaterStore = defineStore('VRCXUpdater', () => {
await configRepository.setString('VRCX_id', state.vrcxId);
}
}
+ function getAssetOfInterest(assets) {
+ let downloadUrl = '';
+ let hashString = '';
+ let size = 0;
+ for (const asset of assets) {
+ if (asset.state !== 'uploaded') {
+ continue;
+ }
+ if (
+ !LINUX &&
+ (asset.content_type === 'application/x-msdownload' ||
+ asset.content_type === 'application/x-msdos-program')
+ ) {
+ downloadUrl = asset.browser_download_url;
+ if (asset.digest && asset.digest.startsWith('sha256:')) {
+ hashString = asset.digest.replace('sha256:', '');
+ }
+ size = asset.size;
+ continue;
+ }
+ if (LINUX && asset.content_type === 'application/octet-stream') {
+ downloadUrl = asset.browser_download_url;
+ if (asset.digest && asset.digest.startsWith('sha256:')) {
+ hashString = asset.digest.replace('sha256:', '');
+ }
+ size = asset.size;
+ continue;
+ }
+ }
+ return { downloadUrl, hashString, size };
+ }
async function checkForVRCXUpdate() {
if (
!currentVersion.value ||
@@ -223,44 +254,9 @@ export const useVRCXUpdaterStore = defineStore('VRCXUpdater', () => {
// update already downloaded
state.VRCXUpdateDialog.updatePendingIsLatest = true;
} else if (releaseName > currentVersion.value) {
- let downloadUrl = '';
- let hashString = '';
- let size = 0;
- for (const asset of json.assets) {
- if (asset.state !== 'uploaded') {
- continue;
- }
- if (
- !LINUX &&
- (asset.content_type === 'application/x-msdownload' ||
- asset.content_type ===
- 'application/x-msdos-program')
- ) {
- downloadUrl = asset.browser_download_url;
- if (
- asset.digest &&
- asset.digest.startsWith('sha256:')
- ) {
- hashString = asset.digest.replace('sha256:', '');
- }
- size = asset.size;
- continue;
- }
- if (
- LINUX &&
- asset.content_type === 'application/octet-stream'
- ) {
- downloadUrl = asset.browser_download_url;
- if (
- asset.digest &&
- asset.digest.startsWith('sha256:')
- ) {
- hashString = asset.digest.replace('sha256:', '');
- }
- size = asset.size;
- continue;
- }
- }
+ const { downloadUrl, hashString, size } = getAssetOfInterest(
+ json.assets
+ );
if (!downloadUrl) {
return;
}
@@ -321,13 +317,13 @@ export const useVRCXUpdaterStore = defineStore('VRCXUpdater', () => {
return;
}
for (const release of json) {
- for (const asset of release.assets) {
- if (
- (asset.content_type === 'application/x-msdownload' ||
- asset.content_type === 'application/x-msdos-program') &&
- asset.state === 'uploaded'
- ) {
+ if (release.prerelease) {
+ continue;
+ }
+ assetLoop: for (const asset of release.assets) {
+ if (asset.state === 'uploaded') {
releases.push(release);
+ break assetLoop;
}
}
}
@@ -376,37 +372,9 @@ export const useVRCXUpdaterStore = defineStore('VRCXUpdater', () => {
if (release.name !== state.VRCXUpdateDialog.release) {
continue;
}
- let downloadUrl = '';
- let hashString = '';
- let size = 0;
- for (const asset of release.assets) {
- if (asset.state !== 'uploaded') {
- continue;
- }
- if (
- WINDOWS &&
- (asset.content_type === 'application/x-msdownload' ||
- asset.content_type === 'application/x-msdos-program')
- ) {
- downloadUrl = asset.browser_download_url;
- if (asset.digest && asset.digest.startsWith('sha256:')) {
- hashString = asset.digest.replace('sha256:', '');
- }
- size = asset.size;
- continue;
- }
- if (
- LINUX &&
- asset.content_type === 'application/octet-stream'
- ) {
- downloadUrl = asset.browser_download_url;
- if (asset.digest && asset.digest.startsWith('sha256:')) {
- hashString = asset.digest.replace('sha256:', '');
- }
- size = asset.size;
- continue;
- }
- }
+ const { downloadUrl, hashString, size } = getAssetOfInterest(
+ release.assets
+ );
if (!downloadUrl) {
return;
}