diff --git a/BTCPayServer/Views/PaymentRequest/ViewPaymentRequest.cshtml b/BTCPayServer/Views/PaymentRequest/ViewPaymentRequest.cshtml index d6a5a4888..f24c990f4 100644 --- a/BTCPayServer/Views/PaymentRequest/ViewPaymentRequest.cshtml +++ b/BTCPayServer/Views/PaymentRequest/ViewPaymentRequest.cshtml @@ -32,7 +32,7 @@ @Safe.Raw(Model.EmbeddedCSS) @@ -45,12 +45,12 @@
-

@Model.Title

+

@Model.Title

Last Updated   - @Model.LastUpdated.ToString("g") + @Model.LastUpdated.ToString("g") @@ -59,11 +59,11 @@
- @if (Model.IsPending && !Model.Archived) + @if (Model.IsPending && !Model.Archived && Model.ExpiryDate.HasValue) { } -
diff --git a/BTCPayServer/Views/PullPayment/ViewPullPayment.cshtml b/BTCPayServer/Views/PullPayment/ViewPullPayment.cshtml index cab509c89..9060b6fad 100644 --- a/BTCPayServer/Views/PullPayment/ViewPullPayment.cshtml +++ b/BTCPayServer/Views/PullPayment/ViewPullPayment.cshtml @@ -27,7 +27,7 @@ @Safe.Raw(Model.EmbeddedCSS) diff --git a/BTCPayServer/Views/Shared/Header.cshtml b/BTCPayServer/Views/Shared/Header.cshtml index 061c28667..103c74e32 100644 --- a/BTCPayServer/Views/Shared/Header.cshtml +++ b/BTCPayServer/Views/Shared/Header.cshtml @@ -24,7 +24,7 @@ @* Non-JS *@ diff --git a/BTCPayServer/wwwroot/main/site.css b/BTCPayServer/wwwroot/main/site.css index 2b8c526ed..4196672ee 100644 --- a/BTCPayServer/wwwroot/main/site.css +++ b/BTCPayServer/wwwroot/main/site.css @@ -289,3 +289,13 @@ html[data-devenv]:before { padding: 1rem 0 !important; } } + +/* Richtext editor */ +.note-editor .table.table-sm { + border-collapse: collapse !important; +} + +.note-editor .table.table-sm th, +.note-editor .table.table-sm td { + border: 1px dotted var(--btcpay-color-neutral-400); +} diff --git a/BTCPayServer/wwwroot/payment-request-admin/main.js b/BTCPayServer/wwwroot/payment-request-admin/main.js index c8b6ea1f1..cd7154ebf 100644 --- a/BTCPayServer/wwwroot/payment-request-admin/main.js +++ b/BTCPayServer/wwwroot/payment-request-admin/main.js @@ -1,6 +1,11 @@ $(document).ready(function() { $(".richtext").summernote({ - minHeight: 300 + minHeight: 300, + tableClassName: 'table table-sm', + insertTableMaxSize: { + col: 5, + row: 10 + } }); }); diff --git a/BTCPayServer/wwwroot/payment-request/app.js b/BTCPayServer/wwwroot/payment-request/app.js index 302b7dcee..f686c072e 100644 --- a/BTCPayServer/wwwroot/payment-request/app.js +++ b/BTCPayServer/wwwroot/payment-request/app.js @@ -28,7 +28,6 @@ addLoadEvent(function (ev) { ended: false, endDiff: "", active: true, - lastUpdated: "", loading: false, timeoutState: "", customAmount: null @@ -40,6 +39,12 @@ addLoadEvent(function (ev) { }, settled: function () { return this.srvModel.amountDue <= 0; + }, + lastUpdated: function () { + return this.srvModel.lastUpdated && moment(this.srvModel.lastUpdated).calendar(); + }, + active: function () { + return !this.ended; } }, methods: { @@ -48,7 +53,6 @@ addLoadEvent(function (ev) { var endDateM = moment(this.srvModel.expiryDate); this.endDate = endDateM.format('MMMM Do YYYY'); this.ended = endDateM.isBefore(moment()); - } else { this.ended = false; this.endDate = null; @@ -63,8 +67,6 @@ addLoadEvent(function (ev) { this.endDiff = mDiffD > 0 ? mDiffD + " days" : mDiffH > 0 ? mDiffH + " hours" : mDiffM > 0 ? mDiffM + " minutes" : mDiffS > 0 ? mDiffS + " seconds" : ""; } - this.lastUpdated = moment(this.srvModel.lastUpdated).calendar(); - this.active = !this.ended; setTimeout(this.updateComputed, 1000); }, setLoading: function (val) {