mirror of
https://github.com/aleksilassila/reiverr.git
synced 2026-04-23 01:05:13 +02:00
33 lines
949 B
Svelte
33 lines
949 B
Svelte
<script lang="ts">
|
|
import type { TitleType } from '$lib/types';
|
|
import { fly } from 'svelte/transition';
|
|
import MoviePage from '../../../routes/movie/[id]/MoviePage.svelte';
|
|
import SeriesPage from '../../../routes/series/[id]/SeriesPage.svelte';
|
|
import { modalStack } from '../../stores/modal.store';
|
|
|
|
export let tmdbId: number;
|
|
export let title: string = '';
|
|
export let type: TitleType;
|
|
export let modalId: symbol;
|
|
|
|
function handleCloseModal() {
|
|
modalStack.close(modalId);
|
|
}
|
|
</script>
|
|
|
|
<div
|
|
class="max-w-screen-2xl overflow-x-hidden overflow-y-scroll h-screen sm:mx-4 lg:mx-12 xl:mx-16 scrollbar-hide"
|
|
>
|
|
<div
|
|
class="relative overflow-hidden"
|
|
in:fly|global={{ y: 20, duration: 200, delay: 200 }}
|
|
out:fly|global={{ y: 20, duration: 200 }}
|
|
>
|
|
{#if type === 'movie'}
|
|
<MoviePage {tmdbId} isModal={true} {handleCloseModal} />
|
|
{:else}
|
|
<SeriesPage {tmdbId} {title} isModal={true} {handleCloseModal} />
|
|
{/if}
|
|
</div>
|
|
</div>
|