diff --git a/src/components/Broadcast/BroadcastDirectorUI/Chyrons/ChyronsDirectorControls.tsx b/src/components/Broadcast/BroadcastDirectorUI/Chyrons/ChyronsDirectorControls.tsx
index 221ec80..eefe809 100644
--- a/src/components/Broadcast/BroadcastDirectorUI/Chyrons/ChyronsDirectorControls.tsx
+++ b/src/components/Broadcast/BroadcastDirectorUI/Chyrons/ChyronsDirectorControls.tsx
@@ -38,29 +38,17 @@ export function ChyronsDirectorControls() {
const { chyrons } = useSelector(broadcastGraphicsSelector);
const { selectedCars } = useSelector(broadcastDirectorSelector);
-
-
// Handle changes to the chyron mode so submodes can be changed accordingly.
useEffect(() => {
setChyronSubModes(getChyronSubModesList(chyronMode));
}, [chyronMode]);
- // Handle changes to selected cars
- // useEffect(() => {
- // console.log(selectedCars, chyrons);
- // // Do not change chyrons while in a non-closed state.
- // if (chyrons != null && chyrons.openState !== 0) {
- // return;
- // }
- // if (chyronMode === "driver") {
- // buildDriver();
- // }
- // }, [selectedCars]);
-
-
const onOpen = () => {
- // dispatch(setChyronsOpenState(1));
buildDriver();
+ setTimeout(() => {
+ // Delay a short time and increment the open state so the animation can happen.
+ dispatch(incrementChyronsOpenState());
+ }, 50);
};
const onNext = () => {
diff --git a/src/components/BroadcastGraphics/Chyrons/Driver/ChyronDriver.tsx b/src/components/BroadcastGraphics/Chyrons/Driver/ChyronDriver.tsx
index c4e61a5..651a254 100644
--- a/src/components/BroadcastGraphics/Chyrons/Driver/ChyronDriver.tsx
+++ b/src/components/BroadcastGraphics/Chyrons/Driver/ChyronDriver.tsx
@@ -68,7 +68,7 @@ export function ChyronDriver({ chyronData, subMode, openState }: ChyronDriverPro
open={openState !== 0}
transitionProps={[{
property: "outline",
- duration: 1000,
+ duration: 1167,
}]}
/>
@@ -129,9 +130,9 @@ export function ChyronDriver({ chyronData, subMode, openState }: ChyronDriverPro
open={openState !== 0}
transitionProps={[{
property: "clip-path",
- duration: 750,
+ duration: 667,
timing: "ease-in-out",
- delay: 750,
+ delay: 733,
}]}
color={teamColor}
/>
@@ -150,7 +151,9 @@ export function ChyronDriver({ chyronData, subMode, openState }: ChyronDriverPro
)}
- {car.driver.team.shortName}
+
+ {car.driver.team.shortName}
+
`
clip-path: ${({ open }) => open
? "polygon(0 0, 100% 0, 100% 100%, 0 100%)"
- : "polygon(0 0, 100% 0, 100% 0, 0 0)"};
+ : "polygon(-100% 0, 200% 0, 200% 0, -100% 0)"};
+
+ outline: ${({ color }) => color} solid 1px;
${({ transitionProps }) => commonTransition(transitionProps)};
`;
@@ -137,11 +141,23 @@ export const NumberContainer = styled.div`
`;
NumberContainer.displayName = "NumberContainer";
-export const TeamName = styled.div`
+const blinkingAnimation = keyframes`
+ 0% { opacity: 0.4 }
+ 14% { opacity: 0 }
+ 42% { opacity: 0.4 }
+ 56% { opacity: 0 }
+ 86% { opacity: 1 }
+`;
+
+export const TeamName = styled.div`
position: relative;
font-family: ${p => p.theme.fonts.f1Regular};
color: #d1d1d1;
font-size: 20px;
+
+ ${({ open }) => open && css`
+ animation: ${blinkingAnimation} 233ms step-end 500ms;
+ `}
`;
TeamName.displayName = "TeamName";
diff --git a/src/components/BroadcastGraphics/Common/VenetianBlindsTransition/VenetianBlindsTransition.tsx b/src/components/BroadcastGraphics/Common/VenetianBlindsTransition/VenetianBlindsTransition.tsx
index 5dd068f..6acd92c 100644
--- a/src/components/BroadcastGraphics/Common/VenetianBlindsTransition/VenetianBlindsTransition.tsx
+++ b/src/components/BroadcastGraphics/Common/VenetianBlindsTransition/VenetianBlindsTransition.tsx
@@ -92,7 +92,7 @@ export const VenetianBlindsTransition = (
opaqueWidth={blindsSize.opaque}
blindsColor={blindsColor}
blindsColorFadeDuration={blindsColorFadeDuration}
- blindsColorFadeDelay={blindsColorFadeDelay}
+ blindsColorFadeDelay={blindsColorFadeDelay + delay}
blindsClosing={visible}
spanBlinkDuration={spanBlinkDuration}
spanBlinkDelay={delay}
@@ -106,7 +106,7 @@ export const VenetianBlindsTransition = (
opaqueWidth={blindsSize.opaque}
blindsColor={blindsColor}
blindsColorFadeDuration={blindsColorFadeDuration}
- blindsColorFadeDelay={blindsColorFadeDelay}
+ blindsColorFadeDelay={blindsColorFadeDelay + delay}
blindsClosing={visible}
spanBlinkDuration={spanBlinkDuration}
spanBlinkDelay={delay}
diff --git a/src/components/Workspaces/Workspace/Workspace.tsx b/src/components/Workspaces/Workspace/Workspace.tsx
index e4ce926..5fe0082 100644
--- a/src/components/Workspaces/Workspace/Workspace.tsx
+++ b/src/components/Workspaces/Workspace/Workspace.tsx
@@ -26,7 +26,7 @@ export const Workspace = ({
prototypeControls,
}: WorkspaceProps) => {
const dispatch = useDispatch();
- const { animatedBG, workspaceProperties } = useSelector(workspaceSelector);
+ const { animatedBG, darkBG, workspaceProperties } = useSelector(workspaceSelector);
const { currentWorkspaceId: overlayWorkspaceId } = useSelector(overlayToolSelector);
useEffect(() => {
@@ -56,6 +56,7 @@ export const Workspace = ({
{previewContent}
`
position: relative;
@@ -24,7 +27,7 @@ export const PreviewWindow = styled.div`
border-radius: 1em;
- background-image: url("${bg}");
+ background-image: url("${({ darkBG }) => darkBG ? bgDark : bgLight}");
background-position: 0px 0px;
background-repeat: repeat;
diff --git a/src/components/Workspaces/WorkspaceControls/WorkspaceControls.tsx b/src/components/Workspaces/WorkspaceControls/WorkspaceControls.tsx
index 406d9be..d06a470 100644
--- a/src/components/Workspaces/WorkspaceControls/WorkspaceControls.tsx
+++ b/src/components/Workspaces/WorkspaceControls/WorkspaceControls.tsx
@@ -1,28 +1,37 @@
-import { Grid } from "@bedrock-layout/grid";
+import { InlineCluster } from "@bedrock-layout/inline-cluster";
import { PadBox } from "@bedrock-layout/padbox";
+import { Split } from "@bedrock-layout/split";
import { useDispatch, useSelector } from "react-redux";
import { workspaceSelector } from "../../../features/workspace/workspaceSelector";
-import { setAnimatedBG } from "../../../features/workspace/workspaceSlice";
+import { setAnimatedBG, setDarkBG } from "../../../features/workspace/workspaceSlice";
import { Toggle } from "../../Common/Inputs/Toggle";
import { OverlayControl } from "../../OverlayTool";
export const WorkspaceControls = () => {
const dispatch = useDispatch();
- const { animatedBG } = useSelector(workspaceSelector);
+ const { animatedBG, darkBG } = useSelector(workspaceSelector);
return(
-
-
+
+
{
dispatch(setAnimatedBG(value));
- }} />
-
+ }}
+ />
+ {
+ dispatch(setDarkBG(value));
+ }}
+ />
+
-
+
);
};
diff --git a/src/features/workspace/workspaceSlice.ts b/src/features/workspace/workspaceSlice.ts
index fad779b..e41a379 100644
--- a/src/features/workspace/workspaceSlice.ts
+++ b/src/features/workspace/workspaceSlice.ts
@@ -4,6 +4,7 @@ import { PrototypeState, RootState, WorkspaceId, WorkspaceProperties } from "../
const initialState: RootState["workspace"] = {
workspaceId: "",
animatedBG: true,
+ darkBG: false,
workspaceProperties: {
name: "undefined",
overlayIds: [],
@@ -27,6 +28,9 @@ export const workspaceSlice = createSlice({
setAnimatedBG: (state, action: PayloadAction) => {
state.animatedBG = action.payload;
},
+ setDarkBG: (state, action: PayloadAction) => {
+ state.darkBG = action.payload;
+ },
updateWorkspace: (state, action: PayloadAction) => {
state.workspaceId = action.payload.workspaceId;
state.workspaceProperties = action.payload.workspaceProperties;
@@ -86,6 +90,7 @@ export const workspaceSlice = createSlice({
export const {
setWorkspaceId,
setAnimatedBG,
+ setDarkBG,
updateWorkspace,
updateAngledFlagCountry,
updateAngledFlagTeam,
diff --git a/src/public/images/misc/checker-40x40-dark.png b/src/public/images/misc/checker-40x40-dark.png
new file mode 100644
index 0000000..ca3c698
Binary files /dev/null and b/src/public/images/misc/checker-40x40-dark.png differ
diff --git a/src/public/images/misc/checker-40x40.png b/src/public/images/misc/checker-40x40-light.png
similarity index 100%
rename from src/public/images/misc/checker-40x40.png
rename to src/public/images/misc/checker-40x40-light.png
diff --git a/src/types/state.d.ts b/src/types/state.d.ts
index b9a1c5e..d242e63 100644
--- a/src/types/state.d.ts
+++ b/src/types/state.d.ts
@@ -22,6 +22,7 @@ export interface Dimensions { width: number; height: number; }
export interface Workspace {
workspaceId: WorkspaceId;
animatedBG: boolean;
+ darkBG: boolean;
workspaceProperties: WorkspaceProperties;
prototypeState: PrototypeState;
}