aboutsummaryrefslogtreecommitdiff
path: root/src/lib/Error/AnimeRateLimited.svelte
blob: c8b822e03ee5535ab1f031e47a6075c8f202ab97 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<script>
import Spacer from "$lib/Layout/Spacer.svelte";
import Popup from "$lib/Layout/Popup.svelte";
import locale from "$stores/locale";
</script>

<Popup locked fullscreen>
  <p><slot /></p>

  <span>{$locale().errors?.animeRateLimited}</span>

  {#await fetch('https://api.waifu.pics/sfw/cry') then response}
    {#await response.json() then json}
      <Spacer />

      <a href={`https://trace.moe/?url=${encodeURIComponent(json.url)}`} target="_blank">
        <img src={json.url} alt="" loading="lazy" decoding="async" style="width: 30vw;" />
      </a>
    {/await}
  {/await}
</Popup>