diff --git a/src/ui/component/fileActions/view.jsx b/src/ui/component/fileActions/view.jsx index 4ae00a8d1..f7e64bc5b 100644 --- a/src/ui/component/fileActions/view.jsx +++ b/src/ui/component/fileActions/view.jsx @@ -15,15 +15,34 @@ type Props = { openModal: (id: string, { uri: string }) => void, claimIsMine: boolean, fileInfo: FileInfo, + showFullscreen: boolean, }; class FileActions extends React.PureComponent { + MaximizeViewer() { + // Get viewer container + const viewer = document.getElementsByClassName('content__embedded')[0]; + viewer.webkitRequestFullscreen(); + } + render() { - const { fileInfo, uri, openModal, claimIsMine, claimId } = this.props; + const { fileInfo, uri, openModal, claimIsMine, claimId, showFullscreen } = this.props; const showDelete = claimIsMine || (fileInfo && Object.keys(fileInfo).length > 0); return ( + {showFullscreen && ( + +