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"`
NeededTransactionConfirmations int `json:"neededTransactionConfirmations"`
ObjectBrowserPaginationEnabled bool `json:"objectBrowserPaginationEnabled"`
ObjectBrowserCardViewEnabled bool `json:"objectBrowserCardViewEnabled"`
BillingFeaturesEnabled bool `json:"billingFeaturesEnabled"`
UnregisteredInviteEmailsEnabled bool `json:"unregisteredInviteEmailsEnabled"`
FreeTierInvitesEnabled bool `json:"freeTierInvitesEnabled"`

View File

@ -110,6 +110,7 @@ type Config struct {
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:""`
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"`
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,
NeededTransactionConfirmations: server.neededTokenPaymentConfirmations,
ObjectBrowserPaginationEnabled: server.config.ObjectBrowserPaginationEnabled,
ObjectBrowserCardViewEnabled: server.config.ObjectBrowserCardViewEnabled,
BillingFeaturesEnabled: server.config.BillingFeaturesEnabled,
UnregisteredInviteEmailsEnabled: server.config.UnregisteredInviteEmailsEnabled,
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
# 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
# console.object-browser-pagination-enabled: false

View File

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