CodeLiturgy.Dashboard/CodeLiturgy.Views/Views/Shared/_HeaderMenu.cshtml

43 lines
1.3 KiB
Plaintext
Raw Normal View History

2022-10-30 19:48:24 +03:00
@using CodeLiturgy.Views.Utils
2022-11-18 03:15:53 +03:00
@using CodeLiturgy.Data.Auth
2022-11-18 03:33:03 +03:00
@using Duende.IdentityServer.Extensions
@using Microsoft.Extensions.Hosting.Internal
2022-09-26 04:05:23 +03:00
@{
Layout = null;
2022-10-27 20:13:02 +03:00
var userAuthenticated = User.IsAuthenticated();
var user = ViewData.GetUserViewData();
var rootUrl = SessionConstants.CookieDomain;
2022-11-17 00:17:44 +03:00
var menu = LayoutCache.GetDefaultHeaderMenu(ViewData, User.IsAuthenticated());
var isDevelopment = false;
#if DEBUG
isDevelopment = true;
#endif
2022-09-26 04:05:23 +03:00
}
2022-11-23 01:39:28 +03:00
<div class="menu top">
<div class="row no-wrap middle-align">
<div class="col">
<nav class="left-align">
@if (menu is {Count: > 0 })
2022-11-23 01:39:28 +03:00
{
@foreach (var record in menu)
{
<a href="@record.Location" class="white-text">
@record.Name
</a>
2022-11-23 01:39:28 +03:00
}
}
</nav>
</div>
<div class="col">
2022-11-23 01:39:28 +03:00
<nav class="right-align">
@if (isDevelopment)
{
<a href="/api/swagger" target="_blank" class="white-text">
Swagger API
</a>
}
2022-11-23 01:39:28 +03:00
</nav>
</div>
2022-09-26 04:05:23 +03:00
</div>
2022-11-17 00:17:44 +03:00
</div>