Skip to content

Commit ccd0498

Browse files
committed
Fix
1 parent e6963b5 commit ccd0498

File tree

6 files changed

+60
-38
lines changed

6 files changed

+60
-38
lines changed

go/internal/i18n/locales/en.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ other = "Mewst is a social network where you can share your current feelings and
1919

2020
[sign_in_title]
2121
description = "Sign in page title"
22-
other = "Sign in"
22+
other = "Sign in to Mewst"
2323

2424
[sign_up_title]
2525
description = "Sign up page title"

go/internal/i18n/locales/ja.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ other = "Mewstは160文字で今の気持ちや状況を記録できるマイク
1919

2020
[sign_in_title]
2121
description = "ログインページのタイトル"
22-
other = "ログイン"
22+
other = "Mewstにログイン"
2323

2424
[sign_up_title]
2525
description = "新規登録ページのタイトル"

go/internal/templates/components/turnstile.templ

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@ package components
33
// Turnstile はCloudflare Turnstileウィジェットを表示する
44
templ Turnstile(siteKey string) {
55
if siteKey != "" {
6-
<div class="cf-turnstile" data-sitekey={ siteKey } data-theme="light"></div>
76
<script src="https://challenges.cloudflare.com/turnstile/v0/api.js" async defer></script>
7+
<div
8+
class="cf-turnstile"
9+
data-sitekey={ siteKey }
10+
></div>
811
}
912
}

go/internal/templates/components/turnstile_templ.go

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

go/internal/templates/pages/sign_in/new.templ

Lines changed: 32 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,75 +26,94 @@ templ New(data NewPageData) {
2626
</div>
2727

2828
<div class="flex flex-col gap-2">
29-
<h1 class="text-center text-3xl font-bold">
29+
<h1 class="text-center text-3xl font-bold antialiased">
3030
{ templates.T(ctx, "sign_in_title") }
3131
</h1>
3232
</div>
3333

3434
@components.FormErrors(data.FormErrors)
3535

36-
<form method="POST" action="/sign_in" class="grid gap-6">
36+
<form
37+
action="/sign_in"
38+
class="form grid gap-6"
39+
data-on:submit__passive="$isSubmitting = true"
40+
method="POST"
41+
>
3742
<input type="hidden" name="csrf_token" value={ data.CSRFToken }/>
3843

3944
<div class="grid gap-2">
4045
<label for="email">
4146
{ templates.T(ctx, "label_email") }
4247
</label>
48+
4349
<input
4450
if data.FormErrors != nil && data.FormErrors.Fields["email"] != nil {
4551
aria-invalid="true"
4652
} else {
4753
aria-invalid="false"
4854
}
49-
type="email"
55+
autocomplete="email"
56+
autofocus
5057
id="email"
5158
name="email"
52-
autocomplete="username"
53-
autofocus
5459
required
5560
tabindex="1"
61+
type="email"
5662
value={ data.Email }
5763
/>
64+
5865
if data.FormErrors != nil && data.FormErrors.Fields["email"] != nil {
5966
for _, errorMsg := range data.FormErrors.Fields["email"] {
60-
<p class="text-sm text-red-600">{ errorMsg }</p>
67+
<p class="text-sm text-red-600">
68+
{ errorMsg }
69+
</p>
6170
}
6271
}
6372
</div>
6473

6574
<div class="grid gap-2">
66-
<div class="flex items-center justify-between">
75+
<div class="flex items-center gap-2">
6776
<label for="password">
6877
{ templates.T(ctx, "label_password") }
6978
</label>
70-
<a class="link text-sm" href="/password_reset" tabindex="4">
79+
80+
<a class="link text-sm ml-auto" href="/password_reset" tabindex="4">
7181
{ templates.T(ctx, "password_reset_title") }
7282
</a>
7383
</div>
84+
7485
<input
7586
if data.FormErrors != nil && data.FormErrors.Fields["password"] != nil {
7687
aria-invalid="true"
7788
} else {
7889
aria-invalid="false"
7990
}
80-
type="password"
91+
autocomplete="current-password"
8192
id="password"
8293
name="password"
83-
autocomplete="current-password"
8494
required
8595
tabindex="2"
96+
type="password"
8697
/>
98+
8799
if data.FormErrors != nil && data.FormErrors.Fields["password"] != nil {
88100
for _, errorMsg := range data.FormErrors.Fields["password"] {
89-
<p class="text-sm text-red-600">{ errorMsg }</p>
101+
<p class="text-sm text-red-600">
102+
{ errorMsg }
103+
</p>
90104
}
91105
}
92106
</div>
93107

94108
@components.Turnstile(data.TurnstileSiteKey)
95109

96-
<button class="btn rounded-full w-fit" tabindex="3" type="submit">
97-
@templates.Icon("sign-in")
110+
<button
111+
class="btn rounded-full w-fit text-black"
112+
tabindex="3"
113+
type="submit"
114+
data-attr:disabled="$isSubmitting == true"
115+
>
116+
@templates.Icon("arrow-right")
98117
{ templates.T(ctx, "btn_sign_in") }
99118
</button>
100119
</form>

go/internal/templates/pages/sign_in/new_templ.go

Lines changed: 19 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)