From ec780003f0c1bb1de562ab0a34d1336c10e97b32 Mon Sep 17 00:00:00 2001 From: Jeremy Wharton Date: Wed, 28 Jun 2023 09:17:28 -0500 Subject: [PATCH] web/satellite: add responsiveness to upgrade notification The upgrade notification has been updated to adapt to mobile screens accordance with our designs. Additionally, an issue where the notification would display "0B free included" when displayed in the All Projects Dashboard has been fixed. Change-Id: Ic13b9426ab5d6529c9d7b2ad8446a17da74905b1 --- .../console/consoleweb/consoleapi/auth.go | 2 + web/satellite/src/api/auth.ts | 2 +- .../notifications/UpgradeNotification.vue | 58 ++++++++++--------- web/satellite/src/types/users.ts | 1 + 4 files changed, 34 insertions(+), 29 deletions(-) diff --git a/satellite/console/consoleweb/consoleapi/auth.go b/satellite/console/consoleweb/consoleapi/auth.go index f49f1279f..8ebad8641 100644 --- a/satellite/console/consoleweb/consoleapi/auth.go +++ b/satellite/console/consoleweb/consoleapi/auth.go @@ -446,6 +446,7 @@ func (a *Auth) GetAccount(w http.ResponseWriter, r *http.Request) { Email string `json:"email"` Partner string `json:"partner"` ProjectLimit int `json:"projectLimit"` + ProjectStorageLimit int64 `json:"projectStorageLimit"` IsProfessional bool `json:"isProfessional"` Position string `json:"position"` CompanyName string `json:"companyName"` @@ -471,6 +472,7 @@ func (a *Auth) GetAccount(w http.ResponseWriter, r *http.Request) { user.Partner = string(consoleUser.UserAgent) } user.ProjectLimit = consoleUser.ProjectLimit + user.ProjectStorageLimit = consoleUser.ProjectStorageLimit user.IsProfessional = consoleUser.IsProfessional user.CompanyName = consoleUser.CompanyName user.Position = consoleUser.Position diff --git a/web/satellite/src/api/auth.ts b/web/satellite/src/api/auth.ts index d072b8405..f37fd8d21 100644 --- a/web/satellite/src/api/auth.ts +++ b/web/satellite/src/api/auth.ts @@ -15,7 +15,6 @@ import { } from '@/types/users'; import { HttpClient } from '@/utils/httpClient'; import { ErrorTokenExpired } from '@/api/errors/ErrorTokenExpired'; -import { Duration } from '@/utils/time'; /** * AuthHttpApi is a console Auth API. @@ -173,6 +172,7 @@ export class AuthHttpApi implements UsersApi { userResponse.partner, userResponse.password, userResponse.projectLimit, + userResponse.projectStorageLimit, userResponse.paidTier, userResponse.isMFAEnabled, userResponse.isProfessional, diff --git a/web/satellite/src/components/notifications/UpgradeNotification.vue b/web/satellite/src/components/notifications/UpgradeNotification.vue index ff71b48e4..c0d146f67 100644 --- a/web/satellite/src/components/notifications/UpgradeNotification.vue +++ b/web/satellite/src/components/notifications/UpgradeNotification.vue @@ -3,28 +3,25 @@