From 20f054e85ce51a66759c52d890adc8d6738e7a78 Mon Sep 17 00:00:00 2001 From: MrNaif2018 <39452697+MrNaif2018@users.noreply.github.com> Date: Thu, 21 Jan 2021 22:53:29 +0300 Subject: [PATCH] New payment statuses (#219) --- components/CheckoutModal.vue | 22 +++++++++++++--------- version.js | 2 +- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/components/CheckoutModal.vue b/components/CheckoutModal.vue index 020aa00..6ed1a14 100644 --- a/components/CheckoutModal.vue +++ b/components/CheckoutModal.vue @@ -76,23 +76,27 @@ export default { invoice: {}, tabitem: {}, loading: true, - status: "Pending", + status: "pending", texts: { expired: { icon: "mdi-close", text: "This invoice has expired", }, - complete: { + invalid: { + icon: "mdi-close", + text: "This invoice has been marked as invalid", + }, + paid: { icon: "mdi-check", text: "This invoice has been paid", }, - Failed: { - icon: "mdi-close", - text: "This invoice has failed", + confirmed: { + icon: "mdi-check", + text: "This invoice has been paid", }, - Invalid: { - icon: "mdi-close", - text: "This invoice is invalid", + complete: { + icon: "mdi-check", + text: "This invoice has been paid", }, "": { icon: "mdi-close", @@ -157,7 +161,7 @@ export default { websocket.onmessage = function (event) { const status = JSON.parse(event.data).status ref.status = status - if (status === "complete") { + if (["paid", "confirmed", "complete"].includes(status)) { ref.setSuccess(true) ref.clearContents() ref.clearCount() diff --git a/version.js b/version.js index ded920b..a48e758 100644 --- a/version.js +++ b/version.js @@ -1,3 +1,3 @@ -const VERSION = "0.1.0.2" +const VERSION = "0.2.0.0" export default VERSION