Skip to content

Commit fc42a69

Browse files
committed
Add version overlay
1 parent 2d93cc6 commit fc42a69

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

packages/streamwall/src/renderer/overlay.tsx

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import { StreamwallState } from 'streamwall-shared'
1515
import { styled } from 'styled-components'
1616
import { TailSpin } from 'svg-loaders-react'
1717
import { matchesState } from 'xstate'
18+
import packageInfo from '../../package.json'
1819
import { StreamwallLayerGlobal } from '../preload/layerPreload'
1920

2021
import '@fontsource/noto-sans'
@@ -40,6 +41,9 @@ function Overlay({
4041
const overlays = streams.filter((s) => s.kind === 'overlay')
4142
return (
4243
<div>
44+
<VersionText>
45+
<strong>streamwall.io</strong> {packageInfo.version}
46+
</VersionText>
4347
{activeViews.map(({ state, context }) => {
4448
const { content, pos } = context
4549
if (!content) {
@@ -267,6 +271,23 @@ const BlurCover = styled.div`
267271
backdrop-filter: ${({ isBlurred }) => (isBlurred ? 'blur(30px)' : 'blur(0)')};
268272
`
269273

274+
const VersionText = styled.div`
275+
position: absolute;
276+
bottom: 4px;
277+
right: 4px;
278+
color: white;
279+
font-size: 12px;
280+
text-shadow:
281+
0 0 1px rgba(0, 0, 0, 0.5),
282+
1px 0 1px rgba(0, 0, 0, 0.5),
283+
0 1px 1px rgba(0, 0, 0, 0.5),
284+
1px 1px 1px rgba(0, 0, 0, 0.5);
285+
backdrop-filter: blur(30px);
286+
padding: 1px 4px;
287+
border-bottom-left-radius: 4px;
288+
opacity: 0.65;
289+
`
290+
270291
const OverlayIFrame = styled.iframe`
271292
position: fixed;
272293
left: 0;

0 commit comments

Comments
 (0)