From 950155bbeae847595faf4c0da0466540b843a3e8 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Sun, 28 Jan 2024 18:58:00 -0800 Subject: feat(badges): rate limited message --- src/lib/Error/RateLimited.svelte | 21 +++++++++++++-------- src/routes/user/[user]/badges/+page.svelte | 9 +++++++++ 2 files changed, 22 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/lib/Error/RateLimited.svelte b/src/lib/Error/RateLimited.svelte index b00bbd11..bdddc3c0 100644 --- a/src/lib/Error/RateLimited.svelte +++ b/src/lib/Error/RateLimited.svelte @@ -4,6 +4,7 @@ export let contact = true; export let list = true; export let card = false; + export let might = true;
@@ -11,8 +12,10 @@ {:else}

- {type} could not be loaded. You might have been - rate limited. + {type} could not be loaded. You{might ? ' might' : ''} have been + rate limited. {#if !might} + Try again in one minute. + {/if}

{#if loginSessionError} @@ -47,9 +52,9 @@ -

- {#if contact} +

+ If the problem persists, please contact @fuwn on AniList. {/if} diff --git a/src/routes/user/[user]/badges/+page.svelte b/src/routes/user/[user]/badges/+page.svelte index e41d294c..551efaf5 100644 --- a/src/routes/user/[user]/badges/+page.svelte +++ b/src/routes/user/[user]/badges/+page.svelte @@ -12,6 +12,7 @@ import cdn from '$lib/Utility/cdn.js'; import locale from '$stores/locale.js'; import Skeleton from '$lib/Skeleton.svelte'; + import RateLimited from '$lib/Error/RateLimited.svelte'; // import { io } from 'socket.io-client'; export let data; @@ -519,6 +520,14 @@ {:catch}

Could not fetch badges
{/await} + {:catch} + {/await} {/if} -- cgit v1.2.3