btcpayserver/BTCPayServer/Views/Shared/_Layout.cshtml

90 lines
3.7 KiB
Plaintext
Raw Normal View History

2017-09-13 08:47:34 +02:00
@inject SignInManager<ApplicationUser> SignInManager
@inject UserManager<ApplicationUser> UserManager
2017-09-15 12:08:31 +02:00
@inject RoleManager<IdentityRole> RoleManager
@inject BTCPayServer.Services.BTCPayServerEnvironment env
2018-01-07 20:14:35 +01:00
@inject BTCPayServer.HostedServices.NBXplorerDashboard dashboard
@addTagHelper *, Meziantou.AspNetCore.BundleTagHelpers
2017-09-13 08:47:34 +02:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
2017-09-13 08:47:34 +02:00
<title>BTCPay Server</title>
2017-09-13 08:47:34 +02:00
@* CSS *@
2018-01-30 21:41:46 +01:00
<bundle name="wwwroot/bundles/main/bundle.min.css" />
2017-09-13 08:47:34 +02:00
@* JS *@
2018-01-30 21:41:46 +01:00
<bundle name="wwwroot/bundles/main/bundle.min.js" />
2017-09-13 08:47:34 +02:00
</head>
<body id="page-top">
@{
if (ViewBag.AlwaysShrinkNavBar == null)
{
ViewBag.AlwaysShrinkNavBar = true;
}
var additionalStyle = ViewBag.AlwaysShrinkNavBar ? "navbar-shrink always-shrinked" : "";
}
<!-- Navigation -->
<nav class='navbar navbar-expand-lg navbar-light fixed-top @additionalStyle' id="mainNav">
<div class="container">
<a class="navbar-brand js-scroll-trigger" href="~/">
<img src="~/img/logo.png" height="45">
@if (env.ChainType != NBXplorer.ChainType.Main)
{
<span class="badge badge-warning" style="font-size:10px;">@env.ChainType.ToString()</span>
}
</a>
<button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarResponsive">
<ul class="navbar-nav ml-auto">
@if (SignInManager.IsSignedIn(User))
{
@if (User.IsInRole(Roles.ServerAdmin))
{
<li class="nav-item"><a asp-area="" asp-controller="Server" asp-action="ListUsers" class="nav-link js-scroll-trigger">Server settings</a></li>
}
<li class="nav-item"><a asp-area="" asp-controller="Stores" asp-action="ListStores" class="nav-link js-scroll-trigger">Stores</a></li>
<li class="nav-item"><a asp-area="" asp-controller="Invoice" asp-action="ListInvoices" class="nav-link js-scroll-trigger">Invoices</a></li>
<li class="nav-item">
<a asp-area="" asp-controller="Manage" asp-action="Index" title="Manage" class="nav-link js-scroll-trigger">My settings</a>
</li>
<li class="nav-item">
<a asp-area="" asp-controller="Account" asp- asp-action="Logout" title="Manage" class="nav-link js-scroll-trigger">Log out</a>
</li>}
else
{
<li class="nav-item"><a asp-area="" asp-controller="Account" asp-action="Register" class="nav-link js-scroll-trigger">Register</a></li>
<li class="nav-item"><a asp-area="" asp-controller="Account" asp-action="Login" class="nav-link js-scroll-trigger">Log in</a></li>}
</ul>
</div>
</div>
</nav>
@RenderBody()
<footer class="bg-dark">
2017-10-27 11:07:44 +02:00
<div class="container text-right"><span style="font-size:8px;">@env.ToString()</span></div>
</footer>
@if (!dashboard.IsFullySynched())
2017-12-16 18:07:11 +01:00
{
@Html.Partial("SyncModal")
2017-12-16 18:07:11 +01:00
}
@RenderSection("Scripts", required: false)
2017-09-13 08:47:34 +02:00
</body>
</html>