Skip to content

Commit e6706b0

Browse files
committed
Merge branch 'develop' into travis/room-list/enable
2 parents 28b5b0b + dbd62fb commit e6706b0

File tree

4 files changed

+20
-19
lines changed

4 files changed

+20
-19
lines changed

config.sample.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@
3131
"feature_pinning": "labs",
3232
"feature_custom_status": "labs",
3333
"feature_custom_tags": "labs",
34-
"feature_state_counters": "labs",
35-
"feature_irc_ui": "labs"
34+
"feature_state_counters": "labs"
3635
},
3736
"default_federate": true,
3837
"default_theme": "light",

docs/labs.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,3 @@ In the event the new room list needs to be disabled, add this to your config.jso
116116

117117
**Note**: In a future release the new room list will not be optional.
118118

119-
## IRC message layout (`feature_irc_ui`)
120-
121-
Adds an option to change the message layout to an IRC style ` timestamp | avatar
122-
| name | message `
123-

riot.im/develop/config.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@
2424
"feature_dm_verification": "labs",
2525
"feature_bridge_state": "labs",
2626
"feature_presence_in_room_list": "labs",
27-
"feature_custom_themes": "labs",
28-
"feature_irc_ui": "labs"
27+
"feature_custom_themes": "labs"
2928
},
3029
"piwik": {
3130
"url": "https://piwik.riot.im/",

src/components/views/auth/VectorAuthPage.js

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright 2019 New Vector Ltd
2+
Copyright 2019, 2020 New Vector Ltd
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.
@@ -14,30 +14,38 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17-
'use strict';
18-
1917
import React from 'react';
2018
import * as sdk from 'matrix-react-sdk/src/index';
2119
import SdkConfig from 'matrix-react-sdk/src/SdkConfig';
2220

2321
export default class VectorAuthPage extends React.PureComponent {
2422
static replaces = 'AuthPage'
2523

26-
render() {
27-
const AuthFooter = sdk.getComponent('auth.AuthFooter');
24+
static welcomeBackgroundUrl;
25+
26+
// cache the url as a static to prevent it changing without refreshing
27+
static getWelcomeBackgroundUrl() {
28+
if (VectorAuthPage.welcomeBackgroundUrl) return VectorAuthPage.welcomeBackgroundUrl;
2829

2930
const brandingConfig = SdkConfig.get().branding;
30-
let backgroundUrl = "themes/riot/img/backgrounds/valley.jpg";
31+
VectorAuthPage.welcomeBackgroundUrl = "themes/riot/img/backgrounds/valley.jpg";
3132
if (brandingConfig && brandingConfig.welcomeBackgroundUrl) {
3233
if (Array.isArray(brandingConfig.welcomeBackgroundUrl)) {
33-
backgroundUrl = brandingConfig.welcomeBackgroundUrl[Math.floor(Math.random() * brandingConfig.welcomeBackgroundUrl.length)];
34+
const index = Math.floor(Math.random() * brandingConfig.welcomeBackgroundUrl.length);
35+
VectorAuthPage.welcomeBackgroundUrl = brandingConfig.welcomeBackgroundUrl[index];
3436
} else {
35-
backgroundUrl = brandingConfig.welcomeBackgroundUrl;
37+
VectorAuthPage.welcomeBackgroundUrl = brandingConfig.welcomeBackgroundUrl;
3638
}
3739
}
3840

41+
return VectorAuthPage.welcomeBackgroundUrl;
42+
}
43+
44+
render() {
45+
const AuthFooter = sdk.getComponent('auth.AuthFooter');
46+
3947
const pageStyle = {
40-
background: `center/cover fixed url(${backgroundUrl})`,
48+
background: `center/cover fixed url(${VectorAuthPage.getWelcomeBackgroundUrl()})`,
4149
};
4250

4351
const modalStyle = {
@@ -65,7 +73,7 @@ export default class VectorAuthPage extends React.PureComponent {
6573
return (
6674
<div className="mx_AuthPage" style={pageStyle}>
6775
<div className="mx_AuthPage_modal" style={modalStyle}>
68-
<div className="mx_AuthPage_modalBlur" style={blurStyle}></div>
76+
<div className="mx_AuthPage_modalBlur" style={blurStyle} />
6977
<div className="mx_AuthPage_modalContent" style={modalContentStyle}>
7078
{ this.props.children }
7179
</div>

0 commit comments

Comments
 (0)