feat: enable enter key to submit login form
**Enhancement:** - Wrap login form in HTML <form> element with @onsubmit - HTML form automatically treats Enter key as submit action - No need for custom @onkeypress handler **Behavior:** - Users can now press Enter in password field to login - Or click the login button (existing behavior maintained) - Both methods trigger HandleLogin() async handler This provides better UX for keyboard-first users. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
<MudPaper Class="pa-8" Elevation="3" Style="width: 100%; max-width: 400px;">
|
||||
<MudText Typo="Typo.h4" Class="mb-6 text-center">관리자 로그인</MudText>
|
||||
|
||||
<div>
|
||||
<form @onsubmit="HandleLogin" @onsubmit:preventDefault>
|
||||
<InputText class="mud-input mud-input-outlined mud-input-root mud-input-root-adorned-start mb-4"
|
||||
style="width: 100%; min-height: 56px; padding: 16px 14px;"
|
||||
placeholder="사용자명"
|
||||
@@ -32,10 +32,9 @@
|
||||
<MudAlert Severity="Severity.Error" Class="mb-4">@errorMessage</MudAlert>
|
||||
}
|
||||
|
||||
<button type="button"
|
||||
<button type="submit"
|
||||
class="mud-button-root mud-button mud-button-filled mud-button-filled-primary mud-elevation-0"
|
||||
style="width: 100%; min-height: 52px; border: 0; border-radius: 4px; color: white;"
|
||||
@onclick="HandleLogin"
|
||||
disabled="@isLoading">
|
||||
@if (isLoading)
|
||||
{
|
||||
@@ -47,7 +46,7 @@
|
||||
<span>로그인</span>
|
||||
}
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</MudPaper>
|
||||
</MudContainer>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user