mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-24 16:39:13 +00:00
Refact/feature sockets (#193)
* chore: migrate and upgrade state dependencies * refactor(eventlist): get data from store * refactor(messagecontrol): get data from store * refactor(playbackcontrol): get data from store * refactor(info): get data from store * refactor(messagecontrol): handle mutations in hook * feat(playbackcontrol): get data from store * refactor(playbackcontrol): handle mutations in hook * refactor(playbackcontrol): simplify object * refactor: simplify interfaces * refactor(InputRow): mixed control + styles * refactor(socket): cleanup unused endpoints * refactor(table): prepare table socket endpoint * refactor(timer): extract timer to own endpoint * refactor(table): get data from store * chore: update tests * refactor(socket): update sockets on cycle * refactor: remove unnecessary safeguards
This commit is contained in:
@@ -15,18 +15,18 @@ export default function Playback(props) {
|
||||
<div className={style.playbackContainer}>
|
||||
<StartIconBtn
|
||||
active={playback === 'start'}
|
||||
clickhandler={() => playbackControl('start')}
|
||||
clickhandler={() => playbackControl.start()}
|
||||
disabled={!selectedId || isRolling || noEvents}
|
||||
/>
|
||||
<PauseIconBtn
|
||||
active={playback === 'pause'}
|
||||
clickhandler={() => playbackControl('pause')}
|
||||
clickhandler={() => playbackControl.pause()}
|
||||
disabled={!selectedId || isRolling || noEvents || playback !== 'start'}
|
||||
/>
|
||||
<RollIconBtn
|
||||
active={playback === 'roll'}
|
||||
disabled={playback === 'roll' || noEvents}
|
||||
clickhandler={() => playbackControl('roll')}
|
||||
clickhandler={() => playbackControl.roll()}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
@@ -35,6 +35,10 @@ export default function Playback(props) {
|
||||
Playback.propTypes = {
|
||||
playback: PropTypes.string,
|
||||
selectedId: PropTypes.string,
|
||||
playbackControl: PropTypes.func.isRequired,
|
||||
playbackControl: PropTypes.shape({
|
||||
start: PropTypes.func,
|
||||
pause: PropTypes.func,
|
||||
roll: PropTypes.func,
|
||||
}).isRequired,
|
||||
noEvents: PropTypes.bool.isRequired,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user