import { Button, FormLabel, Modal, Switch } from '@mui/material'; import { twc } from 'react-twc'; import { useGlobalSettings } from '../../Hooks/useGlobalSettings'; import { ModalWrapper } from './InfoModal'; import { Separator } from './Separator'; import { Paragraph } from './TextComponents'; const SettingContainer = twc.div`w-full flex flex-col`; const ToggleContainer = twc.div`flex flex-row justify-between items-center`; const Container = twc.div`flex flex-col items-center w-full`; const Description = twc.p`mr-16 text-xs text-left text-text-secondary`; type SettingsModalProps = { isOpen: boolean; closeModal: () => void; }; export const SettingsModal = ({ isOpen, closeModal }: SettingsModalProps) => { const { settings, setSettings, isPWA } = useGlobalSettings(); return (

⚙️ Settings ⚙️

Show Start Player { setSettings({ ...settings, showStartingPlayer: !settings.showStartingPlayer, }); }} /> On start or reset of game, will pick a random player who will start first if this is enabled. Keep Awake { setSettings({ ...settings, keepAwake: !settings.keepAwake }); }} /> Will prevent device from going to sleep while this app is open if this is enabled. Go fullscreen on start (Android only) { setSettings({ ...settings, goFullscreenOnStart: !settings.goFullscreenOnStart, }); }} /> Will enter fullscreen mode when starting a game if this is enabled. {!isPWA && ( <> Tip: You can{' '} add this webapp to your home page on iOS or{' '} install it on Android to have it act just like a normal app! If you do, this app will work offline and the toolbar will be automatically hidden. )} {/* @ts-expect-error is defined in vite.config.ts*/} Version: {APP_VERSION}
); };