2015-12-01 16:12:38 +00:00
|
|
|
/*
|
2016-01-07 04:17:56 +00:00
|
|
|
Copyright 2015, 2016 OpenMarket Ltd
|
2019-01-21 18:40:34 -06:00
|
|
|
Copyright 2019 New Vector Ltd
|
2015-12-01 16:12:38 +00: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-01 15:31:33 +01:00
|
|
|
import React from 'react';
|
2019-12-19 18:47:40 -07:00
|
|
|
import SdkConfig from 'matrix-react-sdk/src/SdkConfig';
|
|
|
|
|
import { _t } from 'matrix-react-sdk/src/languageHandler';
|
2015-12-01 16:12:38 +00:00
|
|
|
|
2019-12-19 18:47:11 -07:00
|
|
|
const VectorAuthFooter = () => {
|
2019-08-06 18:22:11 +01:00
|
|
|
const brandingConfig = SdkConfig.get().branding;
|
|
|
|
|
let links = [
|
2020-07-16 23:54:10 -04:00
|
|
|
{"text": "Blog", "url": "https://element.io/blog"},
|
|
|
|
|
{"text": "Twitter", "url": "https://twitter.com/element_hq"},
|
|
|
|
|
{"text": "GitHub", "url": "https://github.com/vector-im/riot-web"},
|
2019-08-06 18:22:11 +01:00
|
|
|
];
|
2015-12-01 16:12:38 +00:00
|
|
|
|
2019-08-06 18:22:11 +01:00
|
|
|
if (brandingConfig && brandingConfig.authFooterLinks) {
|
|
|
|
|
links = brandingConfig.authFooterLinks;
|
|
|
|
|
}
|
2019-03-27 13:34:20 +01:00
|
|
|
|
2019-08-06 18:22:11 +01:00
|
|
|
const authFooterLinks = [];
|
|
|
|
|
for (const linkEntry of links) {
|
|
|
|
|
authFooterLinks.push(
|
2020-02-23 22:14:30 +00:00
|
|
|
<a href={linkEntry.url} key={linkEntry.text} target="_blank" rel="noreferrer noopener">
|
2019-08-06 18:22:11 +01:00
|
|
|
{linkEntry.text}
|
|
|
|
|
</a>,
|
2015-12-01 16:12:38 +00:00
|
|
|
);
|
2019-08-06 18:22:11 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<div className="mx_AuthFooter">
|
|
|
|
|
{authFooterLinks}
|
2020-07-20 12:42:35 -04:00
|
|
|
<a href="https://matrix.org" target="_blank" rel="noreferrer noopener">{ _t('Powered by Matrix') }</a>
|
2019-08-06 18:22:11 +01:00
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
};
|
2019-12-19 18:47:11 -07:00
|
|
|
|
|
|
|
|
VectorAuthFooter.replaces = 'AuthFooter';
|
|
|
|
|
|
|
|
|
|
export default VectorAuthFooter;
|