Skip to content

Commit 91194a9

Browse files
committed
add email textbox
1 parent 6179500 commit 91194a9

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

apps/web/src/routes/(app)/login/+page.svelte

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import { inject } from '@gitbutler/core/context';
77
import { LOGIN_SERVICE } from '@gitbutler/shared/login/loginService';
88
import { WEB_ROUTES_SERVICE } from '@gitbutler/shared/routing/webRoutes.svelte';
9-
import { Button, Textbox } from '@gitbutler/ui';
9+
import { Button, EmailTextbox, Textbox } from '@gitbutler/ui';
1010
import { env } from '$env/dynamic/public';
1111
1212
let email = $state<string>();
@@ -15,6 +15,8 @@
1515
let error = $state<string>();
1616
let errorCode = $state<string>();
1717
18+
const isFormValid = $derived(!!email && !!password);
19+
1820
const loginService = inject(LOGIN_SERVICE);
1921
const routesService = inject(WEB_ROUTES_SERVICE);
2022
const authService = inject(AUTH_SERVICE);
@@ -70,15 +72,22 @@
7072
</h1>
7173

7274
<div class="login-form__inputs">
73-
<Textbox bind:value={email} label="Email" />
75+
<EmailTextbox
76+
label="Email"
77+
placeholder=" "
78+
bind:value={email}
79+
autocomplete={false}
80+
autocorrect={false}
81+
spellcheck
82+
/>
7483
<Textbox bind:value={password} label="Password" type="password" />
7584

7685
<div class="text-12 login-form__password-reset">
7786
<a href={routesService.resetPasswordPath()}>Forgot password?</a>
7887
</div>
7988
</div>
8089

81-
<Button type="submit" style="pop">Log in</Button>
90+
<Button type="submit" style="pop" disabled={!isFormValid}>Log in</Button>
8291

8392
{#if error}
8493
<div class="error-message">

0 commit comments

Comments
 (0)