From 4ecf9dd62d8e53bfca08bc38a46019b2c9f2b995 Mon Sep 17 00:00:00 2001 From: Dillon Date: Tue, 23 Jul 2024 22:25:29 -0400 Subject: [PATCH] Created if blocks to show or hide username, password, signin and or sections depending on new enable_username_password_login variable --- src/routes/auth/+page.svelte | 144 ++++++++++++++++++----------------- 1 file changed, 75 insertions(+), 69 deletions(-) diff --git a/src/routes/auth/+page.svelte b/src/routes/auth/+page.svelte index 830ac3a5b..2da0367e1 100644 --- a/src/routes/auth/+page.svelte +++ b/src/routes/auth/+page.svelte @@ -173,88 +173,94 @@ {/if} -
- {#if mode === 'signup'} -
-
{$i18n.t('Name')}
+ {#if $config?.features.enable_username_password_login} +
+ {#if mode === 'signup'} +
+
{$i18n.t('Name')}
+ +
+ +
+ {/if} + +
+
{$i18n.t('Email')}
-
- {/if} +
+
{$i18n.t('Password')}
-
-
{$i18n.t('Email')}
- -
- -
-
{$i18n.t('Password')}
- - -
-
- -
- - - {#if $config?.features.enable_signup} -
- {mode === 'signin' - ? $i18n.t("Don't have an account?") - : $i18n.t('Already have an account?')} - - +
- {/if} -
+
+ {/if} + + {#if $config?.features.enable_username_password_login} +
+ + + {#if $config?.features.enable_signup} +
+ {mode === 'signin' + ? $i18n.t("Don't have an account?") + : $i18n.t('Already have an account?')} + + +
+ {/if} +
+ {/if} {#if Object.keys($config?.oauth?.providers ?? {}).length > 0}

- {$i18n.t('or')} + {#if $config?.features.enable_username_password_login} + {$i18n.t('or')} + {/if}
{#if $config?.oauth?.providers?.google}