Remove old minimize button / Add check for empty options
This commit is contained in:
parent
205c96d74a
commit
cd434c48b0
@ -451,31 +451,6 @@ class Presentation extends PureComponent {
|
||||
zoomSlide(currentSlide.num, podId, w, h, x, y);
|
||||
}
|
||||
|
||||
renderPresentationClose() {
|
||||
const { isFullscreen } = this.state;
|
||||
const {
|
||||
layoutType,
|
||||
fullscreenContext,
|
||||
layoutContextDispatch,
|
||||
isIphone,
|
||||
} = this.props;
|
||||
|
||||
if (!OLD_MINIMIZE_BUTTON_ENABLED
|
||||
|| !shouldEnableSwapLayout()
|
||||
|| isFullscreen
|
||||
|| fullscreenContext
|
||||
|| layoutType === LAYOUT_TYPE.PRESENTATION_FOCUS) {
|
||||
return null;
|
||||
}
|
||||
return (
|
||||
<PresentationCloseButton
|
||||
toggleSwapLayout={MediaService.toggleSwapLayout}
|
||||
layoutContextDispatch={layoutContextDispatch}
|
||||
isIphone={isIphone}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
renderOverlays(slideObj, svgDimensions, viewBoxPosition, viewBoxDimensions, physicalDimensions) {
|
||||
const {
|
||||
userIsPresenter,
|
||||
@ -613,7 +588,6 @@ class Presentation extends PureComponent {
|
||||
}}
|
||||
>
|
||||
<Styled.VisuallyHidden id="currentSlideText">{slideContent}</Styled.VisuallyHidden>
|
||||
{this.renderPresentationClose()}
|
||||
{this.renderPresentationDownload()}
|
||||
{this.renderPresentationMenu()}
|
||||
<Styled.PresentationSvg
|
||||
|
@ -138,7 +138,7 @@ const PresentationMenu = (props) => {
|
||||
);
|
||||
}
|
||||
|
||||
function renderMenuItems() {
|
||||
function getAvailableOptions() {
|
||||
const menuItems = [];
|
||||
|
||||
if (!isIphone) {
|
||||
@ -254,6 +254,10 @@ const PresentationMenu = (props) => {
|
||||
}
|
||||
});
|
||||
|
||||
const options = getAvailableOptions();
|
||||
|
||||
if (options.length === 0) return null;
|
||||
|
||||
return (
|
||||
<Styled.Right>
|
||||
<TooltipContainer title={intl.formatMessage(intlMessages.optionsLabel)}>
|
||||
@ -275,7 +279,7 @@ const PresentationMenu = (props) => {
|
||||
tabIndex={0}
|
||||
>
|
||||
<Styled.List>
|
||||
{ renderMenuItems().map((option) => {
|
||||
{ options.map((option) => {
|
||||
const {
|
||||
label, onClick, key, dataTest,
|
||||
} = option;
|
||||
|
Loading…
Reference in New Issue
Block a user