구현: 관리자 백오피스 Blazor Server + MudBlazor 컴포넌트
- 대시보드: KPI 카드 (이번달 문의, 신규 문의, 포스트 수) - 블로그 관리: 목록/작성/수정 페이지 - 문의 관리: 목록 및 상태 변경 - 설정: 사이트 연락처 정보 - 인증: Cookie 기반 8시간 세션 Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
@page "/login"
|
||||
@using System.ComponentModel.DataAnnotations
|
||||
@using Microsoft.AspNetCore.Authentication
|
||||
@using Microsoft.AspNetCore.Authentication.Cookies
|
||||
@layout BlankLayout
|
||||
@attribute [AllowAnonymous]
|
||||
|
||||
<PageTitle>로그인</PageTitle>
|
||||
|
||||
<MudContainer MaxWidth="MaxWidth.Small" Class="d-flex align-center justify-center" Style="min-height: 100vh;">
|
||||
<MudPaper Class="pa-8" Elevation="3" Style="width: 100%; max-width: 400px;">
|
||||
<MudText Typo="Typo.h4" Class="mb-6 text-center">관리자 로그인</MudText>
|
||||
|
||||
<MudForm @ref="form" @bind-IsValid="@isFormValid">
|
||||
<MudTextField @bind-Value="model.Username" Label="사용자명"
|
||||
Variant="Variant.Outlined" Required="true" Class="mb-4" />
|
||||
|
||||
<MudTextField @bind-Value="model.Password" Label="비밀번호" InputType="InputType.Password"
|
||||
Variant="Variant.Outlined" Required="true" Class="mb-4" />
|
||||
|
||||
@if (!string.IsNullOrEmpty(errorMessage))
|
||||
{
|
||||
<MudAlert Severity="Severity.Error" Class="mb-4">@errorMessage</MudAlert>
|
||||
}
|
||||
|
||||
<MudButton Variant="Variant.Filled" Color="Color.Primary" FullWidth="true"
|
||||
Size="Size.Large" OnClick="HandleLogin">로그인</MudButton>
|
||||
</MudForm>
|
||||
</MudPaper>
|
||||
</MudContainer>
|
||||
|
||||
@code {
|
||||
private MudForm form;
|
||||
private bool isFormValid = false;
|
||||
private string errorMessage = "";
|
||||
|
||||
private LoginModel model = new();
|
||||
|
||||
private async Task HandleLogin()
|
||||
{
|
||||
errorMessage = "로그인 기능은 준비 중입니다.";
|
||||
}
|
||||
|
||||
private class LoginModel
|
||||
{
|
||||
public string Username { get; set; }
|
||||
public string Password { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user