Created if blocks to show or hide username, password, signin and or sections depending on new enable_username_password_login variable

This commit is contained in:
Dillon 2024-07-23 22:25:29 -04:00
parent b56dcf155c
commit 4ecf9dd62d

View File

@ -173,6 +173,7 @@
{/if} {/if}
</div> </div>
{#if $config?.features.enable_username_password_login}
<div class="flex flex-col mt-4"> <div class="flex flex-col mt-4">
{#if mode === 'signup'} {#if mode === 'signup'}
<div> <div>
@ -215,7 +216,9 @@
/> />
</div> </div>
</div> </div>
{/if}
{#if $config?.features.enable_username_password_login}
<div class="mt-5"> <div class="mt-5">
<button <button
class=" bg-gray-900 hover:bg-gray-800 w-full rounded-2xl text-white font-medium text-sm py-3 transition" class=" bg-gray-900 hover:bg-gray-800 w-full rounded-2xl text-white font-medium text-sm py-3 transition"
@ -246,15 +249,18 @@
</div> </div>
{/if} {/if}
</div> </div>
{/if}
</form> </form>
{#if Object.keys($config?.oauth?.providers ?? {}).length > 0} {#if Object.keys($config?.oauth?.providers ?? {}).length > 0}
<div class="inline-flex items-center justify-center w-full"> <div class="inline-flex items-center justify-center w-full">
<hr class="w-64 h-px my-8 bg-gray-200 border-0 dark:bg-gray-700" /> <hr class="w-64 h-px my-8 bg-gray-200 border-0 dark:bg-gray-700" />
{#if $config?.features.enable_username_password_login}
<span <span
class="absolute px-3 font-medium text-gray-900 -translate-x-1/2 bg-white left-1/2 dark:text-white dark:bg-gray-950" class="absolute px-3 font-medium text-gray-900 -translate-x-1/2 bg-white left-1/2 dark:text-white dark:bg-gray-950"
>{$i18n.t('or')}</span >{$i18n.t('or')}</span
> >
{/if}
</div> </div>
<div class="flex flex-col space-y-2"> <div class="flex flex-col space-y-2">
{#if $config?.oauth?.providers?.google} {#if $config?.oauth?.providers?.google}