mirror of https://github.com/vector-im/riot-web
Step 3.2: Stop using `getComponent`
parent
1bbecdff6c
commit
585c777878
|
@ -15,9 +15,10 @@ limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import React, { CSSProperties } from 'react';
|
import React, { CSSProperties } from 'react';
|
||||||
import * as sdk from 'matrix-react-sdk/src/index';
|
|
||||||
import SdkConfig from 'matrix-react-sdk/src/SdkConfig';
|
import SdkConfig from 'matrix-react-sdk/src/SdkConfig';
|
||||||
|
|
||||||
|
import VectorAuthFooter from "./VectorAuthFooter";
|
||||||
|
|
||||||
export default class VectorAuthPage extends React.PureComponent {
|
export default class VectorAuthPage extends React.PureComponent {
|
||||||
static replaces = 'AuthPage';
|
static replaces = 'AuthPage';
|
||||||
|
|
||||||
|
@ -44,8 +45,6 @@ export default class VectorAuthPage extends React.PureComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const AuthFooter = sdk.getComponent('auth.AuthFooter');
|
|
||||||
|
|
||||||
const pageStyle = {
|
const pageStyle = {
|
||||||
background: `center/cover fixed url(${VectorAuthPage.getWelcomeBackgroundUrl()})`,
|
background: `center/cover fixed url(${VectorAuthPage.getWelcomeBackgroundUrl()})`,
|
||||||
};
|
};
|
||||||
|
@ -80,7 +79,7 @@ export default class VectorAuthPage extends React.PureComponent {
|
||||||
{ this.props.children }
|
{ this.props.children }
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<AuthFooter />
|
<VectorAuthFooter />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,6 @@ limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import * as sdk from 'matrix-react-sdk/src/index';
|
|
||||||
import PlatformPeg from 'matrix-react-sdk/src/PlatformPeg';
|
import PlatformPeg from 'matrix-react-sdk/src/PlatformPeg';
|
||||||
import { _td, newTranslatableError } from 'matrix-react-sdk/src/languageHandler';
|
import { _td, newTranslatableError } from 'matrix-react-sdk/src/languageHandler';
|
||||||
import AutoDiscoveryUtils from 'matrix-react-sdk/src/utils/AutoDiscoveryUtils';
|
import AutoDiscoveryUtils from 'matrix-react-sdk/src/utils/AutoDiscoveryUtils';
|
||||||
|
@ -30,6 +29,7 @@ import { IConfigOptions } from "matrix-react-sdk/src/IConfigOptions";
|
||||||
import { logger } from "matrix-js-sdk/src/logger";
|
import { logger } from "matrix-js-sdk/src/logger";
|
||||||
import { createClient } from "matrix-js-sdk/src/matrix";
|
import { createClient } from "matrix-js-sdk/src/matrix";
|
||||||
import { SnakedObject } from "matrix-react-sdk/src/utils/SnakedObject";
|
import { SnakedObject } from "matrix-react-sdk/src/utils/SnakedObject";
|
||||||
|
import MatrixChat from "matrix-react-sdk/src/components/structures/MatrixChat";
|
||||||
|
|
||||||
import { parseQs } from './url_utils';
|
import { parseQs } from './url_utils';
|
||||||
import VectorBasePlatform from "./platform/VectorBasePlatform";
|
import VectorBasePlatform from "./platform/VectorBasePlatform";
|
||||||
|
@ -133,7 +133,6 @@ export async function loadApp(fragParams: {}) {
|
||||||
const defaultDeviceName = snakedConfig.get("default_device_display_name")
|
const defaultDeviceName = snakedConfig.get("default_device_display_name")
|
||||||
?? platform.getDefaultDeviceDisplayName();
|
?? platform.getDefaultDeviceDisplayName();
|
||||||
|
|
||||||
const MatrixChat = sdk.getComponent('structures.MatrixChat');
|
|
||||||
return <MatrixChat
|
return <MatrixChat
|
||||||
onNewScreen={onNewScreen}
|
onNewScreen={onNewScreen}
|
||||||
makeRegistrationUrl={makeRegistrationUrl}
|
makeRegistrationUrl={makeRegistrationUrl}
|
||||||
|
@ -147,7 +146,7 @@ export async function loadApp(fragParams: {}) {
|
||||||
/>;
|
/>;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function verifyServerConfig() {
|
async function verifyServerConfig(): Promise<IConfigOptions> {
|
||||||
let validatedConfig;
|
let validatedConfig;
|
||||||
try {
|
try {
|
||||||
logger.log("Verifying homeserver configuration");
|
logger.log("Verifying homeserver configuration");
|
||||||
|
|
Loading…
Reference in New Issue