Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions libs/shared/cms/src/__generated__/gql.ts

Large diffs are not rendered by default.

110 changes: 63 additions & 47 deletions libs/shared/cms/src/__generated__/graphql.ts

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions libs/shared/cms/src/lib/queries/relying-party/factories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,16 @@ export const RelyingPartyResultFactory = (
header: faker.color.rgb(),
splitLayoutAltText: faker.string.sample(),
},
illustrationsTheme: {
primary: faker.color.rgb(),
primaryAlt: faker.color.rgb(),
secondary: faker.color.rgb(),
accentBg: faker.color.rgb(),
accentFg: faker.color.rgb(),
cloudPrimary: faker.color.rgb(),
cloudShadow: faker.color.rgb(),
hideClouds: faker.datatype.boolean(),
},
pageTitle: faker.string.sample(),
headerLogoUrl: faker.internet.url(),
headerLogoAltText: faker.string.sample(),
Expand Down
10 changes: 10 additions & 0 deletions libs/shared/cms/src/lib/queries/relying-party/query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,16 @@ export const relyingPartyQuery = graphql(`
splitLayout
splitLayoutAltText
}
illustrationsTheme {
primary
primaryAlt
secondary
accentBg
accentFg
cloudPrimary
cloudShadow
hideClouds
}
favicon
headlineFontSize
headlineTextColor
Expand Down
12 changes: 12 additions & 0 deletions libs/shared/cms/src/lib/queries/relying-party/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export interface Shared {
splitLayout: string | null;
splitLayoutAltText: string | null;
};
illustrationsTheme: IllustrationsTheme | null;
pageTitle: string | null;
headerLogoUrl: string | null;
headerLogoAltText: string | null;
Expand All @@ -45,6 +46,17 @@ export interface Shared {
additionalAccessibilityInfo: string | null;
}

export interface IllustrationsTheme {
primary: string | null;
primaryAlt: string | null;
secondary: string | null;
accentBg: string | null;
accentFg: string | null;
cloudPrimary: string | null;
cloudShadow: string | null;
hideClouds: boolean | null;
}

export interface FeatureFlags {
syncConfirmedPageHideCTA: boolean | null;
syncHidePromoAfterLogin: boolean | null;
Expand Down
32 changes: 24 additions & 8 deletions packages/fxa-settings/src/components/App/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -237,16 +237,16 @@ export const App = ({
if (isValidSession) {
setIsSignedIntoFirefoxDesktop(
!!userFromBrowser?.sessionToken &&
integration.isFirefoxDesktopClient()
integration.isFirefoxDesktopClient()
);
const cachedUser = getAccountByUid(userFromBrowser.uid);
// Refresh the token without switching the "current" account.
persistAccount(
cachedUser
? {
...cachedUser,
sessionToken: userFromBrowser.sessionToken,
}
...cachedUser,
sessionToken: userFromBrowser.sessionToken,
}
: userFromBrowser
);
if (!currentAccount()?.uid) {
Expand Down Expand Up @@ -568,14 +568,20 @@ const AuthAndAccountSetupRoutes = ({
path="/reset_password/*"
{...{ flowQueryParams, serviceName }}
/>
<ConfirmResetPasswordContainer path="/confirm_reset_password/*" />
<ConfirmResetPasswordContainer
path="/confirm_reset_password/*"
{...{ integration }}
/>
<ResetPasswordRecoveryChoiceContainer path="/reset_password_totp_recovery_choice/*" />
<ResetPasswordRecoveryPhoneContainer
path="/reset_password_recovery_phone/*"
{...{ integration }}
/>
<ConfirmTotpResetPasswordContainer path="/confirm_totp_reset_password/*" />
<ConfirmBackupCodeResetPasswordContainer path="/confirm_backup_code_reset_password/*" />
<ConfirmBackupCodeResetPasswordContainer
path="/confirm_backup_code_reset_password/*"
{...{ integration }}
/>
<CompleteResetPasswordContainer
path="/complete_reset_password/*"
{...{ integration }}
Expand Down Expand Up @@ -626,11 +632,21 @@ const AuthAndAccountSetupRoutes = ({
/>
<SigninPasswordlessCodeContainer
path="/oauth/signin_passwordless_code/*"
{...{ integration, serviceName, flowQueryParams, setCurrentSplitLayout }}
{...{
integration,
serviceName,
flowQueryParams,
setCurrentSplitLayout,
}}
/>
<SigninPasswordlessCodeContainer
path="/signin_passwordless_code/*"
{...{ integration, serviceName, flowQueryParams, setCurrentSplitLayout }}
{...{
integration,
serviceName,
flowQueryParams,
setCurrentSplitLayout,
}}
/>
<SigninContainer
path="/oauth/signin/*"
Expand Down
14 changes: 13 additions & 1 deletion packages/fxa-settings/src/components/PreparedImage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export const PreparedImage = (props: PreparedImageProps) => {
return (
<>
{showAriaLabel ? (
<FtlMsg id={props.ariaLabelFtlId} attrs={{ "aria-label": true }}>
<FtlMsg id={props.ariaLabelFtlId} attrs={{ 'aria-label': true }}>
<Image role="img" aria-label={props.ariaLabel} {...{ className }} />
</FtlMsg>
) : (
Expand All @@ -53,7 +53,19 @@ export const PreparedImage = (props: PreparedImageProps) => {
);
};

export interface IllustrationsTheme {
primary?: string;
primaryAlt?: string;
secondary?: string;
accentBg?: string;
accentFg?: string;
cloudPrimary?: string;
cloudShadow?: string;
hideClouds?: boolean;
}

export type ImageProps = {
className?: string;
ariaHidden?: boolean;
illustrationsTheme?: IllustrationsTheme;
};
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading