From 1b28f9aaf1d82578e17194ead1be522028a2822a Mon Sep 17 00:00:00 2001 From: Estelle Comment Date: Tue, 22 Mar 2022 15:28:14 +0100 Subject: [PATCH 01/14] First attempt at replacing a component --- .../views/dialogs/TchapServerPickerDialog.tsx | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 src/components/views/dialogs/TchapServerPickerDialog.tsx diff --git a/src/components/views/dialogs/TchapServerPickerDialog.tsx b/src/components/views/dialogs/TchapServerPickerDialog.tsx new file mode 100644 index 0000000000..cded78008f --- /dev/null +++ b/src/components/views/dialogs/TchapServerPickerDialog.tsx @@ -0,0 +1,29 @@ +/* +Copyright 2020-2021 The Matrix.org Foundation C.I.C. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +import React from "react"; + +export default class TchapServerPickerDialog extends React.PureComponent { + static replaces = 'ServerPickerDialog'; + + public render() { + return
+ COUCOU +
; + } +} From 71c5a59d86548ea6abde56950a9f3cd5dbc7aac8 Mon Sep 17 00:00:00 2001 From: Estelle Comment Date: Tue, 22 Mar 2022 16:03:27 +0100 Subject: [PATCH 02/14] Display list of servers in a dropdown. Submit is broken for now. --- .../views/dialogs/TchapServerPickerDialog.tsx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/components/views/dialogs/TchapServerPickerDialog.tsx b/src/components/views/dialogs/TchapServerPickerDialog.tsx index cded78008f..6762c53d08 100644 --- a/src/components/views/dialogs/TchapServerPickerDialog.tsx +++ b/src/components/views/dialogs/TchapServerPickerDialog.tsx @@ -15,15 +15,24 @@ limitations under the License. */ import React from "react"; +import SdkConfig from 'matrix-react-sdk/src/SdkConfig'; export default class TchapServerPickerDialog extends React.PureComponent { static replaces = 'ServerPickerDialog'; public render() { + const hsList = SdkConfig.get()['hs_url_list']; + const dropdownList = ; return
- COUCOU +
+ + { dropdownList } + +
; } } From 49c6e4e2beec1e0e0e98db48fa766e5e68546a75 Mon Sep 17 00:00:00 2001 From: Estelle Comment Date: Tue, 22 Mar 2022 18:09:59 +0100 Subject: [PATCH 03/14] ServerPickerDialog : everything except getting the users selection --- .../views/dialogs/TchapServerPickerDialog.tsx | 82 ++++++++++++++++--- 1 file changed, 72 insertions(+), 10 deletions(-) diff --git a/src/components/views/dialogs/TchapServerPickerDialog.tsx b/src/components/views/dialogs/TchapServerPickerDialog.tsx index 6762c53d08..32f3ec96e2 100644 --- a/src/components/views/dialogs/TchapServerPickerDialog.tsx +++ b/src/components/views/dialogs/TchapServerPickerDialog.tsx @@ -16,23 +16,85 @@ limitations under the License. import React from "react"; import SdkConfig from 'matrix-react-sdk/src/SdkConfig'; +import { _t } from "matrix-react-sdk/src/languageHandler"; +// We import components from the react-sdk like this to avoid " Attempted to get a component before a skin +// has been loaded" +import * as sdk from 'matrix-react-sdk/src/index'; +import AutoDiscoveryUtils, { ValidatedServerConfig } from "matrix-react-sdk/src/utils/AutoDiscoveryUtils"; -export default class TchapServerPickerDialog extends React.PureComponent { +interface IProps { + title?: string; + serverConfig: ValidatedServerConfig; + onFinished(config?: ValidatedServerConfig): void; +} + +export default class TchapServerPickerDialog extends React.PureComponent { static replaces = 'ServerPickerDialog'; + private onSubmit = async (ev) => { + ev.preventDefault(); + + const hsUrl = 'matrix.i.tchap.gouv.fr'; // todo pick from list + // todo normalise to full url ? or just use full urls in config + + // Fake the discovery process, we don't need it since we know our own servers. + const discoveryResult = { + "m.homeserver": { + state: "SUCCESS", + error: null, + base_url: "https://" + hsUrl, + }, + "m.identity_server": { + state: "PROMPT", + error: null, + base_url: "https://" + hsUrl, // On Tchap our Identity server urls and home server urls are the same + }, + }; + // Then continue the same flow as the original ServerPickerDialog. + const validatedConf = AutoDiscoveryUtils.buildValidatedConfigFromDiscovery(hsUrl, discoveryResult); + this.props.onFinished(validatedConf); + }; + + private getHomeServerList = () => { + return SdkConfig.get()['hs_url_list']; + }; + public render() { - const hsList = SdkConfig.get()['hs_url_list']; - const dropdownList = ; - return
- - { dropdownList } - +
+ +
+
+ ; +
+ + + { _t("Continue") } + + +

{ _t("Learn more") }

+ Todo : specific documentation for tchap + + { _t("About homeservers") } + +
-
; + ; } } From dc5301c3b560ae846d80ce7c3366dbbc92f7d7fa Mon Sep 17 00:00:00 2001 From: Estelle Comment Date: Tue, 22 Mar 2022 18:36:11 +0100 Subject: [PATCH 04/14] Radio buttons, almost working except the selected button is not displayed --- config.sample.json | 4 +++ .../views/dialogs/TchapServerPickerDialog.tsx | 32 ++++++++++++++++--- 2 files changed, 31 insertions(+), 5 deletions(-) diff --git a/config.sample.json b/config.sample.json index 03b8dbeb90..c635589db2 100644 --- a/config.sample.json +++ b/config.sample.json @@ -8,6 +8,10 @@ "base_url": "https://matrix.i.tchap.gouv.fr" } }, + "hs_url_list": [ + "matrix.i.tchap.gouv.fr", + "matrix.e.tchap.gouv.fr" + ], "disable_custom_urls": false, "disable_guests": false, "disable_login_language_selector": false, diff --git a/src/components/views/dialogs/TchapServerPickerDialog.tsx b/src/components/views/dialogs/TchapServerPickerDialog.tsx index 32f3ec96e2..913f6c1fac 100644 --- a/src/components/views/dialogs/TchapServerPickerDialog.tsx +++ b/src/components/views/dialogs/TchapServerPickerDialog.tsx @@ -31,11 +31,13 @@ interface IProps { export default class TchapServerPickerDialog extends React.PureComponent { static replaces = 'ServerPickerDialog'; + selectedHomeServer: string; + private onSubmit = async (ev) => { ev.preventDefault(); - const hsUrl = 'matrix.i.tchap.gouv.fr'; // todo pick from list - // todo normalise to full url ? or just use full urls in config + const hsUrl = this.selectedHomeServer; + console.log('onSubmit found hsUrl', hsUrl); // Fake the discovery process, we don't need it since we know our own servers. const discoveryResult = { @@ -59,13 +61,30 @@ export default class TchapServerPickerDialog extends React.PureComponent return SdkConfig.get()['hs_url_list']; }; + private onHomeServerSelected = (homeServer) => { + console.log('onHomeServerSelected', homeServer); + this.selectedHomeServer = homeServer; + }; + public render() { // Imports const BaseDialog = sdk.getComponent('dialogs.BaseDialog'); const AccessibleButton = sdk.getComponent('elements.AccessibleButton'); + const StyledRadioGroup = sdk.getComponent('elements.StyledRadioGroup'); const homeServerList = this.getHomeServerList(); + const options = homeServerList.map(hsUrl => { + return { + value: hsUrl, + label: Ministère de { hsUrl }, + description: Exemple d'emails dans { hsUrl }, + }; + }); + // todo : add server names, and email examples. + + this.selectedHomeServer = ""; + return
- ; +
From 92b0535f6080d7658c1032698f31601792eaf0ee Mon Sep 17 00:00:00 2001 From: Estelle Comment Date: Tue, 22 Mar 2022 18:45:53 +0100 Subject: [PATCH 05/14] Display user-friendly info instead of just the homeserver url --- config.sample.json | 16 ++++++++++++---- .../views/dialogs/TchapServerPickerDialog.tsx | 12 ++++++------ 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/config.sample.json b/config.sample.json index c635589db2..4b16e69e67 100644 --- a/config.sample.json +++ b/config.sample.json @@ -2,15 +2,23 @@ "default_server_config": { "m.homeserver": { "base_url": "https://matrix.i.tchap.gouv.fr", - "server_name": "Matrix Internes Preprod" + "server_name": "Internes - preprod" }, "m.identity_server": { "base_url": "https://matrix.i.tchap.gouv.fr" } }, - "hs_url_list": [ - "matrix.i.tchap.gouv.fr", - "matrix.e.tchap.gouv.fr" + "homeserver_list": [ + { + "url": "matrix.i.tchap.gouv.fr", + "server_name": "Internes - preprod", + "email_examples": "hakim@beta.gouv.fr, alice@dinterieur.gouv.fr, ..." + }, + { + "url": "matrix.e.tchap.gouv.fr", + "server_name": "Externes - preprod", + "email_examples": "nina@soprasteria.com, pedro@athos.fr, ..." + } ], "disable_custom_urls": false, "disable_guests": false, diff --git a/src/components/views/dialogs/TchapServerPickerDialog.tsx b/src/components/views/dialogs/TchapServerPickerDialog.tsx index 913f6c1fac..e5e797a6e6 100644 --- a/src/components/views/dialogs/TchapServerPickerDialog.tsx +++ b/src/components/views/dialogs/TchapServerPickerDialog.tsx @@ -55,10 +55,11 @@ export default class TchapServerPickerDialog extends React.PureComponent // Then continue the same flow as the original ServerPickerDialog. const validatedConf = AutoDiscoveryUtils.buildValidatedConfigFromDiscovery(hsUrl, discoveryResult); this.props.onFinished(validatedConf); + // todo : when dialog closes, can we display the name of the server instead of the url ? }; private getHomeServerList = () => { - return SdkConfig.get()['hs_url_list']; + return SdkConfig.get()['homeserver_list']; }; private onHomeServerSelected = (homeServer) => { @@ -74,14 +75,13 @@ export default class TchapServerPickerDialog extends React.PureComponent const homeServerList = this.getHomeServerList(); - const options = homeServerList.map(hsUrl => { + const options = homeServerList.map(homeServer => { return { - value: hsUrl, - label: Ministère de { hsUrl }, - description: Exemple d'emails dans { hsUrl }, + value: homeServer.url, + label: { homeServer.server_name }, + description: { homeServer.email_examples }, }; }); - // todo : add server names, and email examples. this.selectedHomeServer = ""; From 81d9546428f3e3c56d377aa0455b3d128e8d7156 Mon Sep 17 00:00:00 2001 From: Estelle Comment Date: Wed, 23 Mar 2022 15:44:58 +0100 Subject: [PATCH 06/14] Radiobuttons that work ! --- .../views/dialogs/TchapServerPickerDialog.tsx | 26 +++++++++++++------ 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/src/components/views/dialogs/TchapServerPickerDialog.tsx b/src/components/views/dialogs/TchapServerPickerDialog.tsx index e5e797a6e6..174d101f44 100644 --- a/src/components/views/dialogs/TchapServerPickerDialog.tsx +++ b/src/components/views/dialogs/TchapServerPickerDialog.tsx @@ -24,19 +24,29 @@ import AutoDiscoveryUtils, { ValidatedServerConfig } from "matrix-react-sdk/src/ interface IProps { title?: string; - serverConfig: ValidatedServerConfig; + serverConfig: ValidatedServerConfig; // todo this is never used onFinished(config?: ValidatedServerConfig): void; } -export default class TchapServerPickerDialog extends React.PureComponent { +interface IState { + selectedHomeServer: string; +} + +export default class TchapServerPickerDialog extends React.PureComponent { static replaces = 'ServerPickerDialog'; - selectedHomeServer: string; + constructor(props) { + super(props); + + this.state = { + selectedHomeServer: 'matrix.e.tchap.gouv.fr', // todo don't hard code + }; + } private onSubmit = async (ev) => { ev.preventDefault(); - const hsUrl = this.selectedHomeServer; + const hsUrl = this.state.selectedHomeServer; console.log('onSubmit found hsUrl', hsUrl); // Fake the discovery process, we don't need it since we know our own servers. @@ -64,7 +74,9 @@ export default class TchapServerPickerDialog extends React.PureComponent private onHomeServerSelected = (homeServer) => { console.log('onHomeServerSelected', homeServer); - this.selectedHomeServer = homeServer; + this.setState({ + selectedHomeServer: homeServer, + }); }; public render() { @@ -83,8 +95,6 @@ export default class TchapServerPickerDialog extends React.PureComponent }; }); - this.selectedHomeServer = ""; - return
From 4d9603ff4dd047ee59ec55af9d3428395a71a799 Mon Sep 17 00:00:00 2001 From: Estelle Comment Date: Wed, 23 Mar 2022 15:53:14 +0100 Subject: [PATCH 07/14] Pass serverConfig to the dialog --- src/components/views/dialogs/TchapServerPickerDialog.tsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/components/views/dialogs/TchapServerPickerDialog.tsx b/src/components/views/dialogs/TchapServerPickerDialog.tsx index 174d101f44..add9915a4c 100644 --- a/src/components/views/dialogs/TchapServerPickerDialog.tsx +++ b/src/components/views/dialogs/TchapServerPickerDialog.tsx @@ -24,7 +24,7 @@ import AutoDiscoveryUtils, { ValidatedServerConfig } from "matrix-react-sdk/src/ interface IProps { title?: string; - serverConfig: ValidatedServerConfig; // todo this is never used + serverConfig: ValidatedServerConfig; onFinished(config?: ValidatedServerConfig): void; } @@ -35,11 +35,15 @@ interface IState { export default class TchapServerPickerDialog extends React.PureComponent { static replaces = 'ServerPickerDialog'; + private removeProtocolFromUrl = (url) => { + return url.replace(/^https?:\/\//, ''); + }; + constructor(props) { super(props); this.state = { - selectedHomeServer: 'matrix.e.tchap.gouv.fr', // todo don't hard code + selectedHomeServer: this.removeProtocolFromUrl(props.serverConfig.hsUrl), }; } @@ -47,7 +51,6 @@ export default class TchapServerPickerDialog extends React.PureComponent Date: Wed, 23 Mar 2022 16:21:13 +0100 Subject: [PATCH 08/14] Use server name for display --- .../views/dialogs/TchapServerPickerDialog.tsx | 37 +++++++++++-------- 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/src/components/views/dialogs/TchapServerPickerDialog.tsx b/src/components/views/dialogs/TchapServerPickerDialog.tsx index add9915a4c..5bf7223938 100644 --- a/src/components/views/dialogs/TchapServerPickerDialog.tsx +++ b/src/components/views/dialogs/TchapServerPickerDialog.tsx @@ -29,7 +29,7 @@ interface IProps { } interface IState { - selectedHomeServer: string; + selectedHomeServerUrl: string; } export default class TchapServerPickerDialog extends React.PureComponent { @@ -39,46 +39,53 @@ export default class TchapServerPickerDialog extends React.PureComponent { + return this.homeServerList.find(homeServer => homeServer.url === url); + }; + constructor(props) { super(props); - + this.homeServerList = this.getHomeServerList(); this.state = { - selectedHomeServer: this.removeProtocolFromUrl(props.serverConfig.hsUrl), + selectedHomeServerUrl: this.removeProtocolFromUrl(props.serverConfig.hsUrl), }; } + homeServerList; + private onSubmit = async (ev) => { ev.preventDefault(); - const hsUrl = this.state.selectedHomeServer; + const selectedHomeServer = this.findHomeServerInListByUrl(this.state.selectedHomeServerUrl); // Fake the discovery process, we don't need it since we know our own servers. const discoveryResult = { "m.homeserver": { state: "SUCCESS", error: null, - base_url: "https://" + hsUrl, + base_url: "https://" + selectedHomeServer.url, // todo use "base_url" instead of "url" ? + server_name: selectedHomeServer.server_name, }, "m.identity_server": { state: "PROMPT", error: null, - base_url: "https://" + hsUrl, // On Tchap our Identity server urls and home server urls are the same + base_url: "https://" + selectedHomeServer.url, // On Tchap our Identity server urls and home server urls are the same + server_name: selectedHomeServer.server_name, }, }; // Then continue the same flow as the original ServerPickerDialog. - const validatedConf = AutoDiscoveryUtils.buildValidatedConfigFromDiscovery(hsUrl, discoveryResult); + const validatedConf = AutoDiscoveryUtils.buildValidatedConfigFromDiscovery( + discoveryResult['m.homeserver'].server_name, discoveryResult); this.props.onFinished(validatedConf); - // todo : when dialog closes, can we display the name of the server instead of the url ? }; private getHomeServerList = () => { return SdkConfig.get()['homeserver_list']; }; - private onHomeServerSelected = (homeServer) => { - console.log('onHomeServerSelected', homeServer); + private onHomeServerSelected = (homeServerUrl) => { this.setState({ - selectedHomeServer: homeServer, + selectedHomeServerUrl: homeServerUrl, }); }; @@ -88,9 +95,7 @@ export default class TchapServerPickerDialog extends React.PureComponent { + const radioButtonOptions = this.homeServerList.map(homeServer => { return { value: homeServer.url, label: { homeServer.server_name }, @@ -113,9 +118,9 @@ export default class TchapServerPickerDialog extends React.PureComponent
From 3cd5c801b88e35f96e234f95d5011cae86c40927 Mon Sep 17 00:00:00 2001 From: Estelle Comment Date: Wed, 23 Mar 2022 16:26:55 +0100 Subject: [PATCH 09/14] Url full URLs in config, and same keys as element --- config.sample.json | 4 +-- .../views/dialogs/TchapServerPickerDialog.tsx | 26 +++++++------------ 2 files changed, 11 insertions(+), 19 deletions(-) diff --git a/config.sample.json b/config.sample.json index cf85a8eeca..f8007e8e04 100644 --- a/config.sample.json +++ b/config.sample.json @@ -10,12 +10,12 @@ }, "homeserver_list": [ { - "url": "matrix.i.tchap.gouv.fr", + "base_url": "https://matrix.i.tchap.gouv.fr", "server_name": "Internes - preprod", "email_examples": "hakim@beta.gouv.fr, alice@dinterieur.gouv.fr, ..." }, { - "url": "matrix.e.tchap.gouv.fr", + "base_url": "https://matrix.e.tchap.gouv.fr", "server_name": "Externes - preprod", "email_examples": "nina@soprasteria.com, pedro@athos.fr, ..." } diff --git a/src/components/views/dialogs/TchapServerPickerDialog.tsx b/src/components/views/dialogs/TchapServerPickerDialog.tsx index 5bf7223938..347f9b3d3a 100644 --- a/src/components/views/dialogs/TchapServerPickerDialog.tsx +++ b/src/components/views/dialogs/TchapServerPickerDialog.tsx @@ -35,23 +35,19 @@ interface IState { export default class TchapServerPickerDialog extends React.PureComponent { static replaces = 'ServerPickerDialog'; - private removeProtocolFromUrl = (url) => { - return url.replace(/^https?:\/\//, ''); - }; - - private findHomeServerInListByUrl = url => { - return this.homeServerList.find(homeServer => homeServer.url === url); - }; + homeServerList; constructor(props) { super(props); - this.homeServerList = this.getHomeServerList(); + this.homeServerList = SdkConfig.get()['homeserver_list']; this.state = { - selectedHomeServerUrl: this.removeProtocolFromUrl(props.serverConfig.hsUrl), + selectedHomeServerUrl: props.serverConfig.hsUrl, }; } - homeServerList; + private findHomeServerInListByUrl = url => { + return this.homeServerList.find(homeServer => homeServer.base_url === url); + }; private onSubmit = async (ev) => { ev.preventDefault(); @@ -63,13 +59,13 @@ export default class TchapServerPickerDialog extends React.PureComponent { - return SdkConfig.get()['homeserver_list']; - }; - private onHomeServerSelected = (homeServerUrl) => { this.setState({ selectedHomeServerUrl: homeServerUrl, @@ -97,7 +89,7 @@ export default class TchapServerPickerDialog extends React.PureComponent { return { - value: homeServer.url, + value: homeServer.base_url, label: { homeServer.server_name }, description: { homeServer.email_examples }, }; From b598c0f46aa668972679970822be8210c55c1467 Mon Sep 17 00:00:00 2001 From: Estelle Comment Date: Wed, 23 Mar 2022 16:36:18 +0100 Subject: [PATCH 10/14] Add translations --- config.sample.json | 2 +- src/components/views/dialogs/TchapServerPickerDialog.tsx | 5 ++--- src/i18n/strings/en_EN.json | 4 +++- src/i18n/strings/fr.json | 4 +++- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/config.sample.json b/config.sample.json index f8007e8e04..af9964e273 100644 --- a/config.sample.json +++ b/config.sample.json @@ -17,7 +17,7 @@ { "base_url": "https://matrix.e.tchap.gouv.fr", "server_name": "Externes - preprod", - "email_examples": "nina@soprasteria.com, pedro@athos.fr, ..." + "email_examples": "nina@soprasteria.com, paul@athos.fr, ..." } ], "disable_custom_urls": false, diff --git a/src/components/views/dialogs/TchapServerPickerDialog.tsx b/src/components/views/dialogs/TchapServerPickerDialog.tsx index 347f9b3d3a..82e28d1324 100644 --- a/src/components/views/dialogs/TchapServerPickerDialog.tsx +++ b/src/components/views/dialogs/TchapServerPickerDialog.tsx @@ -91,7 +91,7 @@ export default class TchapServerPickerDialog extends React.PureComponent{ homeServer.server_name }, - description: { homeServer.email_examples }, + description: { _t("Examples:") } { homeServer.email_examples }, }; }); @@ -105,7 +105,7 @@ export default class TchapServerPickerDialog extends React.PureComponent
- +

{ _t("Learn more") }

- Todo : specific documentation for tchap { _t("About homeservers") } diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index 754d93f761..e4cc1e69b3 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -32,5 +32,7 @@ "Explore rooms": "Explore rooms", "Username": "Email", "Username_comments": "We use Email to login in Tchap. The Login code accepts both username and email. So the simplest change for us to force login by email is to just rename the Username field to Email.", - "Welcome to Tchap": "Bienvenue sur Tchap" + "Welcome to Tchap": "Bienvenue sur Tchap", + "Examples:": "Examples:", + "Choose a homeserver :": "Choose a homeserver :" } diff --git a/src/i18n/strings/fr.json b/src/i18n/strings/fr.json index 6a3e839767..f8208f0985 100644 --- a/src/i18n/strings/fr.json +++ b/src/i18n/strings/fr.json @@ -39,5 +39,7 @@ "Previous recently visited room or community": "Salon ou communauté précédemment visité", "Username": "E-mail", "Username_comments": "We use E-mail to login in Tchap. The Login code accepts both username and email. So the simplest change for us to force login by email is to just rename the Username field to Email.", - "Welcome to Tchap": "Bienvenue sur Tchap" + "Welcome to Tchap": "Bienvenue sur Tchap", + "Examples:": "Exemples :", + "Choose a homeserver :": "Choisissez un serveur d'accueil :" } From 394612ec9595b57f46325339778dd9652b656586 Mon Sep 17 00:00:00 2001 From: Estelle Comment Date: Wed, 23 Mar 2022 17:02:27 +0100 Subject: [PATCH 11/14] Last tweaks --- config.sample.json | 2 +- src/components/views/dialogs/TchapServerPickerDialog.tsx | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/config.sample.json b/config.sample.json index af9964e273..972d04cfe1 100644 --- a/config.sample.json +++ b/config.sample.json @@ -12,7 +12,7 @@ { "base_url": "https://matrix.i.tchap.gouv.fr", "server_name": "Internes - preprod", - "email_examples": "hakim@beta.gouv.fr, alice@dinterieur.gouv.fr, ..." + "email_examples": "hakim@beta.gouv.fr, alice@interieur.gouv.fr, ..." }, { "base_url": "https://matrix.e.tchap.gouv.fr", diff --git a/src/components/views/dialogs/TchapServerPickerDialog.tsx b/src/components/views/dialogs/TchapServerPickerDialog.tsx index 82e28d1324..948632d8b1 100644 --- a/src/components/views/dialogs/TchapServerPickerDialog.tsx +++ b/src/components/views/dialogs/TchapServerPickerDialog.tsx @@ -119,12 +119,6 @@ export default class TchapServerPickerDialog extends React.PureComponent { _t("Continue") } - -

{ _t("Learn more") }

- - { _t("About homeservers") } - - ; } From baac6eedc9f19cb8b8a375ee4c2a430915556e32 Mon Sep 17 00:00:00 2001 From: Estelle Comment Date: Wed, 23 Mar 2022 17:48:31 +0100 Subject: [PATCH 12/14] Remove extra space in a translation --- src/components/views/dialogs/TchapServerPickerDialog.tsx | 2 +- src/i18n/strings/en_EN.json | 2 +- src/i18n/strings/fr.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/views/dialogs/TchapServerPickerDialog.tsx b/src/components/views/dialogs/TchapServerPickerDialog.tsx index 948632d8b1..4a445bf342 100644 --- a/src/components/views/dialogs/TchapServerPickerDialog.tsx +++ b/src/components/views/dialogs/TchapServerPickerDialog.tsx @@ -105,7 +105,7 @@ export default class TchapServerPickerDialog extends React.PureComponent
- +
Date: Wed, 23 Mar 2022 17:50:08 +0100 Subject: [PATCH 13/14] Remove matrix license --- .../views/dialogs/TchapServerPickerDialog.tsx | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/src/components/views/dialogs/TchapServerPickerDialog.tsx b/src/components/views/dialogs/TchapServerPickerDialog.tsx index 4a445bf342..08060ef173 100644 --- a/src/components/views/dialogs/TchapServerPickerDialog.tsx +++ b/src/components/views/dialogs/TchapServerPickerDialog.tsx @@ -1,19 +1,3 @@ -/* -Copyright 2020-2021 The Matrix.org Foundation C.I.C. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - import React from "react"; import SdkConfig from 'matrix-react-sdk/src/SdkConfig'; import { _t } from "matrix-react-sdk/src/languageHandler"; From 98ca867429a16630a421b9c8a81c6b9ad5b122b0 Mon Sep 17 00:00:00 2001 From: Estelle Comment Date: Wed, 23 Mar 2022 17:59:13 +0100 Subject: [PATCH 14/14] Add a license to new file --- src/components/views/dialogs/TchapServerPickerDialog.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/components/views/dialogs/TchapServerPickerDialog.tsx b/src/components/views/dialogs/TchapServerPickerDialog.tsx index 08060ef173..acf6618bb2 100644 --- a/src/components/views/dialogs/TchapServerPickerDialog.tsx +++ b/src/components/views/dialogs/TchapServerPickerDialog.tsx @@ -1,3 +1,7 @@ +/* +* Copyright 2022 DINUM "Apache License" version 2.0 +*/ + import React from "react"; import SdkConfig from 'matrix-react-sdk/src/SdkConfig'; import { _t } from "matrix-react-sdk/src/languageHandler";