diff --git a/BTCPayServer/Controllers/InvoiceController.UI.cs b/BTCPayServer/Controllers/InvoiceController.UI.cs index 90a6489a5..6c6d80e00 100644 --- a/BTCPayServer/Controllers/InvoiceController.UI.cs +++ b/BTCPayServer/Controllers/InvoiceController.UI.cs @@ -498,7 +498,8 @@ namespace BTCPayServer.Controllers var state = invoice.GetInvoiceState(); model.Invoices.Add(new InvoiceModel() { - Status = state.ToString(), + Status = invoice.Status, + StatusString = state.ToString(), ShowCheckout = invoice.Status == InvoiceStatus.New, Date = invoice.InvoiceTime, InvoiceId = invoice.Id, diff --git a/BTCPayServer/Models/InvoicingModels/InvoicesModel.cs b/BTCPayServer/Models/InvoicingModels/InvoicesModel.cs index 42dc8f6f1..8aa5b0a28 100644 --- a/BTCPayServer/Models/InvoicingModels/InvoicesModel.cs +++ b/BTCPayServer/Models/InvoicingModels/InvoicesModel.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; +using BTCPayServer.Services.Invoices; namespace BTCPayServer.Models.InvoicingModels { @@ -25,7 +26,8 @@ namespace BTCPayServer.Models.InvoicingModels public string RedirectUrl { get; set; } public string InvoiceId { get; set; } - public string Status { get; set; } + public InvoiceStatus Status { get; set; } + public string StatusString { get; set; } public bool CanMarkComplete { get; set; } public bool CanMarkInvalid { get; set; } public bool CanMarkStatus => CanMarkComplete || CanMarkInvalid; diff --git a/BTCPayServer/Views/Invoice/ListInvoices.cshtml b/BTCPayServer/Views/Invoice/ListInvoices.cshtml index 16398243b..27ba44da9 100644 --- a/BTCPayServer/Views/Invoice/ListInvoices.cshtml +++ b/BTCPayServer/Views/Invoice/ListInvoices.cshtml @@ -116,25 +116,13 @@ } @invoice.InvoiceId - @invoice.Status - @invoice.AmountCurrency - - @if (invoice.ShowCheckout) - { - - Checkout - [^] - @if (!invoice.CanMarkStatus) - { - - - } - - } + @if (invoice.CanMarkStatus) { - + } + else + { + @invoice.StatusString + } + + @invoice.AmountCurrency + + @if (invoice.ShowCheckout) + { + + Checkout + [^] + @if (!invoice.CanMarkStatus) + { + - + } + + }   Details @**@ @@ -260,5 +266,46 @@ display: block; white-space: nowrap; } + + .pavpill { + display: inline-block; + padding: 0.3em 0.5em; + font-size: 85%; + font-weight: 500; + line-height: 1; + text-align: center; + white-space: nowrap; + vertical-align: baseline; + border-radius: 0.25rem; + } + + .pavpill.dropdown-toggle { + cursor: pointer; + } + + .pavpil-new { + background: #d4edda; + color: #000; + } + + .pavpil-expired { + background: #eee; + color: #000; + } + + .pavpil-invalid { + background: #c94a47; + color: #fff; + } + + .pavpil-confirmed, .pavpil-paid { + background: #f1c332; + color: #000; + } + + .pavpil-complete { + background: #329f80; + color: #fff; + }