From ce18e614beb4d86a29286da31d95e917ecce58e9 Mon Sep 17 00:00:00 2001 From: Natalie L <78037386+CuriousMagpie@users.noreply.github.com> Date: Thu, 21 Jul 2022 15:06:50 -0400 Subject: [PATCH] Gifting modal design - amazonModal.vue update (#14131) * update selectUserModal.vue * more updates to selectUserModal.vue, typo fix in subscriber.json * remove exact sizing for selectUserModal.vue * update to size for selectUserModal.vue * added sendGiftModal.vue file * updates to selectUser & sendGift modals * making the modals go & position cursor * working working working * added a return to method * avatar display & placeholder profile.name and username * subscription-options added * added menu row & started on gem options * Added selectPage function, have not tested. * updated habitica-images * state changes * bringing in gem counter * arranging elements * state changes, gem input boxes * styling sendGiftModal.vue * more sendGiftModal.vue styling and new close.svg icon * more styling! * and more styling of send own gems part of page * images update * more styling of own gems & some attempts to adjust :class on the menu * styling styling styling * replace +/- svg, styling * styling, mostly * new SVGs * stylin' * reverting svg changes * no more stylin' * finally got the +/- icons to show up...but they're the wrong color * solved svg icon color problem! :) * habitica-images * working on sendGift part of button * trying to make it do math, failing * more attempts at math * +/- buttons work on gem pages & cost calculation on buyGems * trying to get hover colors working on +/- svgs * formatted dollar amount as currency * css/html for subscription-options & payments-buttons simplified * swag at payments-buttons parameter (not tested) * send gems from own balance works! * working on starting page * increment gem amount limited to maxGems and not < 0 * uncommented onHide() * got bg color on sub options to work! yay! * payment buttons! * making g1g1 look good * position modal on page properly & code clean-up * Changes as requested! * small color update * fixed ternary function * chore(html): indentation and comments * fix(fn): correct catch for under-0 * chore(json): whitespace * update gem styling; add linebreak to notifications.vue bc linter * updating subscriptionOptions * snackbar css fix * reverting commit e16c12f * removing merge conflict markers * just a little comment * fixed some navigation, clear input field on selectPage, cleaned up code; another try at subscriptionOption.vue * merge upstream/develop * update selectPage() to disable Gems menu items when on 'ownGems' or 'buyGems' states * working on subscriptionOptions.vue logic * fix(script): changed props & added updateSubscriptionData() * fix(script): forgot to call updateSubscriptionData() * fix(scripts): corrected :userReceivingGift on sendGiftModal.vue * fix(scripts): correct props userReceivingGift to an Object * fix(scripts): corrected v-if & revised props * fix(style/html/whitespace): updated css for close.svg and added missing * style(radio-buttons): updated focus states and added hover states * style(radio-buttons): refined focus and hover states * fix(function): changed buyGemsLink to buyGems; still working on menu * style(radio buttons): ensured consistent display of radio buttons through-out site; still struggling with hover states * style(radio buttons): updated focus/active/hover to match design & removed unnecessary code * fix: set default subscription option to 1 month * fix(function): add default amounts to gem states when modal selected from user profile * fix(build): use develop package json * fix: SCSS commenting & abstracted setGemsDefault() * fix(packages): revert to develop * fix: remove unnecessary console.log statement * fix(payments): storePaymentStatusAndReload() modified Co-authored-by: SabreCat --- website/client/src/components/payments/amazonModal.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/client/src/components/payments/amazonModal.vue b/website/client/src/components/payments/amazonModal.vue index 578c627b08..8641a957bb 100644 --- a/website/client/src/components/payments/amazonModal.vue +++ b/website/client/src/components/payments/amazonModal.vue @@ -198,7 +198,7 @@ export default { appState.newGroup = false; appState.group = pick(this.amazonPayments.group, ['_id', 'memberCount', 'name']); } - } else if (paymentType.indexOf('gift-') === 0) { + } else if (paymentType && paymentType.indexOf('gift-') === 0) { appState.gift = this.amazonPayments.gift; appState.giftReceiver = this.amazonPayments.giftReceiver; } else if (paymentType === 'gems') {