Checkout v2: Confetti for processing payments (#4872)

Let's not spoil the fun for those paying on-chain.
This commit is contained in:
d11n 2023-04-13 01:40:21 +02:00 committed by GitHub
parent 58748a24da
commit a2d506c0db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 1 deletions

View File

@ -188,8 +188,10 @@ namespace BTCPayServer.Tests
});
s.Driver.Navigate().Refresh();
// Pay full amount
s.PayInvoice();
// Processing
TestUtils.Eventually(() =>
{
@ -197,8 +199,9 @@ namespace BTCPayServer.Tests
Assert.True(processingSection.Displayed);
Assert.Contains("Payment Received", processingSection.Text);
Assert.Contains("Your payment has been received and is now processing", processingSection.Text);
Assert.True(s.Driver.ElementDoesNotExist(By.Id("confetti")));
});
s.Driver.FindElement(By.Id("confetti"));
// Mine
s.MineBlockOnInvoiceCheckout();
TestUtils.Eventually(() =>

View File

@ -112,6 +112,7 @@
<div v-if="isProcessing" id="processing" key="processing">
<div class="top">
<span class="icn">
<div id="confetti" v-if="srvModel.celebratePayment" v-on:click="celebratePayment(5000)"></div>
<vc:icon symbol="payment-sent" />
</span>
<h4 v-t="'payment_received'"></h4>

View File

@ -192,6 +192,11 @@ function initApp() {
if (newValue === true && oldValue === false) {
// poll from here on
this.listenForConfirmations();
// celebration!
const self = this;
Vue.nextTick(function () {
self.celebratePayment(5000);
});
}
},
isSettled: function (newValue, oldValue) {