File tree Expand file tree Collapse file tree 3 files changed +34
-23
lines changed
src/components/views/auth Expand file tree Collapse file tree 3 files changed +34
-23
lines changed 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
127
127
release to release.
128
128
1 . ` brand ` : String to pass to your homeserver when configuring email notifications, to let the
129
129
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
130
135
1 . ` integrations_ui_url ` : URL to the web interface for the integrations server. The integrations
131
136
server is not Riot and normally not your homeserver either. The integration server settings
132
137
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.
19
19
20
20
import React from 'react' ;
21
21
import PropTypes from 'prop-types' ;
22
+ import SdkConfig from 'matrix-react-sdk/lib/SdkConfig' ;
22
23
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'
24
26
25
- module . exports = React . createClass ( {
26
- displayName : 'VectorAuthHeaderLogo' ,
27
- statics : {
28
- replaces : 'AuthHeaderLogo' ,
29
- } ,
30
- propTypes : {
27
+ static propTypes = {
31
28
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
+ }
33
37
34
- render : function ( ) {
35
38
return (
36
39
< div className = "mx_AuthHeaderLogo" >
37
- < img src = { LOGO_URI } alt = "Riot" />
40
+ < img src = { logoUrl } alt = "Riot" />
38
41
</ div >
39
42
) ;
40
- } ,
41
- } ) ;
43
+ }
44
+ }
Original file line number Diff line number Diff line change @@ -16,21 +16,24 @@ limitations under the License.
16
16
17
17
'use strict' ;
18
18
19
- const React = require ( 'react' ) ;
19
+ import React from 'react' ;
20
20
import sdk from 'matrix-react-sdk/lib/index' ;
21
+ import SdkConfig from 'matrix-react-sdk/lib/SdkConfig' ;
21
22
22
- module . exports = React . createClass ( {
23
- displayName : 'VectorAuthPage' ,
23
+ export default class VectorAuthPage extends React . PureComponent {
24
+ static replaces = 'AuthPage'
24
25
25
- statics : {
26
- replaces : 'AuthPage' ,
27
- } ,
28
-
29
- render : function ( ) {
26
+ render ( ) {
30
27
const AuthFooter = sdk . getComponent ( 'auth.AuthFooter' ) ;
31
28
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
+
32
35
const pageStyle = {
33
- background : ' center/cover fixed url(themes/riot/img/backgrounds/valley.jpg)' ,
36
+ background : ` center/cover fixed url(${ backgroundUrl } )` ,
34
37
} ;
35
38
36
39
const modalStyle = {
@@ -66,5 +69,5 @@ module.exports = React.createClass({
66
69
< AuthFooter />
67
70
</ div >
68
71
) ;
69
- } ,
70
- } ) ;
72
+ }
73
+ }
You can’t perform that action at this time.
0 commit comments