mirror of
https://github.com/Radiquum/AniX.git
synced 2025-04-07 00:34:41 +00:00
refactor: release page layout
This commit is contained in:
parent
6242b850c2
commit
1990e5434c
4 changed files with 82 additions and 93 deletions
|
@ -13,7 +13,7 @@ export const ReleaseInfoBasics = (props: {
|
||||||
const [isFullDescription, setIsFullDescription] = useState(false);
|
const [isFullDescription, setIsFullDescription] = useState(false);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Card className="h-full">
|
<Card className="h-full row-span-2">
|
||||||
<div className="flex flex-col w-full h-full gap-4 lg:flex-row">
|
<div className="flex flex-col w-full h-full gap-4 lg:flex-row">
|
||||||
<Image
|
<Image
|
||||||
className="w-[285px] max-h-[385px] object-cover border border-gray-200 rounded-lg shadow-md dark:border-gray-700"
|
className="w-[285px] max-h-[385px] object-cover border border-gray-200 rounded-lg shadow-md dark:border-gray-700"
|
||||||
|
|
|
@ -28,7 +28,7 @@ export const ReleaseInfoInfo = (props: {
|
||||||
genres: string;
|
genres: string;
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
<Card className="h-full">
|
<Card>
|
||||||
<Table>
|
<Table>
|
||||||
<Table.Body>
|
<Table.Body>
|
||||||
<Table.Row>
|
<Table.Row>
|
||||||
|
|
|
@ -282,7 +282,7 @@ export const ReleasePlayerCustom = (props: {
|
||||||
}, [episode.selected]);
|
}, [episode.selected]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Card className="h-full">
|
<Card className="aspect-video min-h-min-h-[300px] sm:min-h-[466px] md:min-h-[540px] lg:min-h-[512px] xl:min-h-[608px] 2xl:min-h-[712px]">
|
||||||
{(
|
{(
|
||||||
!voiceover.selected ||
|
!voiceover.selected ||
|
||||||
!source.selected ||
|
!source.selected ||
|
||||||
|
|
|
@ -71,9 +71,8 @@ export const ReleasePage = (props: any) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<div className="flex flex-col gap-2">
|
||||||
<div className="flex flex-col lg:grid lg:grid-cols-[70%_30%] gap-2 grid-flow-row-dense">
|
<div className="grid grid-cols-1 lg:grid-cols-[70%_30%] gap-2 grid-flow-row-dense">
|
||||||
<div className="[grid-column:1] [grid-row:span_2]">
|
|
||||||
<ReleaseInfoBasics
|
<ReleaseInfoBasics
|
||||||
image={data.release.image}
|
image={data.release.image}
|
||||||
title={{
|
title={{
|
||||||
|
@ -84,8 +83,6 @@ export const ReleasePage = (props: any) => {
|
||||||
note={data.release.note}
|
note={data.release.note}
|
||||||
release_id={data.release.id}
|
release_id={data.release.id}
|
||||||
/>
|
/>
|
||||||
</div>
|
|
||||||
<div className="[grid-column:2]">
|
|
||||||
<ReleaseInfoInfo
|
<ReleaseInfoInfo
|
||||||
country={data.release.country}
|
country={data.release.country}
|
||||||
aired_on_date={data.release.aired_on_date}
|
aired_on_date={data.release.aired_on_date}
|
||||||
|
@ -104,8 +101,6 @@ export const ReleasePage = (props: any) => {
|
||||||
director={data.release.director}
|
director={data.release.director}
|
||||||
genres={data.release.genres}
|
genres={data.release.genres}
|
||||||
/>
|
/>
|
||||||
</div>
|
|
||||||
<div className="[grid-column:2]">
|
|
||||||
<ReleaseInfoUserList
|
<ReleaseInfoUserList
|
||||||
userList={userList}
|
userList={userList}
|
||||||
isFavorite={userFavorite}
|
isFavorite={userFavorite}
|
||||||
|
@ -117,14 +112,23 @@ export const ReleasePage = (props: any) => {
|
||||||
collection_count={data.release.collection_count}
|
collection_count={data.release.collection_count}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
<div className="grid grid-cols-1 lg:grid-cols-[70%_30%] gap-2 grid-flow-row-dense">
|
||||||
|
<div className="flex flex-col gap-2">
|
||||||
{data.release.status &&
|
{data.release.status &&
|
||||||
data.release.status.name.toLowerCase() != "анонс" && (
|
data.release.status.name.toLowerCase() != "анонс" && (
|
||||||
<div className="[grid-column:1] [grid-row:span_12]">
|
<>
|
||||||
{preferenceStore.params.experimental.newPlayer ?
|
{preferenceStore.params.experimental.newPlayer ?
|
||||||
<ReleasePlayerCustom id={props.id} token={userStore.token} />
|
<ReleasePlayerCustom id={props.id} token={userStore.token} />
|
||||||
: <ReleasePlayer id={props.id} />}
|
: <ReleasePlayer id={props.id} />}
|
||||||
</div>
|
</>
|
||||||
)}
|
)}
|
||||||
|
<CommentsMain
|
||||||
|
release_id={props.id}
|
||||||
|
token={userStore.token}
|
||||||
|
comments={data.release.comments}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div className="flex flex-col gap-2">
|
||||||
{data.release.status &&
|
{data.release.status &&
|
||||||
data.release.status.name.toLowerCase() != "анонс" && (
|
data.release.status.name.toLowerCase() != "анонс" && (
|
||||||
<div className="[grid-column:2]">
|
<div className="[grid-column:2]">
|
||||||
|
@ -144,7 +148,6 @@ export const ReleasePage = (props: any) => {
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
<div className="[grid-column:2] [grid-row:span_4]">
|
|
||||||
<InfoLists
|
<InfoLists
|
||||||
completed={data.release.completed_count}
|
completed={data.release.completed_count}
|
||||||
planned={data.release.plan_count}
|
planned={data.release.plan_count}
|
||||||
|
@ -152,32 +155,18 @@ export const ReleasePage = (props: any) => {
|
||||||
delayed={data.release.hold_on_count}
|
delayed={data.release.hold_on_count}
|
||||||
watching={data.release.watching_count}
|
watching={data.release.watching_count}
|
||||||
/>
|
/>
|
||||||
</div>
|
|
||||||
|
|
||||||
{data.release.screenshot_images.length > 0 && (
|
{data.release.screenshot_images.length > 0 && (
|
||||||
<div className="[grid-column:2] [grid-row:span_11]">
|
|
||||||
<ReleaseInfoScreenshots images={data.release.screenshot_images} />
|
<ReleaseInfoScreenshots images={data.release.screenshot_images} />
|
||||||
</div>
|
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{data.release.related_releases.length > 0 && (
|
{data.release.related_releases.length > 0 && (
|
||||||
<div className="[grid-column:2] [grid-row:span_2]">
|
|
||||||
<ReleaseInfoRelated
|
<ReleaseInfoRelated
|
||||||
release_id={props.id}
|
release_id={props.id}
|
||||||
related={data.release.related}
|
related={data.release.related}
|
||||||
related_releases={data.release.related_releases}
|
related_releases={data.release.related_releases}
|
||||||
/>
|
/>
|
||||||
</div>
|
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<div className="[grid-column:1] [grid-row:span_32]">
|
|
||||||
<CommentsMain
|
|
||||||
release_id={props.id}
|
|
||||||
token={userStore.token}
|
|
||||||
comments={data.release.comments}
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue