Skip to content

Commit 4e0b831

Browse files
committed
feat: onboarding flows simplified
1 parent 693bc07 commit 4e0b831

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+1542
-651
lines changed

@tailwind-shared/css-variables.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
--ui-text-toned: var(--ui-color-neutral-300);
9595
--ui-text: var(--ui-color-neutral-200);
9696
--ui-text-highlighted: white;
97-
--ui-text-inverted: var(--ui-color-neutral-900);
97+
--ui-text-inverted: var(--ui-color-neutral-300);
9898

9999
/* Nuxt UI Design Tokens - Background (Dark) */
100100
--ui-bg: var(--ui-color-neutral-900);

api/generated-schema.graphql

Lines changed: 129 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -708,6 +708,108 @@ enum Role {
708708
VIEWER
709709
}
710710

711+
type PublicPartnerInfo {
712+
partnerName: String
713+
714+
"""Indicates if a partner logo exists"""
715+
hasPartnerLogo: Boolean!
716+
partnerUrl: String
717+
718+
"""
719+
The path to the partner logo image on the flash drive, relative to the activation code file
720+
"""
721+
partnerLogoUrl: String
722+
}
723+
724+
type ActivationCode {
725+
code: String
726+
partnerName: String
727+
partnerUrl: String
728+
serverName: String
729+
sysModel: String
730+
comment: String
731+
header: String
732+
headermetacolor: String
733+
background: String
734+
showBannerGradient: Boolean
735+
theme: String
736+
}
737+
738+
type Customization {
739+
activationCode: ActivationCode
740+
partnerInfo: PublicPartnerInfo
741+
theme: Theme!
742+
}
743+
744+
type ActivationOnboardingStep {
745+
"""Identifier of the activation onboarding step"""
746+
id: ActivationOnboardingStepId!
747+
748+
"""Indicates whether the step is required"""
749+
required: Boolean!
750+
751+
"""Indicates whether the step has been completed for the current version"""
752+
completed: Boolean!
753+
754+
"""Version of Unraid when this step was introduced"""
755+
introducedIn: String
756+
}
757+
758+
enum ActivationOnboardingStepId {
759+
WELCOME
760+
TIMEZONE
761+
PLUGINS
762+
ACTIVATION
763+
}
764+
765+
type ActivationOnboarding {
766+
"""Indicates whether the system is currently in an upgrade state"""
767+
isUpgrade: Boolean!
768+
769+
"""Previous OS version prior to the current upgrade"""
770+
previousVersion: String
771+
772+
"""Current OS version detected by the system"""
773+
currentVersion: String
774+
775+
"""Whether there are any remaining activation onboarding steps"""
776+
hasPendingSteps: Boolean!
777+
778+
"""Activation onboarding steps relevant to the current system state"""
779+
steps: [ActivationOnboardingStep!]!
780+
}
781+
782+
type Theme {
783+
"""The theme name"""
784+
name: ThemeName!
785+
786+
"""Whether to show the header banner image"""
787+
showBannerImage: Boolean!
788+
789+
"""Whether to show the banner gradient"""
790+
showBannerGradient: Boolean!
791+
792+
"""Whether to show the description in the header"""
793+
showHeaderDescription: Boolean!
794+
795+
"""The background color of the header"""
796+
headerBackgroundColor: String
797+
798+
"""The text color of the header"""
799+
headerPrimaryTextColor: String
800+
801+
"""The secondary text color of the header"""
802+
headerSecondaryTextColor: String
803+
}
804+
805+
"""The theme name"""
806+
enum ThemeName {
807+
azure
808+
black
809+
gray
810+
white
811+
}
812+
711813
type SsoSettings implements Node {
712814
id: PrefixedID!
713815

@@ -818,6 +920,26 @@ type PackageVersions {
818920
docker: String
819921
}
820922

923+
type UpgradeStep {
924+
"""Identifier of the onboarding step"""
925+
id: String!
926+
927+
"""Whether the step is required to continue"""
928+
required: Boolean!
929+
930+
"""Version of Unraid when this step was introduced"""
931+
introducedIn: String
932+
933+
"""Display title for the onboarding step"""
934+
title: String!
935+
936+
"""Display description for the onboarding step"""
937+
description: String!
938+
939+
"""Icon identifier for the onboarding step"""
940+
icon: String
941+
}
942+
821943
type UpgradeInfo {
822944
"""Whether the OS version has changed since last boot"""
823945
isUpgrade: Boolean!
@@ -830,6 +952,9 @@ type UpgradeInfo {
830952

831953
"""Onboarding step identifiers completed for the current OS version"""
832954
completedSteps: [String!]!
955+
956+
"""Onboarding step definitions applicable to the current upgrade path"""
957+
steps: [UpgradeStep!]!
833958
}
834959

835960
type InfoVersions implements Node {
@@ -1055,7 +1180,7 @@ type OnboardingMutations {
10551180
"""Input for marking an upgrade onboarding step as completed"""
10561181
input CompleteUpgradeStepInput {
10571182
"""Identifier of the onboarding step to mark completed"""
1058-
stepId: String!
1183+
stepId: ActivationOnboardingStepId!
10591184
}
10601185

10611186
type Config implements Node {
@@ -1064,70 +1189,6 @@ type Config implements Node {
10641189
error: String
10651190
}
10661191

1067-
type PublicPartnerInfo {
1068-
partnerName: String
1069-
1070-
"""Indicates if a partner logo exists"""
1071-
hasPartnerLogo: Boolean!
1072-
partnerUrl: String
1073-
1074-
"""
1075-
The path to the partner logo image on the flash drive, relative to the activation code file
1076-
"""
1077-
partnerLogoUrl: String
1078-
}
1079-
1080-
type ActivationCode {
1081-
code: String
1082-
partnerName: String
1083-
partnerUrl: String
1084-
serverName: String
1085-
sysModel: String
1086-
comment: String
1087-
header: String
1088-
headermetacolor: String
1089-
background: String
1090-
showBannerGradient: Boolean
1091-
theme: String
1092-
}
1093-
1094-
type Customization {
1095-
activationCode: ActivationCode
1096-
partnerInfo: PublicPartnerInfo
1097-
theme: Theme!
1098-
}
1099-
1100-
type Theme {
1101-
"""The theme name"""
1102-
name: ThemeName!
1103-
1104-
"""Whether to show the header banner image"""
1105-
showBannerImage: Boolean!
1106-
1107-
"""Whether to show the banner gradient"""
1108-
showBannerGradient: Boolean!
1109-
1110-
"""Whether to show the description in the header"""
1111-
showHeaderDescription: Boolean!
1112-
1113-
"""The background color of the header"""
1114-
headerBackgroundColor: String
1115-
1116-
"""The text color of the header"""
1117-
headerPrimaryTextColor: String
1118-
1119-
"""The secondary text color of the header"""
1120-
headerSecondaryTextColor: String
1121-
}
1122-
1123-
"""The theme name"""
1124-
enum ThemeName {
1125-
azure
1126-
black
1127-
gray
1128-
white
1129-
}
1130-
11311192
type ExplicitStatusItem {
11321193
name: String!
11331194
updateStatus: UpdateStatus!
@@ -1878,7 +1939,6 @@ type ApiConfig {
18781939
sandbox: Boolean
18791940
ssoSubIds: [String!]!
18801941
plugins: [String!]!
1881-
lastSeenOsVersion: String
18821942
}
18831943

18841944
type OidcAuthorizationRule {
@@ -2415,6 +2475,9 @@ type Query {
24152475
customization: Customization
24162476
publicPartnerInfo: PublicPartnerInfo
24172477
publicTheme: Theme!
2478+
2479+
"""Activation onboarding steps derived from current system state"""
2480+
activationOnboarding: ActivationOnboarding!
24182481
docker: Docker!
24192482
disks: [Disk!]!
24202483
disk(id: PrefixedID!): Disk!

api/src/unraid-api/cli/generated/graphql.ts

Lines changed: 53 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,38 @@ export type ActivationCode = {
119119
theme?: Maybe<Scalars['String']['output']>;
120120
};
121121

122+
export type ActivationOnboarding = {
123+
__typename?: 'ActivationOnboarding';
124+
/** Current OS version detected by the system */
125+
currentVersion?: Maybe<Scalars['String']['output']>;
126+
/** Whether there are any remaining activation onboarding steps */
127+
hasPendingSteps: Scalars['Boolean']['output'];
128+
/** Indicates whether the system is currently in an upgrade state */
129+
isUpgrade: Scalars['Boolean']['output'];
130+
/** Previous OS version prior to the current upgrade */
131+
previousVersion?: Maybe<Scalars['String']['output']>;
132+
/** Activation onboarding steps relevant to the current system state */
133+
steps: Array<ActivationOnboardingStep>;
134+
};
135+
136+
export type ActivationOnboardingStep = {
137+
__typename?: 'ActivationOnboardingStep';
138+
/** Indicates whether the step has been completed for the current version */
139+
completed: Scalars['Boolean']['output'];
140+
/** Identifier of the activation onboarding step */
141+
id: ActivationOnboardingStepId;
142+
/** Version of Unraid when this step was introduced */
143+
introducedIn?: Maybe<Scalars['String']['output']>;
144+
/** Indicates whether the step is required */
145+
required: Scalars['Boolean']['output'];
146+
};
147+
148+
export enum ActivationOnboardingStepId {
149+
ACTIVATION = 'ACTIVATION',
150+
PLUGINS = 'PLUGINS',
151+
TIMEZONE = 'TIMEZONE'
152+
}
153+
122154
export type AddPermissionInput = {
123155
actions: Array<AuthAction>;
124156
resource: Resource;
@@ -132,7 +164,6 @@ export type AddRoleForApiKeyInput = {
132164
export type ApiConfig = {
133165
__typename?: 'ApiConfig';
134166
extraOrigins: Array<Scalars['String']['output']>;
135-
lastSeenOsVersion?: Maybe<Scalars['String']['output']>;
136167
plugins: Array<Scalars['String']['output']>;
137168
sandbox?: Maybe<Scalars['Boolean']['output']>;
138169
ssoSubIds: Array<Scalars['String']['output']>;
@@ -438,7 +469,7 @@ export type CloudResponse = {
438469
/** Input for marking an upgrade onboarding step as completed */
439470
export type CompleteUpgradeStepInput = {
440471
/** Identifier of the onboarding step to mark completed */
441-
stepId: Scalars['String']['input'];
472+
stepId: ActivationOnboardingStepId;
442473
};
443474

444475
export type Config = Node & {
@@ -1679,6 +1710,8 @@ export type PublicPartnerInfo = {
16791710

16801711
export type Query = {
16811712
__typename?: 'Query';
1713+
/** Activation onboarding steps derived from current system state */
1714+
activationOnboarding: ActivationOnboarding;
16821715
apiKey?: Maybe<ApiKey>;
16831716
/** All possible permissions for API keys */
16841717
apiKeyPossiblePermissions: Array<Permission>;
@@ -2348,6 +2381,24 @@ export type UpgradeInfo = {
23482381
isUpgrade: Scalars['Boolean']['output'];
23492382
/** Previous OS version before upgrade */
23502383
previousVersion?: Maybe<Scalars['String']['output']>;
2384+
/** Onboarding step definitions applicable to the current upgrade path */
2385+
steps: Array<UpgradeStep>;
2386+
};
2387+
2388+
export type UpgradeStep = {
2389+
__typename?: 'UpgradeStep';
2390+
/** Display description for the onboarding step */
2391+
description: Scalars['String']['output'];
2392+
/** Icon identifier for the onboarding step */
2393+
icon?: Maybe<Scalars['String']['output']>;
2394+
/** Identifier of the onboarding step */
2395+
id: Scalars['String']['output'];
2396+
/** Version of Unraid when this step was introduced */
2397+
introducedIn?: Maybe<Scalars['String']['output']>;
2398+
/** Whether the step is required to continue */
2399+
required: Scalars['Boolean']['output'];
2400+
/** Display title for the onboarding step */
2401+
title: Scalars['String']['output'];
23512402
};
23522403

23532404
export type Uptime = {

api/src/unraid-api/config/api-config.module.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ const createDefaultConfig = (): ApiConfig => ({
1717
sandbox: false,
1818
ssoSubIds: [],
1919
plugins: [],
20-
lastSeenOsVersion: undefined,
2120
});
2221

2322
/**

0 commit comments

Comments
 (0)