mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-25 07:03:05 +01:00
feat: fullscreen disabling on old browsers
This commit is contained in:
1 parent
7e1949ccc7
commit
512134162d
1 file changed
+3
@@ -19,6 +19,7 @@ export function Options({ isFullScreen, canvas }: OptionsProps) {
|
|||||||
const greenPenetration = useTankopedia(
|
const greenPenetration = useTankopedia(
|
||||||
(state) => state.model.visual.greenPenetration,
|
(state) => state.model.visual.greenPenetration,
|
||||||
);
|
);
|
||||||
|
const fullScreenAvailable = document.fullscreenEnabled;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Flex
|
<Flex
|
||||||
@@ -61,6 +62,7 @@ export function Options({ isFullScreen, canvas }: OptionsProps) {
|
|||||||
</DropdownMenu.Content>
|
</DropdownMenu.Content>
|
||||||
</DropdownMenu.Root>
|
</DropdownMenu.Root>
|
||||||
|
|
||||||
|
{fullScreenAvailable && (
|
||||||
<Button
|
<Button
|
||||||
variant="ghost"
|
variant="ghost"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
@@ -73,6 +75,7 @@ export function Options({ isFullScreen, canvas }: OptionsProps) {
|
|||||||
>
|
>
|
||||||
{isFullScreen ? <ExitFullScreenIcon /> : <EnterFullScreenIcon />}
|
{isFullScreen ? <ExitFullScreenIcon /> : <EnterFullScreenIcon />}
|
||||||
</Button>
|
</Button>
|
||||||
|
)}
|
||||||
</Flex>
|
</Flex>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user