diff --git a/src/lib/components/ui/Navbar.svelte b/src/lib/components/ui/Navbar.svelte
index 9d27bac1..59260097 100644
--- a/src/lib/components/ui/Navbar.svelte
+++ b/src/lib/components/ui/Navbar.svelte
@@ -117,7 +117,7 @@
Admin
- {#if $profile?.user?.notifications.applications ?? 0 > 0}
+ {#if ($profile?.user?.notifications.applications ?? 0) > 0}
@@ -130,7 +130,7 @@
aria-label="Moderation"
class="max-md:w-9 max-md:h-8 max-md:!p-0 dark:text-zinc-300 text-slate-700 relative"
>
- {#if $profile?.user?.notifications.reports ?? 0 > 0}
+ {#if ($profile?.user?.notifications.reports ?? 0) > 0}
diff --git a/src/routes/admin/+layout.svelte b/src/routes/admin/+layout.svelte
index 82b2bc77..c5695c0e 100644
--- a/src/routes/admin/+layout.svelte
+++ b/src/routes/admin/+layout.svelte
@@ -6,7 +6,7 @@
import { Badge } from 'mono-svelte'
-{#if $profile?.user?.notifications.applications ?? 0 > 0}
+{#if ($profile?.user?.notifications.applications ?? 0) > 0}
{$profile?.user?.notifications.applications}
diff --git a/src/routes/signup/[instance]/+page.svelte b/src/routes/signup/[instance]/+page.svelte
index 44531bf0..3f6f6e5c 100644
--- a/src/routes/signup/[instance]/+page.svelte
+++ b/src/routes/signup/[instance]/+page.svelte
@@ -64,27 +64,41 @@
honeypot,
})
- toast({
- content: 'Signed up.',
- type: 'success',
- })
-
if (res?.jwt) {
await setUser(res.jwt, $page.params.instance, username)
toast({ content: 'Successfully logged in.', type: 'success' })
goto('/')
- } else if (res.verify_email_sent) {
+ } else if (
+ res.verify_email_sent ||
+ data.site_view.local_site.registration_mode == 'RequireApplication'
+ ) {
currentInstance.set(instance)
- toast({
- content:
- 'A verification link was sent to your email. Verify your email, and then you can log in.',
- type: 'info',
- })
+ if (res.verify_email_sent) {
+ toast({
+ content:
+ 'A verification link was sent to your email. Verify your email, and then you can log in.',
+ type: 'info',
+ })
+ }
+ if (
+ data.site_view.local_site.registration_mode == 'RequireApplication'
+ ) {
+ toast({
+ content:
+ 'Please wait for your registration application to be approved before you can log in.',
+ type: 'info',
+ })
+ }
goto('/')
} else {
throw new Error('Failed to sign up.')
}
+
+ toast({
+ content: 'Signed up.',
+ type: 'success',
+ })
} catch (err) {
toast({
content: err as any,