@@ -131,57 +131,60 @@ export const SignInForm: FC<React.PropsWithChildren<SignInFormProps>> = ({
131
131
return (
132
132
< >
133
133
< Welcome />
134
- { ! authMethods ?. password . hidden && ( < form onSubmit = { form . handleSubmit } >
135
- < Stack >
136
- { Object . keys ( loginErrors ) . map (
137
- ( errorKey : string ) =>
138
- Boolean ( loginErrors [ errorKey as LoginErrors ] ) && (
139
- < AlertBanner
140
- key = { errorKey }
141
- severity = "error"
142
- error = { loginErrors [ errorKey as LoginErrors ] }
143
- text = { Language . errorMessages [ errorKey as LoginErrors ] }
144
- />
145
- ) ,
146
- ) }
147
- < TextField
148
- { ...getFieldHelpers ( "email" ) }
149
- onChange = { onChangeTrimmed ( form ) }
150
- autoFocus
151
- autoComplete = "email"
152
- fullWidth
153
- label = { Language . emailLabel }
154
- type = "email"
155
- variant = "outlined"
156
- />
157
- < TextField
158
- { ...getFieldHelpers ( "password" ) }
159
- autoComplete = "current-password"
160
- fullWidth
161
- id = "password"
162
- label = { Language . passwordLabel }
163
- type = "password"
164
- variant = "outlined"
165
- />
166
- < div >
167
- < LoadingButton
168
- loading = { isLoading }
134
+ { ! authMethods ?. password . hidden && (
135
+ < form onSubmit = { form . handleSubmit } >
136
+ < Stack >
137
+ { Object . keys ( loginErrors ) . map (
138
+ ( errorKey : string ) =>
139
+ Boolean ( loginErrors [ errorKey as LoginErrors ] ) && (
140
+ < AlertBanner
141
+ key = { errorKey }
142
+ severity = "error"
143
+ error = { loginErrors [ errorKey as LoginErrors ] }
144
+ text = { Language . errorMessages [ errorKey as LoginErrors ] }
145
+ />
146
+ ) ,
147
+ ) }
148
+ < TextField
149
+ { ...getFieldHelpers ( "email" ) }
150
+ onChange = { onChangeTrimmed ( form ) }
151
+ autoFocus
152
+ autoComplete = "email"
169
153
fullWidth
170
- type = "submit"
171
- variant = "contained"
172
- >
173
- { isLoading ? "" : Language . passwordSignIn }
174
- </ LoadingButton >
175
- </ div >
176
- </ Stack >
177
- </ form > ) }
178
- { ( ! authMethods ?. password . hidden && ( authMethods ?. github . enabled || authMethods ?. oidc . enabled ) ) && (
179
- < div className = { styles . divider } >
180
- < div className = { styles . dividerLine } />
181
- < div className = { styles . dividerLabel } > Or</ div >
182
- < div className = { styles . dividerLine } />
183
- </ div >
154
+ label = { Language . emailLabel }
155
+ type = "email"
156
+ variant = "outlined"
157
+ />
158
+ < TextField
159
+ { ...getFieldHelpers ( "password" ) }
160
+ autoComplete = "current-password"
161
+ fullWidth
162
+ id = "password"
163
+ label = { Language . passwordLabel }
164
+ type = "password"
165
+ variant = "outlined"
166
+ />
167
+ < div >
168
+ < LoadingButton
169
+ loading = { isLoading }
170
+ fullWidth
171
+ type = "submit"
172
+ variant = "contained"
173
+ >
174
+ { isLoading ? "" : Language . passwordSignIn }
175
+ </ LoadingButton >
176
+ </ div >
177
+ </ Stack >
178
+ </ form >
184
179
) }
180
+ { ! authMethods ?. password . hidden &&
181
+ ( authMethods ?. github . enabled || authMethods ?. oidc . enabled ) && (
182
+ < div className = { styles . divider } >
183
+ < div className = { styles . dividerLine } />
184
+ < div className = { styles . dividerLabel } > Or</ div >
185
+ < div className = { styles . dividerLine } />
186
+ </ div >
187
+ ) }
185
188
{ ( authMethods ?. github . enabled || authMethods ?. oidc . enabled ) && (
186
189
< Box display = "grid" gridGap = "16px" >
187
190
{ authMethods . github . enabled && (
@@ -211,9 +214,18 @@ export const SignInForm: FC<React.PropsWithChildren<SignInFormProps>> = ({
211
214
) } `}
212
215
>
213
216
< Button
214
- startIcon = { authMethods . oidc . iconUrl
215
- ? < img alt = "Open ID Connect icon" src = { authMethods . oidc . iconUrl } width = "24" height = "24" />
216
- : < KeyIcon className = { styles . buttonIcon } /> }
217
+ startIcon = {
218
+ authMethods . oidc . iconUrl ? (
219
+ < img
220
+ alt = "Open ID Connect icon"
221
+ src = { authMethods . oidc . iconUrl }
222
+ width = "24"
223
+ height = "24"
224
+ />
225
+ ) : (
226
+ < KeyIcon className = { styles . buttonIcon } />
227
+ )
228
+ }
217
229
disabled = { isLoading }
218
230
fullWidth
219
231
type = "submit"
0 commit comments