diff --git a/src/main/services/preact-canvas/components/bottom-bar/index.tsx b/src/main/services/preact-canvas/components/bottom-bar/index.tsx index 5597cbdf..0b131d41 100644 --- a/src/main/services/preact-canvas/components/bottom-bar/index.tsx +++ b/src/main/services/preact-canvas/components/bottom-bar/index.tsx @@ -13,12 +13,19 @@ import { Component, h } from "preact"; import { isFeaturePhone } from "src/main/utils/static-display"; import { bind } from "src/utils/bind"; -import { Back, Fullscreen, Information } from "../icons/initial"; +import { + Back, + FullscreenEnter, + FullscreenExit, + Information +} from "../icons/initial"; import { bottomBar, checkbox, fpToggle, fullscreen, + fullscreenEnter, + fullscreenExit, hidden, leftIcon, leftKeyIcon, @@ -41,6 +48,12 @@ function goFullscreen() { } } +function exitFullscreen() { + if (document.exitFullscreen) { + document.exitFullscreen(); + } +} + const fullscreenSupported: boolean = !!( document.documentElement.requestFullscreen || document.documentElement.webkitRequestFullscreen @@ -184,20 +197,30 @@ export default class BottomBar extends Component { "" ) : fullscreenSupported ? ( ) : (
); + return (