satellite/{console,web}: add browser card view config flag

This change adds config flag to toggle whether the browser card view
can be used.

Issue: #6427

Change-Id: I19986ffe9a778b8752549a4d54b318fff0386479
This commit is contained in:
Wilfred Asomani 2023-10-27 15:32:05 +00:00 committed by Storj Robot
parent f2eb6942c5
commit b3e908f72f
4 changed files with 7 additions and 0 deletions

View File

@ -49,6 +49,7 @@ type FrontendConfig struct {
GalleryViewEnabled bool `json:"galleryViewEnabled"` GalleryViewEnabled bool `json:"galleryViewEnabled"`
NeededTransactionConfirmations int `json:"neededTransactionConfirmations"` NeededTransactionConfirmations int `json:"neededTransactionConfirmations"`
ObjectBrowserPaginationEnabled bool `json:"objectBrowserPaginationEnabled"` ObjectBrowserPaginationEnabled bool `json:"objectBrowserPaginationEnabled"`
ObjectBrowserCardViewEnabled bool `json:"objectBrowserCardViewEnabled"`
BillingFeaturesEnabled bool `json:"billingFeaturesEnabled"` BillingFeaturesEnabled bool `json:"billingFeaturesEnabled"`
UnregisteredInviteEmailsEnabled bool `json:"unregisteredInviteEmailsEnabled"` UnregisteredInviteEmailsEnabled bool `json:"unregisteredInviteEmailsEnabled"`
FreeTierInvitesEnabled bool `json:"freeTierInvitesEnabled"` FreeTierInvitesEnabled bool `json:"freeTierInvitesEnabled"`

View File

@ -110,6 +110,7 @@ type Config struct {
UseVuetifyProject bool `help:"whether to use vuetify POC project" default:"false"` UseVuetifyProject bool `help:"whether to use vuetify POC project" default:"false"`
VuetifyHost string `help:"the subdomain the vuetify POC project should be hosted on" default:""` VuetifyHost string `help:"the subdomain the vuetify POC project should be hosted on" default:""`
ObjectBrowserPaginationEnabled bool `help:"whether to use object browser pagination" default:"false"` ObjectBrowserPaginationEnabled bool `help:"whether to use object browser pagination" default:"false"`
ObjectBrowserCardViewEnabled bool `help:"whether to use object browser card view" default:"false"`
OauthCodeExpiry time.Duration `help:"how long oauth authorization codes are issued for" default:"10m"` OauthCodeExpiry time.Duration `help:"how long oauth authorization codes are issued for" default:"10m"`
OauthAccessTokenExpiry time.Duration `help:"how long oauth access tokens are issued for" default:"24h"` OauthAccessTokenExpiry time.Duration `help:"how long oauth access tokens are issued for" default:"24h"`
@ -749,6 +750,7 @@ func (server *Server) frontendConfigHandler(w http.ResponseWriter, r *http.Reque
GalleryViewEnabled: server.config.GalleryViewEnabled, GalleryViewEnabled: server.config.GalleryViewEnabled,
NeededTransactionConfirmations: server.neededTokenPaymentConfirmations, NeededTransactionConfirmations: server.neededTokenPaymentConfirmations,
ObjectBrowserPaginationEnabled: server.config.ObjectBrowserPaginationEnabled, ObjectBrowserPaginationEnabled: server.config.ObjectBrowserPaginationEnabled,
ObjectBrowserCardViewEnabled: server.config.ObjectBrowserCardViewEnabled,
BillingFeaturesEnabled: server.config.BillingFeaturesEnabled, BillingFeaturesEnabled: server.config.BillingFeaturesEnabled,
UnregisteredInviteEmailsEnabled: server.config.UnregisteredInviteEmailsEnabled, UnregisteredInviteEmailsEnabled: server.config.UnregisteredInviteEmailsEnabled,
FreeTierInvitesEnabled: server.config.FreeTierInvitesEnabled, FreeTierInvitesEnabled: server.config.FreeTierInvitesEnabled,

View File

@ -331,6 +331,9 @@ compensation.withheld-percents: 75,75,75,50,50,50,25,25,25,0,0,0,0,0,0
# how long oauth refresh tokens are issued for # how long oauth refresh tokens are issued for
# console.oauth-refresh-token-expiry: 720h0m0s # console.oauth-refresh-token-expiry: 720h0m0s
# whether to use object browser card view
# console.object-browser-card-view-enabled: false
# whether to use object browser pagination # whether to use object browser pagination
# console.object-browser-pagination-enabled: false # console.object-browser-pagination-enabled: false

View File

@ -46,6 +46,7 @@ export class FrontendConfig {
galleryViewEnabled: boolean; galleryViewEnabled: boolean;
neededTransactionConfirmations: number; neededTransactionConfirmations: number;
objectBrowserPaginationEnabled: boolean; objectBrowserPaginationEnabled: boolean;
objectBrowserCardViewEnabled: boolean;
billingFeaturesEnabled: boolean; billingFeaturesEnabled: boolean;
unregisteredInviteEmailsEnabled: boolean; unregisteredInviteEmailsEnabled: boolean;
freeTierInvitesEnabled: boolean; freeTierInvitesEnabled: boolean;