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
|
2023-11-04 18:35:19 +03:00
|
|
|
@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());
|
2023-11-04 18:35:19 +03:00
|
|
|
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">
|
2023-11-04 18:35:19 +03:00
|
|
|
<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)
|
|
|
|
{
|
2023-11-04 18:35:19 +03:00
|
|
|
<a href="@record.Location" class="white-text">
|
|
|
|
@record.Name
|
|
|
|
</a>
|
2022-11-23 01:39:28 +03:00
|
|
|
}
|
|
|
|
}
|
2023-11-04 18:35:19 +03:00
|
|
|
</nav>
|
|
|
|
</div>
|
|
|
|
<div class="col">
|
2022-11-23 01:39:28 +03:00
|
|
|
<nav class="right-align">
|
2023-11-04 18:35:19 +03:00
|
|
|
@if (isDevelopment)
|
|
|
|
{
|
|
|
|
<a href="/api/swagger" target="_blank" class="white-text">
|
|
|
|
Swagger API
|
|
|
|
</a>
|
|
|
|
}
|
2022-11-23 01:39:28 +03:00
|
|
|
</nav>
|
2023-11-04 18:35:19 +03:00
|
|
|
</div>
|
2022-09-26 04:05:23 +03:00
|
|
|
</div>
|
2022-11-17 00:17:44 +03:00
|
|
|
</div>
|