80 lines
3.7 KiB
Plaintext
80 lines
3.7 KiB
Plaintext
@inject NavigationManager NavManager
|
|
|
|
<button class="shelf-grip @(IsOpen ? "grip-open" : "")"
|
|
@onclick="ToggleShelf"
|
|
aria-label="Toggle Navigation Shelf">
|
|
<div class="grip-icon">
|
|
@if (IsOpen)
|
|
{
|
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">
|
|
<polyline points="9 18 15 12 9 6"></polyline>
|
|
</svg>
|
|
}
|
|
else
|
|
{
|
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">
|
|
<line x1="3" y1="12" x2="21" y2="12"></line>
|
|
<line x1="3" y1="6" x2="21" y2="6"></line>
|
|
<line x1="3" y1="18" x2="21" y2="18"></line>
|
|
</svg>
|
|
}
|
|
</div>
|
|
</button>
|
|
|
|
<div class="shelf-backdrop @(IsOpen ? "backdrop-active" : "")" @onclick="CloseShelf"></div>
|
|
|
|
<aside class="nav-shelf-panel @(IsOpen ? "shelf-open" : "")">
|
|
<div class="shelf-header">
|
|
<h3>System Context</h3>
|
|
<span class="environment-badge">PROD_PLANE</span>
|
|
</div>
|
|
|
|
<nav class="shelf-navigation">
|
|
<NavLink class="shelf-link" href="" Match="NavLinkMatch.All" @onclick="CloseShelf">
|
|
<svg class="link-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="3" y="3" width="7" height="9"></rect><rect x="14" y="3" width="7" height="5"></rect><rect x="14" y="12" width="7" height="9"></rect><rect x="3" y="16" width="7" height="5"></rect></svg>
|
|
<span>Dashboard</span>
|
|
</NavLink>
|
|
|
|
<NavLink class="shelf-link" href="packages" @onclick="CloseShelf">
|
|
<svg class="link-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l-7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"></path><polyline points="3.27 6.96 12 12.01 20.73 6.96"></polyline><line x1="12" y1="22.08" x2="12" y2="12"></line></svg>
|
|
<span>Product Packages</span>
|
|
</NavLink>
|
|
|
|
<NavLink class="shelf-link" href="prices" @onclick="CloseShelf">
|
|
<svg class="link-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="12" y1="12" x2="12" y2="12.01"></line><path d="M20.42 4.58a10 10 0 1 1-14.84 0"></path></svg>
|
|
<span>Price Matrix</span>
|
|
</NavLink>
|
|
|
|
<NavLink class="shelf-link" href="orders" @onclick="CloseShelf">
|
|
<svg class="link-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline points="14 2 14 8 20 8"></polyline><line x1="16" y1="13" x2="8" y2="13"></line><line x1="16" y1="17" x2="8" y2="17"></line><polyline points="10 9 9 9 8 9"></polyline></svg>
|
|
<span>Order Pipelines</span>
|
|
</NavLink>
|
|
|
|
<div class="shelf-divider"></div>
|
|
|
|
<NavLink class="shelf-link" href="scheduler" @onclick="CloseShelf">
|
|
<svg class="link-icon icon-warn" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="10"></circle><polyline points="12 6 12 12 16 14"></polyline></svg>
|
|
<span>Quartz Workloads</span>
|
|
</NavLink>
|
|
</nav>
|
|
</aside>
|
|
|
|
@code {
|
|
[Parameter] public bool IsOpen { get; set; } = false;
|
|
[Parameter] public EventCallback<bool> IsOpenChanged { get; set; }
|
|
|
|
private async Task ToggleShelf()
|
|
{
|
|
IsOpen = !IsOpen;
|
|
await IsOpenChanged.InvokeAsync(IsOpen);
|
|
}
|
|
|
|
private async Task CloseShelf()
|
|
{
|
|
if (IsOpen)
|
|
{
|
|
IsOpen = false;
|
|
await IsOpenChanged.InvokeAsync(IsOpen);
|
|
}
|
|
}
|
|
} |