Skip to content

Commit 893cd9a

Browse files
committed
feat: show screen name in screen-saver
1 parent aa2a5e0 commit 893cd9a

File tree

4 files changed

+15
-3
lines changed

4 files changed

+15
-3
lines changed

packages/webui/src/client/styles/studioScreenSaver.scss

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,5 +72,12 @@
7272
font-size: 2em;
7373
letter-spacing: -0.03em;
7474
}
75+
76+
.studio-screen-saver__info__screen-name {
77+
font-size: 0.5em;
78+
text-align: right;
79+
letter-spacing: 0.05em;
80+
margin: 0.5em;
81+
}
7582
}
7683
}

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@ import { RundownPlaylists } from '../../collections'
1111
import { StudioId } from '@sofie-automation/corelib/dist/dataModel/Ids'
1212
import { CameraScreen } from './CameraScreen'
1313
import { MeteorPubSub } from '@sofie-automation/meteor-lib/dist/api/pubsub'
14+
import { useTranslation } from 'react-i18next'
1415

1516
export function ClockView({ studioId }: Readonly<{ studioId: StudioId }>): JSX.Element {
1617
useSubscription(MeteorPubSub.rundownPlaylistForStudio, studioId, true)
18+
const { t } = useTranslation()
1719

1820
const playlist = useTracker(
1921
() =>
@@ -32,7 +34,7 @@ export function ClockView({ studioId }: Readonly<{ studioId: StudioId }>): JSX.E
3234
<PresenterScreen playlistId={playlist._id} studioId={studioId} />
3335
</RundownTimingProvider>
3436
) : (
35-
<StudioScreenSaver studioId={studioId} ownBackground={true} />
37+
<StudioScreenSaver studioId={studioId} ownBackground={true} screenName={t('Presenter Screen')} />
3638
)}
3739
</Route>
3840
<Route path="/countdowns/:studioId/overlay">

packages/webui/src/client/ui/Prompter/PrompterView.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -558,7 +558,7 @@ export class PrompterViewContent extends React.Component<Translated<IProps & ITr
558558
{this.renderAccessRequestButtons()}
559559
</>
560560
) : this.props.studio ? (
561-
<StudioScreenSaver studioId={this.props.studio._id} />
561+
<StudioScreenSaver studioId={this.props.studio._id} screenName={t('Prompter View')} />
562562
) : this.props.studioId ? (
563563
this.renderMessage(t("This studio doesn't exist."))
564564
) : (

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import { withTranslation } from 'react-i18next'
1818
interface IProps {
1919
// the studio to be displayed in the screen saver
2020
studioId: StudioId
21-
21+
screenName?: string
2222
ownBackground?: boolean
2323
}
2424

@@ -360,6 +360,9 @@ const StudioScreenSaverContent = withTranslation()(
360360
<div className="studio-screen-saver__info__rundown">{this.props.studio?.name}</div>
361361
)
362362
)}
363+
{this.props.screenName && (
364+
<div className="studio-screen-saver__info__screen-name">{this.props.screenName}</div>
365+
)}
363366
</div>
364367
</div>
365368
)

0 commit comments

Comments
 (0)