mirror of
https://github.com/Radiquum/AniX.git
synced 2025-04-29 09:29:41 +05:00
refactor: make related page view as list
This commit is contained in:
parent
4fb996353d
commit
99ea775e76
4 changed files with 201 additions and 57 deletions
|
@ -30,12 +30,12 @@ export const ReleaseLink169Poster = (props: any) => {
|
|||
<div className="flex w-full h-full gap-2 overflow-hidden">
|
||||
<div className="flex-shrink-0">
|
||||
<Image
|
||||
src={props.image}
|
||||
height={250}
|
||||
width={250}
|
||||
alt={props.title}
|
||||
className="object-cover aspect-[9/16] h-auto w-24 md:w-32 lg:w-48 rounded-md"
|
||||
/>
|
||||
src={props.image}
|
||||
height={250}
|
||||
width={250}
|
||||
alt={props.title}
|
||||
className="object-cover aspect-[9/16] h-auto w-24 md:w-32 lg:w-48 rounded-md"
|
||||
/>
|
||||
</div>
|
||||
<div className="flex flex-col flex-1 w-full h-full">
|
||||
<div>
|
||||
|
@ -45,7 +45,7 @@ export const ReleaseLink169Poster = (props: any) => {
|
|||
</p>
|
||||
)}
|
||||
<p className="text-sm font-bold text-black dark:text-white md:text-base lg:text-lg xl:text-xl">
|
||||
{`${props.title_ru.slice(0, 47)}${
|
||||
{`${props.title_ru.slice(0, 47)}${
|
||||
props.title_ru.length > 47 ? "..." : ""
|
||||
}`}
|
||||
</p>
|
||||
|
@ -55,9 +55,7 @@ export const ReleaseLink169Poster = (props: any) => {
|
|||
}`}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex flex-wrap gap-1 mt-1">
|
||||
<div className="flex flex-wrap gap-1 mt-1">
|
||||
<Chip
|
||||
bg_color={
|
||||
grade == 0
|
||||
|
@ -73,51 +71,53 @@ export const ReleaseLink169Poster = (props: any) => {
|
|||
name={grade}
|
||||
/>
|
||||
{user_list && (
|
||||
<Chip bg_color={user_list.bg_color} name={user_list.name} />
|
||||
)}
|
||||
{props.status ? (
|
||||
<Chip name={props.status.name} />
|
||||
) : (
|
||||
props.status_id != 0 && (
|
||||
<Chip bg_color={user_list.bg_color} name={user_list.name} />
|
||||
)}
|
||||
{props.status ? (
|
||||
<Chip name={props.status.name} />
|
||||
) : (
|
||||
props.status_id != 0 && (
|
||||
<Chip
|
||||
name={
|
||||
props.status_id == 1
|
||||
? "Завершено"
|
||||
: props.status_id == 2
|
||||
? "Онгоинг"
|
||||
: props.status_id == 3 && "Анонс"
|
||||
}
|
||||
/>
|
||||
)
|
||||
)}
|
||||
<Chip
|
||||
name={props.episodes_released && props.episodes_released}
|
||||
name_2={
|
||||
props.episodes_total ? props.episodes_total + " эп." : "? эп."
|
||||
}
|
||||
devider="/"
|
||||
/>
|
||||
{props.last_view_episode && (
|
||||
<Chip
|
||||
name={
|
||||
props.status_id == 1
|
||||
? "Завершено"
|
||||
: props.status_id == 2
|
||||
? "Онгоинг"
|
||||
: props.status_id == 3 && "Анонс"
|
||||
props.last_view_episode.name
|
||||
? props.last_view_episode.name
|
||||
: `${props.last_view_episode.position + 1} серия`
|
||||
}
|
||||
name_2={
|
||||
"last_view_timestamp" in props &&
|
||||
sinceUnixDate(props.last_view_timestamp)
|
||||
}
|
||||
devider=", "
|
||||
/>
|
||||
)
|
||||
)}
|
||||
<Chip
|
||||
name={props.episodes_released && props.episodes_released}
|
||||
name_2={
|
||||
props.episodes_total ? props.episodes_total + " эп." : "? эп."
|
||||
}
|
||||
devider="/"
|
||||
/>
|
||||
{props.last_view_episode && (
|
||||
<Chip
|
||||
name={
|
||||
props.last_view_episode.name
|
||||
? props.last_view_episode.name
|
||||
: `${props.last_view_episode.position + 1} серия`
|
||||
}
|
||||
name_2={
|
||||
"last_view_timestamp" in props &&
|
||||
sinceUnixDate(props.last_view_timestamp)
|
||||
}
|
||||
devider=", "
|
||||
/>
|
||||
)}
|
||||
{props.category && <Chip name={props.category.name} />}
|
||||
{props.is_favorite && (
|
||||
<div className="flex items-center justify-center bg-pink-500 rounded-sm">
|
||||
<span className="w-3 px-4 py-2.5 text-white sm:px-4 sm:py-3 xl:px-6 xl:py-4 iconify mdi--heart"></span>
|
||||
</div>
|
||||
)}
|
||||
)}
|
||||
{props.category && <Chip name={props.category.name} />}
|
||||
{props.is_favorite && (
|
||||
<div className="flex items-center justify-center bg-pink-500 rounded-sm">
|
||||
<span className="w-3 px-4 py-2.5 text-white sm:px-4 sm:py-3 xl:px-6 xl:py-4 iconify mdi--heart"></span>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Link>
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue