Skip to content

Commit

Permalink
Skeleton pages for library/filler/custom-shows
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisbenincasa committed Jan 18, 2024
1 parent 94db61b commit 396d41a
Show file tree
Hide file tree
Showing 6 changed files with 167 additions and 8 deletions.
3 changes: 0 additions & 3 deletions web2/src/pages/custom-shows/CustomShowsPage.tsx

This file was deleted.

3 changes: 0 additions & 3 deletions web2/src/pages/filler/FillerListsPage.tsx

This file was deleted.

60 changes: 60 additions & 0 deletions web2/src/pages/library/CustomShowsPage.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
import AddCircleIcon from '@mui/icons-material/AddCircle';

import Box from '@mui/material/Box';
import Button from '@mui/material/Button';
import Paper from '@mui/material/Paper';
import Table from '@mui/material/Table';
import TableBody from '@mui/material/TableBody';
import TableCell from '@mui/material/TableCell';
import TableContainer from '@mui/material/TableContainer';
import TableHead from '@mui/material/TableHead';
import TableRow from '@mui/material/TableRow';
import Typography from '@mui/material/Typography';
import { Link } from 'react-router-dom';

export default function CustomShowsPage() {
// Placeholder...
const customShows = [];
const getTableRows = () => {
if (customShows.length === 0) {
return (
<TableRow>
<TableCell sx={{ py: 3, textAlign: 'center' }} colSpan={3}>
No Custom Shows!
</TableCell>
</TableRow>
);
}
return null;
};

return (
<Box>
<Box display="flex" mb={2}>
<Typography flexGrow={1} variant="h4">
Custom Shows
</Typography>
<Button
component={Link}
to="/channels/new"
variant="contained"
startIcon={<AddCircleIcon />}
>
New
</Button>
</Box>
<TableContainer component={Paper}>
<Table>
<TableHead>
<TableRow>
<TableCell>Name</TableCell>
<TableCell># Clips</TableCell>
<TableCell></TableCell>
</TableRow>
</TableHead>
<TableBody>{getTableRows()}</TableBody>
</Table>
</TableContainer>
</Box>
);
}
60 changes: 60 additions & 0 deletions web2/src/pages/library/FillerListsPage.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
import AddCircleIcon from '@mui/icons-material/AddCircle';

import Box from '@mui/material/Box';
import Button from '@mui/material/Button';
import Paper from '@mui/material/Paper';
import Table from '@mui/material/Table';
import TableBody from '@mui/material/TableBody';
import TableCell from '@mui/material/TableCell';
import TableContainer from '@mui/material/TableContainer';
import TableHead from '@mui/material/TableHead';
import TableRow from '@mui/material/TableRow';
import Typography from '@mui/material/Typography';
import { Link } from 'react-router-dom';

export default function FillerListsPage() {
// Placeholder...
const fillerLists = [];
const getTableRows = () => {
if (fillerLists.length === 0) {
return (
<TableRow>
<TableCell sx={{ py: 3, textAlign: 'center' }} colSpan={3}>
No Filler Lists!
</TableCell>
</TableRow>
);
}
return null;
};

return (
<Box>
<Box display="flex" mb={2}>
<Typography flexGrow={1} variant="h4">
Filler Lists
</Typography>
<Button
component={Link}
to="/channels/new"
variant="contained"
startIcon={<AddCircleIcon />}
>
New
</Button>
</Box>
<TableContainer component={Paper}>
<Table>
<TableHead>
<TableRow>
<TableCell>Name</TableCell>
<TableCell># Clips</TableCell>
<TableCell></TableCell>
</TableRow>
</TableHead>
<TableBody>{getTableRows()}</TableBody>
</Table>
</TableContainer>
</Box>
);
}
39 changes: 39 additions & 0 deletions web2/src/pages/library/LibraryIndexPage.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import { Box, Paper, Stack, Typography } from '@mui/material';
import { Link } from 'react-router-dom';

export default function LibraryIndexPage() {
return (
<Box sx={{ width: '100%' }}>
<Stack direction="column" spacing={2}>
<Paper
component={Link}
to="/library/filler"
sx={{ textDecoration: 'none' }}
>
<Typography variant="h5" mb={1}>
Filler&hellip;
</Typography>
<Typography variant="body1">
Filler lists are collections of videos that you may want to play
during 'flex' time segments. Flex is time within a channel that does
not have a program scheduled (usually used for padding).
</Typography>
</Paper>
<Paper
component={Link}
to="/library/custom-shows"
sx={{ textDecoration: 'none' }}
>
<Typography variant="h5" mb={1}>
Custom Shows&hellip;
</Typography>
<Typography variant="body1">
Custom Shows are sequences of videos that represent a episodes of a
virtual TV show. When you add these shows to a channel, the schedule
tools will treat the videos as if they belonged to a single TV show.
</Typography>
</Paper>
</Stack>
</Box>
);
}
10 changes: 8 additions & 2 deletions web2/src/router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import {
editProgrammingLoader,
newChannelLoader,
} from './pages/channels/loaders.ts';
import CustomShowsPage from './pages/custom-shows/CustomShowsPage.tsx';
import FillerListsPage from './pages/filler/FillerListsPage.tsx';
import CustomShowsPage from './pages/library/CustomShowsPage.tsx';
import FillerListsPage from './pages/library/FillerListsPage.tsx';
import GuidePage from './pages/guide/GuidePage.tsx';
import FfmpegSettingsPage from './pages/settings/FfmpegSettingsPage.tsx';
import PlexSettingsPage from './pages/settings/PlexSettingsPage.tsx';
Expand All @@ -20,6 +20,7 @@ import SettingsLayout from './pages/settings/SettingsLayout.tsx';
import XmlTvSettingsPage from './pages/settings/XmlTvSettingsPage.tsx';
import { queryCache } from './queryClient.ts';
import GeneralSettingsPage from './pages/settings/GeneralSettingsPage.tsx';
import LibraryIndexPage from './pages/library/LibraryIndexPage.tsx';

const queryClient = new QueryClient({ queryCache });

Expand Down Expand Up @@ -84,6 +85,11 @@ export const router = createBrowserRouter([
{
path: '/library',
children: [
{
path: '/library',
index: true,
element: <LibraryIndexPage />,
},
{
path: '/library/filler',
element: <FillerListsPage />,
Expand Down

0 comments on commit 396d41a

Please sign in to comment.