diff --git a/BTCPayServer.Tests/SeleniumTests.cs b/BTCPayServer.Tests/SeleniumTests.cs index b57efba9d..971d1fede 100644 --- a/BTCPayServer.Tests/SeleniumTests.cs +++ b/BTCPayServer.Tests/SeleniumTests.cs @@ -806,7 +806,7 @@ namespace BTCPayServer.Tests s.Driver.FindElement(By.Id("ClaimedAmount")).Clear(); s.Driver.FindElement(By.Id("ClaimedAmount")).SendKeys("20" + Keys.Enter); s.AssertHappyMessage(); - Assert.Contains("AwaitingApproval", s.Driver.PageSource); + Assert.Contains("Awaiting Approval", s.Driver.PageSource); var viewPullPaymentUrl = s.Driver.Url; // This one should have nothing @@ -848,8 +848,7 @@ namespace BTCPayServer.Tests s.Driver.Navigate().GoToUrl(viewPullPaymentUrl); txs = s.Driver.FindElements(By.ClassName("transaction-link")); Assert.Equal(2, txs.Count); - Assert.Contains("InProgress", s.Driver.PageSource); - + Assert.Contains("In Progress", s.Driver.PageSource); await s.Server.ExplorerNode.GenerateAsync(1); diff --git a/BTCPayServer/Controllers/PullPaymentController.cs b/BTCPayServer/Controllers/PullPaymentController.cs index fe8bebd5c..722959b3b 100644 --- a/BTCPayServer/Controllers/PullPaymentController.cs +++ b/BTCPayServer/Controllers/PullPaymentController.cs @@ -1,6 +1,7 @@ using System; using System.Globalization; using System.Linq; +using System.Text.RegularExpressions; using System.Threading.Tasks; using BTCPayServer; using BTCPayServer.Data; @@ -69,13 +70,13 @@ namespace BTCPayServer.Controllers CurrencyData = cd, LastUpdated = DateTime.Now, Payouts = payouts - .Select(entity => new ViewPullPaymentModel.PayoutLine() + .Select(entity => new ViewPullPaymentModel.PayoutLine { Id = entity.Entity.Id, Amount = entity.Blob.Amount, AmountFormatted = _currencyNameTable.FormatCurrency(entity.Blob.Amount, blob.Currency), Currency = blob.Currency, - Status = entity.Entity.State.ToString(), + Status = Regex.Replace(entity.Entity.State.ToString(), "(\\B[A-Z])", " $1"), Destination = entity.Blob.Destination.Address.ToString(), Link = GetTransactionLink(_networkProvider.GetNetwork(entity.Entity.GetPaymentMethodId().CryptoCode), entity.TransactionId), TransactionId = entity.TransactionId diff --git a/BTCPayServer/Views/Account/Login.cshtml b/BTCPayServer/Views/Account/Login.cshtml index 61d30087f..ab81fd112 100644 --- a/BTCPayServer/Views/Account/Login.cshtml +++ b/BTCPayServer/Views/Account/Login.cshtml @@ -29,9 +29,9 @@ @if (env.OnionUrl != null) {
- + - Copy Tor URL + Copy Tor URL
} diff --git a/BTCPayServer/Views/Account/Register.cshtml b/BTCPayServer/Views/Account/Register.cshtml index 6016cf658..495e48e37 100644 --- a/BTCPayServer/Views/Account/Register.cshtml +++ b/BTCPayServer/Views/Account/Register.cshtml @@ -33,9 +33,9 @@ @if (env.OnionUrl != null) {
- + - Copy Tor URL + Copy Tor URL
} diff --git a/BTCPayServer/Views/Invoice/Checkout.cshtml b/BTCPayServer/Views/Invoice/Checkout.cshtml index 487ed4ccc..1fda3fa6b 100644 --- a/BTCPayServer/Views/Invoice/Checkout.cshtml +++ b/BTCPayServer/Views/Invoice/Checkout.cshtml @@ -33,9 +33,8 @@ { - -
-
-
-
-

- {{srvModel.title}} - - - - - -

-
+ + +
+ + } + +
+
+ @await Html.PartialAsync("_StatusMessage", new ViewDataDictionary(ViewData){ { "Margin", "mb-4" } }) + @if (!ViewContext.ModelState.IsValid) + { + @Html.ValidationSummary(string.Empty, new { @class = "alert alert-danger mb-4 pb-0 text-center" }) } -
-
-
-
Pull payment details
- - - - - - - - - - - - - - @if (Model.ResetIn != String.Empty) - { - - - - - } -
Claim limit:@Model.AmountFormatted
Already claimed:@Model.AmountCollectedFormatted
Available claim:@Model.AmountDueFormatted
Reset in:@Model.ResetIn
- @if (Model.Description != null && Model.Description != "" && Model.Description != "
") +
+
+
+ @if (!Model.Title.IsNullOrWhiteSpace()) { -
@Safe.Raw(Model.Description)
+

@Model.Title

+ } +
+ Last Updated +   + @Model.LastUpdated.ToString("g") + +
+ @if (!string.IsNullOrEmpty(Model.ResetIn)) + { +

+ Reset in +   + @Model.ResetIn +

+ } + @if (!string.IsNullOrEmpty(Model.Description) && Model.Description != "
") + { +
@Safe.Raw(Model.Description)
}
-
-
Awaiting claims
- @if (Model.Payouts.Any()) - { - foreach (var invoice in Model.Payouts) - { - - - - - - - - - - - - - - @if (!String.IsNullOrEmpty(invoice.Link)) - { - - - - - } -
Status@invoice.Status
Amount claimed@invoice.AmountFormatted
Destination - @invoice.Destination -
Transaction@invoice.TransactionId
- } - } - else - { -

No claim made yet

- } +
+
+
+

Payment Details

+
+
+
@Model.AmountDueFormatted
+
Available claim
+
+
+
+
+
+
@Model.AmountCollectedFormatted
+
Already claimed
+
+
+
@Model.AmountFormatted
+
Claim limit
+
+
-
+
-
- + diff --git a/BTCPayServer/Views/Shared/Header.cshtml b/BTCPayServer/Views/Shared/Header.cshtml index 1eef7bc0c..103c74e32 100644 --- a/BTCPayServer/Views/Shared/Header.cshtml +++ b/BTCPayServer/Views/Shared/Header.cshtml @@ -21,3 +21,10 @@ @* JS *@ +@* Non-JS *@ + diff --git a/BTCPayServer/Views/Shared/_Layout.cshtml b/BTCPayServer/Views/Shared/_Layout.cshtml index a4d039543..1e955e07c 100644 --- a/BTCPayServer/Views/Shared/_Layout.cshtml +++ b/BTCPayServer/Views/Shared/_Layout.cshtml @@ -5,30 +5,13 @@ @inject BTCPayServer.HostedServices.CssThemeManager themeManager - + @RenderSection("HeadScripts", required: false) @RenderSection("HeaderContent", false) - - - diff --git a/BTCPayServer/Views/Shared/_StatusMessage.cshtml b/BTCPayServer/Views/Shared/_StatusMessage.cshtml index 0b1ffef26..45674dc38 100644 --- a/BTCPayServer/Views/Shared/_StatusMessage.cshtml +++ b/BTCPayServer/Views/Shared/_StatusMessage.cshtml @@ -4,10 +4,10 @@ @if (parsedModel != null) { -