From e95036405b81b435b6e56f152238e68b55db2484 Mon Sep 17 00:00:00 2001 From: Jorik Schellekens Date: Mon, 6 Jul 2020 15:22:57 +0100 Subject: [PATCH 1/2] Release the irc layout to the wild --- config.sample.json | 3 +-- docs/labs.md | 5 ----- riot.im/develop/config.json | 3 +-- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/config.sample.json b/config.sample.json index 10e3afd0..dffbb1f8 100644 --- a/config.sample.json +++ b/config.sample.json @@ -31,8 +31,7 @@ "feature_pinning": "labs", "feature_custom_status": "labs", "feature_custom_tags": "labs", - "feature_state_counters": "labs", - "feature_irc_ui": "labs" + "feature_state_counters": "labs" }, "default_federate": true, "default_theme": "light", diff --git a/docs/labs.md b/docs/labs.md index 09a8e0c9..02d8387b 100644 --- a/docs/labs.md +++ b/docs/labs.md @@ -105,8 +105,3 @@ For some sample themes, check out [aaronraimist/riot-web-themes](https://github. A complete rewrite of the room list is underway to increase performance, stability, and general usability. This is still rapidly changing, but feel free to give it a test. -## IRC message layout (`feature_irc_ui`) - -Adds an option to change the message layout to an IRC style ` timestamp | avatar -| name | message ` - diff --git a/riot.im/develop/config.json b/riot.im/develop/config.json index 908a12c8..553641cd 100644 --- a/riot.im/develop/config.json +++ b/riot.im/develop/config.json @@ -25,8 +25,7 @@ "feature_bridge_state": "labs", "feature_presence_in_room_list": "labs", "feature_custom_themes": "labs", - "feature_new_room_list": "labs", - "feature_irc_ui": "labs" + "feature_new_room_list": "labs" }, "piwik": { "url": "https://piwik.riot.im/", From 826cb1d3085f228ebcad7752e02803780fd85443 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Tue, 7 Jul 2020 17:53:52 +0100 Subject: [PATCH 2/2] Fix welcomeBackgroundUrl array causing background to change during use Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/components/views/auth/VectorAuthPage.js | 28 +++++++++++++-------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/src/components/views/auth/VectorAuthPage.js b/src/components/views/auth/VectorAuthPage.js index 13b43ca1..3e1b059b 100644 --- a/src/components/views/auth/VectorAuthPage.js +++ b/src/components/views/auth/VectorAuthPage.js @@ -1,5 +1,5 @@ /* -Copyright 2019 New Vector Ltd +Copyright 2019, 2020 New Vector Ltd Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,8 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -'use strict'; - import React from 'react'; import * as sdk from 'matrix-react-sdk/src/index'; import SdkConfig from 'matrix-react-sdk/src/SdkConfig'; @@ -23,21 +21,31 @@ import SdkConfig from 'matrix-react-sdk/src/SdkConfig'; export default class VectorAuthPage extends React.PureComponent { static replaces = 'AuthPage' - render() { - const AuthFooter = sdk.getComponent('auth.AuthFooter'); + static welcomeBackgroundUrl; + + // cache the url as a static to prevent it changing without refreshing + static getWelcomeBackgroundUrl() { + if (VectorAuthPage.welcomeBackgroundUrl) return VectorAuthPage.welcomeBackgroundUrl; const brandingConfig = SdkConfig.get().branding; - let backgroundUrl = "themes/riot/img/backgrounds/valley.jpg"; + VectorAuthPage.welcomeBackgroundUrl = "themes/riot/img/backgrounds/valley.jpg"; if (brandingConfig && brandingConfig.welcomeBackgroundUrl) { if (Array.isArray(brandingConfig.welcomeBackgroundUrl)) { - backgroundUrl = brandingConfig.welcomeBackgroundUrl[Math.floor(Math.random() * brandingConfig.welcomeBackgroundUrl.length)]; + const index = Math.floor(Math.random() * brandingConfig.welcomeBackgroundUrl.length); + VectorAuthPage.welcomeBackgroundUrl = brandingConfig.welcomeBackgroundUrl[index]; } else { - backgroundUrl = brandingConfig.welcomeBackgroundUrl; + VectorAuthPage.welcomeBackgroundUrl = brandingConfig.welcomeBackgroundUrl; } } + return VectorAuthPage.welcomeBackgroundUrl; + } + + render() { + const AuthFooter = sdk.getComponent('auth.AuthFooter'); + const pageStyle = { - background: `center/cover fixed url(${backgroundUrl})`, + background: `center/cover fixed url(${VectorAuthPage.getWelcomeBackgroundUrl()})`, }; const modalStyle = { @@ -65,7 +73,7 @@ export default class VectorAuthPage extends React.PureComponent { return (
-
+
{ this.props.children }