From 083b3d6fc1187713e42541414ba18fc04d4f274c Mon Sep 17 00:00:00 2001 From: Vitalii Date: Wed, 10 May 2023 15:00:32 +0300 Subject: [PATCH] web/satellite: added modal to update single project limit Added new modal where user can update storage or bandwidth limit (if Pro tier). Issue: https://github.com/storj/storj/issues/5827 Change-Id: Ic3ae6b7a73d055b4eac93d4e2faad7bf26cb9d73 --- .../modals/ChangeProjectLimitModal.vue | 530 ++++++++++++++++++ .../project/dashboard/LimitCard.vue | 6 +- .../project/dashboard/LimitsArea.vue | 29 +- .../project/dashboard/ProjectDashboard.vue | 14 + web/satellite/src/store/modules/appStore.ts | 7 + web/satellite/src/types/projects.ts | 5 + .../utils/constants/analyticsEventNames.ts | 1 + .../src/utils/constants/appStatePopUps.ts | 3 + web/satellite/static/images/modals/burger.png | Bin 0 -> 122 bytes web/satellite/static/images/modals/limit.svg | 8 + 10 files changed, 584 insertions(+), 19 deletions(-) create mode 100644 web/satellite/src/components/modals/ChangeProjectLimitModal.vue create mode 100644 web/satellite/static/images/modals/burger.png create mode 100644 web/satellite/static/images/modals/limit.svg diff --git a/web/satellite/src/components/modals/ChangeProjectLimitModal.vue b/web/satellite/src/components/modals/ChangeProjectLimitModal.vue new file mode 100644 index 000000000..60e252e7d --- /dev/null +++ b/web/satellite/src/components/modals/ChangeProjectLimitModal.vue @@ -0,0 +1,530 @@ +// Copyright (C) 2023 Storj Labs, Inc. +// See LICENSE for copying information. + + + + + + diff --git a/web/satellite/src/components/project/dashboard/LimitCard.vue b/web/satellite/src/components/project/dashboard/LimitCard.vue index f0819f774..f68bb03f0 100644 --- a/web/satellite/src/components/project/dashboard/LimitCard.vue +++ b/web/satellite/src/components/project/dashboard/LimitCard.vue @@ -18,7 +18,7 @@

{{ usedInfo }}

-

{{ availableTitle }}

+

{{ availableTitle }}

{{ actionTitle }}

=> { } } } + +.alight-right { + text-align: right; +} diff --git a/web/satellite/src/components/project/dashboard/LimitsArea.vue b/web/satellite/src/components/project/dashboard/LimitsArea.vue index 5083c324c..877139439 100644 --- a/web/satellite/src/components/project/dashboard/LimitsArea.vue +++ b/web/satellite/src/components/project/dashboard/LimitsArea.vue @@ -12,7 +12,7 @@ :used-info="`Storage limit: ${usedOrLimitFormatted(limits.storageLimit, true)}`" :available-title="`${availableFormatted(limits.storageLimit - limits.storageUsed)} Available`" :action-title="usageActionTitle(storageUsed)" - :on-action="storageAction" + :on-action="() => usageAction(LimitToChange.Storage)" :is-loading="isLoading" use-action /> @@ -25,7 +25,7 @@ :used-info="`Download limit: ${usedOrLimitFormatted(limits.bandwidthLimit, true)} per month`" :available-title="`${availableFormatted(limits.bandwidthLimit - limits.bandwidthUsed)} Available`" :action-title="usageActionTitle(bandwidthUsed)" - :on-action="bandwidthAction" + :on-action="() => usageAction(LimitToChange.Bandwidth)" :is-loading="isLoading" use-action /> @@ -84,7 +84,7 @@