Skip to content

Commit 911b6d4

Browse files
committed
Make OIDC identity reset consistent with EX
1 parent 063ccac commit 911b6d4

File tree

3 files changed

+52
-18
lines changed

3 files changed

+52
-18
lines changed

src/CreateCrossSigning.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export async function uiAuthCallback(
6464
};
6565

6666
const { finished } = Modal.createDialog(InteractiveAuthDialog, {
67-
title: _t("encryption|bootstrap_title"),
67+
title: "",
6868
matrixClient,
6969
makeRequest,
7070
aestheticsForStagePhases: {

src/components/views/auth/InteractiveAuthEntryComponents.tsx

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@ import { type InternationalisedPolicy, type Terms, type MatrixClient } from "mat
1111
import { AuthType, type AuthDict, type IInputs, type IStageStatus } from "matrix-js-sdk/src/interactive-auth";
1212
import { logger } from "matrix-js-sdk/src/logger";
1313
import React, { type JSX, type ChangeEvent, createRef, type FormEvent, Fragment } from "react";
14-
import { Button, Text } from "@vector-im/compound-web";
14+
import { Button } from "@vector-im/compound-web";
1515
import PopOutIcon from "@vector-im/compound-design-tokens/assets/web/icons/pop-out";
16+
import UserProfileSolidIcon from "@vector-im/compound-design-tokens/assets/web/icons/user-profile-solid";
1617

1718
import EmailPromptIcon from "../../../../res/img/element-icons/email-prompt.svg";
1819
import { _t } from "../../../languageHandler";
@@ -21,8 +22,9 @@ import AccessibleButton, { type AccessibleButtonKind, type ButtonEvent } from ".
2122
import Field from "../elements/Field";
2223
import Spinner from "../elements/Spinner";
2324
import CaptchaForm from "./CaptchaForm";
24-
import { Flex } from "../../utils/Flex";
2525
import { pickBestPolicyLanguage } from "../../../Terms.ts";
26+
import { EncryptionCardButtons } from "../settings/encryption/EncryptionCardButtons.tsx";
27+
import { EncryptionCard } from "../settings/encryption/EncryptionCard.tsx";
2628

2729
/* This file contains a collection of components which are used by the
2830
* InteractiveAuth to prompt the user to enter the information needed
@@ -971,9 +973,14 @@ export class MasUnlockCrossSigningAuthEntry extends FallbackAuthEntry<{
971973

972974
public render(): React.ReactNode {
973975
return (
974-
<div>
975-
<Text>{_t("auth|uia|mas_cross_signing_reset_description")}</Text>
976-
<Flex gap="var(--cpd-space-4x)">
976+
<EncryptionCard
977+
Icon={UserProfileSolidIcon}
978+
title={_t("auth|uia|mas_cross_signing_reset_title")}
979+
description={_t("auth|uia|mas_cross_signing_reset_description", {
980+
serverName: this.props.matrixClient.getDomain(),
981+
})}
982+
>
983+
<EncryptionCardButtons>
977984
<Button
978985
Icon={PopOutIcon}
979986
onClick={this.onGoToAccountClick}
@@ -983,11 +990,11 @@ export class MasUnlockCrossSigningAuthEntry extends FallbackAuthEntry<{
983990
>
984991
{_t("auth|uia|mas_cross_signing_reset_cta")}
985992
</Button>
986-
<Button onClick={this.onRetryClick} kind="secondary" className="mx_Dialog_nonDialogButton">
993+
<Button onClick={this.onRetryClick} kind="tertiary" className="mx_Dialog_nonDialogButton">
987994
{_t("action|retry")}
988995
</Button>
989-
</Flex>
990-
</div>
996+
</EncryptionCardButtons>
997+
</EncryptionCard>
991998
);
992999
}
9931000
}

test/unit-tests/components/views/auth/__snapshots__/InteractiveAuthEntryComponents-test.tsx.snap

Lines changed: 36 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,42 @@ exports[`<EmailIdentityAuthEntry/> should render 1`] = `
3535

3636
exports[`<MasUnlockCrossSigningAuthEntry/> should render 1`] = `
3737
<div>
38-
<div>
39-
<p
40-
class="_typography_6v6n8_153 _font-body-md-regular_6v6n8_50"
38+
<div
39+
class="mx_EncryptionCard"
40+
>
41+
<div
42+
class="mx_EncryptionCard_header"
4143
>
42-
Reset your identity through your account provider and then come back and click “Retry”.
43-
</p>
44+
<div
45+
class="_content_o77nw_8"
46+
data-size="large"
47+
>
48+
<svg
49+
fill="currentColor"
50+
height="1em"
51+
viewBox="0 0 24 24"
52+
width="1em"
53+
xmlns="http://www.w3.org/2000/svg"
54+
>
55+
<path
56+
d="M12 15q-1.65 0-2.825-1.175T8 11t1.175-2.825T12 7t2.825 1.175T16 11t-1.175 2.825T12 15"
57+
/>
58+
<path
59+
d="M19.528 18.583A9.96 9.96 0 0 0 22 12c0-5.523-4.477-10-10-10S2 6.477 2 12c0 2.52.933 4.824 2.472 6.583A9.98 9.98 0 0 0 12 22a9.98 9.98 0 0 0 7.528-3.417M8.75 16.388q-1.373.332-2.709.95a8 8 0 1 1 11.918 0 14.7 14.7 0 0 0-2.709-.95A13.8 13.8 0 0 0 12 16q-1.65 0-3.25.387"
60+
/>
61+
</svg>
62+
</div>
63+
<h2
64+
class="_typography_6v6n8_153 _font-heading-sm-semibold_6v6n8_93"
65+
>
66+
Go to your account to reset your identity
67+
</h2>
68+
<span>
69+
You're about to go to your matrix.org account to reset your identity. Once you have completed reset on your account, please return here and click Retry.
70+
</span>
71+
</div>
4472
<div
45-
class="mx_Flex"
46-
style="--mx-flex-display: flex; --mx-flex-direction: row; --mx-flex-align: start; --mx-flex-justify: start; --mx-flex-gap: var(--cpd-space-4x); --mx-flex-wrap: nowrap;"
73+
class="mx_EncryptionCard_buttons"
4774
>
4875
<button
4976
class="_button_vczzf_8 mx_Dialog_nonDialogButton _has-icon_vczzf_57"
@@ -67,11 +94,11 @@ exports[`<MasUnlockCrossSigningAuthEntry/> should render 1`] = `
6794
d="M15 3h5a1 1 0 0 1 1 1v5a1 1 0 1 1-2 0V6.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L17.586 5H15a1 1 0 1 1 0-2"
6895
/>
6996
</svg>
70-
Go to your account
97+
Continue to account
7198
</button>
7299
<button
73100
class="_button_vczzf_8 mx_Dialog_nonDialogButton"
74-
data-kind="secondary"
101+
data-kind="tertiary"
75102
data-size="lg"
76103
role="button"
77104
tabindex="0"

0 commit comments

Comments
 (0)