diff --git a/src/components/dialogs/UserDialog/UserDialog.vue b/src/components/dialogs/UserDialog/UserDialog.vue index 973be0d8..3a1fbd4d 100644 --- a/src/components/dialogs/UserDialog/UserDialog.vue +++ b/src/components/dialogs/UserDialog/UserDialog.vue @@ -452,6 +452,15 @@ +
+
+ {{ t('view.profile.profile.vrchat_credits') }} + {{ vrchatCredit ?? t('view.profile.profile.refresh') }} +
+
{ const { avatars, avatarReleaseStatus } = userDialog.value; @@ -1485,7 +1495,11 @@ function handleUserDialogTab(tabName) { const userId = userDialog.value.id; - if (tabName === 'Groups') { + if (tabName === 'Info') { + if (vrchatCredit.value === null) { + getVRChatCredits(); + } + } else if (tabName === 'Groups') { if (userDialogLastGroup.value !== userId) { userDialogLastGroup.value = userId; getUserGroups(userId); @@ -2467,4 +2481,8 @@ function closeInviteDialog() { clearInviteImageUpload(); } + + function getVRChatCredits() { + miscRequest.getVRChatCredits().then((args) => (vrchatCredit.value = args.json?.balance)); + }