File tree Expand file tree Collapse file tree
src/components/views/auth Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -127,6 +127,11 @@ For a good example, see https://riot.im/develop/config.json
127127 release to release.
1281281 . ` brand ` : String to pass to your homeserver when configuring email notifications, to let the
129129 homeserver know what email template to use when talking to you.
130+ 1 . ` branding ` : Configures various branding and logo details, such as:
131+ 1 . ` welcomeBackgroundUrl ` : An image to use as a wallpaper outside the app
132+ during authentication flows
133+ 1 . ` authHeaderLogoUrl ` : An logo image that is shown in the header during
134+ authentication flows
1301351 . ` integrations_ui_url ` : URL to the web interface for the integrations server. The integrations
131136 server is not Riot and normally not your homeserver either. The integration server settings
132137 may be left blank to disable integrations.
Original file line number Diff line number Diff line change @@ -19,23 +19,26 @@ limitations under the License.
1919
2020import React from 'react' ;
2121import PropTypes from 'prop-types' ;
22+ import SdkConfig from 'matrix-react-sdk/lib/SdkConfig' ;
2223
23- const LOGO_URI = "themes/riot/img/logos/riot-im-logo-black-text.svg" ;
24+ export default class VectorAuthHeaderLogo extends React . PureComponent {
25+ static replaces = 'AuthHeaderLogo'
2426
25- module . exports = React . createClass ( {
26- displayName : 'VectorAuthHeaderLogo' ,
27- statics : {
28- replaces : 'AuthHeaderLogo' ,
29- } ,
30- propTypes : {
27+ static propTypes = {
3128 icon : PropTypes . string ,
32- } ,
29+ }
30+
31+ render ( ) {
32+ const brandingConfig = SdkConfig . get ( ) . branding ;
33+ let logoUrl = "themes/riot/img/logos/riot-im-logo-black-text.svg" ;
34+ if ( brandingConfig && brandingConfig . authHeaderLogoUrl ) {
35+ logoUrl = brandingConfig . authHeaderLogoUrl ;
36+ }
3337
34- render : function ( ) {
3538 return (
3639 < div className = "mx_AuthHeaderLogo" >
37- < img src = { LOGO_URI } alt = "Riot" />
40+ < img src = { logoUrl } alt = "Riot" />
3841 </ div >
3942 ) ;
40- } ,
41- } ) ;
43+ }
44+ }
Original file line number Diff line number Diff line change @@ -16,21 +16,24 @@ limitations under the License.
1616
1717'use strict' ;
1818
19- const React = require ( 'react' ) ;
19+ import React from 'react' ;
2020import sdk from 'matrix-react-sdk/lib/index' ;
21+ import SdkConfig from 'matrix-react-sdk/lib/SdkConfig' ;
2122
22- module . exports = React . createClass ( {
23- displayName : 'VectorAuthPage' ,
23+ export default class VectorAuthPage extends React . PureComponent {
24+ static replaces = 'AuthPage'
2425
25- statics : {
26- replaces : 'AuthPage' ,
27- } ,
28-
29- render : function ( ) {
26+ render ( ) {
3027 const AuthFooter = sdk . getComponent ( 'auth.AuthFooter' ) ;
3128
29+ const brandingConfig = SdkConfig . get ( ) . branding ;
30+ let backgroundUrl = "themes/riot/img/backgrounds/valley.jpg" ;
31+ if ( brandingConfig && brandingConfig . welcomeBackgroundUrl ) {
32+ backgroundUrl = brandingConfig . welcomeBackgroundUrl ;
33+ }
34+
3235 const pageStyle = {
33- background : ' center/cover fixed url(themes/riot/img/backgrounds/valley.jpg)' ,
36+ background : ` center/cover fixed url(${ backgroundUrl } )` ,
3437 } ;
3538
3639 const modalStyle = {
@@ -66,5 +69,5 @@ module.exports = React.createClass({
6669 < AuthFooter />
6770 </ div >
6871 ) ;
69- } ,
70- } ) ;
72+ }
73+ }
You can’t perform that action at this time.
0 commit comments