Manav Rathi
2025-03-05 13:51:36 +05:30
parent fb8f7901b1
commit b4a853acc5

View File

@@ -731,6 +731,12 @@ const FileViewer: React.FC<FileViewerProps> = ({
<EditIcon /> <EditIcon />
</MoreMenuItem> </MoreMenuItem>
)} )}
<MoreMenuItem onClick={handleToggleFullscreen}>
<MoreMenuItemTitle>
{/*TODO */ pt("Full screen")}
</MoreMenuItemTitle>
<EditIcon />
</MoreMenuItem>
</MoreMenu> </MoreMenu>
{/* TODO(PS): Fix imports */} {/* TODO(PS): Fix imports */}
<ConfirmDeleteFileDialog <ConfirmDeleteFileDialog
@@ -832,3 +838,11 @@ const createImagePNGBlob = async (imageURL: string) =>
image.onerror = reject; image.onerror = reject;
image.src = imageURL; image.src = imageURL;
}); });
/**
* Toggle full screen mode.
*/
const toggleFullscreen = () =>
document.fullscreenElement
? document.exitFullscreen()
: document.body.requestFullscreen();