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