57269e281d
TaxBaik CI/CD / build-and-deploy (push) Failing after 36s
분리의 단점을 제거하고 단일 앱으로 통합: 구조 변경: - TaxBaik.Admin → TaxBaik.Web/Components/Admin/ - Admin Services → TaxBaik.Web/Services/ - 포트: 5001 (기존 5002 제거) 경로: - 홈페이지: http://localhost:5001/taxbaik - 관리자: http://localhost:5001/taxbaik/admin 기술: - Razor Pages (Web) + Blazor Server (Admin) 통합 - 단일 Program.cs로 양쪽 모두 지원 - JWT 인증 유지 - MudBlazor UI 유지 장점: - 개발 복잡도 감소 (터미널 1개) - 배포 단순화 (앱 1개) - DB 마이그레이션 1회 실행 Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
44 lines
922 B
C#
44 lines
922 B
C#
using Microsoft.JSInterop;
|
|
|
|
namespace TaxBaik.Web.Services;
|
|
|
|
public class LocalStorageService : ILocalStorageService
|
|
{
|
|
private readonly IJSRuntime _jsRuntime;
|
|
|
|
public LocalStorageService(IJSRuntime jsRuntime)
|
|
{
|
|
_jsRuntime = jsRuntime;
|
|
}
|
|
|
|
public async Task<string?> GetItemAsStringAsync(string key)
|
|
{
|
|
try
|
|
{
|
|
return await _jsRuntime.InvokeAsync<string>("localStorage.getItem", key);
|
|
}
|
|
catch
|
|
{
|
|
return null;
|
|
}
|
|
}
|
|
|
|
public async Task SetItemAsStringAsync(string key, string value)
|
|
{
|
|
try
|
|
{
|
|
await _jsRuntime.InvokeVoidAsync("localStorage.setItem", key, value);
|
|
}
|
|
catch { }
|
|
}
|
|
|
|
public async Task RemoveItemAsync(string key)
|
|
{
|
|
try
|
|
{
|
|
await _jsRuntime.InvokeVoidAsync("localStorage.removeItem", key);
|
|
}
|
|
catch { }
|
|
}
|
|
}
|