2017-10-24 23:37:26 +01:00
|
|
|
/*
|
|
|
|
|
Copyright 2015, 2016 OpenMarket Ltd
|
2019-01-21 12:05:07 -06:00
|
|
|
Copyright 2019 New Vector Ltd
|
2017-10-24 23:37:26 +01:00
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
*/
|
|
|
|
|
|
2019-08-30 10:27:51 +01:00
|
|
|
import React from 'react';
|
2020-04-15 14:19:47 +01:00
|
|
|
import PropTypes from 'prop-types';
|
2019-12-19 18:19:56 -07:00
|
|
|
import * as sdk from '../../../index';
|
2021-06-29 13:11:58 +01:00
|
|
|
import { replaceableComponent } from "../../../utils/replaceableComponent";
|
2017-10-24 23:37:26 +01:00
|
|
|
|
2021-03-08 19:45:39 -07:00
|
|
|
@replaceableComponent("views.auth.AuthHeader")
|
2020-08-29 12:14:16 +01:00
|
|
|
export default class AuthHeader extends React.Component {
|
|
|
|
|
static propTypes = {
|
2020-04-15 14:19:47 +01:00
|
|
|
disableLanguageSelector: PropTypes.bool,
|
2020-08-29 12:14:16 +01:00
|
|
|
};
|
2020-04-15 14:19:47 +01:00
|
|
|
|
2020-08-29 12:14:16 +01:00
|
|
|
render() {
|
2019-01-22 21:51:42 -06:00
|
|
|
const AuthHeaderLogo = sdk.getComponent('auth.AuthHeaderLogo');
|
2019-01-23 16:10:34 -06:00
|
|
|
const LanguageSelector = sdk.getComponent('views.auth.LanguageSelector');
|
2019-01-22 21:51:42 -06:00
|
|
|
|
2019-01-21 12:05:07 -06:00
|
|
|
return (
|
2019-01-21 18:33:17 -06:00
|
|
|
<div className="mx_AuthHeader">
|
2019-01-22 21:51:42 -06:00
|
|
|
<AuthHeaderLogo />
|
2020-04-15 14:19:47 +01:00
|
|
|
<LanguageSelector disabled={this.props.disableLanguageSelector} />
|
2019-01-21 12:05:07 -06:00
|
|
|
</div>
|
|
|
|
|
);
|
2020-08-29 12:14:16 +01:00
|
|
|
}
|
|
|
|
|
}
|