V2 ws store (#310)

* Update TimerService.ts

* refactor: message service publishes to store

* refactor: several type improvements

* V2 ws store wss (#309)

* refactor: shared logging types

* refactor: simplify message service consumption

* refactor: create discrete logging system

* refactor: move socket.io > websocket
This commit is contained in:
Carlos Valente
2023-03-15 22:06:47 +01:00
committed by GitHub
parent 11648ee546
commit 76c8f8a4d5
86 changed files with 1876 additions and 1936 deletions
@@ -111,7 +111,7 @@ export default function EventBlock(props: EventBlockProps) {
[title, updateEvent, eventId],
);
const eventIsPlaying = selected && playback === 'play';
const eventIsPlaying = selected && playback === Playback.Play;
const playBtnStyles = { _hover: {} };
if (!skip && eventIsPlaying) {
playBtnStyles._hover = { bg: '#c05621' };
@@ -1,20 +1,21 @@
import { useCallback, useContext } from 'react';
import { useCallback } from 'react';
import { millisToString } from 'ontime-utils';
import PropTypes from 'prop-types';
import { useEmitLog } from '@/common/stores/logger';
import TimeInput from '../../../../common/components/input/time-input/TimeInput';
import { LoggingContext } from '../../../../common/context/LoggingContext';
import { millisToMinutes } from '../../../../common/utils/dateConfig';
import { stringFromMillis } from '../../../../common/utils/time';
import { validateEntry } from '../../../../common/utils/timesManager';
import style from '../EventBlock.module.scss';
export default function EventBlockTimers(props) {
const { timeStart, timeEnd, duration, delay, actionHandler, previousEnd } = props;
const { emitWarning } = useContext(LoggingContext);
const { emitWarning } = useEmitLog();
const delayTime = `${delay >= 0 ? '+' : '-'} ${millisToMinutes(Math.abs(delay))}`;
const newTime = stringFromMillis(timeStart + delay);
const newTime = millisToString(timeStart + delay);
/**
* @description Validates a time input against its pair