diff --git a/frontend/src/routes/auth/login/+page.svelte b/frontend/src/routes/auth/login/+page.svelte index 528f7c0..f66112f 100644 --- a/frontend/src/routes/auth/login/+page.svelte +++ b/frontend/src/routes/auth/login/+page.svelte @@ -34,7 +34,9 @@ } }); - const fediLogin = async () => { + const fediLogin = async (e: Event) => { + e.preventDefault(); + fediDisabled = true; try { const resp = await apiFetch<{ url: string }>( @@ -71,26 +73,28 @@ {/if} - - -

- This should be the domain you use to access - posts. For example, if your username is @timmie@mastodon.example, but your - user page is at - social.mastodon.example/timmie, you should fill in - social.mastodon.example. -

- {#if error} -
- -
- {/if} -
- - - +
fediLogin(e)}> + + +

+ This should be the domain you use to + access posts. For example, if your username is @timmie@mastodon.example, + but your user page is at + social.mastodon.example/timmie, you should fill in + social.mastodon.example. +

+ {#if error} +
+ +
+ {/if} +
+ + + +

By signing in, you consent to pronouns.cc storing diff --git a/frontend/src/routes/settings/auth/+page.svelte b/frontend/src/routes/settings/auth/+page.svelte index 7c10704..2d03bb5 100644 --- a/frontend/src/routes/settings/auth/+page.svelte +++ b/frontend/src/routes/settings/auth/+page.svelte @@ -44,7 +44,9 @@ let googleUnlinkModalOpen = false; let toggleGoogleUnlinkModal = () => (googleUnlinkModalOpen = !googleUnlinkModalOpen); - const fediLogin = async () => { + const fediLogin = async (e: Event) => { + e.preventDefault(); + fediDisabled = true; try { const resp = await apiFetch<{ url: string }>( @@ -205,19 +207,21 @@ {/if} - - - {#if error} -

- -
- {/if} - - - - +
fediLogin(e)}> + + + {#if error} +
+ +
+ {/if} +
+ + + +