blob: 73aa6ccab49ee3df0b1ce9ed6e36a38f72559e8a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
<script lang="ts">
/* eslint svelte/no-at-html-tags: "off" */
import type { AniListAuthorisation, UserIdentity } from '$lib/AniList/identity';
import type { Media } from '$lib/AniList/media';
import Error from '$lib/Error.svelte';
import settings from '../../../stores/settings';
import CleanAnimeList from '../Anime/CleanAnimeList.svelte';
import ListTitle from '../ListTitle.svelte';
export let endTime: number;
export let cleanMedia: (media: Media[], displayUnresolved: boolean) => Media[];
export let animeLists: Promise<Media[]>;
export let user: AniListAuthorisation;
export let identity: UserIdentity;
export let title: string;
export let completed = false;
let lastUpdatedMedia = -1;
</script>
{#await animeLists}
<ListTitle custom={title} />
<ul><li>Loading ...</li></ul>
{:then media}
{@const cleanedMedia = cleanMedia(media, $settings.displayUnresolved)}
<CleanAnimeList
media={cleanedMedia}
{title}
bind:animeLists
{user}
{identity}
{endTime}
bind:lastUpdatedMedia
{completed}
/>
{:catch}
<ListTitle time={0} count={'?'} custom={title} />
<Error />
{/await}
|