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
@@ -326,7 +326,7 @@
</div> </div>
</div> </div>
<TabsUnderline <TabsUnderline
v-model="avatarDialogLastActiveTab" v-model="avatarDialogActiveTab"
:items="avatarDialogTabs" :items="avatarDialogTabs"
:unmount-on-hide="false" :unmount-on-hide="false"
@update:modelValue="avatarDialogTabClick"> @update:modelValue="avatarDialogTabClick">
@@ -615,6 +615,7 @@
{ value: 'JSON', label: t('dialog.avatar.json.header') } { value: 'JSON', label: t('dialog.avatar.json.header') }
]); ]);
const avatarDialogActiveTab = ref('Info');
const avatarDialogLastActiveTab = ref('Info'); const avatarDialogLastActiveTab = ref('Info');
const changeAvatarImageDialogVisible = ref(false); const changeAvatarImageDialogVisible = ref(false);
const previousImageUrl = ref(''); const previousImageUrl = ref('');
@@ -686,6 +687,7 @@
); );
function handleAvatarDialogTab(tabName) { function handleAvatarDialogTab(tabName) {
avatarDialogLastActiveTab.value = tabName;
if (tabName === 'JSON') { if (tabName === 'JSON') {
refreshAvatarDialogTreeData(); refreshAvatarDialogTreeData();
} }
@@ -349,7 +349,7 @@
</div> </div>
</div> </div>
<TabsUnderline <TabsUnderline
v-model="groupDialogLastActiveTab" v-model="groupDialogActiveTab"
:items="groupDialogTabs" :items="groupDialogTabs"
:unmount-on-hide="false" :unmount-on-hide="false"
@update:modelValue="groupDialogTabClick"> @update:modelValue="groupDialogTabClick">
@@ -1289,6 +1289,7 @@
const { isDarkMode } = storeToRefs(useAppearanceSettingsStore()); const { isDarkMode } = storeToRefs(useAppearanceSettingsStore());
const groupDialogActiveTab = ref('Info');
const groupDialogLastActiveTab = ref('Info'); const groupDialogLastActiveTab = ref('Info');
const isGroupMembersDone = ref(false); const isGroupMembersDone = ref(false);
const isGroupMembersLoading = ref(false); const isGroupMembersLoading = ref(false);
@@ -1693,6 +1694,7 @@
} }
function handleGroupDialogTab(tabName) { function handleGroupDialogTab(tabName) {
groupDialogLastActiveTab.value = tabName;
if (tabName === 'Members') { if (tabName === 'Members') {
getGroupDialogGroupMembers(); getGroupDialogGroupMembers();
} else if (tabName === 'Photos') { } else if (tabName === 'Photos') {
@@ -19,7 +19,7 @@
:user-dialog-command="userDialogCommand" /> :user-dialog-command="userDialogCommand" />
<TabsUnderline <TabsUnderline
v-model="userDialogLastActiveTab" v-model="userDialogActiveTab"
:items="userDialogTabs" :items="userDialogTabs"
:unmount-on-hide="false" :unmount-on-hide="false"
@update:modelValue="userDialogTabClick"> @update:modelValue="userDialogTabClick">
@@ -1515,6 +1515,7 @@
const userDialogGroupAllSelected = ref(false); const userDialogGroupAllSelected = ref(false);
const userDialogGroupEditSelectedGroupIds = ref([]); // selected groups in edit mode const userDialogGroupEditSelectedGroupIds = ref([]); // selected groups in edit mode
const userDialogActiveTab = ref('Info');
const userDialogLastActiveTab = ref('Info'); const userDialogLastActiveTab = ref('Info');
const userDialogLastMutualFriends = ref(''); const userDialogLastMutualFriends = ref('');
const userDialogLastGroup = ref(''); const userDialogLastGroup = ref('');
@@ -1636,6 +1637,7 @@
} }
function handleUserDialogTab(tabName) { function handleUserDialogTab(tabName) {
userDialogLastActiveTab.value = tabName;
const userId = userDialog.value.id; const userId = userDialog.value.id;
if (tabName === 'Info') { if (tabName === 'Info') {
if (vrchatCredit.value === null) { if (vrchatCredit.value === null) {
@@ -1643,6 +1645,7 @@
} }
} else if (tabName === 'mutual') { } else if (tabName === 'mutual') {
if (userId === currentUser.value.id) { if (userId === currentUser.value.id) {
userDialogActiveTab.value = 'Info';
userDialogLastActiveTab.value = 'Info'; userDialogLastActiveTab.value = 'Info';
return; return;
} }
@@ -317,7 +317,7 @@
</div> </div>
</div> </div>
<TabsUnderline <TabsUnderline
v-model="worldDialogLastActiveTab" v-model="worldDialogActiveTab"
:items="worldDialogTabs" :items="worldDialogTabs"
:unmount-on-hide="false" :unmount-on-hide="false"
@update:modelValue="worldDialogTabClick"> @update:modelValue="worldDialogTabClick">
@@ -921,6 +921,7 @@
return platforms.join(', '); return platforms.join(', ');
}); });
const worldDialogActiveTab = ref('Instances');
const worldDialogLastActiveTab = ref('Instances'); const worldDialogLastActiveTab = ref('Instances');
watch( watch(
@@ -934,6 +935,7 @@
); );
function handleWorldDialogTab(tabName) { function handleWorldDialogTab(tabName) {
worldDialogLastActiveTab.value = tabName;
if (tabName === 'JSON') { if (tabName === 'JSON') {
refreshWorldDialogTreeData(); refreshWorldDialogTreeData();
} }