mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-18 14:23:51 +02:00
Fix opening last active tab
This commit is contained in:
@@ -605,7 +605,6 @@
|
||||
]);
|
||||
|
||||
const avatarDialogActiveTab = ref('Info');
|
||||
const avatarDialogLastActiveTab = ref('Info');
|
||||
const changeAvatarImageDialogVisible = ref(false);
|
||||
const previousImageUrl = ref('');
|
||||
|
||||
@@ -676,18 +675,19 @@
|
||||
);
|
||||
|
||||
function handleAvatarDialogTab(tabName) {
|
||||
avatarDialogLastActiveTab.value = tabName;
|
||||
avatarDialogActiveTab.value = tabName;
|
||||
avatarDialog.value.lastActiveTab = tabName;
|
||||
if (tabName === 'JSON') {
|
||||
refreshAvatarDialogTreeData();
|
||||
}
|
||||
}
|
||||
|
||||
function loadLastActiveTab() {
|
||||
handleAvatarDialogTab(avatarDialogLastActiveTab.value);
|
||||
handleAvatarDialogTab(avatarDialog.value.lastActiveTab);
|
||||
}
|
||||
|
||||
function avatarDialogTabClick(tabName) {
|
||||
if (tabName === avatarDialogLastActiveTab.value) {
|
||||
if (tabName === avatarDialog.value.lastActiveTab) {
|
||||
if (tabName === 'JSON') {
|
||||
refreshAvatarDialogTreeData();
|
||||
}
|
||||
|
||||
@@ -1237,7 +1237,6 @@
|
||||
const { isDarkMode } = storeToRefs(useAppearanceSettingsStore());
|
||||
|
||||
const groupDialogActiveTab = ref('Info');
|
||||
const groupDialogLastActiveTab = ref('Info');
|
||||
const isGroupMembersDone = ref(false);
|
||||
const isGroupMembersLoading = ref(false);
|
||||
const groupDialogGalleryCurrentName = ref('0');
|
||||
@@ -1631,7 +1630,8 @@
|
||||
}
|
||||
|
||||
function handleGroupDialogTab(tabName) {
|
||||
groupDialogLastActiveTab.value = tabName;
|
||||
groupDialogActiveTab.value = tabName;
|
||||
groupDialog.value.lastActiveTab = tabName;
|
||||
if (tabName === 'Members') {
|
||||
getGroupDialogGroupMembers();
|
||||
} else if (tabName === 'Photos') {
|
||||
@@ -1642,7 +1642,7 @@
|
||||
}
|
||||
|
||||
function loadLastActiveTab() {
|
||||
handleGroupDialogTab(groupDialogLastActiveTab.value);
|
||||
handleGroupDialogTab(groupDialog.value.lastActiveTab);
|
||||
}
|
||||
|
||||
function groupDialogTabClick(tabName) {
|
||||
|
||||
@@ -1378,7 +1378,6 @@
|
||||
const userDialogGroupEditSelectedGroupIds = ref([]); // selected groups in edit mode
|
||||
|
||||
const userDialogActiveTab = ref('Info');
|
||||
const userDialogLastActiveTab = ref('Info');
|
||||
const userDialogLastMutualFriends = ref('');
|
||||
const userDialogLastGroup = ref('');
|
||||
const userDialogLastAvatar = ref('');
|
||||
@@ -1490,7 +1489,8 @@
|
||||
}
|
||||
|
||||
function handleUserDialogTab(tabName) {
|
||||
userDialogLastActiveTab.value = tabName;
|
||||
userDialogActiveTab.value = tabName;
|
||||
userDialog.value.lastActiveTab = tabName;
|
||||
const userId = userDialog.value.id;
|
||||
if (tabName === 'Info') {
|
||||
if (vrchatCredit.value === null) {
|
||||
@@ -1499,7 +1499,7 @@
|
||||
} else if (tabName === 'mutual') {
|
||||
if (userId === currentUser.value.id) {
|
||||
userDialogActiveTab.value = 'Info';
|
||||
userDialogLastActiveTab.value = 'Info';
|
||||
userDialog.value.lastActiveTab = 'Info';
|
||||
return;
|
||||
}
|
||||
if (userDialogLastMutualFriends.value !== userId) {
|
||||
@@ -1538,11 +1538,11 @@
|
||||
}
|
||||
|
||||
function loadLastActiveTab() {
|
||||
handleUserDialogTab(userDialogLastActiveTab.value);
|
||||
handleUserDialogTab(userDialog.value.lastActiveTab);
|
||||
}
|
||||
|
||||
function userDialogTabClick(tabName) {
|
||||
if (tabName === userDialogLastActiveTab.value) {
|
||||
if (tabName === userDialog.value.lastActiveTab) {
|
||||
if (tabName === 'JSON') {
|
||||
refreshUserDialogTreeData();
|
||||
}
|
||||
|
||||
@@ -914,7 +914,6 @@
|
||||
});
|
||||
|
||||
const worldDialogActiveTab = ref('Instances');
|
||||
const worldDialogLastActiveTab = ref('Instances');
|
||||
|
||||
watch(
|
||||
() => worldDialog.value.loading,
|
||||
@@ -927,18 +926,19 @@
|
||||
);
|
||||
|
||||
function handleWorldDialogTab(tabName) {
|
||||
worldDialogLastActiveTab.value = tabName;
|
||||
worldDialogActiveTab.value = tabName;
|
||||
worldDialog.value.lastActiveTab = tabName;
|
||||
if (tabName === 'JSON') {
|
||||
refreshWorldDialogTreeData();
|
||||
}
|
||||
}
|
||||
|
||||
function loadLastActiveTab() {
|
||||
handleWorldDialogTab(worldDialogLastActiveTab.value);
|
||||
handleWorldDialogTab(worldDialog.value.lastActiveTab);
|
||||
}
|
||||
|
||||
function worldDialogTabClick(tabName) {
|
||||
if (tabName === worldDialogLastActiveTab.value) {
|
||||
if (tabName === worldDialog.value.lastActiveTab) {
|
||||
if (tabName === 'JSON') {
|
||||
refreshWorldDialogTreeData();
|
||||
}
|
||||
|
||||
@@ -47,6 +47,7 @@ export const useAvatarStore = defineStore('Avatar', () => {
|
||||
const avatarDialog = ref({
|
||||
visible: false,
|
||||
loading: false,
|
||||
lastActiveTab: 'Info',
|
||||
id: '',
|
||||
memo: '',
|
||||
ref: {},
|
||||
|
||||
@@ -46,6 +46,7 @@ export const useGroupStore = defineStore('Group', () => {
|
||||
const groupDialog = ref({
|
||||
visible: false,
|
||||
loading: false,
|
||||
lastActiveTab: 'Info',
|
||||
isGetGroupDialogGroupLoading: false,
|
||||
treeData: {},
|
||||
id: '',
|
||||
@@ -178,7 +179,6 @@ export const useGroupStore = defineStore('Group', () => {
|
||||
})
|
||||
.then((args) => {
|
||||
if (groupId === args.ref.id) {
|
||||
D.loading = false;
|
||||
D.ref = args.ref;
|
||||
uiStore.setDialogCrumbLabel(
|
||||
'group',
|
||||
@@ -447,6 +447,7 @@ export const useGroupStore = defineStore('Group', () => {
|
||||
.then((args) => {
|
||||
const ref = applyGroup(args.json);
|
||||
if (D.id === ref.id) {
|
||||
D.loading = false;
|
||||
D.ref = ref;
|
||||
D.inGroup = ref.membershipStatus === 'member';
|
||||
for (const role of ref.roles) {
|
||||
|
||||
@@ -183,6 +183,7 @@ export const useUserStore = defineStore('User', () => {
|
||||
const userDialog = ref({
|
||||
visible: false,
|
||||
loading: false,
|
||||
lastActiveTab: 'Info',
|
||||
id: '',
|
||||
ref: {},
|
||||
friend: {},
|
||||
@@ -900,7 +901,11 @@ export const useUserStore = defineStore('User', () => {
|
||||
} else if (D.ref.friendRequestStatus === 'outgoing') {
|
||||
D.outgoingRequest = true;
|
||||
}
|
||||
userRequest.getUser(args.params);
|
||||
userRequest.getUser(args.params).then((args1) => {
|
||||
if (args1.ref.id === D.id) {
|
||||
D.loading = false;
|
||||
}
|
||||
});
|
||||
let inCurrentWorld = false;
|
||||
if (
|
||||
locationStore.lastLocation.playerList.has(D.ref.id)
|
||||
@@ -1015,7 +1020,6 @@ export const useUserStore = defineStore('User', () => {
|
||||
.then((args1) => {
|
||||
groupStore.handleGroupRepresented(args1);
|
||||
});
|
||||
D.loading = false;
|
||||
D.visible = true;
|
||||
applyUserDialogLocation(true);
|
||||
});
|
||||
|
||||
@@ -36,6 +36,7 @@ export const useWorldStore = defineStore('World', () => {
|
||||
const worldDialog = reactive({
|
||||
visible: false,
|
||||
loading: false,
|
||||
lastActiveTab: 'Instances',
|
||||
id: '',
|
||||
memo: '',
|
||||
$location: {},
|
||||
@@ -158,7 +159,6 @@ export const useWorldStore = defineStore('World', () => {
|
||||
})
|
||||
.then((args) => {
|
||||
if (D.id === args.ref.id) {
|
||||
D.loading = false;
|
||||
D.ref = args.ref;
|
||||
uiStore.setDialogCrumbLabel(
|
||||
'world',
|
||||
@@ -203,18 +203,14 @@ export const useWorldStore = defineStore('World', () => {
|
||||
});
|
||||
|
||||
if (args.cache) {
|
||||
worldRequest
|
||||
.getWorld(args.params)
|
||||
.catch((err) => {
|
||||
throw err;
|
||||
})
|
||||
.then((args1) => {
|
||||
if (D.id === args1.ref.id) {
|
||||
D.ref = args1.ref;
|
||||
updateVRChatWorldCache();
|
||||
}
|
||||
return args1;
|
||||
});
|
||||
worldRequest.getWorld(args.params).then((args1) => {
|
||||
if (D.id === args1.ref.id) {
|
||||
D.loading = false;
|
||||
D.ref = args1.ref;
|
||||
updateVRChatWorldCache();
|
||||
}
|
||||
return args1;
|
||||
});
|
||||
}
|
||||
}
|
||||
D.visible = true;
|
||||
|
||||
Reference in New Issue
Block a user