diff --git a/packages/client/src/components/EmptyContainer/sub-components/EmptyViewContainer/EmptyViewContainer.helpers.tsx b/packages/client/src/components/EmptyContainer/sub-components/EmptyViewContainer/EmptyViewContainer.helpers.tsx
index a5f42a2201..8757f68d2e 100644
--- a/packages/client/src/components/EmptyContainer/sub-components/EmptyViewContainer/EmptyViewContainer.helpers.tsx
+++ b/packages/client/src/components/EmptyContainer/sub-components/EmptyViewContainer/EmptyViewContainer.helpers.tsx
@@ -419,7 +419,7 @@ export const getOptions = (
description: t("EmptyView:SharePublicRoomOptionDescription"),
icon: ,
key: "share-public-room",
- onClick: actions.createAndCopySharedLink,
+ onClick: actions.openInfoPanel,
disabled: false,
};
diff --git a/packages/client/src/components/EmptyContainer/sub-components/EmptyViewContainer/EmptyViewContainer.tsx b/packages/client/src/components/EmptyContainer/sub-components/EmptyViewContainer/EmptyViewContainer.tsx
index 307b606715..6c7a8015a8 100644
--- a/packages/client/src/components/EmptyContainer/sub-components/EmptyViewContainer/EmptyViewContainer.tsx
+++ b/packages/client/src/components/EmptyContainer/sub-components/EmptyViewContainer/EmptyViewContainer.tsx
@@ -34,8 +34,11 @@ const EmptyViewContainer = observer(
folderType,
selectedFolder,
parentRoomType,
+ isVisibleInfoPanel,
isArchiveFolderRoot,
+ setViewInfoPanel,
onClickInviteUsers,
+ setVisibleInfoPanel,
onCreateAndCopySharedLink,
setSelectFileFormRoomDialogVisible,
}: EmptyViewContainerProps) => {
@@ -48,6 +51,12 @@ const EmptyViewContainer = observer(
const theme = useTheme();
+ const openInfoPanel = useCallback(() => {
+ if (!isVisibleInfoPanel) setVisibleInfoPanel?.(true);
+
+ setViewInfoPanel?.("info_members");
+ }, [setViewInfoPanel, setVisibleInfoPanel, isVisibleInfoPanel]);
+
const onUploadAction = useCallback((uploadType: UploadType) => {
const element =
uploadType === "file"
@@ -152,6 +161,7 @@ const EmptyViewContainer = observer(
uploadFromDocspace,
onUploadAction,
createAndCopySharedLink,
+ openInfoPanel,
},
),
[
@@ -168,6 +178,7 @@ const EmptyViewContainer = observer(
onUploadAction,
createAndCopySharedLink,
onCreate,
+ openInfoPanel,
],
);
@@ -185,10 +196,21 @@ const EmptyViewContainer = observer(
);
const InjectedEmptyViewContainer = inject(
- ({ contextOptionsStore, selectedFolderStore, dialogsStore }) => {
+ ({
+ contextOptionsStore,
+ selectedFolderStore,
+ dialogsStore,
+ infoPanelStore,
+ }) => {
const { onClickInviteUsers, onCreateAndCopySharedLink } =
contextOptionsStore;
+ const {
+ setIsVisible: setVisibleInfoPanel,
+ isVisible: isVisibleInfoPanel,
+ setView: setViewInfoPanel,
+ } = infoPanelStore;
+
const { setSelectFileFormRoomDialogVisible } = dialogsStore;
const { security, access } = selectedFolderStore;
@@ -199,9 +221,12 @@ const InjectedEmptyViewContainer = inject(
access,
security,
selectedFolder,
+ isVisibleInfoPanel,
onClickInviteUsers,
onCreateAndCopySharedLink,
setSelectFileFormRoomDialogVisible,
+ setVisibleInfoPanel,
+ setViewInfoPanel,
};
},
)(EmptyViewContainer);
diff --git a/packages/client/src/components/EmptyContainer/sub-components/EmptyViewContainer/EmptyViewContainer.types.ts b/packages/client/src/components/EmptyContainer/sub-components/EmptyViewContainer/EmptyViewContainer.types.ts
index c953cb8b49..6a36a3f52b 100644
--- a/packages/client/src/components/EmptyContainer/sub-components/EmptyViewContainer/EmptyViewContainer.types.ts
+++ b/packages/client/src/components/EmptyContainer/sub-components/EmptyViewContainer/EmptyViewContainer.types.ts
@@ -36,6 +36,9 @@ export interface EmptyViewContainerProps {
selectedFolder?: ReturnType<
TStore["selectedFolderStore"]["getSelectedFolder"]
>;
+ setVisibleInfoPanel?: (arg: boolean) => void;
+ isVisibleInfoPanel: boolean;
+ setViewInfoPanel?: TStore["infoPanelStore"]["setView"];
}
export type OptionActions = {
@@ -47,4 +50,5 @@ export type OptionActions = {
) => void;
onUploadAction: (type: UploadType) => void;
createAndCopySharedLink: VoidFunction;
+ openInfoPanel: VoidFunction;
};
diff --git a/packages/client/src/store/InfoPanelStore.js b/packages/client/src/store/InfoPanelStore.js
index 252e8225db..479226d3d2 100644
--- a/packages/client/src/store/InfoPanelStore.js
+++ b/packages/client/src/store/InfoPanelStore.js
@@ -161,6 +161,10 @@ class InfoPanelStore {
this.fileView = infoHistory;
};
+ /**
+ * @param {infoMembers | infoHistory | infoDetails} view
+ * @returns {void}
+ */
setView = (view) => {
this.roomsView = view;
this.fileView = view === infoMembers ? infoDetails : view;