Fix dialog tab load

This commit is contained in:
Natsumi
2026-01-16 10:14:44 +13:00
parent aef6acefc9
commit 1c1dd2ebc3
4 changed files with 13 additions and 4 deletions

View File

@@ -19,7 +19,7 @@
:user-dialog-command="userDialogCommand" />
<TabsUnderline
v-model="userDialogLastActiveTab"
v-model="userDialogActiveTab"
:items="userDialogTabs"
:unmount-on-hide="false"
@update:modelValue="userDialogTabClick">
@@ -1515,6 +1515,7 @@
const userDialogGroupAllSelected = ref(false);
const userDialogGroupEditSelectedGroupIds = ref([]); // selected groups in edit mode
const userDialogActiveTab = ref('Info');
const userDialogLastActiveTab = ref('Info');
const userDialogLastMutualFriends = ref('');
const userDialogLastGroup = ref('');
@@ -1636,6 +1637,7 @@
}
function handleUserDialogTab(tabName) {
userDialogLastActiveTab.value = tabName;
const userId = userDialog.value.id;
if (tabName === 'Info') {
if (vrchatCredit.value === null) {
@@ -1643,6 +1645,7 @@
}
} else if (tabName === 'mutual') {
if (userId === currentUser.value.id) {
userDialogActiveTab.value = 'Info';
userDialogLastActiveTab.value = 'Info';
return;
}