From 7348145b7da8ee259e042101b36cc9649a4259e2 Mon Sep 17 00:00:00 2001 From: Matteo Pagliazzi Date: Sun, 16 Dec 2018 15:39:37 +0100 Subject: [PATCH 1/3] fix(success-modal): misc fixes --- .../components/payments/sendGemsModal.vue | 22 ++++++++++--------- .../components/payments/successModal.vue | 5 ++++- website/common/locales/en/npc.json | 2 +- 3 files changed, 17 insertions(+), 12 deletions(-) diff --git a/website/client/components/payments/sendGemsModal.vue b/website/client/components/payments/sendGemsModal.vue index 717db43d1f..995b9d244d 100644 --- a/website/client/components/payments/sendGemsModal.vue +++ b/website/client/components/payments/sendGemsModal.vue @@ -149,17 +149,19 @@ export default { gemAmount: this.gift.gems.amount, }); this.close(); - this.$root.$emit('habitica:payment-success', { - paymentMethod: 'balance', - paymentCompleted: true, - paymentType: 'gift-gems-balance', - gift: { - gems: { - amount: this.gift.gems.amount, + setTimeout(() => { // wait for the send gem modal to be closed + this.$root.$emit('habitica:payment-success', { + paymentMethod: 'balance', + paymentCompleted: true, + paymentType: 'gift-gems-balance', + gift: { + gems: { + amount: this.gift.gems.amount, + }, }, - }, - giftReceiver: this.receiverName, - }); + giftReceiver: this.receiverName, + }); + }, 500); }, onHide () { // @TODO this breaks amazon purchases because when the amazon modal diff --git a/website/client/components/payments/successModal.vue b/website/client/components/payments/successModal.vue index f85d3e41a4..41c7f64554 100644 --- a/website/client/components/payments/successModal.vue +++ b/website/client/components/payments/successModal.vue @@ -14,7 +14,7 @@ .row .col-12.modal-body-col template(v-if="paymentData.paymentType === 'gems'") - span(v-once) {{ $t('paymentYouReceived') }} + strong(v-once) {{ $t('paymentYouReceived') }} .details-block.gems .svg-icon(v-html="icons.gem", v-once) span 20 @@ -55,6 +55,8 @@ background: $green-10; border-top-right-radius: 8px; border-top-left-radius: 8px; + border-bottom: none; + h2 { color: white; } @@ -121,6 +123,7 @@ border-bottom-right-radius: 8px; border-bottom-left-radius: 8px; justify-content: center; + border-top: none; .small-text { font-style: normal; diff --git a/website/common/locales/en/npc.json b/website/common/locales/en/npc.json index 5cfbc75f28..1aac3f4178 100644 --- a/website/common/locales/en/npc.json +++ b/website/common/locales/en/npc.json @@ -119,7 +119,7 @@ "paymentYouReceived": "You received:", "paymentYouSentGems": "You sent <%= name %>:", "paymentYouSentSubscription": "You sent <%= name %> a <%= months %>-months Habitica subscription.", - "paymentSubBilling": "Your subscription will be billed <%= amount %>$ every <%= months %> months.", + "paymentSubBilling": "Your subscription will be billed <%= amount %>$ every <%= months %> months.", "success": "Success!", "classGear": "Class Gear", From 5e76d6df217b05bc195052bd7d9f0c04f6b1c527 Mon Sep 17 00:00:00 2001 From: Matteo Pagliazzi Date: Mon, 17 Dec 2018 13:12:35 +0100 Subject: [PATCH 2/3] fix(i18n): position of $ sign --- website/common/locales/en/npc.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/common/locales/en/npc.json b/website/common/locales/en/npc.json index 1aac3f4178..e7236ceb39 100644 --- a/website/common/locales/en/npc.json +++ b/website/common/locales/en/npc.json @@ -119,7 +119,7 @@ "paymentYouReceived": "You received:", "paymentYouSentGems": "You sent <%= name %>:", "paymentYouSentSubscription": "You sent <%= name %> a <%= months %>-months Habitica subscription.", - "paymentSubBilling": "Your subscription will be billed <%= amount %>$ every <%= months %> months.", + "paymentSubBilling": "Your subscription will be billed $<%= amount %> every <%= months %> months.", "success": "Success!", "classGear": "Class Gear", From 5b21e62647b4bc452d2e6b96d9f8a582f987077b Mon Sep 17 00:00:00 2001 From: Matteo Pagliazzi Date: Tue, 18 Dec 2018 15:02:03 +0100 Subject: [PATCH 3/3] fix(i18n): format --- website/common/locales/en/npc.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/common/locales/en/npc.json b/website/common/locales/en/npc.json index e7236ceb39..3807b3fc1e 100644 --- a/website/common/locales/en/npc.json +++ b/website/common/locales/en/npc.json @@ -119,7 +119,7 @@ "paymentYouReceived": "You received:", "paymentYouSentGems": "You sent <%= name %>:", "paymentYouSentSubscription": "You sent <%= name %> a <%= months %>-months Habitica subscription.", - "paymentSubBilling": "Your subscription will be billed $<%= amount %> every <%= months %> months.", + "paymentSubBilling": "Your subscription will be billed $<%= amount %> every <%= months %> months.", "success": "Success!", "classGear": "Class Gear",