12 changed files with 109 additions and 50 deletions
@ -0,0 +1,26 @@
@@ -0,0 +1,26 @@
|
||||
import { useRecoilValue } from 'recoil'; |
||||
import { clientConfigState } from '../../stores/ClientConfigStore'; |
||||
import { ClientConfig } from '../../../interfaces/client-config.model'; |
||||
import { Layout, Row, Col } from 'antd'; |
||||
|
||||
const { Content } = Layout; |
||||
|
||||
export default function FooterComponent() { |
||||
const clientConfig = useRecoilValue<ClientConfig>(clientConfigState); |
||||
const { extraPageContent } = clientConfig; |
||||
|
||||
return ( |
||||
<Content style={{ margin: '80px 16px 0', overflow: 'initial' }}> |
||||
<div> |
||||
<Row> |
||||
<Col span={24}>Video player goes here</Col> |
||||
</Row> |
||||
<Row> |
||||
<Col span={24}> |
||||
<Content dangerouslySetInnerHTML={{ __html: extraPageContent }} /> |
||||
</Col> |
||||
</Row> |
||||
</div> |
||||
</Content> |
||||
); |
||||
} |
@ -0,0 +1 @@
@@ -0,0 +1 @@
|
||||
export { default } from "./Content" |
@ -0,0 +1,13 @@
@@ -0,0 +1,13 @@
|
||||
import { useRecoilValue } from 'recoil'; |
||||
import { clientConfigState } from '../../stores/ClientConfigStore'; |
||||
import { ClientConfig } from '../../../interfaces/client-config.model'; |
||||
import { Layout } from 'antd'; |
||||
|
||||
const { Footer } = Layout; |
||||
|
||||
export default function FooterComponent() { |
||||
const clientConfig = useRecoilValue<ClientConfig>(clientConfigState); |
||||
const { version } = clientConfig; |
||||
|
||||
return <Footer style={{ textAlign: 'center' }}>Footer: Owncast {version}</Footer>; |
||||
} |
@ -0,0 +1 @@
@@ -0,0 +1 @@
|
||||
export { default } from './Footer'; |
@ -0,0 +1,4 @@
@@ -0,0 +1,4 @@
|
||||
.header { |
||||
@apply fixed w-full bg-red; |
||||
z-index: 1; |
||||
} |
@ -0,0 +1,31 @@
@@ -0,0 +1,31 @@
|
||||
import s from './Header.module.scss'; |
||||
import { Layout } from 'antd'; |
||||
import { ServerStatusStore, serverStatusState } from '../../stores/ServerStatusStore'; |
||||
import { |
||||
ClientConfigStore, |
||||
clientConfigState, |
||||
chatCurrentlyVisible, |
||||
} from '../../stores/ClientConfigStore'; |
||||
import { ClientConfig } from '../../../interfaces/client-config.model'; |
||||
import { useRecoilState, useRecoilValue } from 'recoil'; |
||||
import { useEffect } from 'react'; |
||||
|
||||
const { Header } = Layout; |
||||
|
||||
export default function HeaderComponent() { |
||||
const clientConfig = useRecoilValue<ClientConfig>(clientConfigState); |
||||
const [chatOpen, setChatOpen] = useRecoilState(chatCurrentlyVisible); |
||||
|
||||
const { name } = clientConfig; |
||||
|
||||
useEffect(() => { |
||||
console.log({ chatOpen }); |
||||
}, [chatOpen]); |
||||
|
||||
return ( |
||||
<Header className={`${s.header}`}> |
||||
{name} |
||||
<button onClick={() => setChatOpen(!chatOpen)}>Toggle Chat</button> |
||||
</Header> |
||||
); |
||||
} |
@ -0,0 +1 @@
@@ -0,0 +1 @@
|
||||
export { default } from './Header'; |
@ -0,0 +1,19 @@
@@ -0,0 +1,19 @@
|
||||
import Sider from 'antd/lib/layout/Sider'; |
||||
import { useRecoilValue } from 'recoil'; |
||||
import { chatCurrentlyVisible } from '../../stores/ClientConfigStore'; |
||||
|
||||
export default function Sidebar() { |
||||
let chatOpen = useRecoilValue(chatCurrentlyVisible); |
||||
return ( |
||||
<Sider |
||||
collapsed={!chatOpen} |
||||
width={300} |
||||
style={{ |
||||
position: 'fixed', |
||||
right: 0, |
||||
top: 0, |
||||
bottom: 0, |
||||
}} |
||||
/> |
||||
); |
||||
} |
@ -0,0 +1 @@
@@ -0,0 +1 @@
|
||||
export { default } from './Sidebar'; |
Loading…
Reference in new issue