💄 Improve movie modal cards and layout
This commit is contained in:
@@ -1,7 +1,9 @@
|
|||||||
import {
|
import {
|
||||||
Button,
|
Button,
|
||||||
|
Card,
|
||||||
Center,
|
Center,
|
||||||
Divider,
|
Divider,
|
||||||
|
Grid,
|
||||||
Group,
|
Group,
|
||||||
Loader,
|
Loader,
|
||||||
Image as MantineImage,
|
Image as MantineImage,
|
||||||
@@ -50,7 +52,7 @@ export const MovieModal = ({ opened, closeModal }: MovieModalProps) => {
|
|||||||
<Modal
|
<Modal
|
||||||
opened={opened}
|
opened={opened}
|
||||||
onClose={closeModal}
|
onClose={closeModal}
|
||||||
size="lg"
|
size="100%"
|
||||||
scrollAreaComponent={ScrollArea.Autosize}
|
scrollAreaComponent={ScrollArea.Autosize}
|
||||||
title={
|
title={
|
||||||
<Group>
|
<Group>
|
||||||
@@ -73,6 +75,7 @@ const MovieResults = ({ search, type }: MovieResultsProps) => {
|
|||||||
query: search,
|
query: search,
|
||||||
configName: configName!,
|
configName: configName!,
|
||||||
integration: type,
|
integration: type,
|
||||||
|
limit: 12,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
refetchOnWindowFocus: false,
|
refetchOnWindowFocus: false,
|
||||||
@@ -93,14 +96,13 @@ const MovieResults = ({ search, type }: MovieResultsProps) => {
|
|||||||
<Text>
|
<Text>
|
||||||
Top {overseerrResults?.length} results for <b>{search}</b>
|
Top {overseerrResults?.length} results for <b>{search}</b>
|
||||||
</Text>
|
</Text>
|
||||||
<Stack spacing="xs">
|
<Grid gutter={32}>
|
||||||
{overseerrResults?.map((result, index: number) => (
|
{overseerrResults?.map((result, index: number) => (
|
||||||
<React.Fragment key={index}>
|
<Grid.Col key={index} span={12} sm={6} lg={4}>
|
||||||
<MovieDisplay movie={result} type={type} />
|
<MovieDisplay movie={result} type={type} />
|
||||||
{index < overseerrResults.length - 1 && <Divider variant="dashed" my="xs" />}
|
</Grid.Col>
|
||||||
</React.Fragment>
|
|
||||||
))}
|
))}
|
||||||
</Stack>
|
</Grid>
|
||||||
</Stack>
|
</Stack>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
@@ -125,6 +127,7 @@ const MovieDisplay = ({ movie, type }: MovieDisplayProps) => {
|
|||||||
const serviceUrl = service?.behaviour.externalUrl ? service.behaviour.externalUrl : service?.url;
|
const serviceUrl = service?.behaviour.externalUrl ? service.behaviour.externalUrl : service?.url;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
<Card withBorder>
|
||||||
<Group noWrap style={{ maxHeight: 250 }} p={0} m={0} spacing="xs" align="stretch">
|
<Group noWrap style={{ maxHeight: 250 }} p={0} m={0} spacing="xs" align="stretch">
|
||||||
<MantineImage
|
<MantineImage
|
||||||
withPlaceholder
|
withPlaceholder
|
||||||
@@ -145,6 +148,7 @@ const MovieDisplay = ({ movie, type }: MovieDisplayProps) => {
|
|||||||
{movie.overview}
|
{movie.overview}
|
||||||
</Text>
|
</Text>
|
||||||
</Stack>
|
</Stack>
|
||||||
|
|
||||||
<Group spacing="xs">
|
<Group spacing="xs">
|
||||||
{!movie.mediaInfo?.mediaAddedAt && (
|
{!movie.mediaInfo?.mediaAddedAt && (
|
||||||
<>
|
<>
|
||||||
@@ -169,7 +173,7 @@ const MovieDisplay = ({ movie, type }: MovieDisplayProps) => {
|
|||||||
<Button
|
<Button
|
||||||
component="a"
|
component="a"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
variant="outline"
|
variant="light"
|
||||||
href={mediaUrl}
|
href={mediaUrl}
|
||||||
size="sm"
|
size="sm"
|
||||||
rightIcon={<IconPlayerPlay size={15} />}
|
rightIcon={<IconPlayerPlay size={15} />}
|
||||||
@@ -192,5 +196,6 @@ const MovieDisplay = ({ movie, type }: MovieDisplayProps) => {
|
|||||||
</Group>
|
</Group>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Group>
|
</Group>
|
||||||
|
</Card>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user