2020-01-24 22:11:57 +03:00
|
|
|
/*
|
|
|
|
Copyright 2020 The Matrix.org Foundation C.I.C.
|
|
|
|
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
you may not use this file except in compliance with the License.
|
|
|
|
You may obtain a copy of the License at
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
limitations under the License.
|
|
|
|
*/
|
|
|
|
|
|
|
|
import React from 'react';
|
|
|
|
import PropTypes from 'prop-types';
|
|
|
|
import AsyncWrapper from '../../../AsyncWrapper';
|
|
|
|
import * as sdk from '../../../index';
|
|
|
|
|
|
|
|
export default class E2eSetup extends React.Component {
|
|
|
|
static propTypes = {
|
|
|
|
onFinished: PropTypes.func.isRequired,
|
2020-01-25 18:28:06 +03:00
|
|
|
accountPassword: PropTypes.string,
|
2020-01-24 22:11:57 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
constructor() {
|
|
|
|
super();
|
|
|
|
// awkwardly indented because https://github.com/eslint/eslint/issues/11310
|
|
|
|
this._createStorageDialogPromise =
|
2020-09-10 15:56:07 +03:00
|
|
|
import("../../../async-components/views/dialogs/security/CreateSecretStorageDialog");
|
2020-01-24 22:11:57 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
render() {
|
|
|
|
const AuthPage = sdk.getComponent("auth.AuthPage");
|
2020-01-28 01:27:11 +03:00
|
|
|
const CompleteSecurityBody = sdk.getComponent("auth.CompleteSecurityBody");
|
2020-01-24 22:11:57 +03:00
|
|
|
return (
|
|
|
|
<AuthPage>
|
2020-01-28 01:27:11 +03:00
|
|
|
<CompleteSecurityBody>
|
2020-01-24 22:11:57 +03:00
|
|
|
<AsyncWrapper prom={this._createStorageDialogPromise}
|
|
|
|
hasCancel={false}
|
|
|
|
onFinished={this.props.onFinished}
|
2020-01-25 18:28:06 +03:00
|
|
|
accountPassword={this.props.accountPassword}
|
2020-01-24 22:11:57 +03:00
|
|
|
/>
|
2020-01-28 01:27:11 +03:00
|
|
|
</CompleteSecurityBody>
|
2020-01-24 22:11:57 +03:00
|
|
|
</AuthPage>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|