diff --git a/client/src/common/components/buttons/DownloadIconBtn.jsx b/client/src/common/components/buttons/DownloadIconBtn.jsx deleted file mode 100644 index 8b30023b4..000000000 --- a/client/src/common/components/buttons/DownloadIconBtn.jsx +++ /dev/null @@ -1,18 +0,0 @@ -import { IconButton } from '@chakra-ui/button'; -import { FiDownload } from 'react-icons/fi'; - -export default function DownloadIconBtn(props) { - const { clickhandler, ...rest } = props; - return ( - } - isRound - variant='outline' - onClick={clickhandler} - _focus={{ boxShadow: 'none' }} - colorScheme='whiteAlpha' - {...rest} - /> - ); -} diff --git a/client/src/common/components/buttons/SettingsIconBtn.jsx b/client/src/common/components/buttons/SettingsIconBtn.jsx deleted file mode 100644 index 8a4e3b65f..000000000 --- a/client/src/common/components/buttons/SettingsIconBtn.jsx +++ /dev/null @@ -1,18 +0,0 @@ -import { IconButton } from '@chakra-ui/button'; -import { FiSettings } from 'react-icons/fi'; - -export default function SettingsIconBtn(props) { - const { clickhandler, ...rest } = props; - return ( - } - isRound - variant='outline' - onClick={clickhandler} - _focus={{ boxShadow: 'none' }} - colorScheme='whiteAlpha' - {...rest} - /> - ); -} diff --git a/client/src/features/editors/Editor.jsx b/client/src/features/editors/Editor.jsx index 586f2bd2e..4dc2d2092 100644 --- a/client/src/features/editors/Editor.jsx +++ b/client/src/features/editors/Editor.jsx @@ -7,10 +7,8 @@ import styles from './Editor.module.css'; import EventListWrapper from './list/EventListWrapper'; import { useDisclosure } from '@chakra-ui/hooks'; import SettingsModal from '../modals/SettingsModal'; -import SettingsIconBtn from 'common/components/buttons/SettingsIconBtn'; import { useEffect } from 'react'; -import DownloadIconBtn from 'common/components/buttons/DownloadIconBtn'; -import { downloadEvents } from 'app/api/ontimeApi'; +import MenuBar from 'features/menu/MenuBar'; export default function Editor() { const { isOpen, onOpen, onClose } = useDisclosure(); @@ -20,15 +18,15 @@ export default function Editor() { document.title = 'ontime - Editor'; }, []); - const handleDownload = () => { - downloadEvents(); - }; - return ( <>
+ + + + Event List @@ -69,13 +67,6 @@ export default function Editor() {
- - -
- - -
-
); diff --git a/client/src/features/editors/Editor.module.css b/client/src/features/editors/Editor.module.css index d335b7aaa..00186eecf 100644 --- a/client/src/features/editors/Editor.module.css +++ b/client/src/features/editors/Editor.module.css @@ -8,10 +8,10 @@ display: grid; grid-template-rows: 38vh 1fr; - grid-template-columns: 48em 27vw 25vw 4vw; + grid-template-columns: 40px 48em 27vw 1fr; grid-template-areas: - 'even play info sett' - 'even mess info sett'; + 'sett even play info' + 'sett even mess info'; gap: 2vh; } @@ -20,7 +20,7 @@ .mainContainer { height: 100%; grid-template-rows: 1fr 1fr; - grid-template-columns: 48em 1fr 1fr; + grid-template-columns: 40px 48em 1fr 1fr; /* grid-template-areas: 'even play sett' 'even mess sett'; */ @@ -95,24 +95,22 @@ grid-area: play; } -.settings { +.mainContainer > .settings { grid-area: sett; + background-color: transparent; + padding: 0; + margin: 0; + width: fit-content; + display: flex; flex-direction: column; - align-items: center; - gap: 2.6em; + gap: 1em; } .content { padding-top: 1.5em; } -.settings > .content { - display: flex; - flex-direction: column; - gap: 1em; -} - .cornerButtonContainer { position: relative; top: -4.5em; diff --git a/client/src/features/menu/MenuBar.jsx b/client/src/features/menu/MenuBar.jsx new file mode 100644 index 000000000..f2679fc2b --- /dev/null +++ b/client/src/features/menu/MenuBar.jsx @@ -0,0 +1,30 @@ +import { downloadEvents } from 'app/api/ontimeApi'; +import DownloadIconBtn from './buttons/DownloadIconBtn'; +import SettingsIconBtn from './buttons/SettingsIconBtn'; +import InfoIconBtn from './buttons/InfoIconBtn'; +import MaxIconBtn from './buttons/MaxIconBtn'; +import MinIconBtn from './buttons/MinIconBtn'; +import QuitIconBtn from './buttons/QuitIconBtn'; +import style from './MenuBar.module.css'; +import HelpIconBtn from './buttons/HelpIconBtn'; + +export default function MenuBar(props) { + const { onOpen, onClose } = props; + + const handleDownload = () => { + downloadEvents(); + }; + + return ( + <> + + + +
+ + + + + + ); +} diff --git a/client/src/features/menu/MenuBar.module.css b/client/src/features/menu/MenuBar.module.css new file mode 100644 index 000000000..00d82cfe7 --- /dev/null +++ b/client/src/features/menu/MenuBar.module.css @@ -0,0 +1,3 @@ +.gap { + height: 1em; +} diff --git a/client/src/features/menu/buttons/DownloadIconBtn.jsx b/client/src/features/menu/buttons/DownloadIconBtn.jsx new file mode 100644 index 000000000..d55c41738 --- /dev/null +++ b/client/src/features/menu/buttons/DownloadIconBtn.jsx @@ -0,0 +1,22 @@ +import { IconButton } from '@chakra-ui/button'; +import { Tooltip } from '@chakra-ui/tooltip'; +import { FiDownload } from 'react-icons/fi'; + +export default function DownloadIconBtn(props) { + const { clickhandler, ...rest } = props; + return ( + + } + colorScheme='white' + variant='outline' + isRound + borderColor='#fff1' + onClick={clickhandler} + _focus={{ boxShadow: 'none' }} + {...rest} + /> + + ); +} diff --git a/client/src/features/menu/buttons/HelpIconBtn.jsx b/client/src/features/menu/buttons/HelpIconBtn.jsx new file mode 100644 index 000000000..99eb6d12a --- /dev/null +++ b/client/src/features/menu/buttons/HelpIconBtn.jsx @@ -0,0 +1,22 @@ +import { IconButton } from '@chakra-ui/button'; +import { Tooltip } from '@chakra-ui/tooltip'; +import { FiHelpCircle } from 'react-icons/fi'; + +export default function HelpIconBtn(props) { + const { clickhandler, ...rest } = props; + return ( + + } + colorScheme='white' + variant='outline' + isRound + borderColor='#fff1' + onClick={clickhandler} + _focus={{ boxShadow: 'none' }} + {...rest} + /> + + ); +} diff --git a/client/src/features/menu/buttons/InfoIconBtn.jsx b/client/src/features/menu/buttons/InfoIconBtn.jsx new file mode 100644 index 000000000..118342c9f --- /dev/null +++ b/client/src/features/menu/buttons/InfoIconBtn.jsx @@ -0,0 +1,22 @@ +import { IconButton } from '@chakra-ui/button'; +import { Tooltip } from '@chakra-ui/tooltip'; +import { FiHome } from 'react-icons/fi'; + +export default function InfoIconBtn(props) { + const { clickhandler, ...rest } = props; + return ( + + } + colorScheme='white' + variant='outline' + isRound + borderColor='#fff1' + onClick={clickhandler} + _focus={{ boxShadow: 'none' }} + {...rest} + /> + + ); +} diff --git a/client/src/features/menu/buttons/MaxIconBtn.jsx b/client/src/features/menu/buttons/MaxIconBtn.jsx new file mode 100644 index 000000000..9724b7a8a --- /dev/null +++ b/client/src/features/menu/buttons/MaxIconBtn.jsx @@ -0,0 +1,22 @@ +import { IconButton } from '@chakra-ui/button'; +import { Tooltip } from '@chakra-ui/tooltip'; +import { FiMaximize } from 'react-icons/fi'; + +export default function MaxIconBtn(props) { + const { clickhandler, ...rest } = props; + return ( + + } + colorScheme='white' + variant='outline' + isRound + borderColor='#fff1' + onClick={clickhandler} + _focus={{ boxShadow: 'none' }} + {...rest} + /> + + ); +} diff --git a/client/src/features/menu/buttons/MinIconBtn.jsx b/client/src/features/menu/buttons/MinIconBtn.jsx new file mode 100644 index 000000000..2c51306d8 --- /dev/null +++ b/client/src/features/menu/buttons/MinIconBtn.jsx @@ -0,0 +1,22 @@ +import { IconButton } from '@chakra-ui/button'; +import { Tooltip } from '@chakra-ui/tooltip'; +import { FiMinimize } from 'react-icons/fi'; + +export default function MinIconBtn(props) { + const { clickhandler, ...rest } = props; + return ( + + } + colorScheme='white' + variant='outline' + isRound + borderColor='#fff1' + onClick={clickhandler} + _focus={{ boxShadow: 'none' }} + {...rest} + /> + + ); +} diff --git a/client/src/features/menu/buttons/QuitIconBtn.jsx b/client/src/features/menu/buttons/QuitIconBtn.jsx new file mode 100644 index 000000000..e22b9cd05 --- /dev/null +++ b/client/src/features/menu/buttons/QuitIconBtn.jsx @@ -0,0 +1,21 @@ +import { IconButton } from '@chakra-ui/button'; +import { Tooltip } from '@chakra-ui/tooltip'; +import { FiPower } from 'react-icons/fi'; + +export default function QuitIconBtn(props) { + const { clickhandler, ...rest } = props; + return ( + + } + colorScheme='red' + variant='outline' + isRound + onClick={clickhandler} + _focus={{ boxShadow: 'none' }} + {...rest} + /> + + ); +} diff --git a/client/src/features/menu/buttons/SettingsIconBtn.jsx b/client/src/features/menu/buttons/SettingsIconBtn.jsx new file mode 100644 index 000000000..a8a3233af --- /dev/null +++ b/client/src/features/menu/buttons/SettingsIconBtn.jsx @@ -0,0 +1,22 @@ +import { IconButton } from '@chakra-ui/button'; +import { Tooltip } from '@chakra-ui/tooltip'; +import { FiSettings } from 'react-icons/fi'; + +export default function SettingsIconBtn(props) { + const { clickhandler, ...rest } = props; + return ( + + } + colorScheme='white' + variant='outline' + isRound + borderColor='#fff1' + onClick={clickhandler} + _focus={{ boxShadow: 'none' }} + {...rest} + /> + + ); +}