blob: 885e491a63fbaf2fff284ccad5aa4a58ace13305 (
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
44
45
46
47
48
49
|
<script lang="ts">
import ActivityHistory from '$lib/Tools/ActivityHistory.svelte';
import { todaysCharacterBirthdays } from '$lib/AniList/character';
export let data;
let tool: number;
</script>
<p>
<select bind:value={tool}>
<option value={0}>Tools</option>
<option value={1}>Today's Character Birthdays</option>
<option value={2}>Activity History Hole Risks</option>
</select>
</p>
{#if tool === 0}
Select a tool to continue.
{:else if tool === 2}
<ActivityHistory user={data.user} />
{:else if tool === 1}
<ul>
{#await todaysCharacterBirthdays()}
<li>Loading ...</li>
{:then birthdays}
{#each birthdays as birthday}
<li>
<a href={`https://anilist.co/character/${birthday.id}`} target="_blank"
>{birthday.name.full}</a
>
</li>
{/each}
{:catch}
<li>
<p>
Characters could not be loaded. You might have been <a
href="https://en.wikipedia.org/wiki/Rate_limiting"
target="_blank">rate limited</a
>.
</p>
<p>
Try again in a few minutes. If the problem persists, please contact
<a href="https://anilist.co/user/fuwn" target="_blank">@fuwn</a> on AniList.
</p>
</li>
{/await}
</ul>
{/if}
|