mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-13 03:13:47 +00:00
v2 cleanup (#427)
* refactor: remove useless template * refactor: handle promise * refactor: associate labels to fields * refactor: simplify checking if element exists * refactor: prevent reassigning * refactor: avoid wildcard imports * refactor: simplify imports * refactor: simplify boolean comparison * chore: version bump
This commit is contained in:
@@ -9,11 +9,11 @@ import UploadModal from '../modals/upload-modal/UploadModal';
|
||||
|
||||
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'));
|
||||
const Info = lazy(() => import('../../features/info/InfoExport'));
|
||||
const EventEditor = lazy(() => import('../../features/event-editor/EventEditorExport'));
|
||||
const Rundown = lazy(() => import('../rundown/RundownExport'));
|
||||
const TimerControl = lazy(() => import('../control/playback/TimerControlExport'));
|
||||
const MessageControl = lazy(() => import('../control/message/MessageControlExport'));
|
||||
const Info = lazy(() => import('../info/InfoExport'));
|
||||
const EventEditor = lazy(() => import('../event-editor/EventEditorExport'));
|
||||
|
||||
const IntegrationModal = lazy(() => import('../modals/integration-modal/IntegrationModal'));
|
||||
const SettingsModal = lazy(() => import('../modals/settings-modal/SettingsModal'));
|
||||
|
||||
@@ -24,10 +24,11 @@ export default function CountedTextArea(props: CountedTextAreaProps) {
|
||||
return (
|
||||
<div className={`${style.column} ${style.fullHeight}`}>
|
||||
<div className={style.countedInput}>
|
||||
<label className={style.inputLabel}>{label}</label>
|
||||
<label className={style.inputLabel} htmlFor={field}>{label}</label>
|
||||
<span className={style.charCount}>{`${value.length} characters`}</span>
|
||||
</div>
|
||||
<Textarea
|
||||
id={field}
|
||||
size='sm'
|
||||
resize='none'
|
||||
variant='ontime-filled'
|
||||
|
||||
@@ -26,10 +26,11 @@ export default function CountedTextInput(props: CountedTextInputProps) {
|
||||
return (
|
||||
<div className={style.column}>
|
||||
<div className={style.countedInput}>
|
||||
<label className={style.inputLabel}>{label}</label>
|
||||
<label className={style.inputLabel} htmlFor={field}>{label}</label>
|
||||
<span className={style.charCount}>{`${value.length} characters`}</span>
|
||||
</div>
|
||||
<Input
|
||||
id={field}
|
||||
size='sm'
|
||||
variant='ontime-filled'
|
||||
data-testid='input-textfield'
|
||||
|
||||
@@ -80,8 +80,11 @@ const EventEditorTimes = (props: EventEditorTimesProps) => {
|
||||
return (
|
||||
<div className={style.timeOptions}>
|
||||
<div className={style.timers}>
|
||||
<label className={inputTimeLabels}>{startLabel}</label>
|
||||
<label className={inputTimeLabels} htmlFor='timeStart'>
|
||||
{startLabel}
|
||||
</label>
|
||||
<TimeInput
|
||||
id='timeStart'
|
||||
name='timeStart'
|
||||
submitHandler={handleSubmit}
|
||||
validationHandler={timerValidationHandler}
|
||||
@@ -90,8 +93,11 @@ const EventEditorTimes = (props: EventEditorTimesProps) => {
|
||||
placeholder='Start'
|
||||
warning={warning.start}
|
||||
/>
|
||||
<label className={inputTimeLabels}>{endLabel}</label>
|
||||
<label className={inputTimeLabels} htmlFor='timeEnd'>
|
||||
{endLabel}
|
||||
</label>
|
||||
<TimeInput
|
||||
id='timeEnd'
|
||||
name='timeEnd'
|
||||
submitHandler={handleSubmit}
|
||||
validationHandler={timerValidationHandler}
|
||||
@@ -100,8 +106,11 @@ const EventEditorTimes = (props: EventEditorTimesProps) => {
|
||||
placeholder='End'
|
||||
warning={warning.end}
|
||||
/>
|
||||
<label className={style.inputLabel}>Duration</label>
|
||||
<label className={style.inputLabel} htmlFor='durationOverride'>
|
||||
Duration
|
||||
</label>
|
||||
<TimeInput
|
||||
id='durationOverride'
|
||||
name='durationOverride'
|
||||
submitHandler={handleSubmit}
|
||||
validationHandler={timerValidationHandler}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import Empty from '../../common/components/state/Empty';
|
||||
import useRundown from '../../common/hooks-query/useRundown';
|
||||
import RundownMenu from '../../features/menu/RundownMenu';
|
||||
import RundownMenu from '../menu/RundownMenu';
|
||||
|
||||
import Rundown from './Rundown';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user