feat: improve email verification stage
This commit is contained in:
3 files changed
+21
-12
No files matched your search
@@ -183,7 +183,8 @@
|
|||||||
"chooseInstance": "Choose an instance",
|
"chooseInstance": "Choose an instance",
|
||||||
"application": {
|
"application": {
|
||||||
"label": "Application",
|
"label": "Application",
|
||||||
"info": "To join this instance, you must fill out this application, and wait to be accepted. You will receive an email if your application is accepted."
|
"info": "To join this instance, you must fill out this application, and wait to be accepted. You will receive an email if your application is accepted.",
|
||||||
|
"notice": "Your signup is now pending. Once an administrator reviews it, you will receive an email if it was accepted. You then can log in."
|
||||||
},
|
},
|
||||||
"closed": {
|
"closed": {
|
||||||
"title": "Registrations closed",
|
"title": "Registrations closed",
|
||||||
|
|||||||
@@ -92,12 +92,8 @@
|
|||||||
) {
|
) {
|
||||||
if (res.verify_email_sent) return (stage = 'verify')
|
if (res.verify_email_sent) return (stage = 'verify')
|
||||||
|
|
||||||
if (registrationMode == 'RequireApplication') {
|
if (registrationMode == 'RequireApplication')
|
||||||
return toast({
|
return stage == 'application'
|
||||||
content: $t('toast.waitApplication'),
|
|
||||||
type: 'info',
|
|
||||||
})
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
throw new Error($t('toast.failSignup'))
|
throw new Error($t('toast.failSignup'))
|
||||||
}
|
}
|
||||||
@@ -319,6 +315,16 @@
|
|||||||
</Button>
|
</Button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
{:else if stage == 'application'}
|
||||||
|
<div class="flex-2/3 flex flex-col h-full justify-center gap-8">
|
||||||
|
<h2 class="font-medium text-3xl">
|
||||||
|
{$t('form.signup.application.notice')}
|
||||||
|
</h2>
|
||||||
|
<Button href="/signup" rounding="pill">
|
||||||
|
<Icon src={ArrowLeft} size="16" micro />
|
||||||
|
{$t('common.back')}
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
<Material
|
<Material
|
||||||
color="uniform"
|
color="uniform"
|
||||||
|
|||||||
@@ -1,16 +1,18 @@
|
|||||||
<script>
|
<script>
|
||||||
import { LINKED_INSTANCE_URL } from '$lib/instance.svelte'
|
import { LINKED_INSTANCE_URL } from '$lib/instance.svelte'
|
||||||
import { t } from '$lib/i18n/translations'
|
import { t } from '$lib/i18n/translations'
|
||||||
import { Check, Icon } from 'svelte-hero-icons'
|
import { CheckCircle, Icon } from 'svelte-hero-icons'
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="flex flex-col items-center h-max my-auto gap-2">
|
<div class="flex flex-col h-max my-auto gap-2 max-w-xl mx-auto">
|
||||||
<div
|
<div
|
||||||
class="rounded-full bg-green-200 dark:bg-green-700 text-green-600 dark:text-green-200 p-3"
|
class="rounded-full bg-green-200 dark:bg-green-500/20 text-white p-2 w-max"
|
||||||
>
|
>
|
||||||
<Icon src={Check} size="32" mini />
|
<Icon src={CheckCircle} size="48" solid />
|
||||||
</div>
|
</div>
|
||||||
<h1 class="text-green-800 dark:text-green-200 text-2xl font-semibold">
|
<h1
|
||||||
|
class="text-green-800 dark:text-green-200 text-2xl font-medium tracking-tight"
|
||||||
|
>
|
||||||
{$t('message.success')}
|
{$t('message.success')}
|
||||||
</h1>
|
</h1>
|
||||||
<p class="text-green-800 dark:text-green-200">
|
<p class="text-green-800 dark:text-green-200">
|
||||||
|
|||||||
Reference in new issue
Block a user