@using BTCPayServer.Services.Invoices
@using BTCPayServer.Client.Models
@using BTCPayServer.Abstractions.Contracts
@model BTCPayServer.Models.PaymentRequestViewModels.ViewPaymentRequestViewModel
@addTagHelper *, BundlerMinifier.TagHelpers
@inject BTCPayServer.Services.BTCPayServerEnvironment env
@inject ISettingsRepository _settingsRepository
@{
ViewData["Title"] = Model.Title;
Layout = null;
var theme = await _settingsRepository.GetTheme();
string StatusClass(InvoiceState state)
{
switch (state.Status.ToModernStatus())
{
case InvoiceStatus.Settled:
case InvoiceStatus.Processing:
return "success";
case InvoiceStatus.Expired:
switch (state.ExceptionStatus)
{
case InvoiceExceptionStatus.PaidLate:
case InvoiceExceptionStatus.PaidPartial:
case InvoiceExceptionStatus.PaidOver:
return "warning";
default:
return "danger";
}
case InvoiceStatus.Invalid:
return "danger";
default:
return "warning";
}
}
}
@Model.Title
@if (Model.CustomCSSLink != null)
{
}
@*We need to make sure btcpay.js is not bundled, else it will not work if there is a RootPath*@
@Safe.Raw(Model.EmbeddedCSS)