mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-31 11:59:10 +00:00
1849b4d39f
* chore: migrate eslint to oxlint * chore: migrate prettier to oxfmt * chore: migrate typescript * chore: toThrow should have a expected value * chore: cast test value as Day * chore: small title fix * chore: mocks should be hoisted * chore: incorrect async useage * chore: test should be inside description * chore: test sohuld include an expeced * chore: oxfmt --------- Co-authored-by: alex-Arc <omnivox@LAPTOP-RC5SNBVV.localdomain>
58 lines
1.7 KiB
TypeScript
58 lines
1.7 KiB
TypeScript
import { lazy } from 'react';
|
|
|
|
import TrackingPlaybackBar from '../../features/control/playback/tracking-playback-bar/TrackingPlaybackBar';
|
|
import { AppMode } from '../../ontimeConfig';
|
|
import TitleList from './title-list/TitleList';
|
|
import { EditorLayoutMode, useEditorLayout } from './useEditorLayout';
|
|
|
|
import styles from './Editor.module.scss';
|
|
|
|
const Rundown = lazy(() => import('../../features/rundown/RundownExport'));
|
|
const TimerControl = lazy(() => import('../../features/control/playback/TimerControlExport'));
|
|
const MessageControl = lazy(() => import('../../features/control/message/MessageControlExport'));
|
|
|
|
export default function Editor() {
|
|
const { layoutMode } = useEditorLayout();
|
|
|
|
if (layoutMode === EditorLayoutMode.CONTROL) {
|
|
return (
|
|
<div id='panels' className={styles.panelContainer}>
|
|
<div className={styles.left}>
|
|
<TimerControl />
|
|
<MessageControl />
|
|
</div>
|
|
<Rundown />
|
|
</div>
|
|
);
|
|
}
|
|
|
|
if (layoutMode === EditorLayoutMode.TRACKING) {
|
|
return (
|
|
<div id='panels' className={`${styles.panelContainer} ${styles.panelContainerTracking}`}>
|
|
<div className={styles.rundownLayout}>
|
|
<div className={styles.titlesPanel}>
|
|
<TitleList mode={AppMode.Run} />
|
|
</div>
|
|
<div className={styles.rundownPanel}>
|
|
<Rundown />
|
|
</div>
|
|
</div>
|
|
<TrackingPlaybackBar />
|
|
</div>
|
|
);
|
|
}
|
|
|
|
return (
|
|
<div id='panels' className={styles.panelContainer}>
|
|
<div className={styles.rundownLayout}>
|
|
<div className={styles.titlesPanel}>
|
|
<TitleList mode={AppMode.Edit} />
|
|
</div>
|
|
<div className={styles.rundownPanel}>
|
|
<Rundown />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|