Fix Bug 65631 - Rooms: fix broken return from profile to room/folder

This commit is contained in:
Aleksandr Lushkin 2023-12-22 13:40:52 +01:00
parent 2420f736bd
commit ffc8eecd17
3 changed files with 14 additions and 20 deletions

View File

@ -13,7 +13,9 @@ const generalRoutes = [
children: [
{
index: true,
element: <Navigate to="login" />,
Component: () => (
<Navigate to="login" state={window.DocSpace?.location?.state} />
),
},
{
path: "login",

View File

@ -107,7 +107,6 @@ class ProfileActionsStore {
if ((isAdmin || isOwner || isRoomAdmin) && !prefix) {
this.selectedFolderStore.setSelectedFolder(null);
this.treeFoldersStore.setSelectedNode(["accounts"]);
}
const state = {

View File

@ -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) => {