Implemented authentication starte components
continuous-integration/drone/pr Build is passing

This commit is contained in:
Khwezi Mngoma
2026-05-16 15:29:43 +02:00
parent da0961fe7f
commit 5fd12b34ac
3 changed files with 240 additions and 7 deletions
+23 -7
View File
@@ -1,5 +1,6 @@
@inherits LayoutComponentBase
@using Blazored.Toast
@using Microsoft.AspNetCore.Components.Authorization
<header class="top-bar">
<a href="/" class="brand">
@@ -9,7 +10,7 @@
<circle cx="75" cy="80" r="5" fill="#4dabff" opacity="0.6" />
<circle cx="75" cy="20" r="5" fill="#4dabff" opacity="0.6" />
</svg>
<div class="text-column">
<span class="brand-main">Lite<span class="brand-accent">Charms</span></span>
<span class="payoff-line">Shop Administration &amp; Monitoring</span>
@@ -19,13 +20,28 @@
<TopBarAuthstateView IsAuthenticated="false" />
</header>
<NavShelf IsOpen="isShelfExpanded" IsOpenChanged="OnShelfStateChanged" @rendermode="InteractiveServer" />
<CascadingAuthenticationState>
<AuthorizeView>
<Authorized>
<NavShelf IsOpen="isShelfExpanded" IsOpenChanged="OnShelfStateChanged" @rendermode="InteractiveServer" />
</Authorized>
</AuthorizeView>
</CascadingAuthenticationState>
<div class="page-wrapper @(isShelfExpanded ? "shifted-canvas" : "")">
<main>
@Body
</main>
</div>
<CascadingAuthenticationState>
<div class="page-wrapper @(isShelfExpanded ? "shifted-canvas" : "")">
<AuthorizeView>
<Authorized>
<main class="content-body">
@Body
</main>
</Authorized>
<NotAuthorized>
<Login />
</NotAuthorized>
</AuthorizeView>
</div>
</CascadingAuthenticationState>
<BlazoredToasts />