diff --git a/web/components/ui/Content/Content.tsx b/web/components/ui/Content/Content.tsx index ff78c7a20..058ca4e34 100644 --- a/web/components/ui/Content/Content.tsx +++ b/web/components/ui/Content/Content.tsx @@ -1,3 +1,4 @@ +/* eslint-disable react/no-danger */ import { useRecoilValue } from 'recoil'; import { Layout, Button, Tabs, Spin } from 'antd'; import { NotificationFilled, HeartFilled } from '@ant-design/icons'; @@ -42,7 +43,7 @@ export default function ContentComponent() { const messages = useRecoilValue(chatMessagesAtom); const online = useRecoilValue(isOnlineSelector); - const { extraPageContent, version, socialHandles, name, title, tags } = clientConfig; + const { extraPageContent, version, socialHandles, name, title, tags, summary } = clientConfig; const { viewerCount, lastConnectTime, lastDisconnectTime } = status; const followers: Follower[] = []; @@ -71,7 +72,12 @@ export default function ContentComponent() {
{online && } - {!online && } + {!online && ( + + )}
{tags.length > 0 && tags.map(tag => #{tag} )}
+ - +
diff --git a/web/components/ui/OfflineBanner/OfflineBanner.module.scss b/web/components/ui/OfflineBanner/OfflineBanner.module.scss index e69de29bb..7115840af 100644 --- a/web/components/ui/OfflineBanner/OfflineBanner.module.scss +++ b/web/components/ui/OfflineBanner/OfflineBanner.module.scss @@ -0,0 +1,23 @@ +.outerContainer { + width: 100%; + display: flex; + justify-content: center; +} + +.innerContainer { + display: flex; + flex-direction: column; + width: 50%; + background-color: var(--theme-background-secondary); + margin: 2vw; + border-radius: var(--theme-rounded-corners); + padding: 25px; +} + +.header { + font-weight: bold; +} + +.footer { + margin-top: 20px; +} diff --git a/web/components/ui/OfflineBanner/OfflineBanner.tsx b/web/components/ui/OfflineBanner/OfflineBanner.tsx index 830a3272d..10e95c546 100644 --- a/web/components/ui/OfflineBanner/OfflineBanner.tsx +++ b/web/components/ui/OfflineBanner/OfflineBanner.tsx @@ -1,9 +1,32 @@ -// import s from './OfflineBanner.module.scss'; +import { Divider, Button } from 'antd'; +import { NotificationFilled } from '@ant-design/icons'; + +import s from './OfflineBanner.module.scss'; interface Props { + name: string; text: string; } -export default function OfflineBanner({ text }: Props) { - return
{text}
; +export default function OfflineBanner({ name, text }: Props) { + const handleShowNotificationModal = () => { + console.log('show notification modal'); + }; + + return ( +
+
+
{name} is currently offline.
+ +
{text}
+ +
+ +
+
+
+ ); } diff --git a/web/components/ui/SocialLinks/SocialLinks.module.scss b/web/components/ui/SocialLinks/SocialLinks.module.scss index 4fc9f74de..f5a403ea3 100644 --- a/web/components/ui/SocialLinks/SocialLinks.module.scss +++ b/web/components/ui/SocialLinks/SocialLinks.module.scss @@ -1,11 +1,11 @@ .link { width: 2em; - margin-left: 4px; margin-right: 4px; } .links { display: flex; align-items: center; - justify-content: flex-end; -} \ No newline at end of file + justify-content: flex-start; + margin-top: 5px; +} diff --git a/web/pages/embed/video/index.tsx b/web/pages/embed/video/index.tsx index 4001bd88f..4d4a6e8b6 100644 --- a/web/pages/embed/video/index.tsx +++ b/web/pages/embed/video/index.tsx @@ -1,6 +1,7 @@ import React from 'react'; import { useRecoilValue } from 'recoil'; import { + clientConfigStateAtom, ClientConfigStore, isOnlineSelector, serverStatusState, @@ -8,10 +9,14 @@ import { import OfflineBanner from '../../../components/ui/OfflineBanner/OfflineBanner'; import Statusbar from '../../../components/ui/Statusbar/Statusbar'; import OwncastPlayer from '../../../components/video/OwncastPlayer'; +import { ClientConfig } from '../../../interfaces/client-config.model'; import { ServerStatus } from '../../../interfaces/server-status.model'; export default function VideoEmbed() { const status = useRecoilValue(serverStatusState); + const clientConfig = useRecoilValue(clientConfigStateAtom); + + const { name } = clientConfig; // const { extraPageContent, version, socialHandles, name, title, tags } = clientConfig; const { viewerCount, lastConnectTime, lastDisconnectTime } = status; @@ -21,7 +26,7 @@ export default function VideoEmbed() {
{online && } - {!online && }{' '} + {!online && }{' '} = args => is back online you can follow or ask for notifications.', }; export const ExampleCustom = Template.bind({}); ExampleCustom.args = { + name: 'Dull stream 31337', text: 'This is some example offline text that a streamer can leave for a visitor of the page.', };