Fix web project build errors

This commit is contained in:
Gabe Kangas
2022-05-11 23:31:31 -07:00
parent b66617961d
commit 72c01e1b9a
86 changed files with 863 additions and 813 deletions

View File

@@ -1,26 +1,26 @@
.root {
display: grid;
grid-template-columns: 1fr;
display: grid;
grid-template-columns: 1fr;
}
.mobileChat {
display: block;
position: absolute;
background-color: white;
top: 0px;
width: 100%;
height: calc(50vh - var(--header-h));
display: block;
position: absolute;
background-color: white;
top: 0px;
width: 100%;
height: calc(50vh - var(--header-h));
}
.leftCol {
display: grid;
// -64px, which is the header
grid-template-rows: 50vh calc(50vh - var(--header-h));
display: grid;
// -64px, which is the header
grid-template-rows: 50vh calc(50vh - var(--header-h));
}
.lowerRow {
position: relative;
display: grid;
grid-template-rows: 1fr var(--header-h);
position: relative;
display: grid;
grid-template-rows: 1fr var(--header-h);
}
.pageContentSection {
@@ -32,10 +32,10 @@
}
@media (min-width: 768px) {
.mobileChat {
display: none;
}
.root[data-columns='2'] {
grid-template-columns: 1fr var(--chat-w);
}
.mobileChat {
display: none;
}
.root[data-columns='2'] {
grid-template-columns: 1fr var(--chat-w);
}
}

View File

@@ -1,6 +1,5 @@
import { useRecoilValue } from 'recoil';
import { Layout, Button, Col, Tabs } from 'antd';
import Grid from 'antd/lib/card/Grid';
import { Layout, Button, Tabs } from 'antd';
import {
chatVisibilityAtom,
clientConfigStateAtom,
@@ -23,6 +22,7 @@ import ActionButtonRow from '../../action-buttons/ActionButtonRow';
import ActionButton from '../../action-buttons/ActionButton';
import Statusbar from '../Statusbar/Statusbar';
import { ServerStatus } from '../../../interfaces/server-status.model';
import { Follower } from '../../../interfaces/follower';
const { TabPane } = Tabs;
const { Content } = Layout;
@@ -34,8 +34,8 @@ export default function ContentComponent() {
const messages = useRecoilValue<ChatMessage[]>(chatMessagesAtom);
const chatState = useRecoilValue<ChatState>(chatStateAtom);
const { extraPageContent } = clientConfig;
const { online, viewerCount, lastConnectTime, lastDisconnectTime, streamTitle } = status;
const { extraPageContent, version } = clientConfig;
const { online, viewerCount, lastConnectTime, lastDisconnectTime } = status;
const followers: Follower[] = [];
@@ -88,7 +88,7 @@ export default function ContentComponent() {
<ChatTextField />
</div>
)}
<Footer />
<Footer version={version} />
</div>
</div>
{chatOpen && <Sidebar />}

View File

@@ -1 +1 @@
export { default } from "./Content"
export { default } from './Content';

View File

@@ -54,11 +54,11 @@ export default function CrossfadeImage({
return (
<span style={spanStyle}>
{[...srcs, nextSrc].map(
(src, index) =>
src !== '' && (
(singleSrc, index) =>
singleSrc !== '' && (
<img
key={(key + index) % 3}
src={src}
key={singleSrc}
src={singleSrc}
alt=""
style={imgStyles[index]}
onLoad={index === 2 ? onLoadImg : undefined}

View File

@@ -2,7 +2,11 @@ import { Layout } from 'antd';
const { Footer } = Layout;
export default function FooterComponent(props) {
interface Props {
version: string;
}
export default function FooterComponent(props: Props) {
const { version } = props;
return <Footer style={{ textAlign: 'center', height: '64px' }}>Footer: Owncast {version}</Footer>;

View File

@@ -3,7 +3,7 @@
align-items: center;
justify-content: space-between;
z-index: 1;
padding: .5rem 1rem;
padding: 0.5rem 1rem;
.logo {
display: flex;
align-items: center;

View File

@@ -1,4 +1,5 @@
import { Layout } from 'antd';
import { ChatState } from '../../../interfaces/application-state';
import { OwncastLogo, UserDropdown } from '../../common';
import s from './Header.module.scss';
@@ -12,10 +13,10 @@ export default function HeaderComponent({ name = 'Your stream title' }: Props) {
return (
<Header className={`${s.header}`}>
<div className={`${s.logo}`}>
<OwncastLogo variant='contrast'/>
<OwncastLogo variant="contrast" />
<span>{name}</span>
</div>
<UserDropdown />
<UserDropdown username="fillmein" chatState={ChatState.Available} />
</Header>
);
}

View File

@@ -8,4 +8,4 @@
display: block;
height: 100%;
padding: 2vw;
}
}

View File

@@ -29,7 +29,6 @@ export default function Modal(props: Props) {
width="100%"
height="100%"
sandbox="allow-same-origin allow-scripts allow-popups allow-forms"
allowpaymentrequest="true"
frameBorder="0"
allowFullScreen
onLoad={() => setLoading(false)}

View File

@@ -8,5 +8,3 @@
display: flex;
}
}

View File

@@ -7,4 +7,4 @@
height: 30px;
width: 100%;
background-color: black;
}
}

View File

@@ -40,7 +40,7 @@ export default function Statusbar(props: Props) {
const duration = makeDurationString(new Date(lastConnectTime));
onlineMessage = online ? `Live for ${duration}` : 'Offline';
rightSideMessage = `${viewerCount > 0 ? `${viewerCount}` : 'No'} ${
viewerCount == 1 ? 'viewer' : 'viewers'
viewerCount === 1 ? 'viewer' : 'viewers'
}`;
} else {
onlineMessage = 'Offline';

View File

@@ -1,4 +1,4 @@
export { default as Header } from './Header/index'
export { default as Sidebar } from './Sidebar/index'
export { default as Footer } from './Footer/index'
export { default as Content } from './Content/index'
export { default as Header } from './Header/index';
export { default as Sidebar } from './Sidebar/index';
export { default as Footer } from './Footer/index';
export { default as Content } from './Content/index';