Refactor CreateCrossSigningDialog (#28218)
* Refactor CreateCrossSigningDialog * Converts CreateCrossSigningDialog to a functional component * Pulls logic out to its own class * Updates usage of deprecated cross signing bootstrap method on client to be on the crypto object and updates test to match Moved from https://github.com/element-hq/matrix-react-sdk/pull/131 * Add mock here too * Use the right mock * Remove duplicate mock * Stray jest mock line * Un-move mocks * tsdoc * Typo Co-authored-by: Andy Balaam <andy.balaam@matrix.org> --------- Co-authored-by: Andy Balaam <andy.balaam@matrix.org>
This commit is contained in:
parent
539025cf8c
commit
19ef3267c0
8 changed files with 406 additions and 157 deletions
|
@ -2088,6 +2088,7 @@ export default class MatrixChat extends React.PureComponent<IProps, IState> {
|
|||
} else if (this.state.view === Views.E2E_SETUP) {
|
||||
view = (
|
||||
<E2eSetup
|
||||
matrixClient={MatrixClientPeg.safeGet()}
|
||||
onFinished={this.onCompleteSecurityE2eSetupFinished}
|
||||
accountPassword={this.stores.accountPasswordStore.getPassword()}
|
||||
tokenLogin={!!this.tokenLogin}
|
||||
|
|
|
@ -7,15 +7,17 @@ Please see LICENSE files in the repository root for full details.
|
|||
*/
|
||||
|
||||
import React from "react";
|
||||
import { MatrixClient } from "matrix-js-sdk/src/matrix";
|
||||
|
||||
import AuthPage from "../../views/auth/AuthPage";
|
||||
import CompleteSecurityBody from "../../views/auth/CompleteSecurityBody";
|
||||
import CreateCrossSigningDialog from "../../views/dialogs/security/CreateCrossSigningDialog";
|
||||
|
||||
interface IProps {
|
||||
matrixClient: MatrixClient;
|
||||
onFinished: () => void;
|
||||
accountPassword?: string;
|
||||
tokenLogin?: boolean;
|
||||
tokenLogin: boolean;
|
||||
}
|
||||
|
||||
export default class E2eSetup extends React.Component<IProps> {
|
||||
|
@ -24,6 +26,7 @@ export default class E2eSetup extends React.Component<IProps> {
|
|||
<AuthPage>
|
||||
<CompleteSecurityBody>
|
||||
<CreateCrossSigningDialog
|
||||
matrixClient={this.props.matrixClient}
|
||||
onFinished={this.props.onFinished}
|
||||
accountPassword={this.props.accountPassword}
|
||||
tokenLogin={this.props.tokenLogin}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue