mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-19 14:53:50 +02:00
VRC Credits on user dialog
This commit is contained in:
@@ -452,6 +452,15 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
<div
|
||||||
|
v-if="userDialog.ref.id === currentUser.id"
|
||||||
|
class="x-friend-item"
|
||||||
|
@click="getVRChatCredits()">
|
||||||
|
<div class="detail">
|
||||||
|
<span class="name">{{ t('view.profile.profile.vrchat_credits') }}</span>
|
||||||
|
<span class="extra">{{ vrchatCredit ?? t('view.profile.profile.refresh') }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div
|
<div
|
||||||
v-if="userDialog.ref.id === currentUser.id && currentUser.homeLocation"
|
v-if="userDialog.ref.id === currentUser.id && currentUser.homeLocation"
|
||||||
class="x-friend-item"
|
class="x-friend-item"
|
||||||
@@ -1431,6 +1440,7 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
const isEditNoteAndMemoDialogVisible = ref(false);
|
const isEditNoteAndMemoDialogVisible = ref(false);
|
||||||
|
const vrchatCredit = ref(null);
|
||||||
|
|
||||||
const userDialogAvatars = computed(() => {
|
const userDialogAvatars = computed(() => {
|
||||||
const { avatars, avatarReleaseStatus } = userDialog.value;
|
const { avatars, avatarReleaseStatus } = userDialog.value;
|
||||||
@@ -1485,7 +1495,11 @@
|
|||||||
|
|
||||||
function handleUserDialogTab(tabName) {
|
function handleUserDialogTab(tabName) {
|
||||||
const userId = userDialog.value.id;
|
const userId = userDialog.value.id;
|
||||||
if (tabName === 'Groups') {
|
if (tabName === 'Info') {
|
||||||
|
if (vrchatCredit.value === null) {
|
||||||
|
getVRChatCredits();
|
||||||
|
}
|
||||||
|
} else if (tabName === 'Groups') {
|
||||||
if (userDialogLastGroup.value !== userId) {
|
if (userDialogLastGroup.value !== userId) {
|
||||||
userDialogLastGroup.value = userId;
|
userDialogLastGroup.value = userId;
|
||||||
getUserGroups(userId);
|
getUserGroups(userId);
|
||||||
@@ -2467,4 +2481,8 @@
|
|||||||
function closeInviteDialog() {
|
function closeInviteDialog() {
|
||||||
clearInviteImageUpload();
|
clearInviteImageUpload();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getVRChatCredits() {
|
||||||
|
miscRequest.getVRChatCredits().then((args) => (vrchatCredit.value = args.json?.balance));
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user