-
-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat/104: isolate control components * feat/104: open components in isolated window * feat/104: update tests
- Loading branch information
Showing
10 changed files
with
206 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import React from 'react'; | ||
import ProtectRoute from '../common/components/protectRoute/ProtectRoute'; | ||
import PropTypes from 'prop-types'; | ||
import style from './FeatureWrapper.module.scss'; | ||
|
||
export default function FeatureWrapper({ children }) { | ||
return ( | ||
<ProtectRoute> | ||
<div className={style.wrapper}>{children}</div> | ||
</ProtectRoute> | ||
); | ||
} | ||
|
||
FeatureWrapper.propTypes = { | ||
children: PropTypes.element, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
@use '../styles/main' as *; | ||
|
||
.wrapper { | ||
background: $bg-black; | ||
width: 100%; | ||
height: 100%; | ||
margin: auto; | ||
color: $title-white; | ||
padding: max(16px, 2vh); | ||
} |
21 changes: 21 additions & 0 deletions
21
client/src/features/control/message/MessageControlExport.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import React from 'react'; | ||
import { Box } from '@chakra-ui/layout'; | ||
import ErrorBoundary from '../../../common/components/errorBoundary/ErrorBoundary'; | ||
import MessageControl from './MessageControl'; | ||
import style from '../../editors/Editor.module.scss'; | ||
import { FiArrowUpRight } from '@react-icons/all-files/fi/FiArrowUpRight'; | ||
import { handleLinks } from '../../../common/utils/linkUtils'; | ||
|
||
export default function MessageControlExport() { | ||
return ( | ||
<Box className={style.messages}> | ||
<h1>Messages Control</h1> | ||
<FiArrowUpRight className={style.corner} onClick={(event) => handleLinks(event, 'messagecontrol')} /> | ||
<div className={style.content}> | ||
<ErrorBoundary> | ||
<MessageControl /> | ||
</ErrorBoundary> | ||
</div> | ||
</Box> | ||
); | ||
} |
22 changes: 22 additions & 0 deletions
22
client/src/features/control/playback/TimerControlExport.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import React from 'react'; | ||
import { Box } from '@chakra-ui/layout'; | ||
import ErrorBoundary from '../../../common/components/errorBoundary/ErrorBoundary'; | ||
import PlaybackControl from './PlaybackControl'; | ||
import styles from '../../editors/Editor.module.scss'; | ||
import style from '../../editors/Editor.module.scss'; | ||
import { FiArrowUpRight } from '@react-icons/all-files/fi/FiArrowUpRight'; | ||
import { handleLinks } from '../../../common/utils/linkUtils'; | ||
|
||
export default function TimerControlExport() { | ||
return ( | ||
<Box className={styles.playback}> | ||
<h1>Timer Control</h1> | ||
<FiArrowUpRight className={style.corner} onClick={(event) => handleLinks(event, 'timercontrol')} /> | ||
<div className={styles.content}> | ||
<ErrorBoundary> | ||
<PlaybackControl /> | ||
</ErrorBoundary> | ||
</div> | ||
</Box> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import React from 'react'; | ||
import { CursorProvider } from '../../../app/context/CursorContext'; | ||
import { CollapseProvider } from '../../../app/context/CollapseContext'; | ||
import { Box } from '@chakra-ui/layout'; | ||
import ErrorBoundary from '../../../common/components/errorBoundary/ErrorBoundary'; | ||
import EventListWrapper from './EventListWrapper'; | ||
import { FiArrowUpRight } from '@react-icons/all-files/fi/FiArrowUpRight'; | ||
import { handleLinks } from '../../../common/utils/linkUtils'; | ||
import style from '../Editor.module.scss'; | ||
|
||
export default function EventListExport() { | ||
return ( | ||
<CursorProvider> | ||
<CollapseProvider> | ||
<Box className={style.editor}> | ||
<h1>Event List</h1> | ||
<FiArrowUpRight | ||
className={style.corner} | ||
onClick={(event) => handleLinks(event, 'eventlist')} | ||
/> | ||
<ErrorBoundary> | ||
<EventListWrapper /> | ||
</ErrorBoundary> | ||
</Box> | ||
</CollapseProvider> | ||
</CursorProvider> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import React from 'react'; | ||
import { Box } from '@chakra-ui/layout'; | ||
import { FiArrowUpRight } from '@react-icons/all-files/fi/FiArrowUpRight'; | ||
import ErrorBoundary from '../../common/components/errorBoundary/ErrorBoundary'; | ||
import Info from './Info'; | ||
import style from '../editors/Editor.module.scss'; | ||
import { handleLinks } from '../../common/utils/linkUtils'; | ||
|
||
export default function InfoExport() { | ||
return ( | ||
<Box className={style.info}> | ||
<h1>Info</h1> | ||
<FiArrowUpRight className={style.corner} onClick={(event) => handleLinks(event, 'info')} /> | ||
<div className={style.content}> | ||
<ErrorBoundary> | ||
<Info /> | ||
</ErrorBoundary> | ||
</div> | ||
</Box> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters