Client: PublicRoom: Fixed context options for room inside sdk frame
This commit is contained in:
parent
2fe701f88d
commit
eeabb432b8
@ -728,6 +728,7 @@ const SectionHeaderContent = (props) => {
|
|||||||
haveLinksRight,
|
haveLinksRight,
|
||||||
isPublicRoomType,
|
isPublicRoomType,
|
||||||
isPublicRoom,
|
isPublicRoom,
|
||||||
|
isFrame,
|
||||||
} = props;
|
} = props;
|
||||||
|
|
||||||
const isArchive = selectedFolder.rootFolderType === FolderType.Archive;
|
const isArchive = selectedFolder.rootFolderType === FolderType.Archive;
|
||||||
@ -739,12 +740,14 @@ const SectionHeaderContent = (props) => {
|
|||||||
label: t("Files:CopyLink"),
|
label: t("Files:CopyLink"),
|
||||||
icon: TabletLinkReactSvgUrl,
|
icon: TabletLinkReactSvgUrl,
|
||||||
onClick: onShareRoom,
|
onClick: onShareRoom,
|
||||||
|
disabled: isFrame,
|
||||||
},
|
},
|
||||||
security?.Download && {
|
{
|
||||||
key: "public-room_edit",
|
key: "public-room_edit",
|
||||||
label: t("Common:Download"),
|
label: t("Common:Download"),
|
||||||
icon: DownloadReactSvgUrl,
|
icon: DownloadReactSvgUrl,
|
||||||
onClick: onDownloadAll,
|
onClick: onDownloadAll,
|
||||||
|
disabled: !security?.Download,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
@ -81,6 +81,11 @@ const ControlButtons = ({
|
|||||||
const children = tariffBar ? React.cloneElement(tariffBar, { title }) : null;
|
const children = tariffBar ? React.cloneElement(tariffBar, { title }) : null;
|
||||||
const isTabletView = isTablet();
|
const isTabletView = isTablet();
|
||||||
|
|
||||||
|
const contextOptionsFolder = getContextOptionsFolder();
|
||||||
|
const containVisible = contextOptionsFolder.some(
|
||||||
|
(item) => item.disabled === false,
|
||||||
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<StyledControlButtonContainer isFrame={isFrame} showTitle={showTitle}>
|
<StyledControlButtonContainer isFrame={isFrame} showTitle={showTitle}>
|
||||||
{!isRootFolder || (isTrashFolder && !isEmptyFilesList) ? (
|
{!isRootFolder || (isTrashFolder && !isEmptyFilesList) ? (
|
||||||
@ -165,7 +170,7 @@ const ControlButtons = ({
|
|||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{isPublicRoom && (
|
{isPublicRoom && containVisible && (
|
||||||
<ContextButton
|
<ContextButton
|
||||||
id="header_optional-button"
|
id="header_optional-button"
|
||||||
className="option-button"
|
className="option-button"
|
||||||
|
Loading…
Reference in New Issue
Block a user