mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-18 22:33:50 +02:00
fix 404 handling in main dialog
This commit is contained in:
@@ -98,12 +98,7 @@
|
||||
get: () => activeComponent.value !== null,
|
||||
set: (value) => {
|
||||
if (!value) {
|
||||
userStore.userDialog.visible = false;
|
||||
worldStore.worldDialog.visible = false;
|
||||
avatarStore.avatarDialog.visible = false;
|
||||
groupStore.groupDialog.visible = false;
|
||||
instanceStore.hidePreviousInstancesDialogs();
|
||||
uiStore.clearDialogCrumbs();
|
||||
uiStore.closeMainDialog();
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -177,7 +172,7 @@
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Dialog v-model:open="isOpen">
|
||||
<Dialog v-if="isOpen" v-model:open="isOpen">
|
||||
<DialogContent :class="dialogClass" style="top: 10vh" :show-close-button="false">
|
||||
<Breadcrumb v-if="shouldShowBreadcrumbs" class="mb-2">
|
||||
<BreadcrumbList>
|
||||
|
||||
@@ -216,7 +216,7 @@ export const useAvatarStore = defineStore('Avatar', () => {
|
||||
ref2.authorId !== userStore.currentUser.id
|
||||
) {
|
||||
D.loading = false;
|
||||
D.visible = false;
|
||||
uiStore.closeMainDialog();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -164,7 +164,7 @@ export const useGroupStore = defineStore('Group', () => {
|
||||
})
|
||||
.catch((err) => {
|
||||
D.loading = false;
|
||||
D.visible = false;
|
||||
uiStore.closeMainDialog();
|
||||
toast.error(t('message.group.load_failed'));
|
||||
throw err;
|
||||
})
|
||||
|
||||
@@ -112,6 +112,21 @@ export const useUiStore = defineStore('Ui', () => {
|
||||
dialogCrumbs.value = [];
|
||||
}
|
||||
|
||||
function closeMainDialog() {
|
||||
const userStore = useUserStore();
|
||||
const worldStore = useWorldStore();
|
||||
const avatarStore = useAvatarStore();
|
||||
const groupStore = useGroupStore();
|
||||
const instanceStore = useInstanceStore();
|
||||
|
||||
userStore.userDialog.visible = false;
|
||||
worldStore.worldDialog.visible = false;
|
||||
avatarStore.avatarDialog.visible = false;
|
||||
groupStore.groupDialog.visible = false;
|
||||
instanceStore.hidePreviousInstancesDialogs();
|
||||
clearDialogCrumbs();
|
||||
}
|
||||
|
||||
function openDialog({ type, id, label = '', skipBreadcrumb = false }) {
|
||||
const userStore = useUserStore();
|
||||
const worldStore = useWorldStore();
|
||||
@@ -244,6 +259,7 @@ export const useUiStore = defineStore('Ui', () => {
|
||||
setDialogCrumbLabel,
|
||||
jumpDialogCrumb,
|
||||
clearDialogCrumbs,
|
||||
closeMainDialog,
|
||||
openDialog
|
||||
};
|
||||
});
|
||||
|
||||
@@ -845,7 +845,7 @@ export const useUserStore = defineStore('User', () => {
|
||||
})
|
||||
.catch((err) => {
|
||||
D.loading = false;
|
||||
D.visible = false;
|
||||
uiStore.closeMainDialog();
|
||||
toast.error(t('message.user.load_failed'));
|
||||
throw err;
|
||||
})
|
||||
|
||||
@@ -146,7 +146,7 @@ export const useWorldStore = defineStore('World', () => {
|
||||
})
|
||||
.catch((err) => {
|
||||
D.loading = false;
|
||||
D.visible = false;
|
||||
uiStore.closeMainDialog();
|
||||
toast.error(t('message.world.load_failed'));
|
||||
throw err;
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user