|
|
@ -23,6 +23,7 @@ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
|
|
|
import {
|
|
|
|
import {
|
|
|
|
Button,
|
|
|
|
Button,
|
|
|
|
Checkbox,
|
|
|
|
Checkbox,
|
|
|
|
|
|
|
|
createStyles,
|
|
|
|
Divider,
|
|
|
|
Divider,
|
|
|
|
MantineColor,
|
|
|
|
MantineColor,
|
|
|
|
Stack,
|
|
|
|
Stack,
|
|
|
@ -85,12 +86,21 @@ interface Props {
|
|
|
|
onComplete?: VoidFunction;
|
|
|
|
onComplete?: VoidFunction;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const useStyles = createStyles((theme) => {
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
|
|
|
wrapper: {
|
|
|
|
|
|
|
|
overflowWrap: "anywhere",
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
const SeriesUploadForm: FunctionComponent<Props> = ({
|
|
|
|
const SeriesUploadForm: FunctionComponent<Props> = ({
|
|
|
|
series,
|
|
|
|
series,
|
|
|
|
files,
|
|
|
|
files,
|
|
|
|
onComplete,
|
|
|
|
onComplete,
|
|
|
|
}) => {
|
|
|
|
}) => {
|
|
|
|
const modals = useModals();
|
|
|
|
const modals = useModals();
|
|
|
|
|
|
|
|
const { classes } = useStyles();
|
|
|
|
const episodes = useEpisodesBySeriesId(series.sonarrSeriesId);
|
|
|
|
const episodes = useEpisodesBySeriesId(series.sonarrSeriesId);
|
|
|
|
const episodeOptions = useSelectorOptions(
|
|
|
|
const episodeOptions = useSelectorOptions(
|
|
|
|
episodes.data ?? [],
|
|
|
|
episodes.data ?? [],
|
|
|
@ -358,7 +368,7 @@ const SeriesUploadForm: FunctionComponent<Props> = ({
|
|
|
|
modals.closeSelf();
|
|
|
|
modals.closeSelf();
|
|
|
|
})}
|
|
|
|
})}
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<Stack>
|
|
|
|
<Stack className={classes.wrapper}>
|
|
|
|
<SimpleTable columns={columns} data={form.values.files}></SimpleTable>
|
|
|
|
<SimpleTable columns={columns} data={form.values.files}></SimpleTable>
|
|
|
|
<Divider></Divider>
|
|
|
|
<Divider></Divider>
|
|
|
|
<Button type="submit">Upload</Button>
|
|
|
|
<Button type="submit">Upload</Button>
|
|
|
|