|
@@ -26,6 +26,8 @@
|
|
|
|
|
|
let mode = $config?.features.enable_ldap ? 'ldap' : 'signin';
|
|
|
|
|
|
+ let form = null;
|
|
|
+
|
|
|
let name = '';
|
|
|
let email = '';
|
|
|
let password = '';
|
|
@@ -147,11 +149,13 @@
|
|
|
|
|
|
onMount(async () => {
|
|
|
if ($user !== undefined) {
|
|
|
- const redirectPath = querystringValue('redirect') || '/';
|
|
|
+ const redirectPath = $page.url.searchParams.get('redirect') || '/';
|
|
|
goto(redirectPath);
|
|
|
}
|
|
|
await checkOauthCallback();
|
|
|
|
|
|
+ form = $page.url.searchParams.get('form');
|
|
|
+
|
|
|
loaded = true;
|
|
|
setLogoImage();
|
|
|
|
|
@@ -246,7 +250,7 @@
|
|
|
{/if}
|
|
|
</div>
|
|
|
|
|
|
- {#if $config?.features.enable_login_form || $config?.features.enable_ldap}
|
|
|
+ {#if $config?.features.enable_login_form || $config?.features.enable_ldap || form}
|
|
|
<div class="flex flex-col mt-4">
|
|
|
{#if mode === 'signup'}
|
|
|
<div class="mb-2">
|
|
@@ -337,7 +341,7 @@
|
|
|
</div>
|
|
|
{/if}
|
|
|
<div class="mt-5">
|
|
|
- {#if $config?.features.enable_login_form || $config?.features.enable_ldap}
|
|
|
+ {#if $config?.features.enable_login_form || $config?.features.enable_ldap || form}
|
|
|
{#if mode === 'ldap'}
|
|
|
<button
|
|
|
class="bg-gray-700/5 hover:bg-gray-700/10 dark:bg-gray-100/5 dark:hover:bg-gray-100/10 dark:text-gray-300 dark:hover:text-white transition w-full rounded-full font-medium text-sm py-2.5"
|
|
@@ -386,7 +390,7 @@
|
|
|
{#if Object.keys($config?.oauth?.providers ?? {}).length > 0}
|
|
|
<div class="inline-flex items-center justify-center w-full">
|
|
|
<hr class="w-32 h-px my-4 border-0 dark:bg-gray-100/10 bg-gray-700/10" />
|
|
|
- {#if $config?.features.enable_login_form || $config?.features.enable_ldap}
|
|
|
+ {#if $config?.features.enable_login_form || $config?.features.enable_ldap || form}
|
|
|
<span
|
|
|
class="px-3 text-sm font-medium text-gray-900 dark:text-white bg-transparent"
|
|
|
>{$i18n.t('or')}</span
|