2015-12-01 17:27:23 +01:00
|
|
|
/*
|
2016-01-07 05:17:56 +01:00
|
|
|
Copyright 2015, 2016 OpenMarket Ltd
|
2019-01-22 01:40:34 +01:00
|
|
|
Copyright 2019 New Vector Ltd
|
2015-12-01 17:27:23 +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.
|
|
|
|
*/
|
|
|
|
|
|
|
|
'use strict';
|
|
|
|
|
2017-10-11 17:46:05 +02:00
|
|
|
import React from 'react';
|
|
|
|
import PropTypes from 'prop-types';
|
2019-02-11 17:23:22 +01:00
|
|
|
import SdkConfig from 'matrix-react-sdk/lib/SdkConfig';
|
2017-04-21 18:03:31 +02:00
|
|
|
|
2019-02-11 17:14:34 +01:00
|
|
|
export default class VectorAuthHeaderLogo extends React.PureComponent {
|
|
|
|
static replaces = 'AuthHeaderLogo'
|
|
|
|
|
|
|
|
static propTypes = {
|
2017-10-11 17:46:05 +02:00
|
|
|
icon: PropTypes.string,
|
2019-02-11 17:14:34 +01:00
|
|
|
}
|
2015-12-01 17:27:23 +01:00
|
|
|
|
2019-02-11 17:14:34 +01:00
|
|
|
render() {
|
2019-02-11 17:23:22 +01:00
|
|
|
const brandingConfig = SdkConfig.get().branding;
|
|
|
|
let logoUrl = "themes/riot/img/logos/riot-im-logo-black-text.svg";
|
|
|
|
if (brandingConfig && brandingConfig.authHeaderLogoUrl) {
|
|
|
|
logoUrl = brandingConfig.authHeaderLogoUrl;
|
|
|
|
}
|
|
|
|
|
2015-12-01 17:27:23 +01:00
|
|
|
return (
|
2019-01-23 04:53:46 +01:00
|
|
|
<div className="mx_AuthHeaderLogo">
|
2019-02-11 17:23:22 +01:00
|
|
|
<img src={logoUrl} alt="Riot" />
|
2015-12-01 17:27:23 +01:00
|
|
|
</div>
|
|
|
|
);
|
2019-02-11 17:14:34 +01:00
|
|
|
}
|
|
|
|
}
|