{#if willRedirect}
{:else}
Oxi
Cloud
{#if loginErrorNotice}
{t('auth.login_error_title', 'Sign-in failed')}
{loginErrorNotice}
(loginErrorNotice = null)} > {t('auth.login_error_back_to_login', 'Back to login')}
{:else}
{#if mode === 'login'} {t('auth.sign_in', 'Sign in')} {:else if mode === 'register'} {t('auth.register', 'Create account')} {:else} {t('auth.setup_title', 'Initial setup')} {/if}
{#if sessionExpiredNotice}
{t('auth.session_expired', 'Your session expired. Please sign in again.')}
(sessionExpiredNotice = false)}>×
{/if} {#if loggedOutNotice}
{t('auth.logged_out', 'Successfully signed out.')}
(loggedOutNotice = false)}>×
{/if} {#if postRegisterNotice && mode === 'login'}
{postRegisterNotice}
(postRegisterNotice = null)}>×
{/if} {#if mode === 'login'} {#if passwordLoginEnabled || magicLinkLoginEnabled} {#if error}
{error}
{/if} {#if magicStatus}
{magicStatus.text}
{/if}
{t('auth.login_identifier', 'Username or email')}
{#if passwordLoginEnabled}
{#if magicLinkLoginEnabled} {t('auth.password_or_link_hint', 'Password (leave blank for a sign-in link)')} {:else} {t('auth.password', 'Password')} {/if}
(showPassword = !showPassword)} >
{#if capsOn}
{t('auth.caps_lock', 'Caps Lock is on')}
{/if}
{/if}
{#if busy} {submitAsMagicLink ? t('auth.sending', 'Sending…') : t('auth.signing_in', 'Signing in…')} {:else if submitAsMagicLink} {t('auth.magicLinkSubmit', 'Send sign-in link')} {:else} {t('auth.sign_in', 'Sign in')} {/if}
{/if} {#if oidc.enabled} {#if passwordLoginEnabled}
{t('auth.or', 'or')}
{/if}
{t( 'auth.sso_login_provider', { provider: oidc.provider_name ?? 'SSO' }, 'Sign in with {{provider}}' )}
{/if} {#if passwordLoginEnabled}
{t('auth.no_account', 'No account?')}
(mode = 'register')} > {t('auth.register', 'Create one')}
{/if} {#if setupAvailable}
{t('auth.admin_setup', 'First time?')}
(mode = 'setup')} > {t('auth.setup', 'Set up administrator')}
{/if} {:else if mode === 'register'} {#if regError}
{regError}
{/if}
{t('auth.email', 'Email')}
{t('auth.username_optional', 'Username (optional)')}
{#if passwordLoginEnabled}
{t( 'auth.password_optional', 'Password (optional — leave blank for a sign-in link)' )}
(regShowPassword = !regShowPassword)} >
{#if regCapsOn}
{t('auth.caps_lock', 'Caps Lock is on')}
{/if}
{#if !regEmailOnly}
{t('auth.confirm_password', 'Confirm password')}
(regShowConfirm = !regShowConfirm)} >
{#if matchState}
{matchState === 'ok' ? t('auth.passwords_match', 'Passwords match') : t('auth.passwords_mismatch', "Passwords don't match")}
{/if}
{/if} {/if}
{!passwordLoginEnabled || regEmailOnly ? t('auth.register_email_only', 'Send me a sign-in link') : t('auth.register', 'Create account')}
{t('auth.have_account', 'Already have an account?')}
(mode = 'login')} > {t('auth.sign_in', 'Sign in')}
{:else}
1
{t('auth.setup_step1', 'Admin')}
2
{t('auth.setup_step2', 'System')}
3
{t('auth.setup_step3', 'Completed')}
{#if setupError}
{setupError}
{/if} {#if setupSuccess}
{setupSuccess}
{/if}
{t('auth.admin_username', 'Administrator username')}
{t('auth.admin_email', 'Administrator email')}
{t('auth.admin_password', 'Administrator password')}
(setupShowPassword = !setupShowPassword)} >
{#if setupCapsOn}
{t('auth.caps_lock', 'Caps Lock is on')}
{/if}
{t('auth.confirm_password', 'Confirm password')}
(setupShowConfirm = !setupShowConfirm)} >
{#if setupMatchState}
{setupMatchState === 'ok' ? t('auth.passwords_match', 'Passwords match') : t('auth.passwords_mismatch', "Passwords don't match")}
{/if}
{t('auth.create_admin', 'Create administrator')}
{t('auth.back_to_login', 'Already configured?')}
(mode = 'login')} > {t('auth.sign_in', 'Sign in')}
{/if} {/if}
setLocale(e.currentTarget.value as Locale)} > {#each SUPPORTED_LOCALES as loc (loc)}
{loc}
{/each}
{/if}