aboutsummaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorFuwn <[email protected]>2023-12-26 18:49:10 -0800
committerFuwn <[email protected]>2023-12-26 18:49:10 -0800
commitbfc0fa5165254a05ef67ace883bcc62f30c265dc (patch)
tree8dd4eb07902567d59890de432599e8a07f708b5b /src/lib
parentdocs(wrapped): remove old filters (diff)
downloaddue.moe-bfc0fa5165254a05ef67ace883bcc62f30c265dc.tar.xz
due.moe-bfc0fa5165254a05ef67ace883bcc62f30c265dc.zip
feat(manga): temporarily disable
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/List/Manga/MangaListTemplate.svelte139
-rw-r--r--src/lib/settings.json3
2 files changed, 77 insertions, 65 deletions
diff --git a/src/lib/List/Manga/MangaListTemplate.svelte b/src/lib/List/Manga/MangaListTemplate.svelte
index 4e92acd8..256a4900 100644
--- a/src/lib/List/Manga/MangaListTemplate.svelte
+++ b/src/lib/List/Manga/MangaListTemplate.svelte
@@ -12,6 +12,7 @@
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;
@@ -167,42 +168,14 @@
};
</script>
-{#await mangaLists}
- {#if !authorised}
- <ListTitle count={0} time={endTime / 1000}>
- <a
- href={'#'}
- title="Force a full refresh"
- on:click={() => {
- cleanCache();
-
- forceFlag = true;
- }}>Refresh</a
- >
- </ListTitle>
- {/if}
-
- {#if previousMangaList}
- <CleanMangaList
- media={previousMangaList}
- {cleanCache}
- {lastUpdatedMedia}
- {updateMedia}
- {endTime}
- {pendingUpdate}
- {due}
- {rateLimited}
- {authorised}
- />
- {:else}
- {#if authorised}
- <ListTitle />
- {/if}
+{#if serviceSettings.disabled}
+ <ListTitle />
- <ul><li>Loading {progress.toFixed(0)}% ...</li></ul>
- {/if}
-{:then media}
- {#await cleanMedia(media, displayUnresolved, forceFlag)}
+ <ul>
+ <li>Manga is currently unavailable due to API abuse. Check back later.</li>
+ </ul>
+{:else}
+ {#await mangaLists}
{#if !authorised}
<ListTitle count={0} time={endTime / 1000}>
<a
@@ -236,37 +209,73 @@
<ul><li>Loading {progress.toFixed(0)}% ...</li></ul>
{/if}
- {:then cleanedMedia}
- {#if !authorised}
- <ListTitle count={cleanedMedia.length} time={endTime / 1000}>
- <a
- href={'#'}
- title="Force a full refresh"
- on:click={() => {
- cleanCache();
+ {:then media}
+ {#await cleanMedia(media, displayUnresolved, forceFlag)}
+ {#if !authorised}
+ <ListTitle count={0} time={endTime / 1000}>
+ <a
+ href={'#'}
+ title="Force a full refresh"
+ on:click={() => {
+ cleanCache();
+
+ forceFlag = true;
+ }}>Refresh</a
+ >
+ </ListTitle>
+ {/if}
- forceFlag = true;
- }}>Refresh</a
- >
- </ListTitle>
- {/if}
+ {#if previousMangaList}
+ <CleanMangaList
+ media={previousMangaList}
+ {cleanCache}
+ {lastUpdatedMedia}
+ {updateMedia}
+ {endTime}
+ {pendingUpdate}
+ {due}
+ {rateLimited}
+ {authorised}
+ />
+ {:else}
+ {#if authorised}
+ <ListTitle />
+ {/if}
+
+ <ul><li>Loading {progress.toFixed(0)}% ...</li></ul>
+ {/if}
+ {:then cleanedMedia}
+ {#if !authorised}
+ <ListTitle count={cleanedMedia.length} time={endTime / 1000}>
+ <a
+ href={'#'}
+ title="Force a full refresh"
+ on:click={() => {
+ cleanCache();
+
+ forceFlag = true;
+ }}>Refresh</a
+ >
+ </ListTitle>
+ {/if}
- <CleanMangaList
- media={cleanedMedia}
- {cleanCache}
- {lastUpdatedMedia}
- {updateMedia}
- {endTime}
- {pendingUpdate}
- {due}
- {rateLimited}
- {authorised}
- />
- {:catch}
- {#if authorised}
- <ListTitle count={-1337} time={0} />
- {/if}
+ <CleanMangaList
+ media={cleanedMedia}
+ {cleanCache}
+ {lastUpdatedMedia}
+ {updateMedia}
+ {endTime}
+ {pendingUpdate}
+ {due}
+ {rateLimited}
+ {authorised}
+ />
+ {:catch}
+ {#if authorised}
+ <ListTitle count={-1337} time={0} />
+ {/if}
- <Error />
+ <Error />
+ {/await}
{/await}
-{/await}
+{/if}
diff --git a/src/lib/settings.json b/src/lib/settings.json
new file mode 100644
index 00000000..0fd44ef5
--- /dev/null
+++ b/src/lib/settings.json
@@ -0,0 +1,3 @@
+{
+ "disabled": true
+} \ No newline at end of file