import { Button, FormLabel, Modal, Switch } from '@mui/material'; import { ModalWrapper } from './InfoModal'; import styled from 'styled-components'; import { useGlobalSettings } from '../../Hooks/useGlobalSettings'; import { theme } from '../../Data/theme'; import { Separator } from './Separator'; import { Paragraph } from './TextComponents'; const SettingContainer = styled.div` width: 100%; display: flex; flex-direction: column; `; const ToggleContainer = styled.div` display: flex; flex-direction: row; align-items: center; justify-content: space-between; `; const Container = styled.div` display: flex; flex-direction: column; align-items: center; width: 100%; `; const Description = styled.p` margin-top: -0.25rem; margin-right: 3.5rem; font-size: 0.8rem; text-align: left; color: ${theme.palette.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. )} Version: 0.4.0
); };