Skip to content

Commit ca4cef2

Browse files
committed
feat: List available studio views at /countdowns/[studioID]
Instead of redirecting to root of site.
1 parent b6af173 commit ca4cef2

File tree

2 files changed

+44
-3
lines changed

2 files changed

+44
-3
lines changed

packages/webui/src/client/ui/ClockView/ClockView.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Switch, Route, Redirect } from 'react-router-dom'
1+
import { Switch, Route } from 'react-router-dom'
22
import { useSubscription, useTracker } from '../../lib/ReactMeteorData/react-meteor-data.js'
33

44
import { RundownTimingProvider } from '../RundownView/RundownTiming/RundownTimingProvider.js'
@@ -13,6 +13,7 @@ import { StudioId } from '@sofie-automation/corelib/dist/dataModel/Ids'
1313
import { CameraScreen } from './CameraScreen/index.js'
1414
import { MeteorPubSub } from '@sofie-automation/meteor-lib/dist/api/pubsub'
1515
import { useTranslation } from 'react-i18next'
16+
import { ClockViewIndex } from './ClockViewIndex.js'
1617

1718
export function ClockView({ studioId }: Readonly<{ studioId: StudioId }>): JSX.Element {
1819
useSubscription(MeteorPubSub.rundownPlaylistForStudio, studioId, true)
@@ -61,8 +62,8 @@ export function ClockView({ studioId }: Readonly<{ studioId: StudioId }>): JSX.E
6162
<CameraScreen playlist={playlist} studioId={studioId} />
6263
</RundownTimingProvider>
6364
</Route>
64-
<Route>
65-
<Redirect to="/" />
65+
<Route path="/countdowns/:studioId">
66+
<ClockViewIndex studioId={studioId} />
6667
</Route>
6768
</Switch>
6869
)
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
import { Link } from 'react-router-dom'
2+
import { useTranslation } from 'react-i18next'
3+
import { StudioId } from '@sofie-automation/corelib/dist/dataModel/Ids'
4+
import Container from 'react-bootstrap/esm/Container'
5+
6+
export function ClockViewIndex({ studioId }: Readonly<{ studioId: StudioId }>): JSX.Element {
7+
const { t } = useTranslation()
8+
9+
return (
10+
<Container fluid className="header-clear">
11+
<section className="mt-5 mx-5">
12+
<header className="my-2">
13+
<h1>{t('Available Views for Studio {{studioId}}', { studioId })}</h1>
14+
</header>
15+
<section className="my-5">
16+
<ul>
17+
<li>
18+
<Link to={`/countdowns/${studioId}/presenter`}>{t('Presenter Screen')}</Link>
19+
</li>
20+
<li>
21+
<Link to={`/countdowns/${studioId}/director`}>{t('Director Screen')}</Link>
22+
</li>
23+
<li>
24+
<Link to={`/countdowns/${studioId}/overlay`}>{t('Overlay Screen')}</Link>
25+
</li>
26+
<li>
27+
<Link to={`/countdowns/${studioId}/camera`}>{t('Camera Screen')}</Link>
28+
</li>
29+
<li>
30+
<Link to={`/prompter/${studioId}`}>{t('Prompter')}</Link>
31+
</li>
32+
<li>
33+
<Link to={`/activeRundown/${studioId}`}>{t('Active Rundown')}</Link>
34+
</li>
35+
</ul>
36+
</section>
37+
</section>
38+
</Container>
39+
)
40+
}

0 commit comments

Comments
 (0)