From 4792d6c5fd628e9a455ef461d89b268a7ef114b3 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Tue, 26 Dec 2023 23:44:41 -0800 Subject: feat(manga): distributed proxy --- src/lib/List/Manga/MangaListTemplate.svelte | 139 +++++++++++++--------------- 1 file changed, 65 insertions(+), 74 deletions(-) (limited to 'src/lib/List') diff --git a/src/lib/List/Manga/MangaListTemplate.svelte b/src/lib/List/Manga/MangaListTemplate.svelte index 256a4900..4e92acd8 100644 --- a/src/lib/List/Manga/MangaListTemplate.svelte +++ b/src/lib/List/Manga/MangaListTemplate.svelte @@ -12,7 +12,6 @@ import Error from '$lib/Error/RateLimited.svelte'; import CleanMangaList from './CleanMangaList.svelte'; import authorisedJson from '$lib/authorised.json'; - import serviceSettings from '$lib/settings.json'; export let user: AniListAuthorisation; export let identity: UserIdentity; @@ -168,14 +167,42 @@ }; -{#if serviceSettings.disabled} - +{#await mangaLists} + {#if !authorised} + + { + cleanCache(); + + forceFlag = true; + }}>Refresh + + {/if} + + {#if previousMangaList} + + {:else} + {#if authorised} + + {/if} -
    -
  • Manga is currently unavailable due to API abuse. Check back later.
  • -
-{:else} - {#await mangaLists} +
  • Loading {progress.toFixed(0)}% ...
+ {/if} +{:then media} + {#await cleanMedia(media, displayUnresolved, forceFlag)} {#if !authorised}
  • Loading {progress.toFixed(0)}% ...
  • {/if} - {:then media} - {#await cleanMedia(media, displayUnresolved, forceFlag)} - {#if !authorised} - -
    { - cleanCache(); - - forceFlag = true; - }}>Refresh -
    - {/if} + {:then cleanedMedia} + {#if !authorised} + + { + cleanCache(); - {#if previousMangaList} - - {:else} - {#if authorised} - - {/if} - -
    • Loading {progress.toFixed(0)}% ...
    - {/if} - {:then cleanedMedia} - {#if !authorised} - -
    { - cleanCache(); - - forceFlag = true; - }}>Refresh -
    - {/if} + forceFlag = true; + }}>Refresh +
    + {/if} - - {:catch} - {#if authorised} - - {/if} + + {:catch} + {#if authorised} + + {/if} - - {/await} + {/await} -{/if} +{/await} -- cgit v1.2.3