no registering option

master
gitea 4 months ago
parent af6b7e01cd
commit 44f54b4793

@ -10,6 +10,8 @@
$: myDecksActive = loc === '/' || loc === '/decks/new' || /^\/decks\/[^/]+\/edit$/.test(loc) || $navContext === 'my-decks';
$: communityActive = loc === '/community' || loc.startsWith('/community/') || $navContext === 'community';
const registrationDisabled = import.meta.env.VITE_DISABLE_REGISTRATION === 'true';
let showPopup = false;
let mode = 'login'; // 'login' | 'register'
let email = '';
@ -206,6 +208,7 @@
>
Log in
</button>
{#if !registrationDisabled}
<button
type="button"
class="tab"
@ -214,6 +217,7 @@
>
Register
</button>
{/if}
</div>
{#if registerSuccess && !$auth.user}
@ -250,7 +254,7 @@
/>
{#if $auth.error}
<p class="auth-error">{$auth.error}</p>
{#if mode === 'login'}
{#if mode === 'login' && !registrationDisabled}
<p class="auth-switch">
Do you have an account? <button type="button" class="auth-link" onclick={() => { mode = 'register'; auth.clearError(); }}>Register here</button>.
</p>

Loading…
Cancel
Save

Powered by TurnKey Linux.