diff --git a/src/components/Broadcast/BroadcastDirectorUI/Chyrons/ChyronsDirectorControls.tsx b/src/components/Broadcast/BroadcastDirectorUI/Chyrons/ChyronsDirectorControls.tsx index 7e1a02e..7e9a981 100644 --- a/src/components/Broadcast/BroadcastDirectorUI/Chyrons/ChyronsDirectorControls.tsx +++ b/src/components/Broadcast/BroadcastDirectorUI/Chyrons/ChyronsDirectorControls.tsx @@ -8,9 +8,9 @@ import { FaPlay, FaStepForward, FaStop } from "react-icons/fa"; import { broadcastGraphicsSelector } from "../../../../features/broadcast/graphics/broadcastGraphicsSelector"; import { broadcastDirectorSelector } from "../../../../features/broadcast/director/broadcastDirectorSelector"; import { - chyronsClear, - chyronsOpenStateIncrement, - chyronsSet, + clearChyrons, + incrementChyronsOpenState, + setChyrons, } from "../../../../features/broadcast/graphics/broadcastGraphicsSlice"; import { flagModeList, getChyronModesList, getChyronSubModesList } from "../../../../domain/data/broadcastGraphics"; import { BGChyronDriver, BGChyronMode, BGChyrons, BGChyronSubMode, Car, FlagMode } from "../../../../types/state"; @@ -63,16 +63,16 @@ export function ChyronsDirectorControls() { secondary: secondaryCar != null ? buildDriverChyron(secondaryCar) : null, }, }; - dispatch(chyronsSet(newChyrons)); + dispatch(setChyrons(newChyrons)); } }; const onNext = () => { - dispatch(chyronsOpenStateIncrement()); + dispatch(incrementChyronsOpenState()); }; const onClose = () => { - dispatch(chyronsClear()); + dispatch(clearChyrons()); }; const buildDriverChyron = (car: Car): BGChyronDriver => ({ diff --git a/src/components/Workspaces/PrototypingControls/GridSelection/GridSelection.tsx b/src/components/Workspaces/PrototypingControls/GridSelection/GridSelection.tsx index 9f6b7a7..7b53399 100644 --- a/src/components/Workspaces/PrototypingControls/GridSelection/GridSelection.tsx +++ b/src/components/Workspaces/PrototypingControls/GridSelection/GridSelection.tsx @@ -3,7 +3,7 @@ import { findIndex } from "lodash"; import { useDispatch, useSelector } from "react-redux"; import { broadcastDirectorSelector } from "../../../../features/broadcast/director/broadcastDirectorSelector"; -import { selectedCarsAdd, selectedCarsClear, selectedCarsRemove } from "../../../../features/broadcast/director/broadcastDirectorSlice"; +import { pushSelectedCars, clearSelectedCars, removeSelectedCars } from "../../../../features/broadcast/director/broadcastDirectorSlice"; import { eventSelector } from "../../../../features/event/eventSelector"; import { Car } from "../../../../types/state"; import { carMatch } from "../../../../utils/comparators"; @@ -21,13 +21,13 @@ export function GridSelection() { const carClick = (car: Car, selected: boolean) => () => { if (selected) { - dispatch(selectedCarsRemove(car)); + dispatch(removeSelectedCars(car)); } else { - dispatch(selectedCarsAdd(car)); + dispatch(pushSelectedCars(car)); } }; const carDoubleClick = (car: Car) => () => { - dispatch(selectedCarsClear(car)); + dispatch(clearSelectedCars(car)); }; return ( diff --git a/src/features/broadcast/director/broadcastDirectorSlice.ts b/src/features/broadcast/director/broadcastDirectorSlice.ts index 5bd72aa..238e42d 100644 --- a/src/features/broadcast/director/broadcastDirectorSlice.ts +++ b/src/features/broadcast/director/broadcastDirectorSlice.ts @@ -13,16 +13,16 @@ export const broadcastDirectorSlice = createSlice({ name: "broadcastDirector", initialState, reducers: { - selectedCarsAdd: (state, action: PayloadAction) => { + pushSelectedCars: (state, action: PayloadAction) => { const index = findIndex(state.selectedCars, carMatch(action.payload)); if (index === -1) { state.selectedCars = state.selectedCars.concat(action.payload); } }, - selectedCarsSet: (state, action: PayloadAction) => { // Might be removed. + setSelectedCars: (state, action: PayloadAction) => { // Might be removed. state.selectedCars = [action.payload]; }, - selectedCarsRemove: (state, action: PayloadAction) => { + removeSelectedCars: (state, action: PayloadAction) => { const index = typeof action.payload === "number" ? action.payload : findIndex(state.selectedCars, carMatch(action.payload)); @@ -36,7 +36,7 @@ export const broadcastDirectorSlice = createSlice({ * car. * @param action Car (optional) */ - selectedCarsClear: (state, action: PayloadAction>) => { + clearSelectedCars: (state, action: PayloadAction>) => { if (action.payload == null) { state.selectedCars = []; } else { @@ -47,9 +47,9 @@ export const broadcastDirectorSlice = createSlice({ }); export const { - selectedCarsAdd, - selectedCarsSet, - selectedCarsRemove, - selectedCarsClear, + pushSelectedCars, + setSelectedCars, + removeSelectedCars, + clearSelectedCars, } = broadcastDirectorSlice.actions; export default broadcastDirectorSlice.reducer; diff --git a/src/features/broadcast/graphics/broadcastGraphicsSlice.ts b/src/features/broadcast/graphics/broadcastGraphicsSlice.ts index d5acc27..a169905 100644 --- a/src/features/broadcast/graphics/broadcastGraphicsSlice.ts +++ b/src/features/broadcast/graphics/broadcastGraphicsSlice.ts @@ -10,10 +10,10 @@ export const broadcastGraphicsSlice = createSlice({ name: "broadcastGraphics", initialState, reducers: { - chyronsSet: (state, action: PayloadAction) => { + setChyrons: (state, action: PayloadAction) => { state.chyrons = action.payload; }, - chyronsOpenStateSet: (state, action: PayloadAction) => { + setChyronsOpenState: (state, action: PayloadAction) => { if (state.chyrons == null) return; state.chyrons.openState = action.payload; @@ -21,7 +21,7 @@ export const broadcastGraphicsSlice = createSlice({ state.chyrons.openState = action.payload; } }, - chyronsOpenStateIncrement: (state) => { + incrementChyronsOpenState: (state) => { if (state.chyrons == null) return; ++state.chyrons.openState; @@ -29,16 +29,16 @@ export const broadcastGraphicsSlice = createSlice({ ++state.chyrons.openState; } }, - chyronsClear: (state) => { + clearChyrons: (state) => { state.chyrons = null; }, }, }); export const { - chyronsSet, - chyronsOpenStateSet, - chyronsOpenStateIncrement, - chyronsClear, + setChyrons, + setChyronsOpenState, + incrementChyronsOpenState, + clearChyrons, } = broadcastGraphicsSlice.actions; export default broadcastGraphicsSlice.reducer; diff --git a/src/features/event/eventSlice.ts b/src/features/event/eventSlice.ts index 108ded2..4ad46cd 100644 --- a/src/features/event/eventSlice.ts +++ b/src/features/event/eventSlice.ts @@ -46,13 +46,13 @@ export const eventSlice = createSlice({ name: "event", initialState, reducers: { - courseFlagSet: (state, action: PayloadAction) => { + setCourseFlag: (state, action: PayloadAction) => { state.courseStatus.courseFlag = action.payload; }, }, }); export const { - courseFlagSet, + setCourseFlag, } = eventSlice.actions; export default eventSlice.reducer;