add release search, adding and removing to collection create page

This commit is contained in:
Kentai Radiquum 2024-08-16 15:32:22 +05:00
parent 1073ac4253
commit 530fc1aad0
Signed by: Radiquum
GPG key ID: 858E8EE696525EED
3 changed files with 308 additions and 62 deletions

View file

@ -19,11 +19,19 @@ export const ReleaseLink169 = (props: any) => {
user_list = profile_lists[profile_list_status];
}
return (
<Link href={`/release/${props.id}`}>
<Link
href={`/release/${props.id}`}
className={props.isLinkDisabled ? "pointer-events-none" : ""}
aria-disabled={props.isLinkDisabled}
tabIndex={props.isLinkDisabled ? -1 : undefined}
>
<div className="w-full aspect-video group">
<div className="relative w-full h-full overflow-hidden bg-center bg-no-repeat bg-cover rounded-sm group-hover:animate-bg_zoom animate-bg_zoom_rev group-hover:[background-size:110%] " style={{
<div
className="relative w-full h-full overflow-hidden bg-center bg-no-repeat bg-cover rounded-sm group-hover:animate-bg_zoom animate-bg_zoom_rev group-hover:[background-size:110%] "
style={{
backgroundImage: `linear-gradient(to bottom, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.9) 100%), url(${props.image})`,
}}>
}}
>
<div className="absolute flex flex-wrap items-start justify-start gap-0.5 sm:gap-1 left-2 top-2">
<Chip
bg_color={

View file

@ -19,62 +19,65 @@ export const ReleaseLinkPoster = (props: any) => {
user_list = profile_lists[profile_list_status];
}
return (
<Link href={`/release/${props.id}`}>
<div className="flex flex-col w-full h-full gap-4 lg:flex-row">
<div
className="relative w-full h-64 gap-8 p-4 overflow-hidden bg-white bg-center bg-no-repeat bg-cover border border-gray-200 rounded-lg shadow-md lg:min-w-[300px] lg:min-h-[385px] lg:max-w-[300px] lg:max-h-[385px] lg:bg-top dark:border-gray-700 dark:bg-gray-800"
style={{
backgroundImage: `linear-gradient(to bottom, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.9) 100%), url(${props.image})`,
}}
>
<div className="flex flex-wrap gap-1">
<Link
href={`/release/${props.id}`}
className={props.isLinkDisabled ? "pointer-events-none" : ""}
aria-disabled={props.isLinkDisabled}
tabIndex={props.isLinkDisabled ? -1 : undefined}
>
<div
className="relative w-full h-64 gap-8 p-2 overflow-hidden bg-white bg-center bg-no-repeat bg-cover border border-gray-200 rounded-lg shadow-md lg:min-w-[300px] lg:min-h-[385px] lg:max-w-[300px] lg:max-h-[385px] lg:bg-top dark:border-gray-700 dark:bg-gray-800"
style={{
backgroundImage: `linear-gradient(to bottom, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.9) 100%), url(${props.image})`,
}}
>
<div className="flex flex-wrap gap-1">
<Chip
bg_color={
props.grade.toFixed(1) == 0
? "hidden"
: props.grade.toFixed(1) < 2
? "bg-red-500"
: props.grade.toFixed(1) < 3
? "bg-orange-500"
: props.grade.toFixed(1) < 4
? "bg-yellow-500"
: "bg-green-500"
}
name={props.grade.toFixed(1)}
/>
{props.status ? (
<Chip name={props.status.name} />
) : (
<Chip
bg_color={
props.grade.toFixed(1) == 0
? "hidden"
: props.grade.toFixed(1) < 2
? "bg-red-500"
: props.grade.toFixed(1) < 3
? "bg-orange-500"
: props.grade.toFixed(1) < 4
? "bg-yellow-500"
: "bg-green-500"
name={
props.status_id == 1
? "Завершено"
: props.status_id == 2
? "Онгоинг"
: "Анонс"
}
name={props.grade.toFixed(1)}
/>
{props.status ? (
<Chip name={props.status.name} />
) : (
<Chip
name={
props.status_id == 1
? "Завершено"
: props.status_id == 2
? "Онгоинг"
: "Анонс"
}
/>
)}
<Chip
name={props.episodes_released && props.episodes_released}
name_2={
props.episodes_total ? props.episodes_total + " эп." : "? эп."
}
devider="/"
/>
</div>
<div className="absolute flex flex-col gap-2 text-white bottom-4">
{props.title_ru && (
<p className="text-xl font-bold text-white md:text-2xl">
{props.title_ru}
</p>
)}
{props.title_original && (
<p className="text-sm text-gray-300 md:text-base">
{props.title_original}
</p>
)}
</div>
)}
<Chip
name={props.episodes_released && props.episodes_released}
name_2={
props.episodes_total ? props.episodes_total + " эп." : "? эп."
}
devider="/"
/>
</div>
<div className="absolute flex flex-col gap-2 text-white bottom-4 left-2 right-2">
{props.title_ru && (
<p className="text-xl font-bold text-white md:text-2xl">
{props.title_ru}
</p>
)}
{props.title_original && (
<p className="text-sm text-gray-300 md:text-base">
{props.title_original}
</p>
)}
</div>
</div>
</Link>