aboutsummaryrefslogtreecommitdiff
path: root/src/lib/Tools/EpisodeDiscussionCollector.svelte
diff options
context:
space:
mode:
authorFuwn <[email protected]>2024-01-04 17:51:15 -0800
committerFuwn <[email protected]>2024-01-04 17:51:15 -0800
commit4ae25847a2c13a703babb90443efe536250d8156 (patch)
tree5682e97247df0c4c31c64e221ea21bdda5801f21 /src/lib/Tools/EpisodeDiscussionCollector.svelte
parentfeat(schedule): details (diff)
downloaddue.moe-4ae25847a2c13a703babb90443efe536250d8156.tar.xz
due.moe-4ae25847a2c13a703babb90443efe536250d8156.zip
refactor(tools): better cards
Diffstat (limited to 'src/lib/Tools/EpisodeDiscussionCollector.svelte')
-rw-r--r--src/lib/Tools/EpisodeDiscussionCollector.svelte114
1 files changed, 58 insertions, 56 deletions
diff --git a/src/lib/Tools/EpisodeDiscussionCollector.svelte b/src/lib/Tools/EpisodeDiscussionCollector.svelte
index 447333a8..2399b125 100644
--- a/src/lib/Tools/EpisodeDiscussionCollector.svelte
+++ b/src/lib/Tools/EpisodeDiscussionCollector.svelte
@@ -9,62 +9,64 @@
onMount(clearAllParameters);
</script>
-<p>
- <!-- svelte-ignore missing-declaration -->
- <input
- type="text"
- placeholder="Username"
- bind:value={searchInput}
- on:keypress={(e) => {
- if (e.key === 'Enter') {
- searchInputFinal = searchInput;
+<div class="card">
+ <p>
+ <!-- svelte-ignore missing-declaration -->
+ <input
+ type="text"
+ placeholder="Username"
+ bind:value={searchInput}
+ on:keypress={(e) => {
+ if (e.key === 'Enter') {
+ searchInputFinal = searchInput;
- // eslint-disable-next-line no-undef
- umami.track('Collect Episode Discussions');
- }
- }}
- />
- <button
- class="button-lined"
- on:click={() => (searchInputFinal = searchInput)}
- title="Or click your Enter key"
- data-umami-event="Collect Episode Discussions"
- >
- Search
- </button>
-</p>
+ // eslint-disable-next-line no-undef
+ umami.track('Collect Episode Discussions');
+ }
+ }}
+ />
+ <button
+ class="button-lined"
+ on:click={() => (searchInputFinal = searchInput)}
+ title="Or click your Enter key"
+ data-umami-event="Collect Episode Discussions"
+ >
+ Search
+ </button>
+ </p>
-{#if searchInputFinal !== ''}
- {#await threads(searchInputFinal)}
- Loading forum threads ... 50%
- {:then threads}
- <ul>
- {#each threads
- .filter((thread) => thread.title.includes('[Spoilers]') && thread.title.includes('Episode'))
- .sort((a, b) => b.createdAt - a.createdAt) as thread}
- <li>
- <a href={`https://anilist.co/forum/thread/${thread.id}`} target="_blank">
- {thread.title.replace('[Spoilers]', '')}
- </a>
- </li>
- {/each}
- </ul>
- {:catch}
- <p>
- Threads 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>
- {/await}
-{:else}
- <p />
+ {#if searchInputFinal !== ''}
+ {#await threads(searchInputFinal)}
+ Loading forum threads ... 50%
+ {:then threads}
+ <ul>
+ {#each threads
+ .filter((thread) => thread.title.includes('[Spoilers]') && thread.title.includes('Episode'))
+ .sort((a, b) => b.createdAt - a.createdAt) as thread}
+ <li>
+ <a href={`https://anilist.co/forum/thread/${thread.id}`} target="_blank">
+ {thread.title.replace('[Spoilers]', '')}
+ </a>
+ </li>
+ {/each}
+ </ul>
+ {:catch}
+ <p>
+ Threads 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>
+ {/await}
+ {:else}
+ <p />
- Enter a username to search for to continue.
-{/if}
+ Enter a username to search for to continue.
+ {/if}
+</div>