|
|
|
@ -16,43 +16,38 @@ limitations under the License. |
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
import React from 'react'; |
|
|
|
|
import createReactClass from 'create-react-class'; |
|
|
|
|
import SdkConfig from 'matrix-react-sdk/lib/SdkConfig'; |
|
|
|
|
|
|
|
|
|
import { _t } from 'matrix-react-sdk/lib/languageHandler'; |
|
|
|
|
|
|
|
|
|
module.exports = createReactClass({ |
|
|
|
|
displayName: 'VectorAuthFooter', |
|
|
|
|
statics: { |
|
|
|
|
replaces: 'AuthFooter', |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
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} key={linkEntry.text} target="_blank" rel="noopener"> |
|
|
|
|
{linkEntry.text} |
|
|
|
|
</a>, |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
|
<div className="mx_AuthFooter"> |
|
|
|
|
{authFooterLinks} |
|
|
|
|
<a href="https://matrix.org" target="_blank" rel="noopener">{ _t('powered by Matrix') }</a> |
|
|
|
|
</div> |
|
|
|
|
module.exports = () => { |
|
|
|
|
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} key={linkEntry.text} target="_blank" rel="noopener"> |
|
|
|
|
{linkEntry.text} |
|
|
|
|
</a>, |
|
|
|
|
); |
|
|
|
|
}, |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
|
<div className="mx_AuthFooter"> |
|
|
|
|
{authFooterLinks} |
|
|
|
|
<a href="https://matrix.org" target="_blank" rel="noopener">{ _t('powered by Matrix') }</a> |
|
|
|
|
</div> |
|
|
|
|
); |
|
|
|
|
}; |
|
|
|
|
module.exports.statics = { |
|
|
|
|
replaces: 'AuthFooter', |
|
|
|
|
}; |
|
|
|
|