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

@@ -326,7 +326,7 @@
</div>
</div>
<TabsUnderline
v-model="avatarDialogLastActiveTab"
v-model="avatarDialogActiveTab"
:items="avatarDialogTabs"
:unmount-on-hide="false"
@update:modelValue="avatarDialogTabClick">
@@ -615,6 +615,7 @@
{ value: 'JSON', label: t('dialog.avatar.json.header') }
]);
const avatarDialogActiveTab = ref('Info');
const avatarDialogLastActiveTab = ref('Info');
const changeAvatarImageDialogVisible = ref(false);
const previousImageUrl = ref('');
@@ -686,6 +687,7 @@
);
function handleAvatarDialogTab(tabName) {
avatarDialogLastActiveTab.value = tabName;
if (tabName === 'JSON') {
refreshAvatarDialogTreeData();
}

View File

@@ -349,7 +349,7 @@
</div>
</div>
<TabsUnderline
v-model="groupDialogLastActiveTab"
v-model="groupDialogActiveTab"
:items="groupDialogTabs"
:unmount-on-hide="false"
@update:modelValue="groupDialogTabClick">
@@ -1289,6 +1289,7 @@
const { isDarkMode } = storeToRefs(useAppearanceSettingsStore());
const groupDialogActiveTab = ref('Info');
const groupDialogLastActiveTab = ref('Info');
const isGroupMembersDone = ref(false);
const isGroupMembersLoading = ref(false);
@@ -1693,6 +1694,7 @@
}
function handleGroupDialogTab(tabName) {
groupDialogLastActiveTab.value = tabName;
if (tabName === 'Members') {
getGroupDialogGroupMembers();
} else if (tabName === 'Photos') {

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;
}

View File

@@ -317,7 +317,7 @@
</div>
</div>
<TabsUnderline
v-model="worldDialogLastActiveTab"
v-model="worldDialogActiveTab"
:items="worldDialogTabs"
:unmount-on-hide="false"
@update:modelValue="worldDialogTabClick">
@@ -921,6 +921,7 @@
return platforms.join(', ');
});
const worldDialogActiveTab = ref('Instances');
const worldDialogLastActiveTab = ref('Instances');
watch(
@@ -934,6 +935,7 @@
);
function handleWorldDialogTab(tabName) {
worldDialogLastActiveTab.value = tabName;
if (tabName === 'JSON') {
refreshWorldDialogTreeData();
}