From e5012fcb3d5b055909230eaba071a6e46bffcdae Mon Sep 17 00:00:00 2001 From: VitaliiShpital Date: Tue, 4 Aug 2020 20:36:49 +0300 Subject: [PATCH] web/satellite: info bars for accounts with no paywall WHAT: info bars for accounts with no paywall implemented, USR-976 WHY: we should notify users with no paywall that available coupon value is running low or coupon is used Change-Id: I1a84afce890515b3aaedf1f0b8d359499af05471 --- web/satellite/src/api/payments.ts | 2 +- .../components/navigation/navigationArea.scss | 8 --- .../noPaywallInfoBar/NoPaywallInfoBar.vue | 53 +++++++++++++++ .../noPaywallInfoBar/noPaywallInfoBar.html | 18 ++++++ .../noPaywallInfoBar/noPaywallInfoBar.scss | 39 +++++++++++ .../onboardingTour/OnboardingTourArea.vue | 3 +- web/satellite/src/store/modules/payments.ts | 6 +- web/satellite/src/types/payments.ts | 15 ++++- web/satellite/src/views/DashboardArea.vue | 29 ++++++++- .../paymentMethods/PaymentMethods.spec.ts | 10 +-- .../tests/unit/views/NoPaywallInfoBar.spec.ts | 64 +++++++++++++++++++ .../__snapshots__/DashboardArea.spec.ts.snap | 4 ++ .../NoPaywallInfoBar.spec.ts.snap | 25 ++++++++ 13 files changed, 255 insertions(+), 21 deletions(-) create mode 100644 web/satellite/src/components/noPaywallInfoBar/NoPaywallInfoBar.vue create mode 100644 web/satellite/src/components/noPaywallInfoBar/noPaywallInfoBar.html create mode 100644 web/satellite/src/components/noPaywallInfoBar/noPaywallInfoBar.scss create mode 100644 web/satellite/tests/unit/views/NoPaywallInfoBar.spec.ts create mode 100644 web/satellite/tests/unit/views/__snapshots__/NoPaywallInfoBar.spec.ts.snap diff --git a/web/satellite/src/api/payments.ts b/web/satellite/src/api/payments.ts index a484507c6..681c92640 100644 --- a/web/satellite/src/api/payments.ts +++ b/web/satellite/src/api/payments.ts @@ -269,7 +269,7 @@ export class PaymentsHttpApi implements PaymentsApi { throw new ErrorUnauthorized(); } - throw new Error('can not process coin payment'); + throw new Error('can not get paywall status'); } return await response.json(); diff --git a/web/satellite/src/components/navigation/navigationArea.scss b/web/satellite/src/components/navigation/navigationArea.scss index 8b296b9e9..f0e736f4c 100644 --- a/web/satellite/src/components/navigation/navigationArea.scss +++ b/web/satellite/src/components/navigation/navigationArea.scss @@ -180,11 +180,3 @@ a { height: calc(100vh - 70px); } } - -@media screen and (max-height: 700px) { - - .navigation-area { - padding: 20px 0; - height: calc(100vh - 40px); - } -} diff --git a/web/satellite/src/components/noPaywallInfoBar/NoPaywallInfoBar.vue b/web/satellite/src/components/noPaywallInfoBar/NoPaywallInfoBar.vue new file mode 100644 index 000000000..56d177d24 --- /dev/null +++ b/web/satellite/src/components/noPaywallInfoBar/NoPaywallInfoBar.vue @@ -0,0 +1,53 @@ +// Copyright (C) 2020 Storj Labs, Inc. +// See LICENSE for copying information. + +