mirror of
https://github.com/streamwall/streamwall.git
synced 2026-01-24 14:12:48 -05:00
Add version overlay
This commit is contained in:
@@ -15,6 +15,7 @@ import { StreamwallState } from 'streamwall-shared'
|
|||||||
import { styled } from 'styled-components'
|
import { styled } from 'styled-components'
|
||||||
import { TailSpin } from 'svg-loaders-react'
|
import { TailSpin } from 'svg-loaders-react'
|
||||||
import { matchesState } from 'xstate'
|
import { matchesState } from 'xstate'
|
||||||
|
import packageInfo from '../../package.json'
|
||||||
import { StreamwallLayerGlobal } from '../preload/layerPreload'
|
import { StreamwallLayerGlobal } from '../preload/layerPreload'
|
||||||
|
|
||||||
import '@fontsource/noto-sans'
|
import '@fontsource/noto-sans'
|
||||||
@@ -40,6 +41,9 @@ function Overlay({
|
|||||||
const overlays = streams.filter((s) => s.kind === 'overlay')
|
const overlays = streams.filter((s) => s.kind === 'overlay')
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
|
<VersionText>
|
||||||
|
<strong>streamwall.io</strong> {packageInfo.version}
|
||||||
|
</VersionText>
|
||||||
{activeViews.map(({ state, context }) => {
|
{activeViews.map(({ state, context }) => {
|
||||||
const { content, pos } = context
|
const { content, pos } = context
|
||||||
if (!content) {
|
if (!content) {
|
||||||
@@ -267,6 +271,23 @@ const BlurCover = styled.div`
|
|||||||
backdrop-filter: ${({ isBlurred }) => (isBlurred ? 'blur(30px)' : 'blur(0)')};
|
backdrop-filter: ${({ isBlurred }) => (isBlurred ? 'blur(30px)' : 'blur(0)')};
|
||||||
`
|
`
|
||||||
|
|
||||||
|
const VersionText = styled.div`
|
||||||
|
position: absolute;
|
||||||
|
bottom: 4px;
|
||||||
|
right: 4px;
|
||||||
|
color: white;
|
||||||
|
font-size: 12px;
|
||||||
|
text-shadow:
|
||||||
|
0 0 1px rgba(0, 0, 0, 0.5),
|
||||||
|
1px 0 1px rgba(0, 0, 0, 0.5),
|
||||||
|
0 1px 1px rgba(0, 0, 0, 0.5),
|
||||||
|
1px 1px 1px rgba(0, 0, 0, 0.5);
|
||||||
|
backdrop-filter: blur(30px);
|
||||||
|
padding: 1px 4px;
|
||||||
|
border-bottom-left-radius: 4px;
|
||||||
|
opacity: 0.65;
|
||||||
|
`
|
||||||
|
|
||||||
const OverlayIFrame = styled.iframe`
|
const OverlayIFrame = styled.iframe`
|
||||||
position: fixed;
|
position: fixed;
|
||||||
left: 0;
|
left: 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user