satellite/{console/web}: add v2 signup flow flag

This change adds a new flag to toggle whether to use the v2 app signup
flow. If disabled, the v2 signup page will redirect to the current
app's signup page.

Issue: #6552

Change-Id: I0d48ca713dc77cb2879630613f92123baced3ca3
This commit is contained in:
Wilfred Asomani 2023-11-29 13:32:39 +00:00
parent 9e6c421cc5
commit 5d775e61b1
6 changed files with 12 additions and 0 deletions

View File

@ -29,6 +29,7 @@ type Config struct {
BillingFeaturesEnabled bool `help:"indicates if billing features should be enabled" default:"true"`
StripePaymentElementEnabled bool `help:"indicates whether the stripe payment element should be used to collect card info" default:"true"`
SignupActivationCodeEnabled bool `help:"indicates whether the whether account activation is done using activation code" default:"false"`
NewSignupFlowEnabled bool `help:"indicates whether the v2 app signup flow is enabled" default:"false"`
UsageLimits UsageLimitsConfig
Captcha CaptchaConfig
Session SessionConfig

View File

@ -56,6 +56,7 @@ type FrontendConfig struct {
UserBalanceForUpgrade int64 `json:"userBalanceForUpgrade"`
LimitIncreaseRequestEnabled bool `json:"limitIncreaseRequestEnabled"`
SignupActivationCodeEnabled bool `json:"signupActivationCodeEnabled"`
NewSignupFlowEnabled bool `json:"newSignupFlowEnabled"`
}
// Satellites is a configuration value that contains a list of satellite names and addresses.

View File

@ -759,6 +759,7 @@ func (server *Server) frontendConfigHandler(w http.ResponseWriter, r *http.Reque
UserBalanceForUpgrade: server.config.UserBalanceForUpgrade,
LimitIncreaseRequestEnabled: server.config.LimitIncreaseRequestEnabled,
SignupActivationCodeEnabled: server.config.SignupActivationCodeEnabled,
NewSignupFlowEnabled: server.config.NewSignupFlowEnabled,
}
err := json.NewEncoder(w).Encode(&cfg)

View File

@ -340,6 +340,9 @@ compensation.withheld-percents: 75,75,75,50,50,50,25,25,25,0,0,0,0,0,0
# indicates if storj native token payments system is enabled
# console.native-token-payments-enabled: false
# indicates whether the v2 app signup flow is enabled
# console.new-signup-flow-enabled: false
# how long oauth access tokens are issued for
# console.oauth-access-token-expiry: 24h0m0s

View File

@ -53,6 +53,7 @@ export class FrontendConfig {
userBalanceForUpgrade: number;
limitIncreaseRequestEnabled: boolean;
signupActivationCodeEnabled: boolean;
newSignupFlowEnabled: boolean;
}
export class MultiCaptchaConfig {

View File

@ -435,6 +435,11 @@ async function detectBraveBrowser(): Promise<boolean> {
}
onBeforeMount(async () => {
if (!configStore.state.config.newSignupFlowEnabled) {
location.replace(RouteConfig.Register.path);
return;
}
if (route.query.partner) {
partner.value = route.query.partner.toString();
}