diff --git a/BTCPayServer/Views/PaymentRequest/MinimalPaymentRequest.cshtml b/BTCPayServer/Views/PaymentRequest/MinimalPaymentRequest.cshtml
index 152b7262b..f960291bb 100644
--- a/BTCPayServer/Views/PaymentRequest/MinimalPaymentRequest.cshtml
+++ b/BTCPayServer/Views/PaymentRequest/MinimalPaymentRequest.cshtml
@@ -147,7 +147,8 @@
}
- }else if (Model.Archived)
+ }
+ else if (Model.Archived)
{
@@ -162,13 +163,6 @@
-
diff --git a/BTCPayServer/Views/PaymentRequest/ViewPaymentRequest.cshtml b/BTCPayServer/Views/PaymentRequest/ViewPaymentRequest.cshtml
index 1cddd13dc..a1db9907e 100644
--- a/BTCPayServer/Views/PaymentRequest/ViewPaymentRequest.cshtml
+++ b/BTCPayServer/Views/PaymentRequest/ViewPaymentRequest.cshtml
@@ -12,96 +12,162 @@
@Model.Title
-
-
+
+
+
@if (Model.CustomCSSLink != null)
{
}
- @if (!Context.Request.Query.ContainsKey("simple"))
- {
-
-
-
- @*We need to make sure btcpay.js is not bundled, else it will not work if there is a RootPath*@
-
- }
-
-
-
+
+
+ @*We need to make sure btcpay.js is not bundled, else it will not work if there is a RootPath*@
+
@Safe.Raw(Model.EmbeddedCSS)
-
-
-
-@if (Context.Request.Query.ContainsKey("simple"))
-{
- @await Html.PartialAsync("MinimalPaymentRequest", Model)
-}
-else
-{
-
- @await Html.PartialAsync("MinimalPaymentRequest", Model)
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
- Request amount:
- {{srvModel.amountFormatted}}
-
-
- Paid so far:
- {{srvModel.amountCollectedFormatted}}
-
-
- Amount due:
- {{srvModel.amountDueFormatted}}
-
-
-
-
+
+
@Model.Title
-
-
-
-
+
+ Last Updated
+
+ @Model.LastUpdated.ToString("g")
+
+ Print
+
+
+ Copy Link
+
+
+
+ @Model.Status
+ Settled
+ Request Expired
+ Expires in {{endDiff}}
+ {{srvModel.status}}
+
+
+
+
+
+
+ Archived
+
+
+
+
+
+
+
+
+
+
+ Loading...
+
+ Pay Invoice
+
+
+
+ Loading...
+
+ Cancel Invoice
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Invoice Summary
+
+ @if (Model.Description != null && Model.Description != "" && Model.Description != " ")
+ {
+ @Safe.Raw(Model.Description)
+ }
+
+
+
+
+
+
Payment Details
+
+
+
+ Request amount:
+ {{srvModel.amountFormatted}}
+
+
+ Paid so far:
+ {{srvModel.amountCollectedFormatted}}
+
+
+ Amount due:
+ {{srvModel.amountDueFormatted}}
+
+
+
+
+
+
+
+
+
+
Payment History
+
+
+
Invoice #
Price
Expiry
Status
-
-
+
+
No payments made yet
@@ -144,85 +210,19 @@ else
-
-
- Archived
-
-
-
-
-
-
-
-
-
-
-
-
- Loading...
-
-
- Pay now
-
-
-
- Loading...
-
-
- Cancel current invoice
-
-
-
-
-
-
+
+
-
-
-
-
+
+
-}
diff --git a/BTCPayServer/Views/Shared/_Layout.cshtml b/BTCPayServer/Views/Shared/_Layout.cshtml
index a4d039543..6090b7e39 100644
--- a/BTCPayServer/Views/Shared/_Layout.cshtml
+++ b/BTCPayServer/Views/Shared/_Layout.cshtml
@@ -13,20 +13,10 @@
@RenderSection("HeadScripts", required: false)
@RenderSection("HeaderContent", false)
-
diff --git a/BTCPayServer/bundleconfig.json b/BTCPayServer/bundleconfig.json
index 31e41a3fe..0c2f3bd4a 100644
--- a/BTCPayServer/bundleconfig.json
+++ b/BTCPayServer/bundleconfig.json
@@ -166,7 +166,7 @@
]
},
{
- "outputFileName": "wwwroot/bundles/payment-request-bundle-1.min.js",
+ "outputFileName": "wwwroot/bundles/payment-request-bundle.min.js",
"inputFiles": [
"wwwroot/vendor/vuejs/vue.min.js",
"wwwroot/vendor/babel-polyfill/polyfill.min.js",
@@ -174,13 +174,8 @@
"wwwroot/vendor/bootstrap-vue/bootstrap-vue.js",
"wwwroot/vendor/signalr/signalr.js",
"wwwroot/vendor/animejs/anime.min.js",
+ "wwwroot/vendor/moment/moment.min.js",
"wwwroot/payment-request/**/*.js"
- ]
- },
- {
- "outputFileName": "wwwroot/bundles/payment-request-bundle-2.min.js",
- "inputFiles": [
- "wwwroot/vendor/moment/moment.min.js"
],
"minify": {
"enabled": false
@@ -191,7 +186,7 @@
"inputFiles": [
"wwwroot/vendor/font-awesome/css/font-awesome.min.css",
"wwwroot/vendor/bootstrap-vue/bootstrap-vue.css",
- "wwwroot/payment-request/**/*.css"
+ "wwwroot/main/site.css"
]
},
{
diff --git a/BTCPayServer/wwwroot/main/site.css b/BTCPayServer/wwwroot/main/site.css
index 835d14f77..919a86e56 100644
--- a/BTCPayServer/wwwroot/main/site.css
+++ b/BTCPayServer/wwwroot/main/site.css
@@ -176,8 +176,18 @@ pre {
background-color: lightgray;
}
-[v-cloak] > * { display:none }
-[v-cloak]::before { content: "loading…" }
+
+.hide-when-js {
+ display: block !important;
+}
+
+.only-for-js {
+ display: none !important;
+}
+
+[v-cloak] { display:none }
+[v-cloak-loading] > * { display:none }
+[v-cloak-loading]::before { content: "loading…" }
.cursor-pointer{
cursor: pointer;
diff --git a/BTCPayServer/wwwroot/payment-request/app.js b/BTCPayServer/wwwroot/payment-request/app.js
index a803b0cf1..302b7dcee 100644
--- a/BTCPayServer/wwwroot/payment-request/app.js
+++ b/BTCPayServer/wwwroot/payment-request/app.js
@@ -18,7 +18,6 @@ function addLoadEvent(func) {
addLoadEvent(function (ev) {
Vue.use(Toasted);
-
app = new Vue({
el: '#app',
data: function () {
@@ -83,6 +82,13 @@ addLoadEvent(function (ev) {
eventAggregator.$emit("pay", amount);
},
+ copyLink: function (e) {
+ if (navigator.clipboard) {
+ e.preventDefault();
+ navigator.clipboard.writeText(window.location);
+ e.currentTarget.blur();
+ }
+ },
cancelPayment: function (amount) {
this.setLoading(true);
var self = this;
@@ -100,9 +106,6 @@ addLoadEvent(function (ev) {
return str;
},
- print:function(){
- window.print();
- },
submitCustomAmountForm : function(e){
if (e) {
e.preventDefault();
@@ -115,10 +118,10 @@ addLoadEvent(function (ev) {
}
},
mounted: function () {
-
this.customAmount = (this.srvModel.amountDue || 0).noExponents();
hubListener.connect();
var self = this;
+
eventAggregator.$on("invoice-created", function (invoiceId) {
self.setLoading(false);
btcpay.showInvoice(invoiceId);
diff --git a/BTCPayServer/wwwroot/payment-request/styles/main.css b/BTCPayServer/wwwroot/payment-request/styles/main.css
deleted file mode 100644
index 23f3e7b53..000000000
--- a/BTCPayServer/wwwroot/payment-request/styles/main.css
+++ /dev/null
@@ -1,7 +0,0 @@
-[v-cloak] > * {
- display: none
-}
-
-[v-cloak]::before {
- content: "loading…"
-}