diff --git a/web/satellite/src/components/account/billing/billingHistory/BillingHistory.vue b/web/satellite/src/components/account/billing/billingHistory/BillingHistory.vue index f196abb67..421952699 100644 --- a/web/satellite/src/components/account/billing/billingHistory/BillingHistory.vue +++ b/web/satellite/src/components/account/billing/billingHistory/BillingHistory.vue @@ -17,6 +17,7 @@ @@ -80,6 +81,7 @@ export default class BillingHistory extends Vue { .billing-history-area { margin-top: 83px; + padding: 0 0 80px 0; background-color: #f5f6fa; font-family: 'font_regular', sans-serif; diff --git a/web/satellite/src/components/account/billing/billingHistory/BillingItem.vue b/web/satellite/src/components/account/billing/billingHistory/BillingItem.vue index 71d4635bc..cbf45e293 100644 --- a/web/satellite/src/components/account/billing/billingHistory/BillingItem.vue +++ b/web/satellite/src/components/account/billing/billingHistory/BillingItem.vue @@ -65,7 +65,7 @@ export default class BillingItem extends Vue { border-top: 1px solid rgba(169, 181, 193, 0.3); &__item { - width: 25%; + min-width: 25%; font-family: 'font_medium', sans-serif; font-size: 16px; text-align: left; @@ -74,15 +74,15 @@ export default class BillingItem extends Vue { } .description { - width: 31%; + min-width: 31%; } .status { - width: 12%; + min-width: 12%; } .amount { - width: 22%; + min-width: 22%; margin: 0; } diff --git a/web/satellite/src/components/account/billing/billingHistory/SortingHeader.vue b/web/satellite/src/components/account/billing/billingHistory/SortingHeader.vue index 19424828f..62a362710 100644 --- a/web/satellite/src/components/account/billing/billingHistory/SortingHeader.vue +++ b/web/satellite/src/components/account/billing/billingHistory/SortingHeader.vue @@ -35,7 +35,7 @@ export default class SortingHeader extends Vue {} &__item { text-align: left; - width: 25%; + min-width: 25%; &__name { font-family: 'font_medium', sans-serif; @@ -48,15 +48,15 @@ export default class SortingHeader extends Vue {} } .description { - width: 31%; + min-width: 31%; } .status { - width: 12%; + min-width: 12%; } .amount { - width: 22%; + min-width: 22%; margin: 0; } diff --git a/web/satellite/src/components/account/billing/paymentMethods/PaymentMethods.vue b/web/satellite/src/components/account/billing/paymentMethods/PaymentMethods.vue index 14785b10f..e50f2bcbc 100644 --- a/web/satellite/src/components/account/billing/paymentMethods/PaymentMethods.vue +++ b/web/satellite/src/components/account/billing/paymentMethods/PaymentMethods.vue @@ -42,12 +42,21 @@

Deposit STORJ Tokens via Coin Payments

- +
+ loading gif + +

Add Credit or Debit Card

@@ -56,12 +65,21 @@ ref="stripeCardInput" :on-stripe-response-callback="addCard" /> - +
+ loading gif + +
{ + if (this.isTransactionLoading) return; + + this.isTransactionLoading = true; + if (this.tokenDepositValue >= this.MAX_TOKEN_AMOUNT_IN_DOLLARS || this.tokenDepositValue === 0) { await this.$notify.error('Deposit amount must be more than 0 and less than 1000000'); this.tokenDepositValue = this.DEFAULT_TOKEN_DEPOSIT_VALUE; this.areaState = PaymentMethodsBlockState.DEFAULT; + this.isTransactionLoading = false; return; } @@ -194,6 +219,7 @@ export default class PaymentMethods extends Vue { } } catch (error) { await this.$notify.error(error.message); + this.isTransactionLoading = false; } this.$segment.track(SegmentEvent.PAYMENT_METHOD_ADDED, { @@ -205,9 +231,11 @@ export default class PaymentMethods extends Vue { await this.$store.dispatch(GET_BILLING_HISTORY); } catch (error) { await this.$notify.error(error.message); + this.isTransactionLoading = false; } this.areaState = PaymentMethodsBlockState.DEFAULT; + this.isTransactionLoading = false; } public async onConfirmAddStripe(): Promise { @@ -225,18 +253,16 @@ export default class PaymentMethods extends Vue { } public async addCard(token: string) { - if (this.isLoading) { - return; - } + if (this.isAddingCardLoading) return; - this.isLoading = true; + this.isAddingCardLoading = true; try { await this.$store.dispatch(ADD_CREDIT_CARD, token); } catch (error) { await this.$notify.error(error.message); - this.isLoading = false; + this.isAddingCardLoading = false; return; } @@ -249,12 +275,12 @@ export default class PaymentMethods extends Vue { await this.$store.dispatch(GET_CREDIT_CARDS); } catch (error) { await this.$notify.error(error.message); - this.isLoading = false; + this.isAddingCardLoading = false; } this.areaState = PaymentMethodsBlockState.DEFAULT; - this.isLoading = false; + this.isAddingCardLoading = false; } } @@ -343,6 +369,12 @@ export default class PaymentMethods extends Vue { width: 60%; min-width: 400px; } + + &__submit-area { + display: flex; + justify-content: space-between; + align-items: center; + } } &__existing-cards-container { @@ -360,4 +392,9 @@ export default class PaymentMethods extends Vue { margin-right: 30px; } } + + .payment-loading-image { + width: 80px; + height: 40px; + } diff --git a/web/satellite/static/images/account/billing/loading.gif b/web/satellite/static/images/account/billing/loading.gif new file mode 100644 index 000000000..54a8d3b4d Binary files /dev/null and b/web/satellite/static/images/account/billing/loading.gif differ