mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-14 20:03:52 +00:00
eslint
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { Editable, EditableInput, EditablePreview } from '@chakra-ui/editable';
|
||||
import { useEffect, useState } from 'react';
|
||||
import { useSocket } from '../../app/context/socketContext';
|
||||
import VisibleIconBtn from '../../common/components/buttons/VisibleIconBtn';
|
||||
import { useSocket } from 'app/context/socketContext';
|
||||
import VisibleIconBtn from 'common/components/buttons/VisibleIconBtn';
|
||||
import style from './MessageControl.module.css';
|
||||
|
||||
const inputProps = {
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import { memo } from 'react';
|
||||
import style from './PlaybackControl.module.css';
|
||||
import StartIconBtn from '../../common/components/buttons/StartIconBtn';
|
||||
import PauseIconBtn from '../../common/components/buttons/PauseIconBtn';
|
||||
import PrevIconBtn from '../../common/components/buttons/PrevIconBtn';
|
||||
import NextIconBtn from '../../common/components/buttons/NextIconBtn';
|
||||
import RollIconBtn from '../../common/components/buttons/RollIconBtn';
|
||||
import UnloadIconBtn from '../../common/components/buttons/UnloadIconBtn';
|
||||
import ReloadIconButton from '../../common/components/buttons/ReloadIconBtn';
|
||||
import StartIconBtn from 'common/components/buttons/StartIconBtn';
|
||||
import PauseIconBtn from 'common/components/buttons/PauseIconBtn';
|
||||
import PrevIconBtn from 'common/components/buttons/PrevIconBtn';
|
||||
import NextIconBtn from 'common/components/buttons/NextIconBtn';
|
||||
import RollIconBtn from 'common/components/buttons/RollIconBtn';
|
||||
import UnloadIconBtn from 'common/components/buttons/UnloadIconBtn';
|
||||
import ReloadIconButton from 'common/components/buttons/ReloadIconBtn';
|
||||
|
||||
const areEqual = (prevProps, nextProps) => {
|
||||
return (
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import style from './PlaybackControl.module.css';
|
||||
import { useEffect, useState } from 'react';
|
||||
import { useSocket } from '../../app/context/socketContext';
|
||||
import { useSocket } from 'app/context/socketContext';
|
||||
import PlaybackButtons from './PlaybackButtons';
|
||||
import PlaybackTimer from './PlaybackTimer';
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import style from './PlaybackControl.module.css';
|
||||
import Countdown from '../../common/components/countdown/Countdown';
|
||||
import { stringFromMillis } from '../../common/dateConfig';
|
||||
import Countdown from 'common/components/countdown/Countdown';
|
||||
import { stringFromMillis } from 'common/dateConfig';
|
||||
import { Button } from '@chakra-ui/button';
|
||||
import { memo } from 'react';
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import { Heading } from '@chakra-ui/layout';
|
||||
import { Box } from '@chakra-ui/layout';
|
||||
import NumberedText from '../../common/components/text/NumberedText';
|
||||
import NumberedText from 'common/components/text/NumberedText';
|
||||
import PlaybackControl from '../control/PlaybackControl';
|
||||
import MessageControl from '../control/MessageControl';
|
||||
import styles from './Editor.module.css';
|
||||
import EventListWrapper from './list/EventListWrapper';
|
||||
import { useDisclosure } from '@chakra-ui/hooks';
|
||||
import SettingsModal from '../modals/SettingsModal';
|
||||
import SettingsIconBtn from '../../common/components/buttons/SettingsIconBtn';
|
||||
import SettingsIconBtn from 'common/components/buttons/SettingsIconBtn';
|
||||
import { useEffect } from 'react';
|
||||
|
||||
export default function Editor() {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Draggable } from 'react-beautiful-dnd';
|
||||
import { FiMoreVertical } from 'react-icons/fi';
|
||||
import DeleteIconBtn from '../../../common/components/buttons/DeleteIconBtn';
|
||||
import DeleteIconBtn from 'common/components/buttons/DeleteIconBtn';
|
||||
import ActionButtons from './ActionButtons';
|
||||
import style from './BlockBlock.module.css';
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { Draggable } from 'react-beautiful-dnd';
|
||||
import { FiMoreVertical } from 'react-icons/fi';
|
||||
import { millisToMinutes } from '../../../common/dateConfig';
|
||||
import { millisToMinutes } from 'common/dateConfig';
|
||||
import ActionButtons from './ActionButtons';
|
||||
import DeleteIconBtn from '../../../common/components/buttons/DeleteIconBtn';
|
||||
import ApplyIconBtn from '../../../common/components/buttons/ApplyIconBtn';
|
||||
import DelayInput from '../../../common/input/DelayInput';
|
||||
import DeleteIconBtn from 'common/components/buttons/DeleteIconBtn';
|
||||
import ApplyIconBtn from 'common/components/buttons/ApplyIconBtn';
|
||||
import DelayInput from 'common/input/DelayInput';
|
||||
import style from './DelayBlock.module.css';
|
||||
|
||||
export default function DelayBlock(props) {
|
||||
|
||||
@@ -2,13 +2,13 @@ import Icon from '@chakra-ui/icon';
|
||||
import { FiChevronDown, FiChevronUp, FiMoreVertical } from 'react-icons/fi';
|
||||
import { useState } from 'react';
|
||||
import { Draggable } from 'react-beautiful-dnd';
|
||||
import EventTimes from '../../../common/components/eventTimes/EventTimes';
|
||||
import EventTimesVertical from '../../../common/components/eventTimes/EventTimesVertical';
|
||||
import EditableText from '../../../common/input/EditableText';
|
||||
import EventTimes from 'common/components/eventTimes/EventTimes';
|
||||
import EventTimesVertical from 'common/components/eventTimes/EventTimesVertical';
|
||||
import EditableText from 'common/input/EditableText';
|
||||
import ActionButtons from './ActionButtons';
|
||||
import VisibleIconBtn from '../../../common/components/buttons/VisibleIconBtn';
|
||||
import DeleteIconBtn from '../../../common/components/buttons/DeleteIconBtn';
|
||||
import { millisToMinutes } from '../../../common/dateConfig';
|
||||
import VisibleIconBtn from 'common/components/buttons/VisibleIconBtn';
|
||||
import DeleteIconBtn from 'common/components/buttons/DeleteIconBtn';
|
||||
import { millisToMinutes } from 'common/dateConfig';
|
||||
import style from './EventBlock.module.css';
|
||||
|
||||
const ExpandedBlock = (props) => {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import style from './List.module.css';
|
||||
import { Fragment, useEffect, useState } from 'react';
|
||||
import { useSocket } from '../../../app/context/socketContext';
|
||||
import { useSocket } from 'app/context/socketContext';
|
||||
import tinykeys from 'tinykeys';
|
||||
import Empty from '../../../common/state/Empty';
|
||||
import Empty from 'common/state/Empty';
|
||||
import EventListItem from './EventListItem';
|
||||
import { AnimatePresence, motion } from 'framer-motion';
|
||||
import { DragDropContext, Droppable } from 'react-beautiful-dnd';
|
||||
@@ -45,7 +45,7 @@ export default function EventList(props) {
|
||||
return () => {
|
||||
unsubscribe();
|
||||
};
|
||||
}, [cursor, events, eventsHandler]);
|
||||
}, [cursor, events.length, eventsHandler]);
|
||||
|
||||
// handle incoming messages
|
||||
useEffect(() => {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import DelayBlock from './DelayBlock';
|
||||
import BlockBlock from './BlockBlock';
|
||||
import EventBlock from './EventBlock';
|
||||
import { showErrorToast } from '../../../common/helpers/toastManager';
|
||||
import { showErrorToast } from 'common/helpers/toastManager';
|
||||
import { memo } from 'react';
|
||||
|
||||
const areEqual = (prevProps, nextProps) => {
|
||||
|
||||
@@ -9,12 +9,12 @@ import {
|
||||
requestDelete,
|
||||
requestReorder,
|
||||
requestApplyDelay,
|
||||
} from '../../../app/api/eventsApi.js';
|
||||
} from 'app/api/eventsApi.js';
|
||||
import EventList from './EventList';
|
||||
import EventListMenu from '../../menu/EventListMenu.jsx';
|
||||
import { showErrorToast } from '../../../common/helpers/toastManager';
|
||||
import { useFetch } from '../../../app/hooks/useFetch.js';
|
||||
import Empty from '../../../common/state/Empty';
|
||||
import EventListMenu from 'features/menu/EventListMenu.jsx';
|
||||
import { showErrorToast } from 'common/helpers/toastManager';
|
||||
import { useFetch } from 'app/hooks/useFetch.js';
|
||||
import Empty from 'common/state/Empty';
|
||||
|
||||
export default function EventListWrapper() {
|
||||
const queryClient = useQueryClient();
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
export const sortByDate = (arr) => {
|
||||
const sorter = (a, b) => {
|
||||
return new Date(a.timeStart).getTime() - new Date(b.timeStart).getTime();
|
||||
};
|
||||
return arr.sort(sorter);
|
||||
};
|
||||
@@ -1,112 +0,0 @@
|
||||
import { Skeleton } from '@chakra-ui/skeleton';
|
||||
|
||||
import style from '../list/List.module.css';
|
||||
|
||||
export default function EventListSkeleton() {
|
||||
return (
|
||||
<div className={style.eventContainer}>
|
||||
<Skeleton
|
||||
height='4vh'
|
||||
speed='1.2'
|
||||
startColor='#333333'
|
||||
endColor='#202020'
|
||||
/>
|
||||
<Skeleton
|
||||
height='4vh'
|
||||
speed='1.6'
|
||||
startColor='#333333'
|
||||
endColor='#202020'
|
||||
/>
|
||||
<Skeleton
|
||||
height='4vh'
|
||||
speed='2.0'
|
||||
startColor='#333333'
|
||||
endColor='#202020'
|
||||
/>
|
||||
<Skeleton
|
||||
height='4vh'
|
||||
speed='2.4'
|
||||
startColor='#333333'
|
||||
endColor='#202020'
|
||||
/>
|
||||
<Skeleton
|
||||
height='4vh'
|
||||
speed='2.8'
|
||||
startColor='#333333'
|
||||
endColor='#202020'
|
||||
/>
|
||||
<Skeleton
|
||||
height='4vh'
|
||||
speed='3.2'
|
||||
startColor='#333333'
|
||||
endColor='#202020'
|
||||
/>
|
||||
<Skeleton
|
||||
height='4vh'
|
||||
speed='3.6'
|
||||
startColor='#333333'
|
||||
endColor='#202020'
|
||||
/>
|
||||
<Skeleton
|
||||
height='4vh'
|
||||
speed='4.0'
|
||||
startColor='#333333'
|
||||
endColor='#202020'
|
||||
/>
|
||||
<Skeleton
|
||||
height='4vh'
|
||||
speed='4.4'
|
||||
startColor='#333333'
|
||||
endColor='#202020'
|
||||
/>
|
||||
<Skeleton
|
||||
height='4vh'
|
||||
speed='4.0'
|
||||
startColor='#333333'
|
||||
endColor='#202020'
|
||||
/>
|
||||
<Skeleton
|
||||
height='4vh'
|
||||
speed='3.6'
|
||||
startColor='#333333'
|
||||
endColor='#202020'
|
||||
/>
|
||||
<Skeleton
|
||||
height='4vh'
|
||||
speed='3.2'
|
||||
startColor='#333333'
|
||||
endColor='#202020'
|
||||
/>
|
||||
<Skeleton
|
||||
height='4vh'
|
||||
speed='2.8'
|
||||
startColor='#333333'
|
||||
endColor='#202020'
|
||||
/>
|
||||
<Skeleton
|
||||
height='4vh'
|
||||
speed='2.4'
|
||||
startColor='#333333'
|
||||
endColor='#202020'
|
||||
/>
|
||||
<Skeleton
|
||||
height='4vh'
|
||||
speed='2.0'
|
||||
startColor='#333333'
|
||||
endColor='#202020'
|
||||
/>
|
||||
<Skeleton
|
||||
height='4vh'
|
||||
speed='1.6'
|
||||
startColor='#333333'
|
||||
endColor='#202020'
|
||||
/>
|
||||
<Skeleton
|
||||
height='4vh'
|
||||
speed='1.2'
|
||||
startColor='#333333'
|
||||
endColor='#202020'
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -14,9 +14,9 @@ import {
|
||||
Button,
|
||||
Textarea,
|
||||
} from '@chakra-ui/react';
|
||||
import { fetchEvent, postEvent, eventNamespace } from '../../app/api/eventApi';
|
||||
import { fetchEvent, postEvent, eventNamespace } from 'app/api/eventApi';
|
||||
import { useEffect, useState } from 'react';
|
||||
import { useFetch } from '../../app/hooks/useFetch';
|
||||
import { useFetch } from 'app/hooks/useFetch';
|
||||
|
||||
export default function SettingsModal(props) {
|
||||
const { data, status, isError } = useFetch(eventNamespace, fetchEvent);
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { useEffect, useState } from 'react';
|
||||
import { eventsNamespace, fetchAllEvents } from '../../app/api/eventsApi';
|
||||
import { fetchEvent, eventNamespace } from '../../app/api/eventApi';
|
||||
import { useSocket } from '../../app/context/socketContext';
|
||||
import { stringFromMillis } from '../../common/dateConfig';
|
||||
import { useFetch } from '../../app/hooks/useFetch';
|
||||
import { eventsNamespace, fetchAllEvents } from 'app/api/eventsApi';
|
||||
import { fetchEvent, eventNamespace } from 'app/api/eventApi';
|
||||
import { useSocket } from 'app/context/socketContext';
|
||||
import { stringFromMillis } from 'common/dateConfig';
|
||||
import { useFetch } from 'app/hooks/useFetch';
|
||||
|
||||
const withSocket = (Component) => {
|
||||
const WrappedComponent = (props) => {
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import QRCode from 'react-qr-code';
|
||||
import { formatDisplay } from '../../../common/dateConfig';
|
||||
import { formatDisplay } from 'common/dateConfig';
|
||||
import style from './StageManager.module.css';
|
||||
import Paginator from '../../../common/components/views/Paginator';
|
||||
import NavLogo from '../../../common/components/nav/NavLogo';
|
||||
import Paginator from 'common/components/views/Paginator';
|
||||
import NavLogo from 'common/components/nav/NavLogo';
|
||||
import { useEffect, useState } from 'react';
|
||||
import { AnimatePresence, motion } from 'framer-motion';
|
||||
import TitleSide from '../../../common/components/views/TitleSide';
|
||||
import TitleSide from 'common/components/views/TitleSide';
|
||||
|
||||
export default function StageManager(props) {
|
||||
const { publ, title, time, backstageEvents, selectedId, general } = props;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import QRCode from 'react-qr-code';
|
||||
import style from './Public.module.css';
|
||||
import Paginator from '../../../common/components/views/Paginator';
|
||||
import NavLogo from '../../../common/components/nav/NavLogo';
|
||||
import Paginator from 'common/components/views/Paginator';
|
||||
import NavLogo from 'common/components/nav/NavLogo';
|
||||
import { AnimatePresence, motion } from 'framer-motion';
|
||||
import TitleSide from '../../../common/components/views/TitleSide';
|
||||
import TitleSide from 'common/components/views/TitleSide';
|
||||
import { useEffect } from 'react';
|
||||
|
||||
export default function Public(props) {
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { AnimatePresence, motion } from 'framer-motion';
|
||||
import { useEffect } from 'react';
|
||||
import Countdown from '../../../common/components/countdown/Countdown';
|
||||
import MyProgressBar from '../../../common/components/myProgressBar/MyProgressBar';
|
||||
import NavLogo from '../../../common/components/nav/NavLogo';
|
||||
import TitleCard from '../../../common/components/views/TitleCard';
|
||||
import Countdown from 'common/components/countdown/Countdown';
|
||||
import MyProgressBar from 'common/components/myProgressBar/MyProgressBar';
|
||||
import NavLogo from 'common/components/nav/NavLogo';
|
||||
import TitleCard from 'common/components/views/TitleCard';
|
||||
import style from './PresenterView.module.css';
|
||||
|
||||
export default function PresenterView(props) {
|
||||
@@ -14,7 +14,7 @@ export default function PresenterView(props) {
|
||||
document.title = 'ontime - Speaker Screen';
|
||||
}, []);
|
||||
|
||||
|
||||
|
||||
|
||||
const showOverlay = pres.text !== '' && pres.visible;
|
||||
const isPlaying = time.playstate === 'start';
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import QRCode from 'react-qr-code';
|
||||
import style from './Pip.module.css';
|
||||
import Paginator from '../../../common/components/views/Paginator';
|
||||
import NavLogo from '../../../common/components/nav/NavLogo';
|
||||
import Paginator from 'common/components/views/Paginator';
|
||||
import NavLogo from 'common/components/nav/NavLogo';
|
||||
import { AnimatePresence, motion } from 'framer-motion';
|
||||
import { useEffect, useRef, useState } from 'react';
|
||||
import { formatDisplay } from '../../../common/dateConfig';
|
||||
import { ReactComponent as Emptyimage } from '../../../assets/images/empty.svg';
|
||||
import { formatDisplay } from 'common/dateConfig';
|
||||
import { ReactComponent as Emptyimage } from 'assets/images/empty.svg';
|
||||
|
||||
export default function Pip(props) {
|
||||
const { time, backstageEvents, selectedId, general } = props;
|
||||
|
||||
Reference in New Issue
Block a user