mirror of
https://github.com/Portabase/portabase.git
synced 2026-07-14 11:16:13 +02:00
feat(onboarding): wire steps — add login + agent-key, remove sso-gate
This commit is contained in:
@@ -1,6 +1,5 @@
|
|||||||
// src/features/onboarding/onboarding-steps.tsx
|
|
||||||
import { OnboardingStep } from "@onboardjs/react";
|
import { OnboardingStep } from "@onboardjs/react";
|
||||||
import { StepSsoGate } from "@/features/onboarding/steps/step-sso-gate";
|
import { StepLogin } from "@/features/onboarding/steps/step-login";
|
||||||
import { StepAccountInfo } from "@/features/onboarding/steps/step-account-info";
|
import { StepAccountInfo } from "@/features/onboarding/steps/step-account-info";
|
||||||
import { StepSecurity } from "@/features/onboarding/steps/step-security";
|
import { StepSecurity } from "@/features/onboarding/steps/step-security";
|
||||||
import { StepPreferences } from "@/features/onboarding/steps/step-preferences";
|
import { StepPreferences } from "@/features/onboarding/steps/step-preferences";
|
||||||
@@ -10,18 +9,17 @@ import { StepNotifier } from "@/features/onboarding/steps/step-notifier";
|
|||||||
import { StepStorage } from "@/features/onboarding/steps/step-storage";
|
import { StepStorage } from "@/features/onboarding/steps/step-storage";
|
||||||
import { StepDefaults } from "@/features/onboarding/steps/step-defaults";
|
import { StepDefaults } from "@/features/onboarding/steps/step-defaults";
|
||||||
import { StepAgentCreate } from "@/features/onboarding/steps/step-agent-create";
|
import { StepAgentCreate } from "@/features/onboarding/steps/step-agent-create";
|
||||||
|
import { StepAgentKey } from "@/features/onboarding/steps/step-agent-key";
|
||||||
import { StepAgentWaiting } from "@/features/onboarding/steps/step-agent-waiting";
|
import { StepAgentWaiting } from "@/features/onboarding/steps/step-agent-waiting";
|
||||||
import { StepProjectCreate } from "@/features/onboarding/steps/step-project-create";
|
import { StepProjectCreate } from "@/features/onboarding/steps/step-project-create";
|
||||||
import { StepDbSettings } from "@/features/onboarding/steps/step-db-settings";
|
import { StepDbSettings } from "@/features/onboarding/steps/step-db-settings";
|
||||||
import { StepFinish } from "@/features/onboarding/steps/step-finish";
|
import { StepFinish } from "@/features/onboarding/steps/step-finish";
|
||||||
import { mockSsoConfig } from "@/features/onboarding/onboarding.mock";
|
|
||||||
|
|
||||||
export const onboardingSteps: OnboardingStep[] = [
|
export const onboardingSteps: OnboardingStep[] = [
|
||||||
{
|
{
|
||||||
id: "sso-gate",
|
id: "login",
|
||||||
component: StepSsoGate,
|
component: StepLogin,
|
||||||
isSkippable: !mockSsoConfig.forced as true,
|
isSkippable: false,
|
||||||
skipToStep: undefined,
|
|
||||||
nextStep: "account-info",
|
nextStep: "account-info",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -34,14 +32,14 @@ export const onboardingSteps: OnboardingStep[] = [
|
|||||||
id: "security",
|
id: "security",
|
||||||
component: StepSecurity,
|
component: StepSecurity,
|
||||||
isSkippable: true,
|
isSkippable: true,
|
||||||
skipToStep: undefined,
|
skipToStep: "preferences",
|
||||||
nextStep: "preferences",
|
nextStep: "preferences",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "preferences",
|
id: "preferences",
|
||||||
component: StepPreferences,
|
component: StepPreferences,
|
||||||
isSkippable: true,
|
isSkippable: true,
|
||||||
skipToStep: undefined,
|
skipToStep: "org-create",
|
||||||
nextStep: "org-create",
|
nextStep: "org-create",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -54,40 +52,46 @@ export const onboardingSteps: OnboardingStep[] = [
|
|||||||
id: "invite-members",
|
id: "invite-members",
|
||||||
component: StepInviteMembers,
|
component: StepInviteMembers,
|
||||||
isSkippable: true,
|
isSkippable: true,
|
||||||
skipToStep: undefined,
|
skipToStep: "notifier",
|
||||||
nextStep: "notifier",
|
nextStep: "notifier",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "notifier",
|
id: "notifier",
|
||||||
component: StepNotifier,
|
component: StepNotifier,
|
||||||
isSkippable: true,
|
isSkippable: true,
|
||||||
skipToStep: undefined,
|
skipToStep: "storage",
|
||||||
nextStep: "storage",
|
nextStep: "storage",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "storage",
|
id: "storage",
|
||||||
component: StepStorage,
|
component: StepStorage,
|
||||||
isSkippable: true,
|
isSkippable: true,
|
||||||
skipToStep: undefined,
|
skipToStep: "defaults",
|
||||||
nextStep: "defaults",
|
nextStep: "defaults",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "defaults",
|
id: "defaults",
|
||||||
component: StepDefaults,
|
component: StepDefaults,
|
||||||
isSkippable: true,
|
isSkippable: true,
|
||||||
skipToStep: undefined,
|
skipToStep: "agent-create",
|
||||||
nextStep: "agent-create",
|
nextStep: "agent-create",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "agent-create",
|
id: "agent-create",
|
||||||
component: StepAgentCreate,
|
component: StepAgentCreate,
|
||||||
isSkippable: true,
|
isSkippable: true,
|
||||||
skipToStep: undefined,
|
skipToStep: "finish",
|
||||||
nextStep: (ctx: any) => {
|
nextStep: (ctx: any) => {
|
||||||
const agents = ctx.flowData?.agents as unknown[] | undefined;
|
const agents = ctx.flowData?.agents as unknown[] | undefined;
|
||||||
return agents && agents.length > 0 ? "agent-waiting" : "finish";
|
return agents && agents.length > 0 ? "agent-key" : "finish";
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
id: "agent-key",
|
||||||
|
component: StepAgentKey,
|
||||||
|
isSkippable: false,
|
||||||
|
nextStep: "agent-waiting",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
id: "agent-waiting",
|
id: "agent-waiting",
|
||||||
component: StepAgentWaiting,
|
component: StepAgentWaiting,
|
||||||
@@ -98,14 +102,14 @@ export const onboardingSteps: OnboardingStep[] = [
|
|||||||
id: "project-create",
|
id: "project-create",
|
||||||
component: StepProjectCreate,
|
component: StepProjectCreate,
|
||||||
isSkippable: true,
|
isSkippable: true,
|
||||||
skipToStep: undefined,
|
skipToStep: "db-settings",
|
||||||
nextStep: "db-settings",
|
nextStep: "db-settings",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "db-settings",
|
id: "db-settings",
|
||||||
component: StepDbSettings,
|
component: StepDbSettings,
|
||||||
isSkippable: true,
|
isSkippable: true,
|
||||||
skipToStep: undefined,
|
skipToStep: "finish",
|
||||||
nextStep: "finish",
|
nextStep: "finish",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user