This commit is contained in:
@@ -60,22 +60,24 @@
|
||||
<span>Notifications</span>
|
||||
</NavLink>
|
||||
|
||||
<div class="shelf-divider"></div>
|
||||
<div class="shelf-divider"></div>
|
||||
|
||||
<NavLink class="shelf-link" href="settings" @onclick="CloseShelf">
|
||||
<svg class="link-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="3"></circle><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z"></path></svg>
|
||||
<span>Settings</span>
|
||||
</NavLink>
|
||||
|
||||
<NavLink class="shelf-link" href="policies" @onclick="CloseShelf">
|
||||
<svg class="link-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"></path></svg>
|
||||
<span>Policies</span>
|
||||
</NavLink>
|
||||
|
||||
<NavLink class="shelf-link" href="profile" @onclick="CloseShelf">
|
||||
<svg class="link-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path><circle cx="12" cy="7" r="4"></circle></svg>
|
||||
<NavLink class="shelf-link" href="@ProfileUrl" target="_blank" @onclick="CloseShelf">
|
||||
<svg class="link-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path>
|
||||
<circle cx="12" cy="7" r="4"></circle>
|
||||
</svg>
|
||||
<span>Profile</span>
|
||||
</NavLink>
|
||||
|
||||
<NavLink class="shelf-link" href="auth/logout" ForceLoad="true" @onclick="CloseShelf">
|
||||
<svg class="link-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"></path>
|
||||
<polyline points="16 17 21 12 16 7"></polyline>
|
||||
<line x1="21" y1="12" x2="9" y2="12"></line>
|
||||
</svg>
|
||||
<span>Logout</span>
|
||||
</NavLink>
|
||||
</nav>
|
||||
</aside>
|
||||
|
||||
@@ -83,6 +85,24 @@
|
||||
[Parameter] public bool IsOpen { get; set; } = false;
|
||||
[Parameter] public EventCallback<bool> IsOpenChanged { get; set; }
|
||||
|
||||
[Inject] private IConfiguration? Configuration { get; set; }
|
||||
|
||||
private string? ProfileUrl { get; set; }
|
||||
|
||||
protected override void OnInitialized()
|
||||
{
|
||||
if (Configuration is null) return;
|
||||
|
||||
var authority = Configuration["IdKongisa:Authority"];
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(authority))
|
||||
{
|
||||
var uri = new Uri(authority);
|
||||
|
||||
ProfileUrl = $"{uri.Scheme}://{uri.Host}/if/user/#/settings";
|
||||
}
|
||||
}
|
||||
|
||||
private async Task ToggleShelf()
|
||||
{
|
||||
IsOpen = !IsOpen;
|
||||
|
||||
Reference in New Issue
Block a user