forked from matrix/element-web
configure auth footer links through sdkconfig
Signed-off-by: Jonas Jelten <jelten@in.tum.de>
This commit is contained in:
parent
a8e4949616
commit
5a051824c0
|
@ -141,6 +141,8 @@ For a good example, see https://riot.im/develop/config.json.
|
||||||
during authentication flows
|
during authentication flows
|
||||||
1. `authHeaderLogoUrl`: An logo image that is shown in the header during
|
1. `authHeaderLogoUrl`: An logo image that is shown in the header during
|
||||||
authentication flows
|
authentication flows
|
||||||
|
1. `authFooterLinks`: a list of links to show in the authentication page footer:
|
||||||
|
`[{"text": "Link text", "url": "https://link.target"}, {"text": "Other link", ...}]`
|
||||||
1. `integrations_ui_url`: URL to the web interface for the integrations server. The integrations
|
1. `integrations_ui_url`: URL to the web interface for the integrations server. The integrations
|
||||||
server is not Riot and normally not your homeserver either. The integration server settings
|
server is not Riot and normally not your homeserver either. The integration server settings
|
||||||
may be left blank to disable integrations.
|
may be left blank to disable integrations.
|
||||||
|
|
|
@ -18,6 +18,8 @@ limitations under the License.
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
const React = require('react');
|
const React = require('react');
|
||||||
|
import SdkConfig from 'matrix-react-sdk/lib/SdkConfig';
|
||||||
|
|
||||||
import { _t } from 'matrix-react-sdk/lib/languageHandler';
|
import { _t } from 'matrix-react-sdk/lib/languageHandler';
|
||||||
|
|
||||||
module.exports = React.createClass({
|
module.exports = React.createClass({
|
||||||
|
@ -27,11 +29,27 @@ module.exports = React.createClass({
|
||||||
},
|
},
|
||||||
|
|
||||||
render: function() {
|
render: function() {
|
||||||
|
const brandingConfig = SdkConfig.get().branding;
|
||||||
|
let links = [
|
||||||
|
{"text": "blog", "url": "https://medium.com/@RiotChat"},
|
||||||
|
{"text": "twitter", "url": "https://twitter.com/@RiotChat"},
|
||||||
|
{"text": "github", "url": "https://github.com/vector-im/riot-web"},
|
||||||
|
];
|
||||||
|
|
||||||
|
if (brandingConfig && brandingConfig.authFooterLinks) {
|
||||||
|
links = brandingConfig.authFooterLinks;
|
||||||
|
}
|
||||||
|
|
||||||
|
const authFooterLinks = [];
|
||||||
|
for (const linkEntry of links) {
|
||||||
|
authFooterLinks.push(
|
||||||
|
<a href={linkEntry.url} target="_blank" rel="noopener">{linkEntry.text}</a>,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="mx_AuthFooter">
|
<div className="mx_AuthFooter">
|
||||||
<a href="https://medium.com/@RiotChat" target="_blank" rel="noopener">blog</a>
|
{authFooterLinks}
|
||||||
<a href="https://twitter.com/@RiotChat" target="_blank" rel="noopener">twitter</a>
|
|
||||||
<a href="https://github.com/vector-im/riot-web" target="_blank" rel="noopener">github</a>
|
|
||||||
<a href="https://matrix.org" target="_blank" rel="noopener">{ _t('powered by Matrix') }</a>
|
<a href="https://matrix.org" target="_blank" rel="noopener">{ _t('powered by Matrix') }</a>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue