From 5512836472e7ca35e43d61231135e9e28e499897 Mon Sep 17 00:00:00 2001 From: Jan Starzak Date: Thu, 18 Jan 2024 16:37:17 +0100 Subject: [PATCH] feat: whenConnected helper method on RootAppStore --- .../src/CurrentRundown/CurrentRundown.tsx | 9 ++++ .../client/src/RundownList/RundownList.tsx | 2 + .../src/components/AlertBar/AlertBar.tsx | 14 ++++++ .../SystemStatusAlertBars.tsx | 16 +++++++ .../apps/client/src/stores/RootAppStore.ts | 33 ++++++++++++- .../apps/client/src/stores/RundownStore.ts | 46 +++++++++++++------ 6 files changed, 105 insertions(+), 15 deletions(-) create mode 100644 packages/apps/client/src/components/AlertBar/AlertBar.tsx create mode 100644 packages/apps/client/src/components/SystemStatusAlertBars/SystemStatusAlertBars.tsx diff --git a/packages/apps/client/src/CurrentRundown/CurrentRundown.tsx b/packages/apps/client/src/CurrentRundown/CurrentRundown.tsx index f06de74..a735d9d 100644 --- a/packages/apps/client/src/CurrentRundown/CurrentRundown.tsx +++ b/packages/apps/client/src/CurrentRundown/CurrentRundown.tsx @@ -6,6 +6,7 @@ import { Segment } from './Segment' import { Button } from 'react-bootstrap' import classes from './CurrentRundown.module.scss' import { useNavigate } from 'react-router-dom' +import { SystemStatusAlertBars } from '../components/SystemStatusAlertBars/SystemStatusAlertBars' const CurrentRundown = observer((): React.JSX.Element => { const openRundown = RootAppStore.rundownStore.openRundown @@ -20,6 +21,10 @@ const CurrentRundown = observer((): React.JSX.Element => { navigate('/') }) + const onSendToOutput = action(() => { + RootAppStore.rundownStore.sendRundownToOutput(openRundown.id) + }) + return ( <>

{openRundown.name}

@@ -27,7 +32,11 @@ const CurrentRundown = observer((): React.JSX.Element => { +

+