diff options
Diffstat (limited to 'src/lib/Tools/FollowFix.svelte')
| -rw-r--r-- | src/lib/Tools/FollowFix.svelte | 82 |
1 files changed, 41 insertions, 41 deletions
diff --git a/src/lib/Tools/FollowFix.svelte b/src/lib/Tools/FollowFix.svelte index 434fb746..b9fddeff 100644 --- a/src/lib/Tools/FollowFix.svelte +++ b/src/lib/Tools/FollowFix.svelte @@ -1,52 +1,52 @@ <script lang="ts"> - import { toggleFollow } from '$lib/Data/AniList/follow'; - import type { AniListAuthorisation } from '$lib/Data/AniList/identity'; - import LogInRestricted from '$lib/Error/LogInRestricted.svelte'; + import { toggleFollow } from '$lib/Data/AniList/follow'; + import type { AniListAuthorisation } from '$lib/Data/AniList/identity'; + import LogInRestricted from '$lib/Error/LogInRestricted.svelte'; - export let user: AniListAuthorisation; + export let user: AniListAuthorisation; - let input = ''; - let submit = ''; + let input = ''; + let submit = ''; </script> {#if user === undefined} - <LogInRestricted /> + <LogInRestricted /> {:else} - <p> - <!-- svelte-ignore missing-declaration --> - <input - type="text" - minlength="1" - placeholder="Username" - bind:value={input} - on:keypress={(e) => { - if (e.key === 'Enter') { - submit = input; + <p> + <!-- svelte-ignore missing-declaration --> + <input + type="text" + minlength="1" + placeholder="Username" + bind:value={input} + on:keypress={(e) => { + if (e.key === 'Enter') { + submit = input; - // eslint-disable-next-line no-undef - umami.track('Fix Follow'); - } - }} - /> - <a href={'#'} on:click={() => (submit = input)}> - Toggle follow for {input.length === 0 ? '...' : input} - </a> - </p> + // eslint-disable-next-line no-undef + umami.track('Fix Follow'); + } + }} + /> + <a href={'#'} on:click={() => (submit = input)}> + Toggle follow for {input.length === 0 ? '...' : input} + </a> + </p> - {#if submit.length > 0} - {#await toggleFollow(user, submit)} - Toggling follow ... - {:then response} - <p> - Successfully toggled follow for {submit}. + {#if submit.length > 0} + {#await toggleFollow(user, submit)} + Toggling follow ... + {:then response} + <p> + Successfully toggled follow for {submit}. - {submit} - {response.isFollower ? 'is' : 'is not'} following you, {response.isFollowing - ? 'but' - : 'and'} you {response.isFollowing ? 'are' : 'are not'} following them. - </p> - {:catch} - <p>Failed to toggle follow for {submit}.</p> - {/await} - {/if} + {submit} + {response.isFollower ? 'is' : 'is not'} following you, {response.isFollowing + ? 'but' + : 'and'} you {response.isFollowing ? 'are' : 'are not'} following them. + </p> + {:catch} + <p>Failed to toggle follow for {submit}.</p> + {/await} + {/if} {/if} |