From d1a891eb1252414a3d409fed1fc35b8445dfbcbe Mon Sep 17 00:00:00 2001 From: Natsumi Date: Sun, 2 Nov 2025 02:38:18 +1100 Subject: [PATCH] VRC Credits on user dialog --- .../dialogs/UserDialog/UserDialog.vue | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) 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)); + }