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