From bf28a468030daf72b575949fb0acf8fb14a4e0dc Mon Sep 17 00:00:00 2001 From: Sabe Jones Date: Wed, 16 Dec 2020 16:33:47 -0600 Subject: [PATCH] feat(event): one more banner --- .../src/components/payments/sendGemsModal.vue | 23 +----- .../client/src/components/settings/index.vue | 73 +++++++++++++++++++ .../src/components/settings/subscription.vue | 57 ++++----------- website/common/locales/en/limited.json | 1 + 4 files changed, 88 insertions(+), 66 deletions(-) diff --git a/website/client/src/components/payments/sendGemsModal.vue b/website/client/src/components/payments/sendGemsModal.vue index 192f6e1dc7..a5f7db986e 100644 --- a/website/client/src/components/payments/sendGemsModal.vue +++ b/website/client/src/components/payments/sendGemsModal.vue @@ -78,9 +78,7 @@
-
+
-
-

- {{ $t('winterPromoGiftHeader') }} -

-

- {{ $t('winterPromoGiftDetails1') }} -

-

- {{ $t('winterPromoGiftDetails2') }} -

-
@@ -224,7 +208,6 @@ export default { ...mapState({ userLoggedIn: 'user.data', originalSubscriptionBlocks: 'content.subscriptionBlocks', - currentEvent: 'worldState.data.currentEvent', }), subscriptionBlocks () { let subscriptionBlocks = toArray(this.originalSubscriptionBlocks); @@ -250,10 +233,6 @@ export default { } return this.userReceivingGems.profile.name; }, - columnClass () { - if (this.currentEvent && this.currentEvent.promo && this.currentEvent.promo === 'g1g1') return 'col-md-5'; - return 'col-md-12'; - }, }, mounted () { this.$root.$on('habitica::send-gems', data => { diff --git a/website/client/src/components/settings/index.vue b/website/client/src/components/settings/index.vue index 61e6f4bee7..e22daeef68 100644 --- a/website/client/src/components/settings/index.vue +++ b/website/client/src/components/settings/index.vue @@ -45,18 +45,91 @@ {{ $t('notifications') }} +
+
+
+
+ {{ $t('g1g1Event') }} +

{{ $t('g1g1Details') }}

+
+
+
+
+ + diff --git a/website/client/src/components/settings/subscription.vue b/website/client/src/components/settings/subscription.vue index d96daf1844..0a52fbefd4 100644 --- a/website/client/src/components/settings/subscription.vue +++ b/website/client/src/components/settings/subscription.vue @@ -113,7 +113,6 @@
@@ -269,13 +265,11 @@
@@ -289,43 +283,22 @@
-
-
-
-
-
- {{ $t('giftSubscription') }} -
- - {{ $t('giftASubscription') }} - -
+
-
-

- {{ $t('winterPromoGiftHeader') }} -

-

- {{ $t('winterPromoGiftDetails1') }} -

-

- {{ $t('winterPromoGiftDetails2') }} -

+
+ {{ $t('giftSubscription') }}
+ + {{ $t('giftASubscription') }} +
@@ -624,11 +597,7 @@ export default { }; }, computed: { - ...mapState({ - user: 'user.data', - credentials: 'credentials', - currentEvent: 'worldState.data.currentEvent', - }), + ...mapState({ user: 'user.data', credentials: 'credentials' }), purchasedPlanIdInfo () { if (!this.subscriptionBlocks[this.user.purchased.plan.planId]) { // @TODO: find which subs are in the common diff --git a/website/common/locales/en/limited.json b/website/common/locales/en/limited.json index f4bd8654de..620b08ea4b 100644 --- a/website/common/locales/en/limited.json +++ b/website/common/locales/en/limited.json @@ -190,6 +190,7 @@ "g1g1Announcement": "Gift a subscription and get a subscription free event going on now!", "g1g1Details": "Gift a subscription to a friend, and you'll receive the same subscription for free!", "g1g1": "Gift One, Get One", + "g1g1Event": "Gift One, Get One event going on now!", "g1g1Returning": "In honor of the season, we’re bringing back a very special promotion. Now when you gift a subscription, you’ll receive the same in return!", "howItWorks": "How it Works", "g1g1HowItWorks": "Type in the username of the account you’d like to gift to. From there, pick the sub length you’d like to gift and check out. Your account will automatically be rewarded with the same level of subscription you just gifted.",