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
2017-10-27 05:08:18 +02:00
@inject BTCPayServer.Services.BTCPayServerEnvironment env
2018-01-07 20:14:35 +01:00
@inject BTCPayServer.HostedServices.NBXplorerDashboard dashboard
2018-04-13 23:15:03 +02:00
@inject BTCPayServer.HostedServices.CssThemeManager themeManager
2018-04-29 13:48:17 +02:00
2018-01-30 19:34:09 +01:00
@addTagHelper *, Meziantou.AspNetCore.BundleTagHelpers
2017-09-13 08:47:34 +02:00
<!DOCTYPE html>
<html lang="en">
<head>
2017-10-27 10:53:04 +02:00
<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
2017-10-27 10:53:04 +02:00
<title>BTCPay Server</title>
2017-09-13 08:47:34 +02:00
2018-01-30 19:34:09 +01:00
@* CSS *@
2018-04-29 13:48:17 +02:00
<link href="@this.Context.Request.GetAbsoluteUri(themeManager.BootstrapUri)" rel="stylesheet" />
<link href="@this.Context.Request.GetAbsoluteUri(themeManager.CreativeStartUri)" rel="stylesheet" />
2018-04-17 23:12:17 +02:00
2018-02-27 08:00:50 +01:00
<bundle name="wwwroot/bundles/main-bundle.min.css" />
2017-09-13 08:47:34 +02:00
2018-01-30 19:34:09 +01:00
@* JS *@
2018-02-27 08:00:50 +01:00
<bundle name="wwwroot/bundles/main-bundle.min.js" />
2018-08-22 11:10:46 +02:00
@RenderSection("HeadScripts", required: false)
2018-11-19 05:20:48 +01:00
@RenderSection("HeaderContent", false)
2017-09-13 08:47:34 +02:00
</head>
<body id="page-top">
2017-10-27 10:53:04 +02:00
@{
2018-09-22 08:08:27 +02:00
if (ViewBag.AlwaysShrinkNavBar == null)
2017-10-27 10:53:04 +02:00
{
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">
2018-01-17 08:34:01 +01:00
<a class="navbar-brand js-scroll-trigger" href="~/">
<img src="~/img/logo.png" height="45">
2018-09-22 08:08:27 +02:00
@if (env.NetworkType != NBitcoin.NetworkType.Mainnet)
2018-01-17 08:34:01 +01:00
{
2018-04-19 10:06:08 +02:00
<span class="badge badge-warning" style="font-size:10px;">@env.NetworkType.ToString()</span>
2018-01-17 08:34:01 +01:00
}
</a>
2017-10-27 10:53:04 +02:00
<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">
2018-09-22 08:08:27 +02:00
@if (SignInManager.IsSignedIn(User))
2018-04-13 23:15:03 +02:00
{
2018-09-22 08:08:27 +02:00
@if (User.IsInRole(Roles.ServerAdmin))
2018-04-13 23:15:03 +02:00
{
<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="UserStores" asp-action="ListStores" class="nav-link js-scroll-trigger">Stores</a></li>
<li class="nav-item"><a asp-area="" asp-controller="Apps" asp-action="ListApps" class="nav-link js-scroll-trigger">Apps</a></li>
2018-07-26 15:32:24 +02:00
<li class="nav-item"><a asp-area="" asp-controller="Wallets" asp-action="ListWallets" class="nav-link js-scroll-trigger">Wallets</a></li>
2018-04-13 23:15:03 +02:00
<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
{
2018-09-22 08:08:27 +02:00
@if (themeManager.ShowRegister)
2018-05-10 09:02:49 +02:00
{
<li class="nav-item"><a asp-area="" asp-controller="Account" asp-action="Register" class="nav-link js-scroll-trigger">Register</a></li>
}
2018-04-13 23:15:03 +02:00
<li class="nav-item"><a asp-area="" asp-controller="Account" asp-action="Login" class="nav-link js-scroll-trigger">Log in</a></li>}
2017-10-27 10:53:04 +02:00
</ul>
</div>
2018-07-11 15:40:10 +02:00
<div id="badUrl" class="alert alert-danger alert-dismissible" style="display:none; position:absolute; top:75px;" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
<span>BTCPay is expecting you to access this website from <b>@(env.ExpectedProtocol)://@(env.ExpectedHost)/</b>. If you want to change this expectation:</span>
<ul>
<li>Either starts BTCPay with <b>--externalurl @(env.ExpectedProtocol)://@(env.ExpectedHost)/</b></li>
<li>Or, if using docker-compose deployment, setting environment variable <b>BTCPAY_PROTOCOL=@(env.ExpectedProtocol)</b> and <b>BTCPAY_HOST=@(env.ExpectedDomain)</b></li>
</ul>
2018-09-22 08:08:27 +02:00
2018-07-11 15:40:10 +02:00
</div>
2017-10-27 10:53:04 +02:00
</div>
</nav>
2018-07-11 15:40:10 +02:00
2017-10-27 10:53:04 +02:00
@RenderBody()
2017-12-16 17:04:20 +01:00
2018-09-22 08:08:27 +02:00
@if (User.Identity.IsAuthenticated)
{
<footer class="siteFooter bg-dark text-white">
<div class="container text-right">@env.ToString()</div>
</footer>
}
2017-10-27 10:53:04 +02:00
2018-09-22 08:08:27 +02:00
@if (!dashboard.IsFullySynched())
2017-12-16 18:07:11 +01:00
{
2018-05-08 10:57:53 +02:00
<partial name="SyncModal" />
2017-12-16 18:07:11 +01:00
}
2017-10-27 10:53:04 +02:00
@RenderSection("Scripts", required: false)
2018-07-11 15:40:10 +02:00
<script type="text/javascript">
var expectedDomain = @Html.Raw(Json.Serialize(env.ExpectedHost));
var expectedProtocol = @Html.Raw(Json.Serialize(env.ExpectedProtocol));
if (window.location.host != expectedDomain || window.location.protocol != expectedProtocol + ":") {
document.getElementById("badUrl").style.display = "block";
}
</script>
2017-09-13 08:47:34 +02:00
</body>
</html>