diff --git a/scripts/route_lint.mjs b/scripts/route_lint.mjs index 127f381..1b2352d 100644 --- a/scripts/route_lint.mjs +++ b/scripts/route_lint.mjs @@ -15,8 +15,8 @@ const files = [ const required = [ { file: 'src/TaxBaik.Web/Program.cs', - pattern: 'MapGroup("/taxbaik/admin")', - message: '관리자 Razor Components는 /taxbaik/admin 그룹에만 매핑되어야 합니다.' + pattern: 'app.MapFallbackToFile("admin/{*path:nonfile}", "admin/index.html");', + message: '관리자 SPA 폴백은 admin/index.html로만 연결되어야 합니다.' }, { file: 'tests/e2e/route-isolation.spec.ts', @@ -48,12 +48,18 @@ const adminFiles = files for (const file of adminFiles) { const fullPath = path.join(root, file); const text = fs.readFileSync(fullPath, 'utf8'); - if (file === 'src/TaxBaik.Web/Program.cs') continue; if (text.includes('ToBaseRelativePath(Navigation.Uri)')) { console.error(`[route-lint] FAIL ${file}: unsafe ToBaseRelativePath(Navigation.Uri) usage detected.`); failed = true; } + + if (file === 'src/TaxBaik.Web.Client/Components/Admin/App.razor') { + if (text.includes(' - - - - - 백원숙 세무회계 - 관리자 - - - - - - - - - -
-
- 연결 재설정 중... - 새로운 버전으로 업데이트되었습니다. - 자동으로 페이지를 새로고침합니다. 잠시만 기다려주세요. -
-
-
-
-
-

로드 중...

-
-
- - - - - - - -@code { -} + diff --git a/src/TaxBaik.Web.Client/Components/Admin/Layout/MainLayout.razor b/src/TaxBaik.Web.Client/Components/Admin/Layout/MainLayout.razor index 9ce4f48..9a5d651 100644 --- a/src/TaxBaik.Web.Client/Components/Admin/Layout/MainLayout.razor +++ b/src/TaxBaik.Web.Client/Components/Admin/Layout/MainLayout.razor @@ -1,6 +1,5 @@ @inherits LayoutComponentBase - - +
@Body - +
diff --git a/src/TaxBaik.Web.Client/Program.cs b/src/TaxBaik.Web.Client/Program.cs index d2828ad..f33ae8c 100644 --- a/src/TaxBaik.Web.Client/Program.cs +++ b/src/TaxBaik.Web.Client/Program.cs @@ -5,6 +5,7 @@ using TaxBaik.Web.Services; using TaxBaik.Web.Services.AdminClients; var builder = WebAssemblyHostBuilder.CreateDefault(args); +builder.RootComponents.Add("#app"); // API Base Url: Admin SPA is hosted under /taxbaik/admin/, while APIs live under /taxbaik/api/. var hostBase = new Uri(builder.HostEnvironment.BaseAddress); diff --git a/src/TaxBaik.Web/Program.cs b/src/TaxBaik.Web/Program.cs index 735699b..d00f94f 100644 --- a/src/TaxBaik.Web/Program.cs +++ b/src/TaxBaik.Web/Program.cs @@ -476,12 +476,6 @@ app.MapHealthChecks("/healthz"); app.MapRazorPages(); // Sitemap.cshtml, Rss.cshtml, Feed.cshtml app.MapStaticAssets(); -// Blazor WebAssembly - 관리자 앱은 /taxbaik/admin 아래에서만 렌더링 -app.MapGroup("/taxbaik/admin") - .MapRazorComponents() - .AddInteractiveWebAssemblyRenderMode() - .AllowAnonymous(); - // SPA 라우팅 폴백 app.MapFallbackToFile("admin/{*path:nonfile}", "admin/index.html"); app.MapFallbackToFile("portal/{*path:nonfile}", "portal/index.html");