Fix Bug 65631 - Rooms: fix broken return from profile to room/folder
This commit is contained in:
parent
2420f736bd
commit
ffc8eecd17
@ -13,7 +13,9 @@ const generalRoutes = [
|
||||
children: [
|
||||
{
|
||||
index: true,
|
||||
element: <Navigate to="login" />,
|
||||
Component: () => (
|
||||
<Navigate to="login" state={window.DocSpace?.location?.state} />
|
||||
),
|
||||
},
|
||||
{
|
||||
path: "login",
|
||||
|
@ -107,7 +107,6 @@ class ProfileActionsStore {
|
||||
|
||||
if ((isAdmin || isOwner || isRoomAdmin) && !prefix) {
|
||||
this.selectedFolderStore.setSelectedFolder(null);
|
||||
this.treeFoldersStore.setSelectedNode(["accounts"]);
|
||||
}
|
||||
|
||||
const state = {
|
||||
|
@ -222,14 +222,14 @@ class InfoPanelStore {
|
||||
return item.isRoom || !!item.roomType
|
||||
? item.rootFolderType === FolderType.Archive
|
||||
? item.logo && item.logo.medium
|
||||
: this.settingsStore.getIcon(
|
||||
size,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
item.roomType,
|
||||
true
|
||||
)
|
||||
: this.settingsStore.getIcon(
|
||||
size,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
item.roomType,
|
||||
true
|
||||
)
|
||||
? item.logo.medium
|
||||
: item.icon
|
||||
? item.icon
|
||||
@ -243,7 +243,7 @@ class InfoPanelStore {
|
||||
|
||||
openUser = async (user, navigate) => {
|
||||
if (user.id === this.authStore.userStore.user.id) {
|
||||
this.openSelfProfile(navigate);
|
||||
this.openSelfProfile();
|
||||
return;
|
||||
}
|
||||
|
||||
@ -251,15 +251,8 @@ class InfoPanelStore {
|
||||
this.openAccountsWithSelectedUser(fetchedUser, navigate);
|
||||
};
|
||||
|
||||
openSelfProfile = (navigate) => {
|
||||
const path = [
|
||||
window.DocSpaceConfig?.proxy?.url,
|
||||
config.homepage,
|
||||
"/profile",
|
||||
];
|
||||
this.selectedFolderStore.setSelectedFolder(null);
|
||||
this.treeFoldersStore.setSelectedNode(["accounts", "filter"]);
|
||||
navigate(combineUrl(...path));
|
||||
openSelfProfile = () => {
|
||||
this.peopleStore.profileActionsStore.onProfileClick();
|
||||
};
|
||||
|
||||
openAccountsWithSelectedUser = async (user, navigate) => {
|
||||
|
Loading…
Reference in New Issue
Block a user