From bea0dab623843bd8af601590c8dc0770be3f3d5f Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Thu, 16 Apr 2020 11:35:28 -0600 Subject: [PATCH 1/4] Update cross-signing feature docs and document fallback procedures For https://github.com/matrix-org/matrix-react-sdk/pull/4416 --- docs/labs.md | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/docs/labs.md b/docs/labs.md index 0605e6c5..970a46d1 100644 --- a/docs/labs.md +++ b/docs/labs.md @@ -67,13 +67,24 @@ An implementation of [MSC2241](https://github.com/matrix-org/matrix-doc/pull/224 This also includes a new implementation of the user & member info panel, designed to share more code between showing community members & room members. Built on top of this new panel is also a new UX for verification from the member panel. -## Cross-signing (in development) (`feature_cross_signing`) +## Cross-signing Cross-signing ([MSC1756](https://github.com/matrix-org/matrix-doc/pull/1756)) improves the device verification experience by allowing you to verify a user instead of verifying each of their devices. -This feature is still in development and will be landing in several chunks. +The feature is enabled by default and does not follow a traditional labs flag +at the moment. If something goes wrong, add this to your config to disable it: +```json +{ + "settingDefaults": { + "feature_cross_signing": false + } +} +``` + +The setting will be removed in a future release, enabling it non-optionally for +all users. ## Event indexing and E2EE search support using Seshat (`feature_event_indexing`) From 3a551f2da5c94a279a89349104a22e6223eb643e Mon Sep 17 00:00:00 2001 From: The Stranjer <791672+TheStranjer@users.noreply.github.com> Date: Fri, 17 Apr 2020 06:31:49 -0400 Subject: [PATCH 2/4] Allow admins to create an array of backgrounds to be randomly chosen from --- docs/config.md | 2 +- src/components/views/auth/VectorAuthPage.js | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/config.md b/docs/config.md index 3102eaf8..a1d6304e 100644 --- a/docs/config.md +++ b/docs/config.md @@ -32,7 +32,7 @@ For a good example, see https://riot.im/develop/config.json. homeserver know what email template to use when talking to you. 1. `branding`: Configures various branding and logo details, such as: 1. `welcomeBackgroundUrl`: An image to use as a wallpaper outside the app - during authentication flows + during authentication flows. If an array is passed, an image is chosen randomly for each visit. 1. `authHeaderLogoUrl`: An logo image that is shown in the header during authentication flows 1. `authFooterLinks`: a list of links to show in the authentication page footer: diff --git a/src/components/views/auth/VectorAuthPage.js b/src/components/views/auth/VectorAuthPage.js index 98ddb8ba..b1cd7c22 100644 --- a/src/components/views/auth/VectorAuthPage.js +++ b/src/components/views/auth/VectorAuthPage.js @@ -29,7 +29,11 @@ export default class VectorAuthPage extends React.PureComponent { const brandingConfig = SdkConfig.get().branding; let backgroundUrl = "themes/riot/img/backgrounds/valley.jpg"; if (brandingConfig && brandingConfig.welcomeBackgroundUrl) { - backgroundUrl = brandingConfig.welcomeBackgroundUrl; + if (Array.isArray(brandingConfig.welcomeBackgroundUrl)) { + backgroundUrl = brandingConfig.welcomeBackgroundUrl[ Math.floor(Math.random() * brandingConfig.welcomeBackgroundUrl.length)]; + } else { + backgroundUrl = brandingConfig.welcomeBackgroundUrl; + } } const pageStyle = { From b3f31265835f04330094c9807b3f81e124cb14bd Mon Sep 17 00:00:00 2001 From: The Stranjer <791672+TheStranjer@users.noreply.github.com> Date: Fri, 17 Apr 2020 06:52:43 -0400 Subject: [PATCH 3/4] Better conformity to JS linter --- src/components/views/auth/VectorAuthPage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/views/auth/VectorAuthPage.js b/src/components/views/auth/VectorAuthPage.js index b1cd7c22..13b43ca1 100644 --- a/src/components/views/auth/VectorAuthPage.js +++ b/src/components/views/auth/VectorAuthPage.js @@ -30,7 +30,7 @@ export default class VectorAuthPage extends React.PureComponent { let backgroundUrl = "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)]; + backgroundUrl = brandingConfig.welcomeBackgroundUrl[Math.floor(Math.random() * brandingConfig.welcomeBackgroundUrl.length)]; } else { backgroundUrl = brandingConfig.welcomeBackgroundUrl; } From 982074c12ef79f019625fd3bb8c248b179ee0545 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Sun, 19 Apr 2020 12:10:17 +0100 Subject: [PATCH 4/4] Use matrix-react-sdk type extensions as a base Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/@types/global.d.ts | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/@types/global.d.ts b/src/@types/global.d.ts index 6a5adec6..a3fb9028 100644 --- a/src/@types/global.d.ts +++ b/src/@types/global.d.ts @@ -14,25 +14,15 @@ See the License for the specific language governing permissions and limitations under the License. */ -import "modernizr"; +import "matrix-react-sdk/src/@types/global"; // load matrix-react-sdk's type extensions first import {Renderer} from "react-dom"; declare global { interface Window { - Modernizr: ModernizrAPI & FeatureDetects; - Olm: { - init: () => Promise; - }; - mxSendRageshake: (text: string, withLogs?: boolean) => void; matrixChat: ReturnType; // electron-only ipcRenderer: any; } - - // workaround for https://github.com/microsoft/TypeScript/issues/30933 - interface ObjectConstructor { - fromEntries?(xs: [string|number|symbol, any][]): object - } }