From bf7ca81e024d188fa02e9ec0ce7c5ac3e5723418 Mon Sep 17 00:00:00 2001 From: arihanv <63890951+arihanv@users.noreply.github.com> Date: Sun, 23 Jul 2023 15:17:25 -0500 Subject: [PATCH] style: Styling Operator Block (#468) * Operator Layout --- .../features/operator/Operator.module.scss | 14 ++++++++- .../client/src/features/operator/Operator.tsx | 29 ++++++++++++++---- .../operator/focus-block/focus-block.tsx | 14 +++++++++ .../focus-block/focusBlock.module.scss | 25 ++++++++++++++++ .../operator/op-event/OpEvent.module.scss | 26 ++++++++++++++++ .../features/operator/op-event/OpEvent.tsx | 30 +++++++++++++------ 6 files changed, 123 insertions(+), 15 deletions(-) create mode 100644 apps/client/src/features/operator/focus-block/focus-block.tsx create mode 100644 apps/client/src/features/operator/focus-block/focusBlock.module.scss diff --git a/apps/client/src/features/operator/Operator.module.scss b/apps/client/src/features/operator/Operator.module.scss index c31b66126..2ffccd80d 100644 --- a/apps/client/src/features/operator/Operator.module.scss +++ b/apps/client/src/features/operator/Operator.module.scss @@ -30,9 +30,21 @@ .scheduledEvent { @include event-block(); background-color: $gray-1300; + align-items: start; +} + +.activeEvent { + border-top: 1.5px white; + border-style: solid; +} + +.runningTimer { + border-top: 0.5px white; + border-style: solid; + background-color: $green-700; } .block { @include event-block(); background-color: $gray-1350; -} +} \ No newline at end of file diff --git a/apps/client/src/features/operator/Operator.tsx b/apps/client/src/features/operator/Operator.tsx index 4e4795eab..120b1ca17 100644 --- a/apps/client/src/features/operator/Operator.tsx +++ b/apps/client/src/features/operator/Operator.tsx @@ -1,7 +1,10 @@ +import React from 'react'; import { SupportedEvent } from 'ontime-types'; +import NavigationMenu from '../.././common/components/navigation-menu/NavigationMenu'; import useRundown from '../../common/hooks-query/useRundown'; +import FocusBlock from './focus-block/focus-block'; import OpBlock from './op-block/OpBlock'; import OpEvent from './op-event/OpEvent'; import TimeBlock from './time-block/TimeBlock'; @@ -12,6 +15,14 @@ export default function Operator() { // this is the data that you need, the status flag should give you possibility to create a loading state // for debugging data use the react query dev tools (flower thing in the bottom left corner) const { data, status } = useRundown(); + const [showChild, setShowChild] = React.useState(false); + + const handleScroll = (event: any) => { + const scrollThreshold = 50; // Set the scroll threshold here + const scrollPosition = event.target.scrollTop; + + setShowChild(scrollPosition > scrollThreshold); + }; if (!data || status === 'loading') { return <>loading>; @@ -19,16 +30,23 @@ export default function Operator() { return (