From 47fcd59301d7f19f9e48667ca84da0154953caaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Wed, 25 Aug 2021 11:24:20 +0200 Subject: [PATCH 001/156] Remove $eventtile-meta-color MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Šimon Brandner --- res/themes/dark/css/_dark.scss | 1 - res/themes/legacy-dark/css/_legacy-dark.scss | 1 - res/themes/legacy-light/css/_legacy-light.scss | 1 - res/themes/light/css/_light.scss | 1 - 4 files changed, 4 deletions(-) diff --git a/res/themes/dark/css/_dark.scss b/res/themes/dark/css/_dark.scss index f012dff0a12..e0e98d3b1fb 100644 --- a/res/themes/dark/css/_dark.scss +++ b/res/themes/dark/css/_dark.scss @@ -115,7 +115,6 @@ $groupheader-button-color: $header-panel-text-primary-color; $rightpanel-button-color: $header-panel-text-primary-color; $icon-button-color: $tertiary-content; $roomtopic-color: $text-secondary-color; -$eventtile-meta-color: $roomtopic-color; $header-divider-color: $header-panel-text-primary-color; $composer-e2e-icon-color: $header-panel-text-primary-color; diff --git a/res/themes/legacy-dark/css/_legacy-dark.scss b/res/themes/legacy-dark/css/_legacy-dark.scss index bed1e9c6617..451f69cbc49 100644 --- a/res/themes/legacy-dark/css/_legacy-dark.scss +++ b/res/themes/legacy-dark/css/_legacy-dark.scss @@ -114,7 +114,6 @@ $groupheader-button-color: $header-panel-text-primary-color; $rightpanel-button-color: $header-panel-text-primary-color; $icon-button-color: $header-panel-text-primary-color; $roomtopic-color: $text-secondary-color; -$eventtile-meta-color: $roomtopic-color; $header-divider-color: $header-panel-text-primary-color; $composer-e2e-icon-color: $header-panel-text-primary-color; diff --git a/res/themes/legacy-light/css/_legacy-light.scss b/res/themes/legacy-light/css/_legacy-light.scss index 2ce5b6062c5..542577a5611 100644 --- a/res/themes/legacy-light/css/_legacy-light.scss +++ b/res/themes/legacy-light/css/_legacy-light.scss @@ -181,7 +181,6 @@ $groupheader-button-color: #91a1c0; $rightpanel-button-color: #91a1c0; $icon-button-color: #91a1c0; $roomtopic-color: #9e9e9e; -$eventtile-meta-color: $roomtopic-color; $composer-e2e-icon-color: #91a1c0; $header-divider-color: #91a1c0; diff --git a/res/themes/light/css/_light.scss b/res/themes/light/css/_light.scss index 26cd1766c1e..9528018423b 100644 --- a/res/themes/light/css/_light.scss +++ b/res/themes/light/css/_light.scss @@ -175,7 +175,6 @@ $groupheader-button-color: #91A1C0; $rightpanel-button-color: #91A1C0; $icon-button-color: $quaternary-content; $roomtopic-color: #9e9e9e; -$eventtile-meta-color: $roomtopic-color; $composer-e2e-icon-color: #91A1C0; $header-divider-color: #91A1C0; From 8a9c493f3a07fe3dce82f8d937ee2d4e971041cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Wed, 25 Aug 2021 09:17:22 +0200 Subject: [PATCH 002/156] Use correct color for a selected room in the MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Šimon Brandner --- res/css/structures/_SpacePanel.scss | 2 +- res/css/views/rooms/_RoomTile.scss | 2 +- res/themes/dark/css/_dark.scss | 1 - res/themes/legacy-dark/css/_legacy-dark.scss | 1 + res/themes/legacy-light/css/_legacy-light.scss | 1 + res/themes/light-custom/css/_custom.scss | 2 +- res/themes/light/css/_light.scss | 1 - 7 files changed, 5 insertions(+), 5 deletions(-) diff --git a/res/css/structures/_SpacePanel.scss b/res/css/structures/_SpacePanel.scss index 30d421a3517..149436960ed 100644 --- a/res/css/structures/_SpacePanel.scss +++ b/res/css/structures/_SpacePanel.scss @@ -19,7 +19,7 @@ $nestedHeight: 24px; $gutterSize: 16px; $activeBorderTransparentGap: 1px; -$activeBackgroundColor: $roomtile-selected-bg-color; +$activeBackgroundColor: $panel-actions; $activeBorderColor: $secondary-content; .mx_SpacePanel { diff --git a/res/css/views/rooms/_RoomTile.scss b/res/css/views/rooms/_RoomTile.scss index 0c04f271156..0ec0b3988e3 100644 --- a/res/css/views/rooms/_RoomTile.scss +++ b/res/css/views/rooms/_RoomTile.scss @@ -30,7 +30,7 @@ limitations under the License. &:hover, &:focus-within, &.mx_RoomTile_hasMenuOpen { - background-color: $roomtile-selected-bg-color; + background-color: $panel-actions; border-radius: 8px; } diff --git a/res/themes/dark/css/_dark.scss b/res/themes/dark/css/_dark.scss index e0e98d3b1fb..6fbcc92e402 100644 --- a/res/themes/dark/css/_dark.scss +++ b/res/themes/dark/css/_dark.scss @@ -133,7 +133,6 @@ $groupFilterPanel-divider-color: $roomlist-header-color; $roomtile-preview-color: $secondary-content; $roomtile-default-badge-bg-color: #61708b; -$roomtile-selected-bg-color: rgba(141, 151, 165, 0.2); // ******************** diff --git a/res/themes/legacy-dark/css/_legacy-dark.scss b/res/themes/legacy-dark/css/_legacy-dark.scss index 451f69cbc49..eda173c716e 100644 --- a/res/themes/legacy-dark/css/_legacy-dark.scss +++ b/res/themes/legacy-dark/css/_legacy-dark.scss @@ -30,6 +30,7 @@ $tertiary-content: $tertiary-fg-color; $quaternary-content: #6F7882; $quinary-content: $quaternary-content; $background: $primary-bg-color; +$panel-actions: $roomtile-selected-bg-color; // used for dialog box text $light-fg-color: $header-panel-text-secondary-color; diff --git a/res/themes/legacy-light/css/_legacy-light.scss b/res/themes/legacy-light/css/_legacy-light.scss index 542577a5611..5810cdc5842 100644 --- a/res/themes/legacy-light/css/_legacy-light.scss +++ b/res/themes/legacy-light/css/_legacy-light.scss @@ -38,6 +38,7 @@ $tertiary-content: $tertiary-fg-color; $quaternary-content: #C1C6CD; $quinary-content: #e3e8f0; $background: $primary-bg-color; +$panel-actions: $roomtile-selected-bg-color; // used for dialog box text $light-fg-color: #747474; diff --git a/res/themes/light-custom/css/_custom.scss b/res/themes/light-custom/css/_custom.scss index af302bf252b..641182ecf38 100644 --- a/res/themes/light-custom/css/_custom.scss +++ b/res/themes/light-custom/css/_custom.scss @@ -64,7 +64,7 @@ $authpage-modal-bg-color: var(--timeline-background-color-50pct); //still needs $roomheader-bg-color: var(--timeline-background-color); // // --roomlist-highlights-color -$roomtile-selected-bg-color: var(--roomlist-highlights-color); +$panel-actions: var(--roomlist-highlights-color); // // --sidebar-color $groupFilterPanel-bg-color: var(--sidebar-color); diff --git a/res/themes/light/css/_light.scss b/res/themes/light/css/_light.scss index 9528018423b..73aef42bcad 100644 --- a/res/themes/light/css/_light.scss +++ b/res/themes/light/css/_light.scss @@ -195,7 +195,6 @@ $groupFilterPanel-divider-color: $roomlist-header-color; $roomtile-preview-color: $secondary-content; $roomtile-default-badge-bg-color: #61708b; -$roomtile-selected-bg-color: #FFF; $presence-online: $accent-color; $presence-away: #d9b072; From 14466b1e3be3437bc744eea705638c0ae120e90c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Wed, 25 Aug 2021 11:08:10 +0200 Subject: [PATCH 003/156] $settings-profile-placeholder-bg-color -> $system MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Šimon Brandner --- res/css/views/beta/_BetaCard.scss | 2 +- res/css/views/settings/_AvatarSetting.scss | 2 +- res/themes/dark/css/_dark.scss | 1 - res/themes/legacy-dark/css/_legacy-dark.scss | 1 - res/themes/legacy-light/css/_legacy-light.scss | 1 - res/themes/light/css/_light.scss | 1 - 6 files changed, 2 insertions(+), 6 deletions(-) diff --git a/res/css/views/beta/_BetaCard.scss b/res/css/views/beta/_BetaCard.scss index a6b61d3eada..ae7922e8027 100644 --- a/res/css/views/beta/_BetaCard.scss +++ b/res/css/views/beta/_BetaCard.scss @@ -17,7 +17,7 @@ limitations under the License. .mx_BetaCard { margin-bottom: 20px; padding: 24px; - background-color: $settings-profile-placeholder-bg-color; + background-color: $system; border-radius: 8px; box-sizing: border-box; diff --git a/res/css/views/settings/_AvatarSetting.scss b/res/css/views/settings/_AvatarSetting.scss index a350605ab12..9b2bd328cce 100644 --- a/res/css/views/settings/_AvatarSetting.scss +++ b/res/css/views/settings/_AvatarSetting.scss @@ -129,5 +129,5 @@ limitations under the License. } .mx_AvatarSetting_avatar .mx_AvatarSetting_avatarPlaceholder { - background-color: $settings-profile-placeholder-bg-color; + background-color: $system; } diff --git a/res/themes/dark/css/_dark.scss b/res/themes/dark/css/_dark.scss index 6fbcc92e402..75637455e47 100644 --- a/res/themes/dark/css/_dark.scss +++ b/res/themes/dark/css/_dark.scss @@ -100,7 +100,6 @@ $lightbox-background-bg-color: #000; $lightbox-background-bg-opacity: 0.85; $settings-grey-fg-color: #a2a2a2; -$settings-profile-placeholder-bg-color: $system; $settings-profile-overlay-placeholder-fg-color: #454545; $settings-profile-button-bg-color: #e7e7e7; $settings-profile-button-fg-color: $settings-profile-overlay-placeholder-fg-color; diff --git a/res/themes/legacy-dark/css/_legacy-dark.scss b/res/themes/legacy-dark/css/_legacy-dark.scss index eda173c716e..c6a859869b3 100644 --- a/res/themes/legacy-dark/css/_legacy-dark.scss +++ b/res/themes/legacy-dark/css/_legacy-dark.scss @@ -100,7 +100,6 @@ $lightbox-background-bg-color: #000; $lightbox-background-bg-opacity: 0.85; $settings-grey-fg-color: #a2a2a2; -$settings-profile-placeholder-bg-color: #e7e7e7; $settings-profile-overlay-placeholder-fg-color: #454545; $settings-profile-button-bg-color: #e7e7e7; $settings-profile-button-fg-color: $settings-profile-overlay-placeholder-fg-color; diff --git a/res/themes/legacy-light/css/_legacy-light.scss b/res/themes/legacy-light/css/_legacy-light.scss index 5810cdc5842..abf046b486e 100644 --- a/res/themes/legacy-light/css/_legacy-light.scss +++ b/res/themes/legacy-light/css/_legacy-light.scss @@ -158,7 +158,6 @@ $blockquote-bar-color: #ddd; $blockquote-fg-color: #777; $settings-grey-fg-color: #a2a2a2; -$settings-profile-placeholder-bg-color: #e7e7e7; $settings-profile-overlay-placeholder-fg-color: #2e2f32; $settings-profile-button-bg-color: #e7e7e7; $settings-profile-button-fg-color: $settings-profile-overlay-placeholder-fg-color; diff --git a/res/themes/light/css/_light.scss b/res/themes/light/css/_light.scss index 73aef42bcad..d8088c99889 100644 --- a/res/themes/light/css/_light.scss +++ b/res/themes/light/css/_light.scss @@ -152,7 +152,6 @@ $blockquote-bar-color: #ddd; $blockquote-fg-color: #777; $settings-grey-fg-color: #a2a2a2; -$settings-profile-placeholder-bg-color: $system; $settings-profile-overlay-placeholder-fg-color: #2e2f32; $settings-profile-button-bg-color: #e7e7e7; $settings-profile-button-fg-color: $settings-profile-overlay-placeholder-fg-color; From aeb74471a2c2cbe5b81f1181735e3cba1bf48337 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Fri, 1 Oct 2021 20:56:02 +0200 Subject: [PATCH 004/156] Move backports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Šimon Brandner --- res/themes/legacy-dark/css/_legacy-dark.scss | 19 +++++++------ .../legacy-light/css/_legacy-light.scss | 28 +++++++++++++------ 2 files changed, 30 insertions(+), 17 deletions(-) diff --git a/res/themes/legacy-dark/css/_legacy-dark.scss b/res/themes/legacy-dark/css/_legacy-dark.scss index c6a859869b3..778b7cc6d15 100644 --- a/res/themes/legacy-dark/css/_legacy-dark.scss +++ b/res/themes/legacy-dark/css/_legacy-dark.scss @@ -23,14 +23,7 @@ $tertiary-fg-color: $primary-fg-color; $primary-bg-color: $bg-color; $muted-fg-color: $header-panel-text-primary-color; -// Legacy theme backports -$primary-content: $primary-fg-color; -$secondary-content: $secondary-fg-color; -$tertiary-content: $tertiary-fg-color; -$quaternary-content: #6F7882; -$quinary-content: $quaternary-content; -$background: $primary-bg-color; -$panel-actions: $roomtile-selected-bg-color; + // used for dialog box text $light-fg-color: $header-panel-text-secondary-color; @@ -222,6 +215,16 @@ $eventbubble-bg-hover: #1C2026; $eventbubble-avatar-outline: $bg-color; $eventbubble-reply-color: #C1C6CD; +// Legacy theme backports +$primary-content: $primary-fg-color; +$secondary-content: $secondary-fg-color; +$tertiary-content: $tertiary-fg-color; +$quaternary-content: #6F7882; +$quinary-content: $quaternary-content; +$background: $primary-bg-color; +$panel-actions: $roomtile-selected-bg-color; +// Legacy theme backports + // ***** Mixins! ***** @define-mixin mx_DialogButton { diff --git a/res/themes/legacy-light/css/_legacy-light.scss b/res/themes/legacy-light/css/_legacy-light.scss index abf046b486e..b241c54f560 100644 --- a/res/themes/legacy-light/css/_legacy-light.scss +++ b/res/themes/legacy-light/css/_legacy-light.scss @@ -31,15 +31,6 @@ $tertiary-fg-color: $primary-fg-color; $primary-bg-color: #ffffff; $muted-fg-color: #61708b; // Commonly used in headings and relevant alt text -// Legacy theme backports -$primary-content: $primary-fg-color; -$secondary-content: $secondary-fg-color; -$tertiary-content: $tertiary-fg-color; -$quaternary-content: #C1C6CD; -$quinary-content: #e3e8f0; -$background: $primary-bg-color; -$panel-actions: $roomtile-selected-bg-color; - // used for dialog box text $light-fg-color: #747474; @@ -296,6 +287,16 @@ $progressbar-bg-color: rgba(141, 151, 165, 0.2); $room-warning-bg-color: $yellow-background; +// Legacy theme backports +$primary-content: $primary-fg-color; +$secondary-content: $secondary-fg-color; +$tertiary-content: $tertiary-fg-color; +$quaternary-content: #6F7882; +$quinary-content: $quaternary-content; +$background: $primary-bg-color; +$panel-actions: $roomtile-selected-bg-color; +// Legacy theme backports + $memberstatus-placeholder-color: $muted-fg-color; $authpage-bg-color: #2e3649; @@ -348,6 +349,15 @@ $eventbubble-bg-hover: #FAFBFD; $eventbubble-avatar-outline: #fff; $eventbubble-reply-color: #C1C6CD; +// Legacy theme backports +$primary-content: $primary-fg-color; +$secondary-content: $secondary-fg-color; +$tertiary-content: $tertiary-fg-color; +$quaternary-content: #C1C6CD; +$quinary-content: #e3e8f0; +$background: $primary-bg-color; +$panel-actions: $roomtile-selected-bg-color; + // ***** Mixins! ***** @define-mixin mx_DialogButton { From cc019ca1852c4c98fe8e11c5501aae957883b033 Mon Sep 17 00:00:00 2001 From: iaiz Date: Mon, 4 Oct 2021 10:53:37 +0000 Subject: [PATCH 005/156] Translated using Weblate (Spanish) Currently translated at 99.5% (3183 of 3198 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/es/ --- src/i18n/strings/es.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/i18n/strings/es.json b/src/i18n/strings/es.json index a508a9e40f3..44559d86f7e 100644 --- a/src/i18n/strings/es.json +++ b/src/i18n/strings/es.json @@ -1228,7 +1228,7 @@ "New login. Was this you?": "Nuevo inicio de sesión. ¿Has sido tú?", "%(name)s is requesting verification": "%(name)s solicita verificación", "Sign In or Create Account": "Iniciar sesión o Crear una cuenta", - "Use your account or create a new one to continue.": "Usa tu cuenta existente o crea una nueva para continuar.", + "Use your account or create a new one to continue.": "Entra con tu cuenta si ya tienes una o crea una nueva para continuar.", "Create Account": "Crear cuenta", "Sign In": "Iniciar sesión", "Sends a message as html, without interpreting it as markdown": "Envía un mensaje como HTML, sin interpretarlo en Markdown", @@ -1730,7 +1730,7 @@ "This account has been deactivated.": "Esta cuenta ha sido desactivada.", "Room name or address": "Nombre o dirección de la sala", "Help us improve %(brand)s": "Ayúdanos a mejorar %(brand)s", - "Send anonymous usage data which helps us improve %(brand)s. This will use a cookie.": "Enviar información anónima de uso nos ayuda a mejorar %(brand)s. Esto usará una cookie.", + "Send anonymous usage data which helps us improve %(brand)s. This will use a cookie.": "Envía información anónima de uso y ayúdanos a mejorar %(brand)s. Esto usará una cookie.", "Ok": "Ok", "You joined the call": "Te has unido a la llamada", "%(senderName)s joined the call": "%(senderName)s se ha unido a la llamada", @@ -2290,7 +2290,7 @@ "Use Security Key": "Usar clave de seguridad", "Use Security Key or Phrase": "Usar clave de seguridad o frase", "Decide where your account is hosted": "Decide dónde quieres alojar tu cuenta", - "Host account on": "Alojar cuenta en", + "Host account on": "Alojar la cuenta en", "Already have an account? Sign in here": "¿Ya tienes una cuenta? Inicia sesión aquí", "That username already exists, please try another.": "Ese nombre de usuario ya está en uso, escoge otro.", "New? Create account": "¿Primera vez? Crea una cuenta", @@ -2345,7 +2345,7 @@ "A call can only be transferred to a single user.": "Una llamada solo puede transferirse a un usuario.", "Invite by email": "Invitar a través de correo electrónico", "Send feedback": "Enviar comentarios", - "Report a bug": "Informar de un fallo", + "Report a bug": "Avísanos de un fallo", "There are two ways you can provide feedback and help us improve %(brand)s.": "Hay dos maneras en las que nos puedes hacer llegar tus comentarios para ayudarnos a mejorar %(brand)s.", "Comment": "Comentario", "Add comment": "Añadir comentario", @@ -3084,7 +3084,7 @@ "To view Spaces, hide communities in Preferences": "Para ver espacios, oculta las comunidades en ajustes", "It's not recommended to make encrypted rooms public. It will mean anyone can find and join the room, so anyone can read messages. You'll get none of the benefits of encryption. Encrypting messages in a public room will make receiving and sending messages slower.": "No está recomendado activar el cifrado en salas públicas. Cualquiera puede encontrar la sala y unirse, por lo que cualquiera puede leer los mensajes. No disfrutarás de los beneficios del cifrado. Además, activarlo en una sala pública hará que recibir y enviar mensajes tarde más.", "Communities have been archived to make way for Spaces but you can convert your communities into Spaces below. Converting will ensure your conversations get the latest features.": "Las comunidades han sido archivadas para dar paso a los espacios, pero puedes convertir tus comunidades a espacios debajo. Al convertirlas, te aseguras de que tus conversaciones tienen acceso a las últimas funcionalidades.", - "If you've submitted a bug via GitHub, debug logs can help us track down the problem. Debug logs contain application usage data including your username, the IDs or aliases of the rooms or groups you have visited, which UI elements you last interacted with, and the usernames of other users. They do not contain messages.": "Si nos has avisado de un fallo a través de Github, los registros de depuración nos pueden ayudar a encontrar más fácil el problema. Los registros incluyen datos de uso de la aplicación incluyendo tu nombre de usuario, las IDs o nombres de las salas o grupos que has visitado, los elementos de la interfaz con los que hayas interactuado recientemente, y los nombres de usuario de otras personas. No contienen mensajes.", + "If you've submitted a bug via GitHub, debug logs can help us track down the problem. Debug logs contain application usage data including your username, the IDs or aliases of the rooms or groups you have visited, which UI elements you last interacted with, and the usernames of other users. They do not contain messages.": "Si nos has avisado de un fallo a través de Github, los registros de depuración nos pueden ayudar a encontrar más fácil el problema. Los registros incluyen datos de uso de la aplicación como tu nombre de usuario, las IDs o nombres de las salas o grupos que has visitado, los elementos de la interfaz con los que hayas interactuado recientemente, y los nombres de usuario de otras personas. No contienen mensajes.", "Delete avatar": "Borrar avatar", "Flair won't be available in Spaces for the foreseeable future.": "Por ahora no está previsto que las insignias estén disponibles en los espacios.", "Ask the admins of this community to make it into a Space and keep a look out for the invite.": "Pídele a los admins que conviertan la comunidad en un espacio y espera a que te inviten.", From 9e1b51776528261c6b33a073daffb50f81a16fb1 Mon Sep 17 00:00:00 2001 From: Glandos Date: Mon, 4 Oct 2021 20:28:18 +0000 Subject: [PATCH 006/156] Translated using Weblate (French) Currently translated at 99.9% (3195 of 3198 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/fr/ --- src/i18n/strings/fr.json | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/fr.json b/src/i18n/strings/fr.json index 8af2e8cee16..afc18991603 100644 --- a/src/i18n/strings/fr.json +++ b/src/i18n/strings/fr.json @@ -3169,5 +3169,40 @@ "Leave all rooms": "Quitter tous les salons", "Don't leave any rooms": "Ne quitter aucun salon", "Expand quotes │ ⇧+click": "Développer les citations │ ⇧+clic", - "Collapse quotes │ ⇧+click": "Réduire les citations │ ⇧+clic" + "Collapse quotes │ ⇧+click": "Réduire les citations │ ⇧+clic", + "Include Attachments": "Inclure les fichiers attachés", + "Size Limit": "Taille maximale", + "Format": "Format", + "Select from the options below to export chats from your timeline": "Sélectionner les options ci-dessous pour exporter les conversations privées de votre historique", + "Export Chat": "Exporter la conversation privée", + "Exporting your data": "Export de vos données", + "Stop": "Arrêter", + "Are you sure you want to stop exporting your data? If you do, you'll need to start over.": "Êtes vous sûr de vouloir arrêter l’export de vos données ? Si vous le fait, vous devrez recommencer depuis le début.", + "Your export was successful. Find it in your Downloads folder.": "Votre export est réussi. Vous le trouverez dans votre dossier Téléchargements.", + "The export was cancelled successfully": "Cet export a été annulé avec succès", + "Export Successful": "Export réussi", + "MB": "Mo", + "Number of messages": "Nombre de messages", + "Number of messages can only be a number between %(min)s and %(max)s": "Le nombre de messages ne peut être qu’un nombre compris entre %(min)s et %(max)s", + "Size can only be a number between %(min)s MB and %(max)s MB": "La taille ne peut être qu'un nombre compris entre %(min)s Mo et %(max)s Mo", + "Enter a number between %(min)s and %(max)s": "Entrez un nombre entre %(min)s et %(max)s", + "In reply to this message": "En réponse à ce message", + "Export chat": "Exporter la conversation privée", + "File Attached": "Fichier attaché", + "Error fetching file": "Erreur lors de la récupération du fichier", + "Topic: %(topic)s": "Sujet : %(topic)s", + "This is the start of export of . Exported by at %(exportDate)s.": "C’est le début de l’export de . Exporté par le %(exportDate)s.", + "%(creatorName)s created this room.": "%(creatorName)s a créé ce salon.", + "Media omitted - file size limit exceeded": "Média ignoré – taille limite de fichier dépassée", + "Media omitted": "Média ignorés", + "Current Timeline": "Historique actuel", + "Specify a number of messages": "Spécifiez un nombre de messages", + "From the beginning": "Depuis le début", + "Plain Text": "Text brut", + "JSON": "JSON", + "HTML": "HTML", + "Are you sure you want to exit during this export?": "Êtes vous sûr de vouloir quitter pendant cet export ?", + "%(senderDisplayName)s sent a sticker.": "%(senderDisplayName)s a envoyé un autocollant.", + "%(senderDisplayName)s changed the room avatar.": "%(senderDisplayName)s a changé l’avatar du salon.", + "%(date)s at %(time)s": "%(date)s à %(time)s" } From 4376a530fe430155e775c935ec5a8dbd24e67911 Mon Sep 17 00:00:00 2001 From: Nikita Epifanov Date: Tue, 5 Oct 2021 07:49:38 +0000 Subject: [PATCH 007/156] Translated using Weblate (Russian) Currently translated at 98.2% (3143 of 3198 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/ru/ --- src/i18n/strings/ru.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/ru.json b/src/i18n/strings/ru.json index d2766949fba..2ccc7999063 100644 --- a/src/i18n/strings/ru.json +++ b/src/i18n/strings/ru.json @@ -3195,5 +3195,7 @@ "Are you sure you want to exit during this export?": "Вы уверены, что хотите выйти во время экспорта?", "%(senderDisplayName)s sent a sticker.": "%(senderDisplayName)s отправил(а) стикер.", "%(senderDisplayName)s changed the room avatar.": "%(senderDisplayName)s сменил(а) аватар комнаты.", - "%(date)s at %(time)s": "%(date)s в %(time)s" + "%(date)s at %(time)s": "%(date)s в %(time)s", + "Select from the options below to export chats from your timeline": "Выберите один из приведенных ниже вариантов экспорта чатов из вашей временной шкалы", + "Current Timeline": "Текущая временная шкала" } From 70106f979e878985145d637774db19a2d3b8d772 Mon Sep 17 00:00:00 2001 From: Phu Thong Pham Date: Tue, 5 Oct 2021 10:11:25 -0400 Subject: [PATCH 008/156] Fix text overflows button on Home page --- res/css/structures/_HomePage.scss | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/res/css/structures/_HomePage.scss b/res/css/structures/_HomePage.scss index 9f72213d1a9..b530d994c61 100644 --- a/res/css/structures/_HomePage.scss +++ b/res/css/structures/_HomePage.scss @@ -56,6 +56,7 @@ limitations under the License. } .mx_HomePage_default_buttons { + display: flex; margin: 60px auto 0; width: fit-content; @@ -63,7 +64,7 @@ limitations under the License. padding: 73px 8px 15px; // top: 20px top padding + 40px icon + 13px margin width: 160px; - height: 132px; + min-height: 132px; margin: 20px; position: relative; display: inline-block; From cb575e26271b9f428a50a9220bb9a78208967873 Mon Sep 17 00:00:00 2001 From: sr093906 Date: Tue, 5 Oct 2021 13:44:45 +0000 Subject: [PATCH 009/156] Translated using Weblate (Chinese (Simplified)) Currently translated at 100.0% (3206 of 3206 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/zh_Hans/ --- src/i18n/strings/zh_Hans.json | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/zh_Hans.json b/src/i18n/strings/zh_Hans.json index 7084e9f6493..4626ef634a5 100644 --- a/src/i18n/strings/zh_Hans.json +++ b/src/i18n/strings/zh_Hans.json @@ -3201,5 +3201,19 @@ "Are you sure you want to exit during this export?": "您确定要在导出未完成时退出吗?", "%(senderDisplayName)s sent a sticker.": "%(senderDisplayName)s 发送了一张贴纸。", "%(senderDisplayName)s changed the room avatar.": "%(senderDisplayName)s 更改了聊天室头像。", - "%(date)s at %(time)s": "%(date)s 的 %(time)s" + "%(date)s at %(time)s": "%(date)s 的 %(time)s", + "Please only proceed if you're sure you've lost all of your other devices and your security key.": "除非你确定丢失了所有其他设备和安全密钥,否则不要继续重置操作。", + "Verify with Security Key or Phrase": "使用安全密钥或短语进行验证", + "Resetting your verification keys cannot be undone. After resetting, you won't have access to old encrypted messages, and any friends who have previously verified you will see security warnings until you re-verify with them.": "无法撤消重置验证密钥的操作。重置后,你将无法访问旧的加密消息,任何之前验证过你的朋友将看到安全警告,直到你再次和他们进行验证。", + "I'll verify later": "我稍后进行验证", + "Verify with another login": "使用另一个登录进行验证", + "Verify with Security Key": "使用安全密钥进行验证", + "Proceed with reset": "进行重置", + "It looks like you don't have a Security Key or any other devices you can verify against. This device will not be able to access old encrypted messages. In order to verify your identity on this device, you'll need to reset your verification keys.": "看起来你没有安全密钥或者任何其他可以验证的设备。 此设备将无法访问旧的加密信息。为了在这个设备上验证你的身份,你需要重置你的验证密钥。", + "Skip verification for now": "暂时跳过验证", + "Really reset verification keys?": "确实要重置验证密钥?", + "Unable to verify this login": "无法验证此登录", + "To proceed, please accept the verification request on your other login.": "继续,请接受您其他登录的验证请求。", + "Waiting for you to verify on your other session…": "等待您验证您的其他会话…", + "Waiting for you to verify on your other session, %(deviceName)s (%(deviceId)s)…": "等待您验证您的其他会话,%(deviceName)s%(deviceId)s…" } From 184ebe147a5719e07bed6e5433bcf96ec2b4fe5f Mon Sep 17 00:00:00 2001 From: Nikita Epifanov Date: Tue, 5 Oct 2021 20:12:42 +0000 Subject: [PATCH 010/156] Translated using Weblate (Russian) Currently translated at 98.1% (3148 of 3206 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/ru/ --- src/i18n/strings/ru.json | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/ru.json b/src/i18n/strings/ru.json index 2ccc7999063..e60b3b3109a 100644 --- a/src/i18n/strings/ru.json +++ b/src/i18n/strings/ru.json @@ -3197,5 +3197,19 @@ "%(senderDisplayName)s changed the room avatar.": "%(senderDisplayName)s сменил(а) аватар комнаты.", "%(date)s at %(time)s": "%(date)s в %(time)s", "Select from the options below to export chats from your timeline": "Выберите один из приведенных ниже вариантов экспорта чатов из вашей временной шкалы", - "Current Timeline": "Текущая временная шкала" + "Current Timeline": "Текущая временная шкала", + "Please only proceed if you're sure you've lost all of your other devices and your security key.": "Пожалуйста, действуйте только в том случае, если вы уверены, что потеряли все остальные устройства и ключ безопасности.", + "Resetting your verification keys cannot be undone. After resetting, you won't have access to old encrypted messages, and any friends who have previously verified you will see security warnings until you re-verify with them.": "Сброс ключей проверки нельзя отменить. После сброса вы не сможете получить доступ к старым зашифрованным сообщениям, а друзья, которые ранее проверили вас, будут видеть предупреждения о безопасности, пока вы не пройдете повторную проверку.", + "Skip verification for now": "Пока пропустить проверку", + "I'll verify later": "Я проверю позже", + "Verify with another login": "Проверить с помощью другого логина", + "Verify with Security Key": "Проверить с помощью ключа безопасности", + "Verify with Security Key or Phrase": "Проверка с помощью ключа безопасности или фразы", + "Proceed with reset": "Выполнить сброс", + "It looks like you don't have a Security Key or any other devices you can verify against. This device will not be able to access old encrypted messages. In order to verify your identity on this device, you'll need to reset your verification keys.": "Похоже, что у вас нет Ключа безопасности или других устройств, которые можно проверить. Это устройство не сможет получить доступ к старым зашифрованным сообщениям. Чтобы подтвердить свою личность на этом устройстве, вам необходимо сбросить ключи проверки.", + "Really reset verification keys?": "Действительно сбросить ключи проверки?", + "Unable to verify this login": "Невозможно проверить этот логин", + "To proceed, please accept the verification request on your other login.": "Чтобы продолжить, пожалуйста, примите запрос на проверку на другом логине.", + "Waiting for you to verify on your other session…": "Ожидаем проверки на другом сеансе…", + "Waiting for you to verify on your other session, %(deviceName)s (%(deviceId)s)…": "Ожидаем проверки на другом сеансе, %(deviceName)s (%(deviceId)s)…" } From eb3b76fa028f7371594e3237f37c29f8fe9331cc Mon Sep 17 00:00:00 2001 From: Jeff Huang Date: Wed, 6 Oct 2021 01:56:22 +0000 Subject: [PATCH 011/156] Translated using Weblate (Chinese (Traditional)) Currently translated at 100.0% (3206 of 3206 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/zh_Hant/ --- src/i18n/strings/zh_Hant.json | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/zh_Hant.json b/src/i18n/strings/zh_Hant.json index 798f7a99c2c..6d4a1c677bd 100644 --- a/src/i18n/strings/zh_Hant.json +++ b/src/i18n/strings/zh_Hant.json @@ -3204,5 +3204,19 @@ "Are you sure you want to exit during this export?": "您確定您要從此匯出流程中退出嗎?", "%(senderDisplayName)s sent a sticker.": "%(senderDisplayName)s 傳送了貼圖。", "%(senderDisplayName)s changed the room avatar.": "%(senderDisplayName)s 變更了聊天室大頭照。", - "%(date)s at %(time)s": "%(date)s 於 %(time)s" + "%(date)s at %(time)s": "%(date)s 於 %(time)s", + "Please only proceed if you're sure you've lost all of your other devices and your security key.": "請僅在您確定您遺失您所有其他裝置與您的安全金鑰時繼續。", + "Resetting your verification keys cannot be undone. After resetting, you won't have access to old encrypted messages, and any friends who have previously verified you will see security warnings until you re-verify with them.": "重設您的驗證金鑰將無法復原。重設後,您將無法存取舊的加密訊息,之前任何驗證過您的朋友也會看到安全警告,直到您重新驗證。", + "I'll verify later": "我稍後驗證", + "Verify with another login": "使用其他登入進行驗證", + "Verify with Security Key": "使用安全金鑰進行驗證", + "Verify with Security Key or Phrase": "使用安全金鑰或密語進行驗證", + "Proceed with reset": "繼續重設", + "It looks like you don't have a Security Key or any other devices you can verify against. This device will not be able to access old encrypted messages. In order to verify your identity on this device, you'll need to reset your verification keys.": "您似乎沒有安全金鑰或其他可以驗證的裝置。此裝置將無法存取舊的加密訊息。為了在此裝置上驗證您的身份,您必須重設您的驗證金鑰。", + "Skip verification for now": "暫時略過驗證", + "Really reset verification keys?": "真的要重設驗證金鑰?", + "Unable to verify this login": "無法驗證此登入", + "To proceed, please accept the verification request on your other login.": "要繼續,請在您的其他裝置上接受驗證請求。", + "Waiting for you to verify on your other session…": "正在等待您驗證您的其他工作階段……", + "Waiting for you to verify on your other session, %(deviceName)s (%(deviceId)s)…": "正在等待您驗證您的其他工作階段,%(deviceName)s (%(deviceId)s)……" } From dcb423f08a137a34b9abe269465e67cca55a4a28 Mon Sep 17 00:00:00 2001 From: random Date: Tue, 5 Oct 2021 15:10:05 +0000 Subject: [PATCH 012/156] Translated using Weblate (Italian) Currently translated at 98.7% (3166 of 3206 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/it/ --- src/i18n/strings/it.json | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/it.json b/src/i18n/strings/it.json index b12554e256f..180d110d7d3 100644 --- a/src/i18n/strings/it.json +++ b/src/i18n/strings/it.json @@ -3168,5 +3168,15 @@ "Leave all rooms": "Esci da tutte le stanze", "Don't leave any rooms": "Non uscire da alcuna stanza", "Expand quotes │ ⇧+click": "Espandi le menzioni │ ⇧+clic", - "Collapse quotes │ ⇧+click": "Riduci le menzioni │ ⇧+clic" + "Collapse quotes │ ⇧+click": "Riduci le menzioni │ ⇧+clic", + "Current Timeline": "Linea temporale attuale", + "Specify a number of messages": "Specifica un numero di messaggi", + "From the beginning": "Dall'inizio", + "Plain Text": "Testo semplice", + "JSON": "JSON", + "HTML": "HTML", + "Are you sure you want to exit during this export?": "Vuoi davvero uscire durante l'esportazione?", + "%(senderDisplayName)s sent a sticker.": "%(senderDisplayName)s ha inviato uno sticker.", + "%(senderDisplayName)s changed the room avatar.": "%(senderDisplayName)s ha cambiato l'avatar della stanza.", + "%(date)s at %(time)s": "%(date)s alle %(time)s" } From e3280ca8d51986c7a439afe36aa369832b9f5da9 Mon Sep 17 00:00:00 2001 From: waclaw66 Date: Tue, 5 Oct 2021 15:57:43 +0000 Subject: [PATCH 013/156] Translated using Weblate (Czech) Currently translated at 100.0% (3206 of 3206 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/cs/ --- src/i18n/strings/cs.json | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/src/i18n/strings/cs.json b/src/i18n/strings/cs.json index 2b225077d89..34052db4884 100644 --- a/src/i18n/strings/cs.json +++ b/src/i18n/strings/cs.json @@ -166,7 +166,7 @@ "%(roomName)s does not exist.": "%(roomName)s neexistuje.", "%(roomName)s is not accessible at this time.": "Místnost %(roomName)s není v tuto chvíli dostupná.", "Save": "Uložit", - "Send Reset Email": "Poslat resetovací e-mail", + "Send Reset Email": "Odeslat obnovovací e-mail", "%(senderDisplayName)s sent an image.": "%(senderDisplayName)s poslal(a) obrázek.", "%(senderName)s sent an invitation to %(targetDisplayName)s to join the room.": "%(senderName)s pozval(a) uživatele %(targetDisplayName)s ke vstupu do místnosti.", "Server error": "Chyba serveru", @@ -2760,7 +2760,7 @@ "If you reset everything, you will restart with no trusted sessions, no trusted users, and might not be able to see past messages.": "Pokud vše resetujete, začnete bez důvěryhodných relací, bez důvěryhodných uživatelů a možná nebudete moci zobrazit minulé zprávy.", "Only do this if you have no other device to complete verification with.": "Udělejte to, pouze pokud nemáte žádné jiné zařízení, se kterým byste mohli dokončit ověření.", "Reset everything": "Resetovat vše", - "Forgotten or lost all recovery methods? Reset all": "Zapomněli nebo ztratili jste všechny metody obnovy? Obnovit vše", + "Forgotten or lost all recovery methods? Reset all": "Zapomněli nebo ztratili jste všechny metody obnovy? Resetovat vše", "If you do, please note that none of your messages will be deleted, but the search experience might be degraded for a few moments whilst the index is recreated": "Pokud tak učiníte, nezapomeňte, že žádná z vašich zpráv nebude smazána, ale vyhledávání může být na několik okamžiků zpomaleno během opětovného vytvoření indexu", "View message": "Zobrazit zprávu", "Zoom in": "Přiblížit", @@ -3204,5 +3204,19 @@ "Are you sure you want to exit during this export?": "Opravdu chcete skončit během tohoto exportu?", "%(senderDisplayName)s sent a sticker.": "%(senderDisplayName)s poslal(a) nálepku.", "%(senderDisplayName)s changed the room avatar.": "%(senderDisplayName)s změnil(a) avatar místnosti.", - "%(date)s at %(time)s": "%(date)s v %(time)s" + "%(date)s at %(time)s": "%(date)s v %(time)s", + "Resetting your verification keys cannot be undone. After resetting, you won't have access to old encrypted messages, and any friends who have previously verified you will see security warnings until you re-verify with them.": "Resetování ověřovacích klíčů nelze vrátit zpět. Po jejich resetování nebudete mít přístup ke starým zašifrovaným zprávám a všem přátelům, kteří vás dříve ověřili, se zobrazí bezpečnostní varování, dokud se u nich znovu neověříte.", + "Proceed with reset": "Pokračovat v resetování", + "It looks like you don't have a Security Key or any other devices you can verify against. This device will not be able to access old encrypted messages. In order to verify your identity on this device, you'll need to reset your verification keys.": "Vypadá to, že nemáte bezpečnostní klíč ani žádné jiné zařízení, které byste mohli ověřit. Toto zařízení nebude mít přístup ke starým šifrovaným zprávám. Abyste mohli na tomto zařízení ověřit svou totožnost, budete muset resetovat ověřovací klíče.", + "Really reset verification keys?": "Opravdu chcete resetovat ověřovací klíče?", + "Please only proceed if you're sure you've lost all of your other devices and your security key.": "Pokračujte pouze v případě, že jste si jisti, že jste ztratili všechna ostatní zařízení a bezpečnostní klíč.", + "I'll verify later": "Ověřím se později", + "Verify with another login": "Ověření pomocí jiného přihlášení", + "Verify with Security Key": "Ověření pomocí bezpečnostního klíče", + "Verify with Security Key or Phrase": "Ověření pomocí bezpečnostního klíče nebo fráze", + "Skip verification for now": "Prozatím přeskočit ověřování", + "Unable to verify this login": "Nelze ověřit toto přihlášení", + "To proceed, please accept the verification request on your other login.": "Pro pokračování, přijměte žádost o ověření na svém dalším zařízení.", + "Waiting for you to verify on your other session…": "Čekáme, až provedete ověření v jiné relaci…", + "Waiting for you to verify on your other session, %(deviceName)s (%(deviceId)s)…": "Čekáme, až provedete ověření v jiné relaci, %(deviceName)s (%(deviceId)s)…" } From c42d27357493459dcc90d383f156f6e9017b4d8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jiri=20Gr=C3=B6nroos?= Date: Tue, 5 Oct 2021 22:57:28 +0000 Subject: [PATCH 014/156] Translated using Weblate (Finnish) Currently translated at 87.8% (2818 of 3206 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/fi/ --- src/i18n/strings/fi.json | 247 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 243 insertions(+), 4 deletions(-) diff --git a/src/i18n/strings/fi.json b/src/i18n/strings/fi.json index e2ca967980e..63a11e767cb 100644 --- a/src/i18n/strings/fi.json +++ b/src/i18n/strings/fi.json @@ -128,7 +128,7 @@ "Register": "Rekisteröidy", "Reject invitation": "Hylkää kutsu", "Return to login screen": "Palaa kirjautumissivulle", - "%(brand)s version:": "%(brand)s-webin versio:", + "%(brand)s version:": "%(brand)s-versio:", "Rooms": "Huoneet", "Save": "Tallenna", "Search failed": "Haku epäonnistui", @@ -203,7 +203,7 @@ "Import room keys": "Tuo huoneen avaimet", "File to import": "Tuotava tiedosto", "You must join the room to see its files": "Sinun pitää liittyä huoneeseen voidaksesi nähdä sen sisältämät tiedostot", - "Reject all %(invitedRooms)s invites": "Hylkää kaikki %(invitedRooms)s kutsut", + "Reject all %(invitedRooms)s invites": "Hylkää kaikki %(invitedRooms)s kutsua", "Failed to invite": "Kutsu epäonnistui", "Confirm Removal": "Varmista poistaminen", "Unknown error": "Tuntematon virhe", @@ -920,7 +920,7 @@ "User %(userId)s is already in the room": "Käyttäjä %(userId)s on jo huoneessa", "The user must be unbanned before they can be invited.": "Käyttäjän porttikielto täytyy poistaa ennen kutsumista.", "Upgrade to your own domain": "Päivitä omaan verkkotunnukseen", - "Accept all %(invitedRooms)s invites": "Hyväksy kaikki %(invitedRooms)s kutsut", + "Accept all %(invitedRooms)s invites": "Hyväksy kaikki %(invitedRooms)s kutsua", "Change room avatar": "Vaihda huoneen kuva", "Change room name": "Vaihda huoneen nimi", "Change main address for the room": "Vaihda huoneen pääosoite", @@ -2592,5 +2592,244 @@ "Identity server (%(server)s)": "Identiteettipalvelin (%(server)s)", "Could not connect to identity server": "Identiteettipalvelimeen ei saatu yhteyttä", "Not a valid identity server (status code %(code)s)": "Ei kelvollinen identiteettipalvelin (tilakoodi %(code)s)", - "Identity server URL must be HTTPS": "Identiteettipalvelimen URL-osoitteen täytyy olla HTTPS-alkuinen" + "Identity server URL must be HTTPS": "Identiteettipalvelimen URL-osoitteen täytyy olla HTTPS-alkuinen", + "Transfer Failed": "Siirto epäonnistui", + "Unable to transfer call": "Puhelun siirtäminen ei onnistu", + "Invite your teammates": "Kutsu tiimikaverit", + "Me and my teammates": "Minä ja tiimikaverit", + "Just me": "Vain minä", + "Go to my space": "Mene avaruuteeni", + "Go to my first room": "Mene ensimmäiseen huoneeseeni", + "Search for rooms or spaces": "Etsi huoneita tai avaruuksia", + "Support": "Tuki", + "Rooms and spaces": "Huoneet ja avaruudet", + "No results for \"%(query)s\"": "Ei tuloksia kyselyllä \"%(query)s\"", + "Unable to copy a link to the room to the clipboard.": "Huoneen linkin kopiointi leikepöydälle ei onnistu.", + "Unable to copy room link": "Huoneen linkin kopiointi ei onnistu", + "Private community": "Yksityinen yhteisö", + "Public community": "Julkinen yhteisö", + "Play": "Toista", + "Pause": "Keskeytä", + "Error downloading audio": "Virhe ääntä ladattaessa", + "Avatar": "Avatar", + "Join the beta": "Liity beetaan", + "Leave the beta": "Poistu beetasta", + "Spaces is a beta feature": "Avaruudet eli Spaces on beetaominaisuus", + "Show preview": "Näytä esikatselu", + "Forward": "Välitä", + "View source": "Näytä lähde", + "Settings - %(spaceName)s": "Asetukset - %(spaceName)s", + "Space settings": "Avaruuden asetukset", + "Report the entire room": "Raportoi koko huone", + "Search spaces": "Etsi avaruuksia", + "Unnamed Space": "Nimetön avaruus", + "You may contact me if you have any follow up questions": "Voitte olla yhteydessä minuun, jos teillä on lisäkysymyksiä", + "Search for rooms or people": "Etsi huoneita tai ihmisiä", + "Message preview": "Viestin esikatselu", + "Forward message": "Välitä viesti", + "Sent": "Lähetetty", + "Open link": "Avaa linkki", + "Include Attachments": "Sisällytä liitteet", + "Stop": "Pysäytä", + "Are you sure you want to stop exporting your data? If you do, you'll need to start over.": "Pysäytä", + "Export Successful": "Vienti onnistui", + "Number of messages": "Viestien määrä", + "Server did not require any authentication": "Palvelin ei vaatinut mitään tunnistautumista", + "Adding...": "Lisätään...", + "Only people invited will be able to find and join this space.": "Vain kutsutut ihmiset voivat löytää tämän avaruuden ja liittyä siihen.", + "Public space": "Julkinen avaruus", + "Failed to migrate community": "Yhteisön migraatio epäonnistui", + "This community has been upgraded into a Space": "Tämä yhteisö on päivitetty avaruudeksi", + "Public room": "Julkinen huone", + "Private room (invite only)": "Yksityinen huone (vain kutsulla)", + "Create a room": "Luo huone", + "Only people invited will be able to find and join this room.": "Vain kutsutut ihmiset voivat löytää tämän huoneen ja liittyä siihen.", + "You can change this at any time from room settings.": "Voit muuttaa tämän milloin tahansa huoneen asetuksista.", + "Everyone in will be able to find and join this room.": "Kaikki avaruudessa voivat löytää tämän huoneen ja liittyä siihen.", + "Zoom in": "Lähennä", + "Zoom out": "Loitonna", + "%(count)s members including %(commaSeparatedMembers)s|other": "%(count)s jäsentä mukaan lukien %(commaSeparatedMembers)s", + "Including %(commaSeparatedMembers)s": "Mukaan lukien %(commaSeparatedMembers)s", + "Share content": "Jaa sisältö", + "Application window": "Sovelluksen ikkuna", + "Share entire screen": "Jaa koko näyttö", + "Image": "Kuva", + "Sticker": "Tarra", + "Expand quotes │ ⇧+click": "Laajenna lainaukset │ ⇧+napsauta", + "Collapse quotes │ ⇧+click": "Supista lainaukset │ ⇧+napsauta", + "Error processing audio message": "Virhe ääniviestiä käsiteltäessä", + "Decrypting": "Puretaan salausta", + "The call is in an unknown state!": "Puhelu on tuntemattomassa tilassa!", + "Missed call": "Vastaamaton puhelu", + "Unknown failure: %(reason)s": "Tuntematon virhe: %(reason)s", + "An unknown error occurred": "Tapahtui tuntematon virhe", + "Their device couldn't start the camera or microphone": "Laite ei voinut käyynnistää kameraa tai mikrofonia", + "Connection failed": "Yhteys epäonnistui", + "No answer": "Ei vastausta", + "Message": "Viesti", + "Pinned messages": "Kiinnitetyt viestit", + "Nothing pinned, yet": "Ei mitään kiinnitetty, ei vielä", + "Stop recording": "Pysäytä nauhoittaminen", + "Copy Room Link": "Kopioi huoneen linkki", + "Joining space …": "Liitytään avaruuteen…", + "Explore %(spaceName)s": "Tutki avaruutta %(spaceName)s", + "Invite to just this room": "Kutsu vain tähän huoneeseen", + "Send voice message": "Lähetä ääniviesti", + "Send a sticker": "Lähetä tarra", + "Add emoji": "Lisää emoji", + "Invite to this space": "Kutsu tähän avaruuteen", + "Are you sure you want to make this encrypted room public?": "Haluatko varmasti tehdä tästä salatusta huoneesta julkisen?", + "Unknown failure": "Tuntematon virhe", + "Change description": "Vaihda kuvaus", + "Change space name": "Vaihda avaruuden nimi", + "Change space avatar": "Vaihda avaruuden avatar", + "Open Space": "Avaa avaruus", + "Message bubbles": "Viestikuplat", + "IRC": "IRC", + "Upgrade anyway": "Päivitä silti", + "Before you upgrade": "Ennen kuin päivität", + "Space members": "Avaruuden jäsenet", + "& %(count)s more|one": "& %(count)s lisää", + "& %(count)s more|other": "& %(count)s lisää", + "Anyone can find and join.": "Kuka tahansa voi löytää ja liittyä.", + "Only invited people can join.": "Vain kutsutut ihmiset voivat liittyä.", + "Space options": "Avaruuden valinnat", + "Collapse": "Supista", + "Expand": "Laajenna", + "Recommended for public spaces.": "Suositeltu julkisiin avaruuksiin.", + "Guests can join a space without having an account.": "Vieraat voivat liittyä avaruuteen ilman tiliä.", + "Enable guest access": "Ota käyttöön vieraiden pääsy", + "Failed to save space settings.": "Avaruuden asetusten tallentaminen epäonnistui.", + "Thank you for trying Spaces. Your feedback will help inform the next versions.": "Kiitos, että kokeilet Avaruudet-ominaisuuta. Palautteesi auttaa tulevien versioiden kanssa.", + "Delete avatar": "Poista avatar", + "Mute the microphone": "Mykistä mikrofoni", + "Unmute the microphone": "Poista mikrofonin mykistys", + "Dialpad": "Numeronäppäimistö", + "Show sidebar": "Näytä sivupalkki", + "Hide sidebar": "Piilota sivupalkki", + "Start sharing your screen": "Aloita näyttösi jakaminen", + "Stop sharing your screen": "Lopeta näyttösi jakaminen", + "Stop the camera": "Pysäytä kamera", + "Start the camera": "Käynnistä kamera", + "Your camera is still enabled": "Kamerasi on edelleen päällä", + "Your camera is turned off": "Kamerasi on pois päältä", + "%(sharerName)s is presenting": "%(sharerName)s esittää", + "You are presenting": "Esität parhaillaan", + "Don't send read receipts": "Älä lähetä lukukuittauksia", + "Send pseudonymous analytics data": "Lähetä pseudonymisoitua analytiikkadataa", + "Threaded messaging": "Säikeistetty viestittely", + "Set up Secure Backup": "Määritä turvallinen varmuuskopio", + "Error fetching file": "Virhe tiedostoa noutaessa", + "You have unverified logins": "Vahvistamattomia kirjautumisia havaittu", + "Review to ensure your account is safe": "Katselmoi varmistaaksesi, että tilisi on turvassa", + "%(creatorName)s created this room.": "%(creatorName)s loi tämän huoneen.", + "Plain Text": "Raakateksti", + "JSON": "JSON", + "HTML": "HTML", + "Share your public space": "Jaa julkinen avaruutesi", + "Invite to %(spaceName)s": "Kutsu avaruuteen %(spaceName)s", + "User %(userId)s is already invited to the room": "Käyttäjä %(userId)s on jo kutsuttu huoneeseen", + "%(senderName)s pinned a message to this room. See all pinned messages.": "%(senderName)s kiinnitti viestin tähän huoneeseen. Katso kaikki kiinnitetyt viestit.", + "%(senderDisplayName)s sent a sticker.": "%(senderDisplayName)s lähetti tarran.", + "%(senderName)s removed their display name (%(oldDisplayName)s)": "%(senderName)s poisti näyttönimensä (%(oldDisplayName)s)", + "The user you called is busy.": "Käyttäjä, jolle soitit, on varattu.", + "User Busy": "Käyttäjä varattu", + "Decide who can join %(roomName)s.": "Päätä ketkä voivat liittyä huoneeseen %(roomName)s.", + "Decide who can view and join %(spaceName)s.": "Päätä ketkä voivat katsella avaruutta %(spaceName)s ja liittyä siihen.", + "Space information": "Avaruuden tiedot", + "Allow people to preview your space before they join.": "Salli ihmisten esikatsella avaruutesi ennen liittymistä.", + "Preview Space": "Esikatsele avaruus", + "Space visibility": "Avaruuden näkyvyys", + "Room visibility": "Huoneen näkyvyys", + "Visibility": "Näkyvyys", + "Are you sure you want to leave the space '%(spaceName)s'?": "Haluatko varmasti poistua avaruudesta '%(spaceName)s'?", + "Leave space": "Poistu avaruudesta", + "Would you like to leave the rooms in this space?": "Haluatko poistua tässä avaruudessa olevista huoneista?", + "You are about to leave .": "Olet aikeissa poistua avaruudesta .", + "Leave %(spaceName)s": "Poistu avaruudesta %(spaceName)s", + "Leave Space": "Poistu avaruudesta", + "Edit settings relating to your space.": "Muokkaa avaruuteesi liittyviä asetuksia.", + "Welcome to ": "Tervetuloa, tämä on ", + "Filter all spaces": "Suodata kaikista avaruuksista", + "Enable encryption in settings.": "Ota salaus käyttöön asetuksissa.", + "A private space for you and your teammates": "Yksityinen avaruus sinulle ja tiimikavereille", + "A private space to organise your rooms": "Yksityinen avaruus jossa voit järjestää huoneesi", + "Your private messages are normally encrypted, but this room isn't. Usually this is due to an unsupported device or method being used, like email invites.": "Yksityiset viestisi ovat normaalisti salattu, mutta tämä huone ei ole. Yleensä tämä johtuu ei tuetusta laitteesta tai käytetystä tavasta, kuten sähköpostikutsuista.", + "End-to-end encryption isn't enabled": "Päästä päähän -salaus ei ole käytössä", + "You have no visible notifications.": "Sinulla ei ole näkyviä ilmoituksia.", + "Add space": "Lisää avaruus", + "Want to add an existing space instead?": "Haluatko sen sijaan lisätä olemassa olevan avaruuden?", + "Add a space to a space you manage.": "Lisää avaruus hallitsemaasi avaruuteen.", + "Anyone will be able to find and join this room, not just members of .": "Kuka tahansa voi löytää tämän huoneen ja liittyä siihen, ei pelkästään avaruuden jäsenet.", + "Anyone will be able to find and join this space, not just members of .": "Kuka tahansa voi löytää tämän avaruuden ja liittyä siihen, ei pelkästään avaruuden jäsenet.", + "Anyone in will be able to find and join.": "Kuka tahansa avaruudessa voi löytää ja liittyä.", + "Anyone will be able to find and join this room.": "Kuka tahansa voi löytää tämän huoneen ja liittyä siihen.", + "e.g. my-space": "esim. minun-avaruus", + "Private space": "Yksityinen avaruus", + "Private space (invite only)": "Yksityinen avaruus (vain kutsulla)", + "Visible to space members": "Näkyvissä avaruuden jäsenille", + "To view all keyboard shortcuts, click here.": "Katso kaikki pikanäppäimet napsauttamalla tästä.", + "Autoplay videos": "Toista videot automaattisesti", + "Autoplay GIFs": "Toista GIF-tiedostot automaattisesti", + "Images, GIFs and videos": "Kuvat, GIF:t ja videot", + "Code blocks": "Koodilohkot", + "Keyboard shortcuts": "Pikanäppäimet", + "Displaying time": "Ajan näyttäminen", + "Olm version:": "Olm-versio:", + "Your access token gives full access to your account. Do not share it with anyone.": "Käyttöpolettisi (ns. token) antaa täyden pääsyn tilillesi. Älä jaa sitä kenenkään kanssa.", + "Access Token": "Käyttöpoletti", + "Select spaces": "Valitse avaruudet", + "Want to add a new space instead?": "Haluatko lisätä sen sijaan uuden avaruuden?", + "Add existing space": "Lisää olemassa oleva avaruus", + "Space selection": "Avaruuden valinta", + "Search for rooms": "Etsi huoneita", + "Search for spaces": "Etsi avaruuksia", + "%(count)s results in all spaces|one": "%(count)s tulos kaikissa avaruuksissa", + "%(count)s results in all spaces|other": "%(count)s tulosta kaikissa avaruuksissa", + "Global": "Yleiset", + "New keyword": "Uusi avainsana", + "Keyword": "Avainsana", + "Messages containing keywords": "Viestit, jotka sisältävät avainsanoja", + "Enable email notifications for %(email)s": "Sähköposti-ilmoitukset osoitteeseen %(email)s", + "Enable for this account": "Ota käyttöön tällä tilillä", + "Mentions & keywords": "Maininnat ja avainsanat", + "%(targetName)s left the room": "%(targetName)s poistui huoneesta", + "%(targetName)s left the room: %(reason)s": "%(targetName)s poistui huoneesta: %(reason)s", + "%(targetName)s rejected the invitation": "%(targetName)s hylkäsi kutsun", + "%(targetName)s joined the room": "%(targetName)s liittyi huoneeseen", + "%(senderName)s made no change": "%(senderName)s ei tehnyt muutosta", + "%(senderName)s set a profile picture": "%(senderName)s asetti profiilikuvan", + "%(senderName)s changed their profile picture": "%(senderName)s vaihtoi profiilikuvansa", + "%(senderName)s removed their profile picture": "%(senderName)s poisti profiilikuvansa", + "%(oldDisplayName)s changed their display name to %(displayName)s": "%(oldDisplayName)s vaihtoi näyttönimekseen %(displayName)s", + "%(senderName)s set their display name to %(displayName)s": "%(senderName)s asetti näyttönimekseen %(displayName)s", + "%(targetName)s accepted an invitation": "%(targetName)s hyväksyi kutsun", + "Some invites couldn't be sent": "Joitain kutsuja ei voitu lähettää", + "We couldn't log you in": "Emme voineet kirjata sinua sisään", + "%(date)s at %(time)s": "%(date)s klo %(time)s", + "Collapse space panel": "Supista avaruuspaneeli", + "Expand space panel": "Laajenna avaruuspaneeli", + "Spaces": "Avaruudet", + "Show all rooms": "Näytä kaikki huoneet", + "To join a space you'll need an invite.": "Liittyäksesi avaruuteen tarvitset kutsun.", + "You can also make Spaces from communities.": "Voit myös luoda avaruuksia yhteisöistä.", + "Your private space": "Yksityinen avaruutesi", + "Your public space": "Julkinen avaruutesi", + "Invite only, best for yourself or teams": "Vain kutsulla, paras itsellesi tai tiimeille", + "Open space for anyone, best for communities": "Avoin avaruus kaikille, paras yhteisöille", + "Give feedback.": "Anna palautetta.", + "Spaces feedback": "Palautetta avaruuksista", + "Please enter a name for the space": "Anna nimi avaruudelle", + "Address": "Osoite", + "You can change this later.": "Voit muuttaa tämän myöhemmin.", + "Spaces are a new way to make a community, with new features coming.": "Avaruudet ovat uusi tapa luoda yhteisö, ja lisää ominaisuuksia on tulossa.", + "Spaces are a new way to group rooms and people.": "Avaruudet on uudenlainen tapa ryhmitellä huoneita ja ihmisiä.", + "Spaces are a new feature.": "Avaruudet ovat uusi ominaisuus.", + "Create Space from community": "Luo avaruus yhteisöstä", + "Space created": "Avaruus luotu", + "Create a new space": "Luo uusi avaruus", + "You do not have permissions to create new rooms in this space": "Sinulla ei ole oikeuksia luoda uusia huoneita tässä avaruudessa", + "Create Space": "Luo avaruus", + "What kind of Space do you want to create?": "Minkälaisen avaruuden haluat luoda?", + "Create a space": "Luo avaruus" } From 5ff817a402520e05382cbc584a2ea6b9a738caa6 Mon Sep 17 00:00:00 2001 From: Besnik Bleta Date: Wed, 6 Oct 2021 07:42:44 +0000 Subject: [PATCH 015/156] Translated using Weblate (Albanian) Currently translated at 99.6% (3195 of 3206 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/sq/ --- src/i18n/strings/sq.json | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/sq.json b/src/i18n/strings/sq.json index 9aad3d737fb..2e3f988a395 100644 --- a/src/i18n/strings/sq.json +++ b/src/i18n/strings/sq.json @@ -3198,5 +3198,16 @@ "Are you sure you want to exit during this export?": "Jeni i sigurt se doni të dilet gjatë këtij eksportimi?", "%(senderDisplayName)s sent a sticker.": "%(senderDisplayName)s dërgoi një ngjitës.", "%(senderDisplayName)s changed the room avatar.": "%(senderDisplayName)s ndryshoi avatarin e dhomës.", - "%(date)s at %(time)s": "%(date)s më %(time)s" + "%(date)s at %(time)s": "%(date)s më %(time)s", + "Please only proceed if you're sure you've lost all of your other devices and your security key.": "Ju lutemi, ecni më tej vetëm nëse jeni i sigurt se keni humbur krejt pajisjet tuaja të tjera dhe kyçin tuaj të sigurisë.", + "I'll verify later": "Do ta verifikoj më vonë", + "Verify with another login": "Verifikoje nga tjetër skenë hyrjesh", + "Verify with Security Key": "Verifikoje me Kyç Sigurie", + "Verify with Security Key or Phrase": "Verifikojeni me Kyç ose Frazë Sigurie", + "It looks like you don't have a Security Key or any other devices you can verify against. This device will not be able to access old encrypted messages. In order to verify your identity on this device, you'll need to reset your verification keys.": "Duket sikur s’keni Kyç Sigurie ose ndonjë pajisje tjetër nga e cila mund të bëni sërish verifikimin. Kjo pajisje s’do të jetë në gjendje të hyjë te mesazhe të dikurshëm të fshehtëzuar. Që të mund të verifikohet identiteti juaj në këtë pajisje, you'll need to reset your verification keys.", + "Skip verification for now": "Anashkaloje verifikimin hëpërhë", + "Unable to verify this login": "S’arrihet të verifikohet kjo hyrje", + "To proceed, please accept the verification request on your other login.": "Që të vazhdohet, ju lutemi, pranoni kërkesën për verifikim në skenën(pajisjen) tuaj tjetër për hyrje.", + "Waiting for you to verify on your other session…": "Po pritet që ju të bëni verifikimin në sesionin tuaj tjetër…", + "Waiting for you to verify on your other session, %(deviceName)s (%(deviceId)s)…": "Po pritet që ju të bëni verifikimin në sesionin tuaj tjetër, %(deviceName)s (%(deviceId)s)…" } From d3cf6d14fcbaa89be8fb72a9fc429a55520ae928 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Priit=20J=C3=B5er=C3=BC=C3=BCt?= Date: Tue, 5 Oct 2021 20:50:57 +0000 Subject: [PATCH 016/156] Translated using Weblate (Estonian) Currently translated at 99.9% (3205 of 3206 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/et/ --- src/i18n/strings/et.json | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/et.json b/src/i18n/strings/et.json index 9fa345f435e..b09739980c6 100644 --- a/src/i18n/strings/et.json +++ b/src/i18n/strings/et.json @@ -3200,5 +3200,19 @@ "Are you sure you want to exit during this export?": "Kas sa oled kindel, et soovid lõpetada tegevuse selle ekspordi ajal?", "%(senderDisplayName)s sent a sticker.": "%(senderDisplayName)s saatis kleepsu.", "%(senderDisplayName)s changed the room avatar.": "%(senderDisplayName)s muutis jututoa tunnuspilti.", - "%(date)s at %(time)s": "%(date)s %(time)s" + "%(date)s at %(time)s": "%(date)s %(time)s", + "Proceed with reset": "Jätka kustutamisega", + "It looks like you don't have a Security Key or any other devices you can verify against. This device will not be able to access old encrypted messages. In order to verify your identity on this device, you'll need to reset your verification keys.": "Tundub, et sul ei ole ei turvavõtit ega muid seadmeid, mida saaksid verifitseerimiseks kasutada. Siin seadmes ei saa lugeda vanu krüptitud sõnumeid. Enda tuvastamiseks selles seadmed pead oma vanad verifitseerimisvõtmed kustutama.", + "Please only proceed if you're sure you've lost all of your other devices and your security key.": "Palun jätka ainult siis, kui sa oled kaotanud ligipääsu kõikidele oma seadmetele ning oma turvavõtmele.", + "Resetting your verification keys cannot be undone. After resetting, you won't have access to old encrypted messages, and any friends who have previously verified you will see security warnings until you re-verify with them.": "Verifitseerimisvõtmete kustutamist ei saa hiljem tagasi võtta. Peale seda sul puudub ligipääs vanadele krüptitud sõnumitele ja kõik sinu verifitseeritud sõbrad-tuttavad näevad turvahoiatusi seni kuni sa uuesti nad verifitseerid.", + "I'll verify later": "Ma verifitseerin hiljem", + "Verify with another login": "Verifitseeri oma muu sessiooniga", + "Verify with Security Key": "Verifitseeri turvavõtmega", + "Verify with Security Key or Phrase": "Verifitseeri turvavõtme või turvafraasiga", + "Skip verification for now": "Jäta verifitseerimine praegu vahele", + "Really reset verification keys?": "Kas tõesti kustutame kõik verifitseerimisvõtmed?", + "Unable to verify this login": "Selle seadme verifitseerimine ei õnnestunud", + "To proceed, please accept the verification request on your other login.": "Jätkamaks palun võta vastu verifitseerimispalve oma teises seadmes.", + "Waiting for you to verify on your other session…": "Ootan, et sa verifitseeriksid teises sessioonis…", + "Waiting for you to verify on your other session, %(deviceName)s (%(deviceId)s)…": "Ootan, et sa verifitseerid oma teises sessioonis: %(deviceName)s (%(deviceId)s)…" } From 336ae6de3ef6ef8f7c96aec573ac2d682147a215 Mon Sep 17 00:00:00 2001 From: LinAGKar Date: Wed, 6 Oct 2021 11:47:48 +0000 Subject: [PATCH 017/156] Translated using Weblate (Swedish) Currently translated at 98.4% (3158 of 3208 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/sv/ --- src/i18n/strings/sv.json | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/i18n/strings/sv.json b/src/i18n/strings/sv.json index 50ff9f5056f..30c418f140f 100644 --- a/src/i18n/strings/sv.json +++ b/src/i18n/strings/sv.json @@ -241,7 +241,7 @@ "Noisy": "Högljudd", "Room not found": "Rummet hittades inte", "Messages containing my display name": "Meddelanden som innehåller mitt visningsnamn", - "Messages in one-to-one chats": "Meddelanden i en-till-en chattar", + "Messages in one-to-one chats": "Meddelanden i en-till-en-chattar", "Unavailable": "Otillgänglig", "remove %(name)s from the directory.": "ta bort %(name)s från katalogen.", "Explore Room State": "Utforska rumsstatus", @@ -768,7 +768,7 @@ "Enable Community Filter Panel": "Aktivera gemenskapsfilterpanel", "Messages containing my username": "Meddelanden som innehåller mitt användarnamn", "Messages containing @room": "Meddelanden som innehåller @room", - "Encrypted messages in one-to-one chats": "Krypterade meddelanden i en-till-en chattar", + "Encrypted messages in one-to-one chats": "Krypterade meddelanden i en-till-en-chattar", "Encrypted messages in group chats": "Krypterade meddelanden i gruppchattar", "Dog": "Hund", "Cat": "Katt", @@ -3164,5 +3164,8 @@ "You are about to leave .": "Du kommer att lämna .", "Leave some rooms": "Lämna vissa rum", "Leave all rooms": "Lämna alla rum", - "Don't leave any rooms": "Lämna inga rum" + "Don't leave any rooms": "Lämna inga rum", + "%(senderDisplayName)s sent a sticker.": "%(senderDisplayName)s skickade en dekal.", + "%(senderDisplayName)s changed the room avatar.": "%(senderDisplayName)s bytte rummets avatar.", + "%(date)s at %(time)s": "%(date)s vid %(time)s" } From 8ae7bc78fdbe100dd3fd092b482280db9909f046 Mon Sep 17 00:00:00 2001 From: sr093906 Date: Wed, 6 Oct 2021 08:52:52 +0000 Subject: [PATCH 018/156] Translated using Weblate (Chinese (Simplified)) Currently translated at 100.0% (3208 of 3208 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/zh_Hans/ --- src/i18n/strings/zh_Hans.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/zh_Hans.json b/src/i18n/strings/zh_Hans.json index 4626ef634a5..bb4d9e47931 100644 --- a/src/i18n/strings/zh_Hans.json +++ b/src/i18n/strings/zh_Hans.json @@ -3215,5 +3215,7 @@ "Unable to verify this login": "无法验证此登录", "To proceed, please accept the verification request on your other login.": "继续,请接受您其他登录的验证请求。", "Waiting for you to verify on your other session…": "等待您验证您的其他会话…", - "Waiting for you to verify on your other session, %(deviceName)s (%(deviceId)s)…": "等待您验证您的其他会话,%(deviceName)s%(deviceId)s…" + "Waiting for you to verify on your other session, %(deviceName)s (%(deviceId)s)…": "等待您验证您的其他会话,%(deviceName)s%(deviceId)s…", + "Creating Space...": "正在创建空间…", + "Fetching data...": "获取数据中…" } From 97819ebf9aa71250725833f123450b33a81b1fd6 Mon Sep 17 00:00:00 2001 From: waclaw66 Date: Wed, 6 Oct 2021 10:54:18 +0000 Subject: [PATCH 019/156] Translated using Weblate (Czech) Currently translated at 100.0% (3208 of 3208 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/cs/ --- src/i18n/strings/cs.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/cs.json b/src/i18n/strings/cs.json index 34052db4884..dcfcb9b4d0a 100644 --- a/src/i18n/strings/cs.json +++ b/src/i18n/strings/cs.json @@ -3218,5 +3218,7 @@ "Unable to verify this login": "Nelze ověřit toto přihlášení", "To proceed, please accept the verification request on your other login.": "Pro pokračování, přijměte žádost o ověření na svém dalším zařízení.", "Waiting for you to verify on your other session…": "Čekáme, až provedete ověření v jiné relaci…", - "Waiting for you to verify on your other session, %(deviceName)s (%(deviceId)s)…": "Čekáme, až provedete ověření v jiné relaci, %(deviceName)s (%(deviceId)s)…" + "Waiting for you to verify on your other session, %(deviceName)s (%(deviceId)s)…": "Čekáme, až provedete ověření v jiné relaci, %(deviceName)s (%(deviceId)s)…", + "Creating Space...": "Vytváření prostoru...", + "Fetching data...": "Načítání dat..." } From 46a45d65e9833b692a2a52e72093584fd9ddbe42 Mon Sep 17 00:00:00 2001 From: Besnik Bleta Date: Wed, 6 Oct 2021 11:45:49 +0000 Subject: [PATCH 020/156] Translated using Weblate (Albanian) Currently translated at 99.6% (3197 of 3208 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/sq/ --- src/i18n/strings/sq.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/sq.json b/src/i18n/strings/sq.json index 2e3f988a395..2c849a83197 100644 --- a/src/i18n/strings/sq.json +++ b/src/i18n/strings/sq.json @@ -3209,5 +3209,7 @@ "Unable to verify this login": "S’arrihet të verifikohet kjo hyrje", "To proceed, please accept the verification request on your other login.": "Që të vazhdohet, ju lutemi, pranoni kërkesën për verifikim në skenën(pajisjen) tuaj tjetër për hyrje.", "Waiting for you to verify on your other session…": "Po pritet që ju të bëni verifikimin në sesionin tuaj tjetër…", - "Waiting for you to verify on your other session, %(deviceName)s (%(deviceId)s)…": "Po pritet që ju të bëni verifikimin në sesionin tuaj tjetër, %(deviceName)s (%(deviceId)s)…" + "Waiting for you to verify on your other session, %(deviceName)s (%(deviceId)s)…": "Po pritet që ju të bëni verifikimin në sesionin tuaj tjetër, %(deviceName)s (%(deviceId)s)…", + "Creating Space...": "Po Krijohet Hapësirë…", + "Fetching data...": "Po sillen të dhëna…" } From 7e8187893e7e393dc7c687971226299e6a2288d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Priit=20J=C3=B5er=C3=BC=C3=BCt?= Date: Wed, 6 Oct 2021 10:17:20 +0000 Subject: [PATCH 021/156] Translated using Weblate (Estonian) Currently translated at 99.9% (3207 of 3208 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/et/ --- src/i18n/strings/et.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/et.json b/src/i18n/strings/et.json index b09739980c6..62a9a88da69 100644 --- a/src/i18n/strings/et.json +++ b/src/i18n/strings/et.json @@ -3214,5 +3214,7 @@ "Unable to verify this login": "Selle seadme verifitseerimine ei õnnestunud", "To proceed, please accept the verification request on your other login.": "Jätkamaks palun võta vastu verifitseerimispalve oma teises seadmes.", "Waiting for you to verify on your other session…": "Ootan, et sa verifitseeriksid teises sessioonis…", - "Waiting for you to verify on your other session, %(deviceName)s (%(deviceId)s)…": "Ootan, et sa verifitseerid oma teises sessioonis: %(deviceName)s (%(deviceId)s)…" + "Waiting for you to verify on your other session, %(deviceName)s (%(deviceId)s)…": "Ootan, et sa verifitseerid oma teises sessioonis: %(deviceName)s (%(deviceId)s)…", + "Creating Space...": "Loon kogukonnakeskust…", + "Fetching data...": "Laadin andmeid..." } From 1c95a8503a6333190e0972f8d7eaf56c3dc44107 Mon Sep 17 00:00:00 2001 From: iaiz Date: Wed, 6 Oct 2021 15:11:05 +0000 Subject: [PATCH 022/156] Translated using Weblate (Spanish) Currently translated at 99.9% (3207 of 3208 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/es/ --- src/i18n/strings/es.json | 52 +++++++++++++++++++++++++++++++--------- 1 file changed, 41 insertions(+), 11 deletions(-) diff --git a/src/i18n/strings/es.json b/src/i18n/strings/es.json index 44559d86f7e..a55d286b9f1 100644 --- a/src/i18n/strings/es.json +++ b/src/i18n/strings/es.json @@ -109,7 +109,7 @@ "%(senderName)s made future room history visible to unknown (%(visibility)s).": "%(senderName)s hizo visible el historial futuro de la sala para desconocido (%(visibility)s).", "Something went wrong!": "¡Algo ha fallado!", "Create new room": "Crear nueva sala", - "Start chat": "Iniciar conversación", + "Start chat": "Empezar una conversación", "New Password": "Contraseña nueva", "Analytics": "Analítica de datos", "Options": "Opciones", @@ -419,7 +419,7 @@ "Drop file here to upload": "Suelta aquí el archivo para enviarlo", "This event could not be displayed": "No se ha podido mostrar este evento", "Key request sent.": "Solicitud de clave enviada.", - "Disinvite this user?": "¿Borrar la invitación a este usuario?", + "Disinvite this user?": "¿Dejar de invitar a este usuario?", "Kick this user?": "¿Echar a este usuario?", "Unban this user?": "¿Quitarle el veto a este usuario?", "Ban this user?": "¿Vetar a este usuario?", @@ -985,7 +985,7 @@ "When rooms are upgraded": "Cuando las salas son actualizadas", "My Ban List": "Mi lista de baneos", "This is your list of users/servers you have blocked - don't leave the room!": "Esta es la lista de usuarios y/o servidores que has bloqueado. ¡No te salgas de la sala!", - "Decline (%(counter)s)": "Declinar (%(counter)s)", + "Decline (%(counter)s)": "Rechazar (%(counter)s)", "Accept to continue:": ", acepta para continuar:", "ID": "ID", "Public Name": "Nombre público", @@ -2356,8 +2356,8 @@ "There was an error finding this widget.": "Ha ocurrido un error al buscar este widget.", "Active Widgets": "Widgets activos", "This version of %(brand)s does not support viewing some encrypted files": "Esta versión de %(brand)s no permite ver algunos archivos cifrados", - "Use the Desktop app to search encrypted messages": "Usa la aplicación de ordenador para buscar en los mensajes cifrados", - "Use the Desktop app to see all encrypted files": "Usa la aplicación de ordenador para ver todos los archivos cifrados", + "Use the Desktop app to search encrypted messages": "Usa la aplicación de escritorio para buscar en los mensajes cifrados", + "Use the Desktop app to see all encrypted files": "Usa la aplicación de escritorio para ver todos los archivos cifrados", "Video conference started by %(senderName)s": "Videoconferencia iniciada por %(senderName)s", "Video conference updated by %(senderName)s": "Videoconferencia actualizada por %(senderName)s", "You held the call Resume": "Has puesto la llamada en espera Recuperar", @@ -2723,11 +2723,11 @@ "Add some details to help people recognise it.": "Añade algún detalle para ayudar a que la gente lo reconozca.", "Check your devices": "Comprueba tus dispositivos", "You have unverified logins": "Tienes inicios de sesión sin verificar", - "Verification requested": "Verificación solicitada", + "Verification requested": "Solicitud de verificación", "Avatar": "Imagen de perfil", - "Verify other login": "Verificar otro inicio de sesión", + "Verify other login": "Verifica otro inicio de sesión", "Consult first": "Consultar primero", - "Invited people will be able to read old messages.": "Las personas invitadas podrán leer mensajes antiguos.", + "Invited people will be able to read old messages.": "Las personas que invites podrán leer los mensajes antiguos.", "We couldn't create your DM.": "No hemos podido crear tu mensaje directo.", "Adding...": "Añadiendo...", "Add existing rooms": "Añadir salas que ya existan", @@ -2832,10 +2832,10 @@ "The user you called is busy.": "La persona a la que has llamado está ocupada.", "User Busy": "Persona ocupada", "End-to-end encryption isn't enabled": "El cifrado de extremo a extremo no está activado", - "If you can't see who you’re looking for, send them your invite link below.": "Si no encuentras abajo a quien buscas, envíale tu enlace de invitación.", + "If you can't see who you’re looking for, send them your invite link below.": "Si no encuentras a quien estés buscando, envíale tu enlace de invitación, que encontrarás más abajo.", "Teammates might not be able to view or join any private rooms you make.": "Las personas de tu equipo no podrán ver o unirse a ninguna sala privada que crees.", "Or send invite link": "O envía un enlace de invitación", - "Some suggestions may be hidden for privacy.": "Puede que se hayan ocultado algunas sugerencias por motivos de privacidad.", + "Some suggestions may be hidden for privacy.": "Puede que algunas sugerencias no se muestren por motivos de privacidad.", "Search for rooms or people": "Busca salas o gente", "Message preview": "Vista previa del mensaje", "Forward message": "Reenviar mensaje", @@ -3186,5 +3186,35 @@ "HTML": "HTML", "Are you sure you want to exit during this export?": "¿Seguro que quieres salir durante la exportación?", "%(senderDisplayName)s changed the room avatar.": "%(senderDisplayName)s cambió la imagen de la sala.", - "%(senderDisplayName)s sent a sticker.": "%(senderDisplayName)s envió una pegatina." + "%(senderDisplayName)s sent a sticker.": "%(senderDisplayName)s envió una pegatina.", + "Size can only be a number between %(min)s MB and %(max)s MB": "El tamaño solo puede ser un número de %(min)s a %(max)s MB", + "This room is in some spaces you’re not an admin of. In those spaces, the old room will still be shown, but people will be prompted to join the new one.": "Esta sala está incluida en algunos espacios en los que no tienes permisos de administración. En esos espacios, la sala que aparecerá será la antigua, pero se avisará a las personas que estén en la sala y podrán unirse a la nueva.", + "Waiting for you to verify on your other session, %(deviceName)s (%(deviceId)s)…": "Esperando a que lo verifiques tu otra sesión, %(deviceName)s (%(deviceId)s)…", + "Waiting for you to verify on your other session…": "Esperando a que lo verifiques en tu otra sesión…", + "%(date)s at %(time)s": "%(date)s a la(s) %(time)s", + "It looks like you don't have a Security Key or any other devices you can verify against. This device will not be able to access old encrypted messages. In order to verify your identity on this device, you'll need to reset your verification keys.": "Parece que no tienes una clave de seguridad u otros dispositivos para la verificación. Este dispositivo no podrá acceder los mensajes cifrados antiguos. Para verificar tu identidad en este dispositivo, tendrás que restablecer tus claves de verificación.", + "Please only proceed if you're sure you've lost all of your other devices and your security key.": "Por favor, hazlo solo si de verdad crees que has perdido todos tus demás dispositivos y tu clave de seguridad.", + "Resetting your verification keys cannot be undone. After resetting, you won't have access to old encrypted messages, and any friends who have previously verified you will see security warnings until you re-verify with them.": "Una vez restableces las claves de verificación, no lo podrás deshacer. Después de restablecerlas, no podrás acceder a los mensajes cifrados antiguos, y cualquier persona que te haya verificado verá avisos de seguridad hasta que vuelvas a hacer la verificación con ella.", + "I'll verify later": "La verificaré en otro momento", + "Verify with another login": "Verificar usando otro inicio de sesión", + "Verify with Security Key": "Verificar con una clave de seguridad", + "Verify with Security Key or Phrase": "Verificar con una clave o frase de seguridad", + "Proceed with reset": "Continuar y restablecer", + "Skip verification for now": "Saltar la verificación por ahora", + "Really reset verification keys?": "¿De verdad quieres restablecer las claves de verificación?", + "Unable to verify this login": "No se ha podido verificar este inicio de sesión", + "To join this Space, hide communities in your preferences": "Para unirte a este espacio, oculta las comunidades en tus ajustes", + "To view this Space, hide communities in your preferences": "Para ver este espacio, oculta las comunidades en tus ajustes", + "To view %(communityName)s, swap to communities in your preferences": "Para ver %(communityName)s, cambia a las comunidades en tus ajustes", + "To join %(communityName)s, swap to communities in your preferences": "Para unirte a %(communityName)s, cambia a las comunidades en tus ajustes", + "Select from the options below to export chats from your timeline": "Selecciona entre las opciones siguientes las conversaciones que quieres exportar", + "Are you sure you want to stop exporting your data? If you do, you'll need to start over.": "¿Seguro que quieres parar la exportación de tus datos? Si quieres exportarlos más adelante, tendrás que empezarla de nuevo.", + "Your export was successful. Find it in your Downloads folder.": "La exportación ha terminado correctamente. La puedes encontrar en tu carpeta de Descargas.", + "The export was cancelled successfully": "Has cancelado la exportación", + "Export Successful": "Exportado con éxito", + "Number of messages": "Número de mensajes", + "Enter a number between %(min)s and %(max)s": "Escribe un número entre %(min)s y %(max)s", + "Creating Space...": "Creando el espacio…", + "Fetching data...": "Pidiendo los datos…", + "To proceed, please accept the verification request on your other login.": "Antes de continuar, acepta la solicitud de verificación en algún otro sitio donde tengas tu sesión iniciada, por favor." } From 2ed7744ca3b75ca429711db7ae249656e8558566 Mon Sep 17 00:00:00 2001 From: random Date: Wed, 6 Oct 2021 12:44:45 +0000 Subject: [PATCH 023/156] Translated using Weblate (Italian) Currently translated at 100.0% (3208 of 3208 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/it/ --- src/i18n/strings/it.json | 44 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/it.json b/src/i18n/strings/it.json index 180d110d7d3..8efabc19ce7 100644 --- a/src/i18n/strings/it.json +++ b/src/i18n/strings/it.json @@ -3178,5 +3178,47 @@ "Are you sure you want to exit during this export?": "Vuoi davvero uscire durante l'esportazione?", "%(senderDisplayName)s sent a sticker.": "%(senderDisplayName)s ha inviato uno sticker.", "%(senderDisplayName)s changed the room avatar.": "%(senderDisplayName)s ha cambiato l'avatar della stanza.", - "%(date)s at %(time)s": "%(date)s alle %(time)s" + "%(date)s at %(time)s": "%(date)s alle %(time)s", + "Displaying time": "Mostrando l'ora", + "Please only proceed if you're sure you've lost all of your other devices and your security key.": "Procedi solo se sei sicuro di avere perso tutti gli altri tuoi dispositivi e la chiave di sicurezza.", + "Resetting your verification keys cannot be undone. After resetting, you won't have access to old encrypted messages, and any friends who have previously verified you will see security warnings until you re-verify with them.": "La reimpostazione delle chiavi di verifica non può essere annullata. Dopo averlo fatto, non avrai accesso ai vecchi messaggi cifrati, e gli amici che ti avevano verificato in precedenza vedranno avvisi di sicurezza fino a quando non ti ri-verifichi con loro.", + "I'll verify later": "Verificherò dopo", + "Verify with another login": "Verifica con un altro accesso", + "Verify with Security Key": "Verifica con chiave di sicurezza", + "Verify with Security Key or Phrase": "Verifica con chiave di sicurezza o frase", + "Proceed with reset": "Procedi con la reimpostazione", + "It looks like you don't have a Security Key or any other devices you can verify against. This device will not be able to access old encrypted messages. In order to verify your identity on this device, you'll need to reset your verification keys.": "Pare che tu non abbia una chiave di sicurezza o altri dispositivi con cui poterti verificare. Questo dispositivo non potrà accedere ai vecchi messaggi cifrati. Per potere verificare la tua ideintità su questo dispositivo, dovrai reimpostare le chiavi di verifica.", + "Skip verification for now": "Salta la verifica per adesso", + "Really reset verification keys?": "Reimpostare le chiavi di verifica?", + "Unable to verify this login": "Impossibile verificare questo accesso", + "Include Attachments": "Includi allegati", + "Size Limit": "Limite dimensione", + "Format": "Formato", + "Select from the options below to export chats from your timeline": "Seleziona dalle opzioni sotto per esportare le chat dalla linea temporale", + "Export Chat": "Esporta conversazione", + "Exporting your data": "Esportazione dei dati", + "Stop": "Ferma", + "Are you sure you want to stop exporting your data? If you do, you'll need to start over.": "Vuoi davvero fermare l'esportazione dei dati? Se lo fai, dovrai ricominciare da capo.", + "Your export was successful. Find it in your Downloads folder.": "Esportazione riuscita. La puoi trovare nella cartella Download.", + "The export was cancelled successfully": "Esportazione annullata correttamente", + "Export Successful": "Esportazione riuscita", + "MB": "MB", + "Number of messages": "Numero di messaggi", + "Number of messages can only be a number between %(min)s and %(max)s": "Il numero di messaggi può essere solo tra %(min)s e %(max)s", + "Size can only be a number between %(min)s MB and %(max)s MB": "La dimensione può essere solo tra %(min)s MB e %(max)s MB", + "Enter a number between %(min)s and %(max)s": "Inserisci un numero tra %(min)s e %(max)s", + "Creating Space...": "Creazione spazio...", + "Fetching data...": "Recupero dei dati...", + "In reply to this message": "In risposta a questo messaggio", + "Export chat": "Esporta conversazione", + "To proceed, please accept the verification request on your other login.": "Per continuare, accetta la richiesta di verifica nell'altro tuo accesso.", + "Waiting for you to verify on your other session…": "In attesa della verifica nella tua altra sessione…", + "Waiting for you to verify on your other session, %(deviceName)s (%(deviceId)s)…": "In attesa della verifica nella tua altra sessione, %(deviceName)s (%(deviceId)s)…", + "File Attached": "File allegato", + "Error fetching file": "Errore di recupero del file", + "Topic: %(topic)s": "Argomento: %(topic)s", + "This is the start of export of . Exported by at %(exportDate)s.": "Questo è l'inizio dell'esportazione di . Esportata da il %(exportDate)s.", + "%(creatorName)s created this room.": "%(creatorName)s ha creato questa stanza.", + "Media omitted - file size limit exceeded": "File omesso - superata dimensione massima", + "Media omitted": "File omesso" } From 25110e4316be88815205c7770c51abc18c71b861 Mon Sep 17 00:00:00 2001 From: Szimszon Date: Wed, 6 Oct 2021 19:52:13 +0000 Subject: [PATCH 024/156] Translated using Weblate (Hungarian) Currently translated at 99.7% (3200 of 3208 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/hu/ --- src/i18n/strings/hu.json | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/hu.json b/src/i18n/strings/hu.json index c561759db9f..6d93c1d10b1 100644 --- a/src/i18n/strings/hu.json +++ b/src/i18n/strings/hu.json @@ -3194,5 +3194,20 @@ "Are you sure you want to exit during this export?": "Biztos, hogy kilép az exportálás közben?", "%(senderDisplayName)s sent a sticker.": "%(senderDisplayName)s matricát küldött.", "%(senderDisplayName)s changed the room avatar.": "%(senderDisplayName)s megváltoztatta a szoba avatar képét.", - "%(date)s at %(time)s": "%(date)s %(time)s" + "%(date)s at %(time)s": "%(date)s %(time)s", + "I'll verify later": "Később ellenőrzöm", + "Verify with another login": "Ellenőrizze egy másik bejelentkezéssel", + "Proceed with reset": "Lecserélés folytatása", + "Skip verification for now": "Ellenőrzés kihagyása most", + "Really reset verification keys?": "Biztosan lecseréli az ellenőrzési kulcsokat?", + "Unable to verify this login": "Ennek a bejelentkezésnek az ellenőrzése nem lehetséges", + "Are you sure you want to stop exporting your data? If you do, you'll need to start over.": "Biztos, hogy megállítja az adatai kimentését? Ha igen, később újra előröl kell kezdeni.", + "Your export was successful. Find it in your Downloads folder.": "Az exportálás sikeres volt. Megtalálja a Letöltések könyvtárban.", + "Number of messages can only be a number between %(min)s and %(max)s": "Az üzenetek száma csak %(min)s és %(max)s közötti szám lehet", + "Size can only be a number between %(min)s MB and %(max)s MB": "A méret csak %(min)s MB és %(max)s MB közötti szám lehet", + "Enter a number between %(min)s and %(max)s": "Adjon meg egy számot %(min)s és %(max)s között", + "Creating Space...": "Tér készítése…", + "Fetching data...": "Adatok letöltése…", + "To proceed, please accept the verification request on your other login.": "A folytatáshoz fogadja el az ellenőrzés kérést a másik munkamenetben.", + "Waiting for you to verify on your other session…": "A megerősítést várjuk a másik munkamenetből…" } From f84d5b244de55c2e57183f7e1af6edb9f9056767 Mon Sep 17 00:00:00 2001 From: jelv Date: Wed, 6 Oct 2021 19:51:37 +0000 Subject: [PATCH 025/156] Translated using Weblate (Dutch) Currently translated at 99.6% (3197 of 3208 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/nl/ --- src/i18n/strings/nl.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/nl.json b/src/i18n/strings/nl.json index cce71ac8f26..250e5c61761 100644 --- a/src/i18n/strings/nl.json +++ b/src/i18n/strings/nl.json @@ -3201,5 +3201,10 @@ "Plain Text": "Platte tekst", "JSON": "JSON", "HTML": "HTML", - "Are you sure you want to exit during this export?": "Weet u zeker dat u wilt afsluiten tijdens een export?" + "Are you sure you want to exit during this export?": "Weet u zeker dat u wilt afsluiten tijdens een export?", + "Creating Space...": "Ruimte aanmaken...", + "Fetching data...": "Gegevens ophalen...", + "To proceed, please accept the verification request on your other login.": "Om door te gaan, accepteer het verificatieverzoek op uw andere login.", + "Waiting for you to verify on your other session…": "Wachten op uw verificatie op uw andere sessie…", + "Waiting for you to verify on your other session, %(deviceName)s (%(deviceId)s)…": "Wachten op uw verificatie op uw andere sessie, %(deviceName)s (%(deviceId)s)…" } From cd3977639a91cdbe97aed168fb864b7513e40d2e Mon Sep 17 00:00:00 2001 From: Jeff Huang Date: Thu, 7 Oct 2021 01:39:27 +0000 Subject: [PATCH 026/156] Translated using Weblate (Chinese (Traditional)) Currently translated at 100.0% (3208 of 3208 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/zh_Hant/ --- src/i18n/strings/zh_Hant.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/zh_Hant.json b/src/i18n/strings/zh_Hant.json index 6d4a1c677bd..3e46dc15a3e 100644 --- a/src/i18n/strings/zh_Hant.json +++ b/src/i18n/strings/zh_Hant.json @@ -3218,5 +3218,7 @@ "Unable to verify this login": "無法驗證此登入", "To proceed, please accept the verification request on your other login.": "要繼續,請在您的其他裝置上接受驗證請求。", "Waiting for you to verify on your other session…": "正在等待您驗證您的其他工作階段……", - "Waiting for you to verify on your other session, %(deviceName)s (%(deviceId)s)…": "正在等待您驗證您的其他工作階段,%(deviceName)s (%(deviceId)s)……" + "Waiting for you to verify on your other session, %(deviceName)s (%(deviceId)s)…": "正在等待您驗證您的其他工作階段,%(deviceName)s (%(deviceId)s)……", + "Creating Space...": "正在建立空間……", + "Fetching data...": "正在擷取資料……" } From 930a34d4894e20f2c1fd9c6792b0b8ac79f2bb0f Mon Sep 17 00:00:00 2001 From: XoseM Date: Thu, 7 Oct 2021 04:23:01 +0000 Subject: [PATCH 027/156] Translated using Weblate (Galician) Currently translated at 100.0% (3208 of 3208 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/gl/ --- src/i18n/strings/gl.json | 53 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 52 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/gl.json b/src/i18n/strings/gl.json index 63fc7d4804b..38493e76a12 100644 --- a/src/i18n/strings/gl.json +++ b/src/i18n/strings/gl.json @@ -3166,5 +3166,56 @@ "%(reactors)s reacted with %(content)s": "%(reactors)s reaccionou con %(content)s", "Joining space …": "Uníndote ao espazo…", "Expand quotes │ ⇧+click": "Despregar citas | ⇧+click", - "Collapse quotes │ ⇧+click": "Pechar citas | ⇧+click" + "Collapse quotes │ ⇧+click": "Pechar citas | ⇧+click", + "Please only proceed if you're sure you've lost all of your other devices and your security key.": "Continúa só se estas segura de que perdeches a túa chave de seguridade e o acceso noutros dispositivos.", + "Resetting your verification keys cannot be undone. After resetting, you won't have access to old encrypted messages, and any friends who have previously verified you will see security warnings until you re-verify with them.": "O restablecemento das chaves de seguridade non se pode desfacer. Tras o restablecemento, non terás acceso ás antigas mensaxes cifradas, e calquera amizade que verificaras con anterioridade vai ver un aviso de seguridade ata que volvades a verificarvos mutuamente.", + "I'll verify later": "Verificarei máis tarde", + "Verify with another login": "Verificar con outra conexión", + "Verify with Security Key": "Verificar coa Chave de Seguridade", + "Verify with Security Key or Phrase": "Verificar coa Chave ou Frase de Seguridade", + "Proceed with reset": "Procede co restablecemento", + "It looks like you don't have a Security Key or any other devices you can verify against. This device will not be able to access old encrypted messages. In order to verify your identity on this device, you'll need to reset your verification keys.": "Semella que non tes unha Chave de Seguridade ou outros dispositivos cos que verificar. Este dispositivo non poderá acceder a mensaxes antigas cifradas. Para poder verificar a túa identidade neste dispositivo tes que restablecer as chaves de verificación.", + "Skip verification for now": "Omitir a verificación por agora", + "Really reset verification keys?": "Queres restablecer as chaves de verificación?", + "Unable to verify this login": "Non se puido verificar esta conexión", + "Include Attachments": "Incluír anexos", + "Size Limit": "Límite do tamaño", + "Format": "Formato", + "Select from the options below to export chats from your timeline": "Elixe entre as opcións seguintes para exportar a túa cronoloxía", + "Export Chat": "Exportar chat", + "Exporting your data": "Exportando os teus datos", + "Stop": "Deter", + "Are you sure you want to stop exporting your data? If you do, you'll need to start over.": "Tes a certeza de querer deter a exportación de datos? Se é así, terás que volver a iniciala.", + "Your export was successful. Find it in your Downloads folder.": "A exportación foi correcta. Atoparala no cartafol de Descargas.", + "The export was cancelled successfully": "Cancelouse con éxito a exportación", + "Export Successful": "Exportación correcta", + "MB": "MB", + "Number of messages": "Número de mensaxes", + "Number of messages can only be a number between %(min)s and %(max)s": "O número de mensaxes só pode ser un número entre %(min)s e %(max)s", + "Size can only be a number between %(min)s MB and %(max)s MB": "O tamaño só pode ser un número entre %(min)s MB e %(max)s MB", + "Enter a number between %(min)s and %(max)s": "Escribe un número entre %(min)s e %(max)s", + "Creating Space...": "Creando Espazo...", + "Fetching data...": "Obtendo datos...", + "In reply to this message": "En resposta a esta mensaxe", + "Export chat": "Exportar chat", + "To proceed, please accept the verification request on your other login.": "Para continuar, acepta a solicitude de verificación na túa outra conexión.", + "Waiting for you to verify on your other session…": "Agardando a que verifiques na túa outra sesión…", + "Waiting for you to verify on your other session, %(deviceName)s (%(deviceId)s)…": "Agardando a que verifiques na túa outra sesión, %(deviceName)s %(deviceId)s…", + "File Attached": "Ficheiro anexado", + "Error fetching file": "Erro ao obter o ficheiro", + "Topic: %(topic)s": "Asunto: %(topic)s", + "This is the start of export of . Exported by at %(exportDate)s.": "Este é o inicio da exportación de . Exportada por o %(exportDate)s.", + "%(creatorName)s created this room.": "%(creatorName)s creou esta sala.", + "Media omitted - file size limit exceeded": "Multimedia omitido - excedeuse o límite de tamaño", + "Media omitted": "Omitir multimedia", + "Current Timeline": "Cronoloxía actual", + "Specify a number of messages": "Indica un número de mensaxes", + "From the beginning": "Desde o comezo", + "Plain Text": "Texto plano", + "JSON": "JSON", + "HTML": "HTML", + "Are you sure you want to exit during this export?": "Tes a certeza de querer saír durante esta exportación?", + "%(senderDisplayName)s sent a sticker.": "%(senderDisplayName)s enviou un adhesivo.", + "%(senderDisplayName)s changed the room avatar.": "%(senderDisplayName)s cambiou o avatar da sala.", + "%(date)s at %(time)s": "%(date)s ás %(time)s" } From 9720ab897da222ed5ae2be6530db08f5e6dc1b61 Mon Sep 17 00:00:00 2001 From: Ihor Hordiichuk Date: Fri, 8 Oct 2021 02:05:49 +0000 Subject: [PATCH 028/156] Translated using Weblate (Ukrainian) Currently translated at 66.7% (2140 of 3208 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/uk/ --- src/i18n/strings/uk.json | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/i18n/strings/uk.json b/src/i18n/strings/uk.json index 4fe75dd2ffa..2df149c484c 100644 --- a/src/i18n/strings/uk.json +++ b/src/i18n/strings/uk.json @@ -1724,7 +1724,7 @@ "Start a new chat": "Почати нову бесіду", "This is the start of .": "Це початок .", "Start sharing your screen": "Почати показ екрана", - "Start the camera": "Запустити камеру", + "Start the camera": "Увімкнути камеру", "Scan this unique code": "Скануйте цей унікальний код", "Verify this session by completing one of the following:": "Звірте цей сеанс одним із запропонованих способів:", "Leave %(groupName)s?": "Вийти з %(groupName)s?", @@ -2136,5 +2136,13 @@ "Upload completed": "Вивантаження виконано", "Search %(spaceName)s": "Пошук %(spaceName)s", "Leave some rooms": "Вийте з кількох кімнат", - "Leave all rooms": "Вийти з кімнати" + "Leave all rooms": "Вийти з кімнати", + "More": "Більше", + "Show sidebar": "Показати бічну панель", + "Hide sidebar": "Сховати бічну панель", + "Stop sharing your screen": "Вимкнути показ екрана", + "Stop the camera": "Вимкнути камеру", + "Your camera is still enabled": "Ваша камера досі увімкнена", + "Your camera is turned off": "Вашу камеру вимкнено", + "sends snowfall": "надсилає снігопад" } From e344f3ce3b39d40e625253c42641b431fd70ad00 Mon Sep 17 00:00:00 2001 From: iaiz Date: Fri, 8 Oct 2021 15:25:35 +0000 Subject: [PATCH 029/156] Translated using Weblate (Spanish) Currently translated at 99.9% (3207 of 3208 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/es/ --- src/i18n/strings/es.json | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/i18n/strings/es.json b/src/i18n/strings/es.json index a55d286b9f1..87632e6b286 100644 --- a/src/i18n/strings/es.json +++ b/src/i18n/strings/es.json @@ -17,7 +17,7 @@ "Bans user with given id": "Veta al usuario con la ID dada", "Can't connect to homeserver via HTTP when an HTTPS URL is in your browser bar. Either use HTTPS or enable unsafe scripts.": "No se ha podido conectar al servidor base a través de HTTP, cuando es necesario un enlace HTTPS en la barra de direcciones de tu navegador. Ya sea usando HTTPS o activando los scripts inseguros.", "Change Password": "Cambiar la contraseña", - "%(senderName)s changed the power level of %(powerLevelDiffText)s.": "%(senderName)s ha cambiado el nivel de acceso de %(powerLevelDiffText)s.", + "%(senderName)s changed the power level of %(powerLevelDiffText)s.": "%(senderName)s cambió el nivel de acceso de %(powerLevelDiffText)s.", "%(senderDisplayName)s changed the room name to %(roomName)s.": "%(senderDisplayName)s cambió el nombre de la sala a %(roomName)s.", "%(senderDisplayName)s changed the topic to \"%(topic)s\".": "%(senderDisplayName)s cambió el tema a \"%(topic)s\".", "Changes your display nickname": "Cambia tu apodo público", @@ -2449,7 +2449,7 @@ "Change the topic of your active room": "Cambiar el asunto de la sala en la que estés", "See when the topic changes in this room": "Ver cuándo cambia el asunto de esta sala", "Change the topic of this room": "Cambiar el asunto de esta sala", - "%(senderDisplayName)s changed the server ACLs for this room.": "%(senderDisplayName)s ha cambiado los permisos de la sala.", + "%(senderDisplayName)s changed the server ACLs for this room.": "%(senderDisplayName)s cambió los permisos de la sala.", "%(senderDisplayName)s set the server ACLs for this room.": "%(senderDisplayName)s ha establecido los permisos de la sala.", "Converts the DM to a room": "Convierte el mensaje directo a sala", "Converts the room to a DM": "Convierte la sala a un mensaje directo", @@ -2877,10 +2877,10 @@ "This user is displaying toxic behaviour, for instance by insulting other users or sharing adult-only content in a family-friendly room or otherwise violating the rules of this room.\nThis will be reported to the room moderators.": "Esta persona está teniendo un comportamiento tóxico. Por ejemplo, insultando al resto, compartiendo contenido explícito en una sala para todos los públicos, o incumpliendo las normas de la sala en general.\nSe avisará a los moderadores de la sala.", "What this user is writing is wrong.\nThis will be reported to the room moderators.": "Lo que esta persona está escribiendo no está bien.\nSe avisará a los moderadores de la sala.", "Please provide an address": "Por favor, elige una dirección", - "%(oneUser)schanged the server ACLs %(count)s times|one": "%(oneUser)s ha cambiado los permisos del servidor", - "%(oneUser)schanged the server ACLs %(count)s times|other": "%(oneUser)s ha cambiado los permisos del servidor %(count)s veces", - "%(severalUsers)schanged the server ACLs %(count)s times|one": "%(severalUsers)s ha cambiado los permisos del servidor", - "%(severalUsers)schanged the server ACLs %(count)s times|other": "%(severalUsers)s ha cambiado los permisos del servidor %(count)s veces", + "%(oneUser)schanged the server ACLs %(count)s times|one": "%(oneUser)s cambió los permisos del servidor", + "%(oneUser)schanged the server ACLs %(count)s times|other": "%(oneUser)s cambió los permisos del servidor %(count)s veces", + "%(severalUsers)schanged the server ACLs %(count)s times|one": "%(severalUsers)s cambió los permisos del servidor", + "%(severalUsers)schanged the server ACLs %(count)s times|other": "%(severalUsers)s cambió los permisos del servidor %(count)s veces", "Message search initialisation failed, check your settings for more information": "Ha fallado el sistema de búsqueda de mensajes. Comprueba tus ajustes para más información", "Set addresses for this space so users can find this space through your homeserver (%(localDomain)s)": "Elige una dirección para este espacio y los usuarios de tu servidor base (%(localDomain)s) podrán encontrarlo a través del buscador", "To publish an address, it needs to be set as a local address first.": "Para publicar una dirección, primero debe ser añadida como dirección local.", @@ -2915,9 +2915,9 @@ "%(targetName)s joined the room": "%(targetName)s se ha unido a la sala", "%(senderName)s made no change": "%(senderName)s no ha hecho ningún cambio", "%(senderName)s set a profile picture": "%(senderName)s se ha puesto una foto de perfil", - "%(senderName)s changed their profile picture": "%(senderName)s ha cambiado su foto de perfil", + "%(senderName)s changed their profile picture": "%(senderName)s cambió su foto de perfil", "%(senderName)s removed their profile picture": "%(senderName)s ha eliminado su foto de perfil", - "%(oldDisplayName)s changed their display name to %(displayName)s": "%(oldDisplayName)s ha cambiado su nombre a %(displayName)s", + "%(oldDisplayName)s changed their display name to %(displayName)s": "%(oldDisplayName)s cambió su nombre a %(displayName)s", "%(senderName)s invited %(targetName)s": "%(senderName)s ha invitado a %(targetName)s", "%(targetName)s accepted an invitation": "%(targetName)s ha aceptado una invitación", "%(targetName)s accepted the invitation for %(displayName)s": "%(targetName)s ha aceptado la invitación a %(displayName)s", @@ -3092,8 +3092,8 @@ "To create a Space from another community, just pick the community in Preferences.": "Para crear un espacio a partir de otra comunidad, escoge la comunidad en ajustes.", "Debug logs contain application usage data including your username, the IDs or aliases of the rooms or groups you have visited, which UI elements you last interacted with, and the usernames of other users. They do not contain messages.": "Los registros de depuración contienen datos de uso de la aplicación como tu nombre de usuario, las IDs o los nombres de las salas o grupos que has visitado, con qué elementos de la interfaz has interactuado recientemente, y nombres de usuario de otras personas. No incluyen mensajes.", "To avoid these issues, create a new public room for the conversation you plan to have.": "Para evitar estos problemas, crea una nueva sala pública para la conversación que planees tener.", - "%(severalUsers)schanged the pinned messages for the room %(count)s times.|other": "%(severalUsers)s han cambiado los mensajes fijados de la sala %(count)s veces.", - "%(oneUser)schanged the pinned messages for the room %(count)s times.|other": "%(oneUser)s han cambiado los mensajes fijados de la sala %(count)s veces.", + "%(severalUsers)schanged the pinned messages for the room %(count)s times.|other": "%(severalUsers)s cambiaron los mensajes fijados de la sala %(count)s veces.", + "%(oneUser)schanged the pinned messages for the room %(count)s times.|other": "%(oneUser)s cambiaron los mensajes fijados de la sala %(count)s veces.", "Cross-signing is ready but keys are not backed up.": "La firma cruzada está lista, pero no hay copia de seguridad de las claves.", "Rooms and spaces": "Salas y espacios", "Results": "Resultados", From f423cfec7fe68234170669a78b6640fd30059742 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Priit=20J=C3=B5er=C3=BC=C3=BCt?= Date: Sat, 9 Oct 2021 09:57:46 +0000 Subject: [PATCH 030/156] Translated using Weblate (Estonian) Currently translated at 99.9% (3207 of 3208 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/et/ --- src/i18n/strings/et.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/i18n/strings/et.json b/src/i18n/strings/et.json index 62a9a88da69..05e39a0110c 100644 --- a/src/i18n/strings/et.json +++ b/src/i18n/strings/et.json @@ -2902,7 +2902,7 @@ "Collapse reply thread": "Ahenda vastuste jutulõng", "Show preview": "Näita eelvaadet", "View source": "Vaata algset teavet", - "Forward": "Edasi", + "Forward": "Edasta", "Settings - %(spaceName)s": "Seadistused - %(spaceName)s", "Toxic Behaviour": "Ebasobilik käitumine", "Report the entire room": "Teata tervest jututoast", From f750fc043431000228c58f9a837efb123b9e15b4 Mon Sep 17 00:00:00 2001 From: Szimszon Date: Sun, 10 Oct 2021 17:48:52 +0000 Subject: [PATCH 031/156] Translated using Weblate (Hungarian) Currently translated at 100.0% (3208 of 3208 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/hu/ --- src/i18n/strings/hu.json | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/hu.json b/src/i18n/strings/hu.json index 6d93c1d10b1..80b15dd861e 100644 --- a/src/i18n/strings/hu.json +++ b/src/i18n/strings/hu.json @@ -3209,5 +3209,13 @@ "Creating Space...": "Tér készítése…", "Fetching data...": "Adatok letöltése…", "To proceed, please accept the verification request on your other login.": "A folytatáshoz fogadja el az ellenőrzés kérést a másik munkamenetben.", - "Waiting for you to verify on your other session…": "A megerősítést várjuk a másik munkamenetből…" + "Waiting for you to verify on your other session…": "A megerősítést várjuk a másik munkamenetből…", + "Please only proceed if you're sure you've lost all of your other devices and your security key.": "Csak akkor folytassa ha biztos benne, hogy elvesztett minden hozzáférést a többi eszközéhez és biztonsági kulcsához.", + "Resetting your verification keys cannot be undone. After resetting, you won't have access to old encrypted messages, and any friends who have previously verified you will see security warnings until you re-verify with them.": "Az ellenőrzéshez használt kulcsok alaphelyzetbe állítását nem lehet visszavonni. A visszaállítás után nem fog hozzáférni a régi titkosított üzenetekhez és minden ismerőse aki eddig ellenőrizte a személyazonosságát biztonsági figyelmeztetést fog látni amíg újra nem ellenőrzi.", + "Verify with Security Key": "Ellenőrzés Biztonsági Kulccsal", + "Verify with Security Key or Phrase": "Ellenőrzés Biztonsági Kulccsal vagy Jelmondattal", + "It looks like you don't have a Security Key or any other devices you can verify against. This device will not be able to access old encrypted messages. In order to verify your identity on this device, you'll need to reset your verification keys.": "Úgy tűnik nem rendelkezik Biztonsági Kulccsal vagy másik eszközzel amivel ellenőrizni lehetne. Ezzel az eszközzel nem fér majd hozzá a régi titkosított üzenetekhez. Ahhoz, hogy a személyazonosságát ezen az eszközön ellenőrizni lehessen a kulcsokat alaphelyzetbe kell állítani.", + "Select from the options below to export chats from your timeline": "Az idővonalon a beszélgetés kimentéséhez tartozó beállítások kiválasztása", + "Waiting for you to verify on your other session, %(deviceName)s (%(deviceId)s)…": "Várakozás a másik munkamenetből való ellenőrzésre, %(deviceName)s (%(deviceId)s)…", + "This is the start of export of . Exported by at %(exportDate)s.": "Ez az exportálás kezdete ehhez a szobához: . Kimentette: , időpont: %(exportDate)s." } From b022bf6b5f6034805878ffc1b5a9f5f834b54104 Mon Sep 17 00:00:00 2001 From: Linerly Date: Sun, 10 Oct 2021 14:58:59 +0000 Subject: [PATCH 032/156] Translated using Weblate (Indonesian) Currently translated at 6.7% (216 of 3208 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/id/ --- src/i18n/strings/id.json | 138 +++++++++++++++++++-------------------- 1 file changed, 69 insertions(+), 69 deletions(-) diff --git a/src/i18n/strings/id.json b/src/i18n/strings/id.json index c96a10ea2a5..31225ed75e6 100644 --- a/src/i18n/strings/id.json +++ b/src/i18n/strings/id.json @@ -1,21 +1,21 @@ { "Accept": "Terima", "Account": "Akun", - "Add": "Tambah", + "Add": "Tambahkan", "No Microphones detected": "Tidak ada mikrofon terdeteksi", "No media permissions": "Tidak ada izin media", "Microphone": "Mikrofon", "Camera": "Kamera", - "Are you sure?": "Anda yakin?", + "Are you sure?": "Apakah Anda yakin?", "An error has occurred.": "Telah terjadi kesalahan.", "Are you sure you want to reject the invitation?": "Anda yakin menolak undangannya?", - "Change Password": "Ubah Password", + "Change Password": "Ubah Kata Sandi", "Close": "Tutup", "Commands": "Perintah", - "Confirm password": "Konfirmasi password", + "Confirm password": "Konfirmasi kata sandi", "Continue": "Lanjut", - "Create Room": "Buat Ruang", - "Current password": "Password sekarang", + "Create Room": "Buat Ruangan", + "Current password": "Kata sandi sekarang", "Deactivate Account": "Nonaktifkan Akun", "Email": "Email", "Email address": "Alamat email", @@ -25,54 +25,54 @@ "Default": "Bawaan", "Download %(text)s": "Unduh %(text)s", "Export": "Ekspor", - "Failed to join room": "Gagal gabung ruang", + "Failed to join room": "Gagal saat bergabung ruangan", "Failed to reject invitation": "Gagal menolak undangan", "Failed to send email": "Gagal mengirim email", "Favourite": "Favorit", "Favourites": "Favorit", "Import": "Impor", "Incorrect verification code": "Kode verifikasi tidak benar", - "Invalid Email Address": "Alamat email tidak benar", + "Invalid Email Address": "Alamat Email Tidak Valid", "Invited": "Diundang", "Sign in with": "Masuk dengan", - "Leave room": "Meninggalkan ruang", + "Leave room": "Tinggalkan ruangan", "Logout": "Keluar", "Low priority": "Prioritas rendah", - "Mute": "Bisu", + "Mute": "Bisukan", "Name": "Nama", - "New passwords don't match": "Password baru tidak cocok", + "New passwords don't match": "Kata sandi baru tidak cocok", "": "", "No results": "Tidak ada hasil", "OK": "OK", "Operation failed": "Operasi gagal", - "Passwords can't be empty": "Password tidak boleh kosong", + "Passwords can't be empty": "Kata sandi tidak boleh kosong", "Permissions": "Izin", "Profile": "Profil", "Reason": "Alasan", - "Register": "Registrasi", - "%(brand)s version:": "%(brand)s versi:", + "Register": "Daftar", + "%(brand)s version:": "Versi %(brand)s:", "Return to login screen": "Kembali ke halaman masuk", - "Rooms": "Ruang", + "Rooms": "Ruangan", "Save": "Simpan", "Search": "Cari", "Search failed": "Pencarian gagal", "Send Reset Email": "Kirim Email Atur Ulang", - "Server error": "Server bermasalah", + "Server error": "Kesalahan server", "Session ID": "ID Sesi", "Settings": "Pengaturan", "Sign in": "Masuk", "Sign out": "Keluar", "Someone": "Seseorang", "Submit": "Kirim", - "Success": "Sukses", - "This email address was not found": "Alamat email ini tidak ada", - "This room": "Ruang ini", + "Success": "Berhasil", + "This email address was not found": "Alamat email ini tidak ditemukan", + "This room": "Ruangan ini", "Unable to add email address": "Tidak dapat menambahkan alamat email", "Unable to verify email address.": "Tidak dapat memverifikasi alamat email.", "unknown error code": "kode kesalahan tidak diketahui", - "Verification Pending": "Verifikasi Tertunda", - "Video call": "Panggilan Video", - "Voice call": "Panggilan Suara", + "Verification Pending": "Verifikasi Menunggu", + "Video call": "Panggilan video", + "Voice call": "Panggilan suara", "Warning!": "Peringatan!", "You cannot place a call with yourself.": "Anda tidak dapat melakukan panggilan dengan diri sendiri.", "Sun": "Min", @@ -97,111 +97,111 @@ "Admin": "Admin", "Admin Tools": "Peralatan Admin", "No Webcams detected": "Tidak ada Webcam terdeteksi", - "You may need to manually permit %(brand)s to access your microphone/webcam": "Anda mungkin perlu secara manual mengizinkan %(brand)s untuk mengakses mikrofon/webcam", + "You may need to manually permit %(brand)s to access your microphone/webcam": "Anda mungkin perlu mengizinkan %(brand)s secara manual untuk mengakses mikrofon/webcam", "Default Device": "Perangkat Bawaan", "Advanced": "Tingkat Lanjut", - "Always show message timestamps": "Selalu tampilkan cap waktu dari pesan", - "Authentication": "Autentikasi", - "Are you sure you want to leave the room '%(roomName)s'?": "Anda yakin ingin meninggalkan ruang '%(roomName)s'?", - "A new password must be entered.": "Password baru harus diisi.", + "Always show message timestamps": "Selalu tampilkan stempel waktu pesan", + "Authentication": "Otentikasi", + "Are you sure you want to leave the room '%(roomName)s'?": "Anda yakin ingin meninggalkan ruangan '%(roomName)s'?", + "A new password must be entered.": "Kata sandi baru harus dimasukkan.", "%(items)s and %(lastItem)s": "%(items)s dan %(lastItem)s", - "Banned users": "Pengguna yang diblokir", - "Can't connect to homeserver - please check your connectivity, ensure your homeserver's SSL certificate is trusted, and that a browser extension is not blocking requests.": "Tidak dapat terhubung ke server Home - harap cek koneksi anda, pastikan sertifikat SSL server Home Anda terpercaya, dan ekstensi dari browser tidak memblokir permintaan.", - "Can't connect to homeserver via HTTP when an HTTPS URL is in your browser bar. Either use HTTPS or enable unsafe scripts.": "Tidak dapat terhubung ke server Home melalui HTTP ketika URL di browser berupa HTTPS. Pilih gunakan HTTPS atau aktifkan skrip yang tidak aman.", + "Banned users": "Pengguna yang dicekal", + "Can't connect to homeserver - please check your connectivity, ensure your homeserver's SSL certificate is trusted, and that a browser extension is not blocking requests.": "Tidak dapat terhubung ke homeserver - harap cek koneksi anda, pastikan sertifikat SSL homeserver Anda terpercaya, dan ekstensi browser tidak memblokir permintaan.", + "Can't connect to homeserver via HTTP when an HTTPS URL is in your browser bar. Either use HTTPS or enable unsafe scripts.": "Tidak dapat terhubung ke homeserver melalui HTTP ketika URL di browser berupa HTTPS. Gunakan HTTPS atau aktifkan skrip yang tidak aman.", "%(senderName)s changed the power level of %(powerLevelDiffText)s.": "%(senderName)s telah mengubah tingkat kekuatan dari %(powerLevelDiffText)s.", - "Changes your display nickname": "Ubah tampilan nama panggilan Anda", - "%(senderDisplayName)s removed the room name.": "%(senderDisplayName)s telah menghapus nama ruang.", + "Changes your display nickname": "Ubah tampilan nama tampilan Anda", + "%(senderDisplayName)s removed the room name.": "%(senderDisplayName)s telah menghapus nama ruangan.", "%(senderDisplayName)s changed the room name to %(roomName)s.": "%(senderDisplayName)s telah mengubah nama ruang menjadi %(roomName)s.", "%(senderDisplayName)s changed the topic to \"%(topic)s\".": "%(senderDisplayName)s telah mengubah topik menjadi \"%(topic)s\".", "Cryptography": "Kriptografi", - "Decrypt %(text)s": "Dekrip %(text)s", - "Ban": "Blokir", - "Bans user with given id": "Blokir pengguna dengan id", + "Decrypt %(text)s": "Dekripsi %(text)s", + "Ban": "Cekal", + "Bans user with given id": "Blokir pengguna dengan id yang dicantumkan", "Fetching third party location failed": "Gagal mengambil lokasi pihak ketiga", "Sunday": "Minggu", - "Guests can join": "Tamu dapat gabung", + "Guests can join": "Tamu dapat bergabung", "Messages sent by bot": "Pesan dikirim oleh bot", "Notification targets": "Target notifikasi", - "Failed to set direct chat tag": "Gagal mengatur tag obrolan langsung", + "Failed to set direct chat tag": "Gagal mengatur tanda pesan langsung", "Today": "Hari Ini", "Dismiss": "Abaikan", "Update": "Perbarui", "Notifications": "Notifikasi", "What's New": "Apa Yang Baru", "On": "Nyala", - "Changelog": "Daftar perubahan", + "Changelog": "Changelog", "Waiting for response from server": "Menunggu respon dari server", "Leave": "Tinggalkan", - "World readable": "Terpublikasi Umum", + "World readable": "Bisa dibaca oleh semua", "Warning": "Peringatan", - "This Room": "Ruang ini", + "This Room": "Ruangan ini", "Noisy": "Berisik", - "Messages containing my display name": "Pesan mengandung nama tampilan saya", + "Messages containing my display name": "Pesan yang berisi nama tampilan saya", "Messages in one-to-one chats": "Pesan di obrolan satu-ke-satu", "Unavailable": "Tidak Tersedia", - "remove %(name)s from the directory.": "hapus %(name)s dari direktori.", + "remove %(name)s from the directory.": "hapus %(name)s dari direktorinya.", "powered by Matrix": "didukung oleh Matrix", - "All Rooms": "Semua Ruang", - "Source URL": "URL sumber", - "Failed to add tag %(tagName)s to room": "Gagal menambahkan tag %(tagName)s ke ruang", + "All Rooms": "Semua Ruangan", + "Source URL": "URL Sumber", + "Failed to add tag %(tagName)s to room": "Gagal menambahkan tag %(tagName)s ke ruangan", "Members": "Anggota", - "No update available.": "Tidak ada pembaruan.", + "No update available.": "Tidak ada pembaruan yang tersedia.", "Resend": "Kirim Ulang", - "Collecting app version information": "Mengumpukan informasi versi aplikasi", + "Collecting app version information": "Mengumpulkan informasi versi aplikasi", "Room not found": "Ruang tidak ditemukan", "Tuesday": "Selasa", "Search…": "Cari…", - "Remove %(name)s from the directory?": "Hapus %(name)s dari direktori?", + "Remove %(name)s from the directory?": "Hapus %(name)s dari direktorinya?", "Unnamed room": "Ruang tanpa nama", "Friday": "Jumat", "Saturday": "Sabtu", "The server may be unavailable or overloaded": "Server mungkin tidak tersedia atau kelebihan muatan", "Reject": "Tolak", "Monday": "Senin", - "Remove from Directory": "Hapus dari DIrektori", - "Collecting logs": "Mengumpulkan catatan", - "Failed to forget room %(errCode)s": "Gagal melupakan ruang %(errCode)s", + "Remove from Directory": "Hapus dari Direktori", + "Collecting logs": "Mengumpulkan log", + "Failed to forget room %(errCode)s": "Gagal melupakan ruangan %(errCode)s", "Wednesday": "Rabu", "You cannot delete this message. (%(code)s)": "Anda tidak dapat menghapus pesan ini. (%(code)s)", "Quote": "Kutip", "Send": "Kirim", - "Error": "Terjadi Kesalahan", - "Send logs": "Kirim catatan", + "Error": "Kesalahan", + "Send logs": "Kirim log", "All messages": "Semua pesan", "Call invitation": "Undangan panggilan", - "Downloading update...": "Unduh pembaruan...", + "Downloading update...": "Mengunduh pembaruan...", "What's new?": "Apa yang baru?", - "When I'm invited to a room": "Ketika Saya diundang ke ruang", + "When I'm invited to a room": "Ketika saya diundang ke ruangan", "Cancel": "Batal", "Unable to look up room ID from server": "Tidak dapat mencari ID ruang dari server", "Couldn't find a matching Matrix room": "Tidak dapat menemukan ruang Matrix yang sesuai", - "Invite to this room": "Undang ke ruang ini", + "Invite to this room": "Undang ke ruangan ini", "Thursday": "Kamis", "Back": "Kembali", - "Show message in desktop notification": "Tampilkan pesan pada desktop", - "Unable to join network": "Tidak dapat bergabung di jaringan", + "Show message in desktop notification": "Tampilkan pesan di notifikasi desktop", + "Unable to join network": "Tidak dapat bergabung ke jaringan", "Messages in group chats": "Pesan di obrolan grup", "Yesterday": "Kemarin", "Error encountered (%(errorDetail)s).": "Terjadi kesalahan (%(errorDetail)s).", "Low Priority": "Prioritas Rendah", "Off": "Mati", - "%(brand)s does not know how to join a room on this network": "%(brand)s tidak tau bagaimana gabung ruang di jaringan ini", - "Failed to remove tag %(tagName)s from room": "Gagal menghapus tag %(tagName)s dari ruang", + "%(brand)s does not know how to join a room on this network": "%(brand)s tidak tahu bagaimana untuk gabung ruang di jaringan ini", + "Failed to remove tag %(tagName)s from room": "Gagal menghapus tanda %(tagName)s dari ruangan", "Remove": "Hapus", - "No rooms to show": "Tidak ada ruang ditunjukkan", - "Failed to change password. Is your password correct?": "Gagal untuk mengubah password. Apakah password Anda benar?", + "No rooms to show": "Tidak ada ruang yang ditampilkan", + "Failed to change password. Is your password correct?": "Gagal untuk mengubah kata sandi. Apakah kata sandi Anda benar?", "View Source": "Tampilkan Sumber", "Thank you!": "Terima kasih!", - "Checking for an update...": "Cek pembaruan...", + "Checking for an update...": "Mengecek untuk pembaruan...", "This email address is already in use": "Alamat email ini telah terpakai", "This phone number is already in use": "Nomor telepon ini telah terpakai", "Failed to verify email address: make sure you clicked the link in the email": "Gagal memverifikasi alamat email: pastikan Anda telah menekan link di dalam email", "The version of %(brand)s": "Versi %(brand)s", - "Your language of choice": "Pilihan bahasamu", - "Your homeserver's URL": "URL Homeserver Anda", + "Your language of choice": "Pilihan bahasa Anda", + "Your homeserver's URL": "URL homeserver Anda", "e.g. %(exampleValue)s": "mis. %(exampleValue)s", "Every page you use in the app": "Setiap halaman yang digunakan di app", - "e.g. ": "e.g. ", + "e.g. ": "e.g. ", "Your device resolution": "Resolusi perangkat Anda", "Analytics": "Analitik", "The information being sent to us to help make %(brand)s better includes:": "Informasi yang dikirim membantu kami memperbaiki %(brand)s, termasuk:", @@ -209,9 +209,9 @@ "Call Failed": "Panggilan Gagal", "VoIP is unsupported": "VoIP tidak didukung", "You cannot place VoIP calls in this browser.": "Anda tidak dapat melakukan panggilan VoIP di browser ini.", - "Permission Required": "Permisi Dibutuhkan", - "You do not have permission to start a conference call in this room": "Anda tidak memiliki permisi untuk memulai panggilan massal di ruang ini", - "Explore rooms": "Jelajahi ruang", + "Permission Required": "Izin Dibutuhkan", + "You do not have permission to start a conference call in this room": "Anda tidak memiliki permisi untuk memulai panggilan konferensi di ruang ini", + "Explore rooms": "Jelajahi ruangan", "Sign In": "Masuk", "Create Account": "Buat Akun", "Identity server": "Server identitas" From 21197107925d673a3b22a223a13e2db12fc491bf Mon Sep 17 00:00:00 2001 From: Linerly Date: Tue, 12 Oct 2021 02:50:58 +0000 Subject: [PATCH 033/156] Translated using Weblate (Indonesian) Currently translated at 20.7% (667 of 3208 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/id/ --- src/i18n/strings/id.json | 453 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 452 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/id.json b/src/i18n/strings/id.json index 31225ed75e6..a289d2a351d 100644 --- a/src/i18n/strings/id.json +++ b/src/i18n/strings/id.json @@ -214,5 +214,456 @@ "Explore rooms": "Jelajahi ruangan", "Sign In": "Masuk", "Create Account": "Buat Akun", - "Identity server": "Server identitas" + "Identity server": "Server identitas", + "%(senderName)s banned %(targetName)s": "%(senderName)s mencekal %(targetName)s", + "Prepends ┬──┬ ノ( ゜-゜ノ) to a plain-text message": "Menambahkan ┬──┬ ノ( ゜-゜ノ) ke pesan teks biasa", + "%(weekDayName)s, %(monthName)s %(day)s %(fullYear)s": "%(weekDayName)s, %(day)s %(monthName)s %(fullYear)s", + "The call was answered on another device.": "Panggilan dijawab di perangkat lainnya.", + "%(senderName)s unbanned %(targetName)s": "%(senderName)s menghilangkan cekalan %(targetName)s", + "%(targetName)s left the room": "%(targetName)s keluar dari ruangan ini", + "%(targetName)s left the room: %(reason)s": "%(targetName)s keluar dari ruangan ini: %(reason)s", + "%(targetName)s rejected the invitation": "%(targetName)s menolak undangannya", + "%(targetName)s joined the room": "%(targetName)s bergabung ke ruangan ini", + "%(senderName)s made no change": "%(senderName)s tidak membuat perubahan", + "%(senderName)s set a profile picture": "%(senderName)s mengatur foto profil", + "%(senderName)s changed their profile picture": "%(senderName)s mengubah foto profilnya", + "%(senderName)s removed their profile picture": "%(senderName)s menghilangkan foto profilnya", + "%(senderName)s removed their display name (%(oldDisplayName)s)": "%(senderName)s menghilangkan nama tampilannya (%(oldDisplayName)s)", + "%(senderName)s set their display name to %(displayName)s": "%(senderName)s mengatur nama tampilannya ke %(displayName)s", + "%(oldDisplayName)s changed their display name to %(displayName)s": "%(oldDisplayName)s mengubah nama tampilannya ke %(displayName)s", + "%(senderName)s invited %(targetName)s": "%(senderName)s mengundang %(targetName)s", + "%(senderName)s banned %(targetName)s: %(reason)s": "%(senderName)s mencekal %(targetName)s: %(reason)s", + "%(targetName)s accepted an invitation": "%(targetName)s menerima sebuah undangan", + "%(targetName)s accepted the invitation for %(displayName)s": "%(targetName)s menerima undangan %(displayName)s", + "%(senderName)s placed a video call. (not supported by this browser)": "%(senderName)s melakukan panggilan video. (tidak didukung oleh browser ini)", + "%(senderName)s placed a video call.": "%(senderName)s melakukan panggilan video.", + "%(senderName)s placed a voice call. (not supported by this browser)": "%(senderName)s melakukan panggilan suara. (tidak didukung oleh browser ini)", + "%(senderName)s placed a voice call.": "%(senderName)s melakukan panggilan video.", + "Displays action": "Menampilkan aksi", + "Converts the DM to a room": "Mengubah pesan langsung ke ruangan", + "Converts the room to a DM": "Mengubah ruangan ini ke pesan langsung", + "Takes the call in the current room off hold": "Melanjutkan panggilan di ruang saat ini", + "Places the call in the current room on hold": "Menunda panggilan di ruangan saat ini", + "Sends a message to the given user": "Mengirim sebuah pesan ke pengguna yang dicantumkan", + "Opens chat with the given user": "Membuat chat dengan pengguna yang dicantumkan", + "Send a bug report with logs": "Mengirim laporan bug dengan log", + "Displays information about a user": "Menampilkan informasi tentang sebuah pengguna", + "Displays list of commands with usages and descriptions": "Menampilkan daftar perintah dengan penggunaan dan deskripsi", + "Sends the given emote coloured as a rainbow": "Mengirim emote dengan warna pelangi", + "Sends the given message coloured as a rainbow": "Mengirim pesan dengan warna pelangi", + "Forces the current outbound group session in an encrypted room to be discarded": "Memaksa sesi grup keluar saat ini di ruang terenkripsi untuk dibuang", + "The signing key you provided matches the signing key you received from %(userId)s's session %(deviceId)s. Session marked as verified.": "Kunci penandatanganan yang Anda sediakan cocok dengan kunci penandatanganan yang Anda terima dari sesi %(userId)s %(deviceId)s. Sesi ditandai sebagai terverifikasi.", + "Verified key": "Kunci terverifikasi", + "WARNING: KEY VERIFICATION FAILED! The signing key for %(userId)s and session %(deviceId)s is \"%(fprint)s\" which does not match the provided key \"%(fingerprint)s\". This could mean your communications are being intercepted!": "PERINGATAN: VERIFIKASI KUNCI GAGAL! Kunci penandatanganan untuk %(userId)s dan sesi %(deviceId)s adalah \"%(fprint)s\" yang tidak cocok dengan kunci \"%(fingerprint)s\" yang disediakan. Ini bisa saja berarti komunikasi Anda sedang disadap!", + "WARNING: Session already verified, but keys do NOT MATCH!": "PERINGATAN: Sesi telah diverifikasi, tetapi kuncinya TIDAK COCOK!", + "Session already verified!": "Sesi telah diverifikasi!", + "Unknown (user, session) pair:": "Tidak diketahui (pengguna, sesi) pasangan:", + "Verifies a user, session, and pubkey tuple": "Memverifikasi sebuah pengguna, sesi, dan tupel pubkey", + "You cannot modify widgets in this room.": "Anda tidak dapat mengubah widget di ruangan ini.", + "Please supply a https:// or http:// widget URL": "Mohon masukkan sebuah URL widget https:// atau http://", + "Please supply a widget URL or embed code": "Silakan masukkan URL widget atau kode embed", + "Adds a custom widget by URL to the room": "Menambahkan widget kustom dari URL ke ruangan ini", + "Opens the Developer Tools dialog": "Membuka dialog Peralatan Pengembang", + "Deops user with given id": "De-op pengguna dengan ID yang dicantumkan", + "Could not find user in room": "Tidak dapat menemukan pengguna di ruangan", + "Command failed": "Perintah gagal", + "Define the power level of a user": "Tentukan tingkat daya pengguna", + "You are no longer ignoring %(userId)s": "Anda sekarang berhenti mengabaikan %(userId)s", + "Unignored user": "Pengguna yang berhenti diabaikan", + "Ignores a user, hiding their messages from you": "Mengabaikan pengguna, dan sembunyikan pesan mereka", + "Stops ignoring a user, showing their messages going forward": "Berhenti mengabaikan pengguna, dan tampilkan pesan mereka", + "You are now ignoring %(userId)s": "Anda sekarang mengabaikan %(userId)s", + "Ignored user": "Pengguna yang diabaikan", + "Unbans user with given ID": "Menhilangkan cekalan pengguna dengan ID yang dicantumkan", + "Kicks user with given id": "Mengeluarkan pengguna dengan ID yang dicantumkan", + "Unrecognised room address:": "Alamat ruangan yang tidak diketahui:", + "Joins room with given address": "Bergabung ke ruangan dengan alamat yang dicantumkan", + "Use an identity server to invite by email. Manage in Settings.": "Gunakan server identitas untuk mengundang melalui email. Kelola di Pengaturan.", + "Use an identity server to invite by email. Click continue to use the default identity server (%(defaultIdentityServerName)s) or manage in Settings.": "Gunakan server identitas untuk mengundang melalui email. Klik lanjutkan untuk menggunakan server identitas default (%(defaultIdentityServerName)s) atau kelola di Pengaturan.", + "Use an identity server": "Gunakan sebuah server identitias", + "Invites user with given id to current room": "Mengundang pengguna dengan ID yang dicantumkan ke ruangan saat ini", + "Sets the room name": "Mengatur nama ruangan", + "This room has no topic.": "Ruangan ini tidak ada topik.", + "Failed to set topic": "Gagal untuk mengatur topik", + "Gets or sets the room topic": "Mendapatkan atau mengatur topik ruangan", + "Changes your avatar in all rooms": "Mengubah avatar Anda di semua ruangan", + "Changes your avatar in this current room only": "Mengubah avatar Anda di ruangan saat ini saja", + "Changes the avatar of the current room": "Mengubah avatar ruangan saat ini", + "Changes your display nickname in the current room only": "Mengubah nama tampilan di ruangan saat ini saja", + "You do not have the required permissions to use this command.": "Anda tidak memiliki izin yang dibutuhkan untuk menggunakan perintah ini.", + "Upgrades a room to a new version": "Meningkatkan ruangan ke versi yang baru", + "Sends a message as html, without interpreting it as markdown": "Mengirim pesan sebagai HTML, tanpa mengubahnya ke markdown", + "Sends a message as plain text, without interpreting it as markdown": "Mengirim pesan sebagai teks biasa, tanpa mengubahnya ke markdown", + "Prepends ( ͡° ͜ʖ ͡°) to a plain-text message": "Menambahkan ( ͡° ͜ʖ ͡°) ke pesan teks biasa", + "Prepends (╯°□°)╯︵ ┻━┻ to a plain-text message": "Menambahkan (╯°□°)╯︵ ┻━┻ ke pesan teks biasa", + "Prepends ¯\\_(ツ)_/¯ to a plain-text message": "Menambahkan ¯\\_(ツ)_/¯ ke pesan teks biasa", + "Sends the given message as a spoiler": "Mengirim pesan sebagai spoiler", + "Usage": "Penggunaan", + "Other": "Lainnya", + "Effects": "Efek", + "Actions": "Aksi", + "Messages": "Pesan", + "Setting up keys": "Menyiapkan kunci", + "Go Back": "Kembali", + "Are you sure you want to cancel entering passphrase?": "Apakah Anda yakin untuk membatalkan pemasukkan frasa sandi?", + "Cancel entering passphrase?": "Batalkan memasukkan frasa sandi?", + "Missing user_id in request": "Kurang user_id di permintaan", + "Room %(roomId)s not visible": "Ruangan %(roomId)s tidak terlihat", + "Missing room_id in request": "Kurang room_id di permintaan", + "Missing roomId.": "Kurang ID ruangan.", + "You do not have permission to do that in this room.": "Anda tidak memiliki izin untuk melakukannya di ruangan ini.", + "You are not in this room.": "Anda tidak berada di ruangan ini.", + "Power level must be positive integer.": "Level kekuatan harus angka yang positif.", + "This room is not recognised.": "Ruangan ini tidak dikenal.", + "Failed to send request.": "Gagal untuk mengirim permintaan.", + "Unable to create widget.": "Tidak dapat membuat widget.", + "You need to be able to invite users to do that.": "Anda harus dapat mengundang pengguna untuk melakukannya.", + "You need to be logged in.": "Anda harus masuk.", + "We sent the others, but the below people couldn't be invited to ": "Kami telah mengirim yang lainnya, tetapi orang berikut ini tidak dapat diundang ke ", + "Some invites couldn't be sent": "Beberapa undangan tidak dapat dikirim", + "Failed to invite users to the room:": "Gagal untuk mengundang pengguna ke ruangan ini:", + "Failed to invite": "Gagal untuk mengundang", + "Custom (%(level)s)": "Kustom (%(level)s)", + "Moderator": "Moderator", + "Restricted": "Dibatasi", + "Sign In or Create Account": "Masuk atau Buat Akun", + "Use your account or create a new one to continue.": "Gunakan akun Anda atau buat akun baru untuk lanjut.", + "Zimbabwe": "Zimbabwe", + "Zambia": "Zambia", + "Yemen": "Yaman", + "Western Sahara": "Sahara Barat", + "Wallis & Futuna": "Wallis & Futuna", + "Vietnam": "Vietnam", + "Venezuela": "Venezuela", + "Vatican City": "Kota Vatikan", + "Vanuatu": "Vanuatu", + "Uzbekistan": "Uzbekistan", + "Uruguay": "Uruguay", + "United Arab Emirates": "Uni Emirat Arab", + "Ukraine": "Ukraina", + "Uganda": "Uganda", + "U.S. Virgin Islands": "Kepulauan Virgin AS", + "Tuvalu": "Tuvalu", + "Turks & Caicos Islands": "Kepulauan Turks & Caicos", + "Turkmenistan": "Turkmenistan", + "Turkey": "Turki", + "Tunisia": "Tunisia", + "Trinidad & Tobago": "Trinidad & Tobago", + "Tonga": "Tonga", + "Tokelau": "Tokelau", + "Togo": "Togo", + "Timor-Leste": "Timor-Leste", + "Thailand": "Thailand", + "Tanzania": "Tanzania", + "Tajikistan": "Tajikistan", + "Taiwan": "Taiwan", + "São Tomé & Príncipe": "São Tomé & Príncipe", + "Syria": "Suriah", + "Switzerland": "Swiss", + "Sweden": "Swedia", + "Swaziland": "Swaziland", + "Svalbard & Jan Mayen": "Svalbard & Jan Mayen", + "Suriname": "Suriname", + "Sudan": "Sudan", + "St. Vincent & Grenadines": "St. Vincent & Grenadines", + "St. Pierre & Miquelon": "St. Pierre & Miquelon", + "St. Martin": "St. Martin", + "St. Lucia": "St. Lucia", + "St. Kitts & Nevis": "St. Kitts & Nevis", + "St. Helena": "St. Helena", + "Sri Lanka": "Sri Lanka", + "St. Barthélemy": "St. Barthélemy", + "Spain": "Spanyol", + "South Sudan": "Sudan Selatan", + "South Korea": "Korea Selatan", + "South Georgia & South Sandwich Islands": "Georgia Selatan & Kepulauan Sandwich Selatan", + "South Africa": "Afrika Selatan", + "Somalia": "Somalia", + "Solomon Islands": "Pulau Solomon", + "Slovenia": "Slovenia", + "Slovakia": "Slowakia", + "Sint Maarten": "Sint Maarten", + "Singapore": "Singapura", + "Sierra Leone": "Sierra Leone", + "Seychelles": "Seychelles", + "Serbia": "Serbia", + "Senegal": "Senegal", + "Saudi Arabia": "Arab Saudi", + "San Marino": "San Marino", + "Samoa": "Samoa", + "Réunion": "Reuni", + "Rwanda": "Rwanda", + "Russia": "Rusia", + "Romania": "Rumania", + "Qatar": "Qatar", + "Puerto Rico": "Puerto Riko", + "Portugal": "Portugal", + "Poland": "Polandia", + "Pitcairn Islands": "Kepulauan Pitcairn", + "Philippines": "Filipina", + "Peru": "Peru", + "Paraguay": "Paraguay", + "Papua New Guinea": "Papua Nugini", + "Panama": "Panama", + "Palestine": "Palestina", + "Pakistan": "Pakistan", + "Palau": "Palau", + "Oman": "Oman", + "Norway": "Norway", + "Northern Mariana Islands": "Kepulauan Mariana Utara", + "North Korea": "Korea Utara", + "Norfolk Island": "Pulau Norfolk", + "Niue": "Niue", + "Nigeria": "Nigeria", + "Niger": "Niger", + "Nicaragua": "Nikaragua", + "New Zealand": "Selandia Baru", + "New Caledonia": "Kaledonia Baru", + "Netherlands": "Belanda", + "Nepal": "Nepal", + "Nauru": "Nauru", + "Namibia": "Namibia", + "Myanmar": "Myanmar", + "Mozambique": "Mozambik", + "Morocco": "Maroko", + "Montserrat": "Montserrat", + "Montenegro": "Montenegro", + "Mongolia": "Mongolia", + "Monaco": "Monako", + "Moldova": "Moldova", + "Micronesia": "Mikronesia", + "Mexico": "Meksiko", + "Mayotte": "Mayotte", + "Mauritius": "Mauritius", + "Mauritania": "Mauritania", + "Martinique": "Martinik", + "Marshall Islands": "Pulau Marshall", + "Malta": "Malta", + "Mali": "Mali", + "Maldives": "Maladewa", + "Malaysia": "Malaysia", + "Malawi": "Malawi", + "Madagascar": "Madagaskar", + "Macedonia": "Makedonia", + "Macau": "Makau", + "Luxembourg": "Luksemburg", + "Lithuania": "Lithuania", + "Liechtenstein": "Liechtenstein", + "Libya": "Libya", + "Liberia": "Liberia", + "Lesotho": "Lesotho", + "Lebanon": "Libanon", + "Latvia": "Latvia", + "Laos": "Laos", + "Kyrgyzstan": "Kirgistan", + "Kuwait": "Kuwait", + "Kosovo": "Kosovo", + "Kiribati": "Kiribati", + "Kenya": "Kenya", + "Kazakhstan": "Kazakstan", + "Jordan": "Yordania", + "Jersey": "Jersey", + "Japan": "Jepang", + "Jamaica": "Jamaika", + "Italy": "Italia", + "Israel": "Israel", + "Isle of Man": "Isle of Man", + "Ireland": "Irlandia", + "Iraq": "Irak", + "Iran": "Iran", + "Indonesia": "Indonesia", + "India": "India", + "Iceland": "Islandia", + "Hungary": "Hungaria", + "Hong Kong": "Hongkong", + "Honduras": "Honduras", + "Heard & McDonald Islands": "Pulau Heard & McDonald", + "Haiti": "Haiti", + "Guyana": "Guyana", + "Guinea-Bissau": "Guinea-Bissau", + "Guinea": "Guinea", + "Guernsey": "Guernsey", + "Guatemala": "Guatemala", + "Guam": "Guam", + "Guadeloupe": "Guadeloupe", + "Grenada": "Grenada", + "Greenland": "Greenland", + "Greece": "Yunani", + "Gibraltar": "Gibraltar", + "Ghana": "Ghana", + "Germany": "Jerman", + "Georgia": "Georgia", + "Gambia": "Gambia", + "Gabon": "Gabon", + "French Southern Territories": "Wilayah Selatan Prancis", + "French Polynesia": "Polinesia Perancis", + "French Guiana": "Guyana Perancis", + "France": "Perancis", + "Finland": "Finlandia", + "Fiji": "Fiji", + "Faroe Islands": "Kepulauan Faroe", + "Falkland Islands": "Kepulauan Falkland", + "Ethiopia": "Etiopia", + "Estonia": "Estonia", + "Eritrea": "Eritrea", + "Equatorial Guinea": "Guinea Ekuator", + "El Salvador": "El Salvador", + "Egypt": "Mesir", + "Ecuador": "Ekuador", + "Dominican Republic": "Republik Dominika", + "Dominica": "Dominika", + "Djibouti": "Djibouti", + "Denmark": "Denmark", + "Côte d’Ivoire": "Pantai Gading", + "Czech Republic": "Republik Ceko", + "Cyprus": "Siprus", + "Curaçao": "Curacao", + "Cuba": "Kuba", + "Croatia": "Kroasia", + "Costa Rica": "Kosta Rika", + "Cook Islands": "Kepulauan Cook", + "Congo - Kinshasa": "Kongo - Kinshasa", + "Congo - Brazzaville": "Kongo - Brazzaville", + "Comoros": "Komoro", + "Colombia": "Kolumbia", + "Cocos (Keeling) Islands": "Kepulauan Cocos (Keeling)", + "Christmas Island": "Pulau Natal", + "China": "Cina", + "Chile": "Chili", + "Chad": "Chad", + "Central African Republic": "Republik Afrika Tengah", + "Cayman Islands": "Pulau Cayman", + "Caribbean Netherlands": "Karibia Belanda", + "Cape Verde": "Tanjung Verde", + "Canada": "Kanada", + "Cameroon": "Kamerun", + "Cambodia": "Kamboja", + "Burundi": "Burundi", + "Burkina Faso": "Burkina Faso", + "Bulgaria": "Bulgaria", + "Brunei": "Brunei", + "British Virgin Islands": "Kepulauan Virgin Inggris", + "British Indian Ocean Territory": "Wilayah Samudra Hindia Britania", + "Brazil": "Brazil", + "Bouvet Island": "Pulau Bouvet", + "Botswana": "Botswana", + "Bosnia": "Bosnia", + "Bolivia": "Bolivia", + "Bhutan": "Bhutan", + "Bermuda": "Bermuda", + "Benin": "Benin", + "Belize": "Belize", + "Belgium": "Belgium", + "Belarus": "Belarusia", + "Barbados": "Barbados", + "Bangladesh": "Bangladesh", + "Bahrain": "Bahrain", + "Bahamas": "Bahama", + "Azerbaijan": "Azerbaijan", + "Austria": "Austria", + "Australia": "Australia", + "Aruba": "Aruba", + "Armenia": "Armenia", + "Argentina": "Argentina", + "Antigua & Barbuda": "Antigua & Barbuda", + "Antarctica": "Antartika", + "Anguilla": "Anguila", + "Angola": "Angola", + "Andorra": "Andora", + "American Samoa": "Samoa Amerika", + "Algeria": "Aljazair", + "Albania": "Albania", + "Åland Islands": "Pulau Aland", + "Afghanistan": "Afganistan", + "United States": "Amerika Serikat", + "United Kingdom": "Britania Raya", + "Your email address does not appear to be associated with a Matrix ID on this Homeserver.": "Alamat email Anda tidak tertaut dengan ID Matrix di homeserver ini.", + "Unable to enable Notifications": "Tidak dapat mengaktifkan Notifikasi", + "%(brand)s was not given permission to send notifications - please try again": "%(brand)s tidak memiliki izin untuk mengirim Anda notifikasi - silakan coba lagi", + "%(brand)s does not have permission to send you notifications - please check your browser settings": "%(brand)s tidak memiliki izin untuk mengirim Anda notifikasi - mohon periksa pengaturan browser Anda", + "%(name)s is requesting verification": "%(name)s meminta verifikasi", + "Your homeserver was unreachable and was not able to log you in. Please try again. If this continues, please contact your homeserver administrator.": "Homeserver Anda tidak dapat diakses dan tidak dapat memasukkan Anda. Silakan coba lagi. Jika ini terus terjadi, hubungi administrator homeserver Anda.", + "Your homeserver rejected your log in attempt. This could be due to things just taking too long. Please try again. If this continues, please contact your homeserver administrator.": "Homeserver Anda menolak upaya masuk Anda. Ini bisa jadi karena hal-hal yang terlalu lama. Silakan coba lagi. Jika ini berlanjut, hubungi administrator homeserver Anda.", + "Try again": "Coba lagi", + "We asked the browser to remember which homeserver you use to let you sign in, but unfortunately your browser has forgotten it. Go to the sign in page and try again.": "Kami menanyakan browser ini untuk mengingat homeserver apa yang Anda gunakan untuk membantu Anda masuk, tetapi sayangnya browser ini melupakannya. Pergi ke halaman masuk dan coba lagi.", + "We couldn't log you in": "Kami tidak dapat memasukkan Anda", + "Trust": "Percayakan", + "Only continue if you trust the owner of the server.": "Hanya lanjutkan jika Anda mempercayai pemilik server ini.", + "This action requires accessing the default identity server to validate an email address or phone number, but the server does not have any terms of service.": "Aksi ini memerlukan mengakses server identitas bawaan untuk memvalidasi sebuah alamat email atau nomor telepon, tetapi server ini tidak memiliki syarat layanan apapun.", + "Identity server has no terms of service": "Identitas server ini tidak memiliki syarat layanan", + "Unnamed Room": "Ruangan Tanpa Nama", + "Failed to add the following rooms to %(groupId)s:": "Gagal untuk menambahkan ruangan berikut ini ke %(groupId)s:", + "Failed to invite users to %(groupId)s": "Gagal untuk mengundang pengguna ke %(groupId)s", + "Failed to invite users to community": "Gagal untuk mengundang pengguna ke komunitas", + "Failed to invite the following users to %(groupId)s:": "Gagal mengundang pengguna berikut ini ke %(groupId)s:", + "Add to community": "Tambahkan ke komunitas", + "Room name or address": "Nama ruangan atau alamat", + "Add rooms to the community": "Tambahkan ruangan ke komunitas ini", + "Show these rooms to non-members on the community page and room list?": "Tampilkan ruangan ini ke orang yang bukan anggota komunitas di halaman komunitas dan daftar ruangan?", + "Which rooms would you like to add to this community?": "Ruangan apa yang Anda ingin tambahkan ke komunitas ini?", + "Invite to Community": "Undang ke Komunitas", + "Name or Matrix ID": "Nama atau ID Matrix", + "Invite new community members": "Undang anggota komunitas baru", + "Warning: any person you add to a community will be publicly visible to anyone who knows the community ID": "Peringatan: setiap orang yang Anda tambahkan ke komunitas akan terlihat oleh siapa saja yang mengetahui ID komunitas", + "Who would you like to add to this community?": "Siapa yang ingin Anda tambahkan ke komunitas ini?", + "%(date)s at %(time)s": "%(date)s pada %(time)s", + "%(weekDayName)s, %(monthName)s %(day)s %(fullYear)s %(time)s": "%(weekDayName)s, %(day)s %(monthName)s %(fullYear)s %(time)s", + "%(weekDayName)s, %(monthName)s %(day)s %(time)s": "%(weekDayName)s, %(day)s %(monthName)s %(time)s", + "%(weekDayName)s %(time)s": "%(weekDayName)s %(time)s", + "AM": "AM", + "PM": "PM", + "Failure to create room": "Gagal untuk membuat ruangan", + "The server does not support the room version specified.": "Server ini tidak mendukung versi ruangan yang dicantumkan.", + "Server may be unavailable, overloaded, or you hit a bug.": "Server mungkin tidak tersedia, kelebihan beban, atau Anda mengalami bug.", + "Upload Failed": "Unggahan Gagal", + "The file '%(fileName)s' exceeds this homeserver's size limit for uploads": "File '%(fileName)s' melebihi batas ukuran unggahan file homeserver", + "The file '%(fileName)s' failed to upload.": "File '%(fileName)s' gagal untuk diunggah.", + "At this time it is not possible to reply with a file. Would you like to upload this file without replying?": "Saat ini membalas dengan file tidak dapat dilakukan. Apakah Anda ingin menunggah file ini tanpa membalas?", + "Replying With Files": "Membalas Dengan File", + "This will end the conference for everyone. Continue?": "Ini akan mengakhiri konferensi ini untuk semuanya. Lanjut?", + "End conference": "Akhiri konferensi", + "Unable to transfer call": "Tidak dapat memindahkan panggilan", + "Failed to transfer call": "Gagal untuk memindahkan panggilan", + "Transfer Failed": "Pemindahan Gagal", + "There was an error looking up the phone number": "Sebuah kesalahan terjadi mencari nomor teleponnya", + "Unable to look up phone number": "Tidak dapat mencari nomor telepon", + "You've reached the maximum number of simultaneous calls.": "Anda telah mencapai jumlah maksimum panggilan pada waktu bersamaan.", + "Too Many Calls": "Terlalu Banyak Panggilan", + "You're already in a call with this person.": "Anda sudah ada di panggilan dengan orang itu.", + "Already in call": "Sudah ada di panggilan", + "No other application is using the webcam": "Tidak ada aplikasi lain yang menggunakan webcam", + "Permission is granted to use the webcam": "Izin diberikan untuk menggunakan webcam", + "A microphone and webcam are plugged in and set up correctly": "Mikrofon dan webcam telah dicolokkan dan diatur dengan benar", + "Call failed because webcam or microphone could not be accessed. Check that:": "Panggilan gagal karena webcam atau mikrofon tidak bisa diakses. Periksa itu:", + "Unable to access webcam / microphone": "Tidak dapat mengakses webcam/mikrofon", + "Call failed because microphone could not be accessed. Check that a microphone is plugged in and set up correctly.": "Panggilan gagal karena mikrofon tidak bisa diakses. Periksa apakah mikrofon sudah dicolokkan dan diatur dengan benar.", + "Unable to load! Check your network connectivity and try again.": "Tidak dapat dimuat! Periksa koneksi jaringan Anda dan coba lagi.", + "Unable to access microphone": "Tidak dapat mengakses mikrofon", + "Try using turn.matrix.org": "Coba menggunakan turn.matrix.org", + "Alternatively, you can try to use the public server at turn.matrix.org, but this will not be as reliable, and it will share your IP address with that server. You can also manage this in Settings.": "Alternatifnya, Anda bisa coba menggunakan server publik di turn.matrix.org, tetapi ini tidak terlalu andal, dan akan membagikan alamat IP Anda dengan servernya. Anda juga bisa kelola ini di Pengaturan.", + "Please ask the administrator of your homeserver (%(homeserverDomain)s) to configure a TURN server in order for calls to work reliably.": "Mohon tanyakan ke administrator homeserver Anda (%(homeserverDomain)s) untuk mengkonfigurasikan server TURN supaya panggilan dapat bekerja dengan benar.", + "Call failed due to misconfigured server": "Panggilan gagal karena servernya tidak dikonfigurasi dengan benar", + "Answered Elsewhere": "Dijawab di Perangkat Lain", + "The call could not be established": "Panggilan tidak dapat dilakukan", + "The user you called is busy.": "Pengguna yang Anda panggil sedang sibuk.", + "User Busy": "Pengguna Sibuk", + "Your user agent": "Agen pengguna Anda", + "Whether you're using %(brand)s as an installed Progressive Web App": "Apakah Anda menggunakan %(brand)s sebagai Aplikasi Web Progresif yang terpasang", + "Whether or not you're using the 'breadcrumbs' feature (avatars above the room list)": "Apakah Anda menggunakan fitur 'breadcrumbs' atau tidak (avatar di atas daftar ruangan)", + "Whether you're using %(brand)s on a device where touch is the primary input mechanism": "Apakah Anda menggunakan %(brand)s pada perangkat yang mekanisme input utamanya adalah sentuhan", + "Whether or not you're using the Richtext mode of the Rich Text Editor": "Apakah Anda menggunakan mode Richtext dari Rich Text Editor atau tidak", + "Which officially provided instance you are using, if any": "Instansi mana yang secara resmi Anda gunakan, jika ada", + "Whether or not you're logged in (we don't record your username)": "Apakah Anda masuk atau tidak (kami tidak mencatat nama pengguna Anda)", + "The platform you're on": "Platform yang Anda berada saat ini", + "Add Phone Number": "Tambahkan Nomor Telepon", + "Click the button below to confirm adding this phone number.": "Klik tombol di bawah untuk mengkonfirmasi penambahan nomor telepon ini.", + "Confirm adding phone number": "Konfirmasi penambahan nomor telepon", + "Confirm adding this phone number by using Single Sign On to prove your identity.": "Konfirmasi penambahan nomor telepon ini dengan menggunakan Single Sign On untuk membuktikan identitas Anda.", + "Add Email Address": "Tambahkan Alamat Email", + "Confirm": "Konfirmasi", + "Click the button below to confirm adding this email address.": "Klik tombol di bawah untuk mengkonfirmasi penambahan alamat email ini.", + "Confirm adding email": "Konfirmasi penambahan email", + "Single Sign On": "Single Sign On", + "Confirm adding this email address by using Single Sign On to prove your identity.": "Konfirmasi penambahan alamat email ini dengan menggunakan Single Sign On untuk membuktikan identitas Anda.", + "Use Single Sign On to continue": "Gunakan Single Sign On untuk melanjutkan" } From dd458f4e6d3534a83aebcbdf8fb55bfa0c0a2f0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Priit=20J=C3=B5er=C3=BC=C3=BCt?= Date: Mon, 11 Oct 2021 22:10:32 +0000 Subject: [PATCH 034/156] Translated using Weblate (Estonian) Currently translated at 99.9% (3207 of 3208 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/et/ --- src/i18n/strings/et.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/i18n/strings/et.json b/src/i18n/strings/et.json index 05e39a0110c..f54a44f3776 100644 --- a/src/i18n/strings/et.json +++ b/src/i18n/strings/et.json @@ -1856,8 +1856,8 @@ "The homeserver the user you’re verifying is connected to": "Sinu poolt verifitseeritava kasutaja koduserver", "Yours, or the other users’ internet connection": "Sinu või teise kasutaja internetiühendus", "Yours, or the other users’ session": "Sinu või teise kasutaja sessioon", - "Trusted": "Usaldusväärsed", - "Not trusted": "Ei ole usaldusväärsed", + "Trusted": "Usaldusväärne", + "Not trusted": "Ei ole usaldusväärne", "%(count)s verified sessions|other": "%(count)s verifitseeritud sessiooni", "%(count)s verified sessions|one": "1 verifitseeritud sessioon", "Hide verified sessions": "Peida verifitseeritud sessioonid", From 89958e6b1007864a9e61696d052b5f5d51d3b592 Mon Sep 17 00:00:00 2001 From: iaiz Date: Tue, 12 Oct 2021 10:17:10 +0000 Subject: [PATCH 035/156] Translated using Weblate (Spanish) Currently translated at 100.0% (3208 of 3208 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/es/ --- src/i18n/strings/es.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/es.json b/src/i18n/strings/es.json index 87632e6b286..c8a28079dfe 100644 --- a/src/i18n/strings/es.json +++ b/src/i18n/strings/es.json @@ -3216,5 +3216,6 @@ "Enter a number between %(min)s and %(max)s": "Escribe un número entre %(min)s y %(max)s", "Creating Space...": "Creando el espacio…", "Fetching data...": "Pidiendo los datos…", - "To proceed, please accept the verification request on your other login.": "Antes de continuar, acepta la solicitud de verificación en algún otro sitio donde tengas tu sesión iniciada, por favor." + "To proceed, please accept the verification request on your other login.": "Antes de continuar, acepta la solicitud de verificación en algún otro sitio donde tengas tu sesión iniciada, por favor.", + "Number of messages can only be a number between %(min)s and %(max)s": "El número de mensajes solo puede ser de %(min)s a %(max)s" } From e946df5e2bf1bb30adf8bd129ce8ed3524c1eab1 Mon Sep 17 00:00:00 2001 From: Daimar Stein Date: Tue, 12 Oct 2021 14:33:52 +0000 Subject: [PATCH 036/156] Translated using Weblate (Portuguese (Brazil)) Currently translated at 92.7% (2975 of 3208 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/pt_BR/ --- src/i18n/strings/pt_BR.json | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/pt_BR.json b/src/i18n/strings/pt_BR.json index 3a2f1aeb086..670b654f2d0 100644 --- a/src/i18n/strings/pt_BR.json +++ b/src/i18n/strings/pt_BR.json @@ -2959,5 +2959,29 @@ "To avoid these issues, create a new encrypted room for the conversation you plan to have.": "Para evitar esses problemas, crie uma nova sala criptografada para a conversa que você planeja ter.", "Are you sure you want to add encryption to this public room?": "Tem certeza que deseja adicionar criptografia para esta sala pública?", "Select the roles required to change various parts of the space": "Selecionar os cargos necessários para alterar certas partes do espaço", - "Change main address for the space": "Mudar o endereço principal para o espaço" + "Change main address for the space": "Mudar o endereço principal para o espaço", + "Include Attachments": "Incluir Anexos", + "Size Limit": "Limite de Tamanho", + "MB": "MB", + "Number of messages": "Número de mensagens", + "Number of messages can only be a number between %(min)s and %(max)s": "Número de mensagens pode ser apenas um número entre %(min)s e %(max)s", + "Size can only be a number between %(min)s MB and %(max)s MB": "O tamanho pode ser apenas um número entre %(min)s MB e %(max)s MB", + "Enter a number between %(min)s and %(max)s": "Insira um número entre %(min)s e %(max)s", + "Creating Space...": "Criando Espaço…", + "Fetching data...": "Buscando dados…", + "In reply to this message": "Em resposta a esta mensagem", + "Zoom in": "Aumentar zoom", + "Zoom out": "Diminuir zoom", + "Expand quotes │ ⇧+click": "Expandir citações | ⇧+click", + "Export chat": "Exportar conversa", + "To proceed, please accept the verification request on your other login.": "Para prosseguir, por favor aceite o pedido de verificação em seu outro login.", + "Waiting for you to verify on your other session…": "Aguardando sua verificação em sua outra sessão…", + "Waiting for you to verify on your other session, %(deviceName)s (%(deviceId)s)…": "Aguardando sua verificação na outra sessão, %(deviceName)s%(deviceId)s…", + "File Attached": "Arquivo Anexado", + "Topic: %(topic)s": "Tópico: %(topic)s", + "%(creatorName)s created this room.": "%(creatorName)s criou esta sala.", + "Plain Text": "Texto Simples", + "JSON": "JSON", + "HTML": "HTML", + "%(senderDisplayName)s sent a sticker.": "%(senderDisplayName)s enviou uma figurinha." } From 900944a1cf73e65d287b0c13ad2ce426bb704d4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jiri=20Gr=C3=B6nroos?= Date: Wed, 13 Oct 2021 06:07:37 +0000 Subject: [PATCH 037/156] Translated using Weblate (Finnish) Currently translated at 89.6% (2877 of 3208 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/fi/ --- src/i18n/strings/fi.json | 60 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 58 insertions(+), 2 deletions(-) diff --git a/src/i18n/strings/fi.json b/src/i18n/strings/fi.json index 63a11e767cb..6626796fba8 100644 --- a/src/i18n/strings/fi.json +++ b/src/i18n/strings/fi.json @@ -2591,7 +2591,7 @@ "Identity server": "Identiteettipalvelin", "Identity server (%(server)s)": "Identiteettipalvelin (%(server)s)", "Could not connect to identity server": "Identiteettipalvelimeen ei saatu yhteyttä", - "Not a valid identity server (status code %(code)s)": "Ei kelvollinen identiteettipalvelin (tilakoodi %(code)s)", + "Not a valid identity server (status code %(code)s)": "Identiteettipalvelin ei ole kelvollinen (tilakoodi %(code)s)", "Identity server URL must be HTTPS": "Identiteettipalvelimen URL-osoitteen täytyy olla HTTPS-alkuinen", "Transfer Failed": "Siirto epäonnistui", "Unable to transfer call": "Puhelun siirtäminen ei onnistu", @@ -2831,5 +2831,61 @@ "You do not have permissions to create new rooms in this space": "Sinulla ei ole oikeuksia luoda uusia huoneita tässä avaruudessa", "Create Space": "Luo avaruus", "What kind of Space do you want to create?": "Minkälaisen avaruuden haluat luoda?", - "Create a space": "Luo avaruus" + "Create a space": "Luo avaruus", + "%(senderName)s unpinned a message from this room. See all pinned messages.": "%(senderName)s poisti viestin kiinnityksen tästä huoneesta. Katso kaikki kiinnitetyt viestit.", + "Sends the given message as a spoiler": "Lähettää annetun viestin spoilerina", + "I'll verify later": "Vahvistan myöhemmin", + "Skip verification for now": "Ohita vahvistus toistaiseksi", + "Unable to verify this login": "Tätä kirjautumista ei voitu vahvistaa", + "What projects are you working on?": "Minkä projektien parissa työskentelet?", + "Invite by username": "Kutsu käyttäjänimellä", + "Failed to invite the following users to your space: %(csvUsers)s": "Seuraavien käyttäjien kutsuminen avaruuteesi epäonnistui: %(csvUsers)s", + "Who are you working with?": "Kenen kanssa työskentelet?", + "Created from ": "Luotu yhteisöstä ", + "Results": "Tulokset", + "Suggested": "Ehdotettu", + "Communities won't receive further updates.": "Yhteisöt eivät saa enää päivityksiä.", + "You can create a Space from this community here.": "Voit luoda avaruuden tästä yhteisöstä täällä.", + "Verify other login": "Vahvista toinen kirjautuminen", + "Illegal Content": "Laiton sisältö", + "You won't be able to rejoin unless you are re-invited.": "Et voi liittyä uudelleen, ellei sinua kutsuta uudelleen.", + "User Directory": "Käyttäjähakemisto", + "Size Limit": "Kokoraja", + "The export was cancelled successfully": "Vienti peruttiin onnistuneesti", + "MB": "Mt", + "Server did not return valid authentication information.": "Palvelin ei palauttanut kelvollista tunnistautumistietoa.", + "This description will be shown to people when they view your space": "Tämä kuvaus näytetään ihmisille, kun he katselevat avaruuttasi", + "Creating Space...": "Luodaan avaruutta...", + "Fetching data...": "Noudetaan tietoja...", + "Please provide an address": "Määritä osoite", + "Thread": "Ketju", + "Call back": "Soita takaisin", + "Role in ": "Rooli huoneessa ", + "Screen sharing is here!": "Näytönjakaminen on täällä!", + "Reply to thread…": "Vastaa ketjuun…", + "Reply to encrypted thread…": "Vastaa salattuun ketjuun…", + "Are you sure you want to add encryption to this public room?": "Haluatko varmasti lisätä salauksen tähän julkiseen huoneeseen?", + "Show my Communities": "Näytä omat yhteisöt", + "There was an error loading your notification settings.": "Virhe ladatessa ilmoitusasetuksia.", + "An error occurred whilst saving your notification preferences.": "Ilmoitusasetuksia tallentaessa tapahtui virhe.", + "Error saving notification preferences": "Virhe tallentaessa ilmoitusasetuksia", + "Private (invite only)": "Yksityinen (vain kutsulla)", + "Workspace: ": "Työtila: ", + "This may be useful for public spaces.": "Tämä voi olla hyödyllinen julkisille avaruuksille.", + "Invite with email or username": "Kutsu sähköpostiosoitteella tai käyttäjänimellä", + "Waiting for you to verify on your other session…": "Odotetaan sinun vahvistavan toinen istuntosi…", + "Waiting for you to verify on your other session, %(deviceName)s (%(deviceId)s)…": "Odotetaan sinun vahvistan toinen istuntosi, %(deviceName)s (%(deviceId)s)…", + "Display Communities instead of Spaces": "Näytä yhteisöt avaruuksien sijaan", + "Use Ctrl + F to search timeline": "Ctrl + F hakee aikajanalta", + "%(senderName)s unpinned a message from this room. See all pinned messages.": "%(senderName)s poisti viestin kiinnityksen tästä huoneesta. Katso kaikki kiinnitetyt viestit.", + "%(senderName)s pinned a message to this room. See all pinned messages.": "%(senderName)s kiinnitti viestin tähän huoneeseen. Katso kaikki kiinnitetyt viestit.", + "Silence call": "Hiljennä puhelu", + "Sound on": "Ääni päällä", + "Don't miss a reply": "Älä jätä vastauksia huomiotta", + "Current Timeline": "Nykyinen aikajana", + "Specify a number of messages": "Määritä viestien lukumäärä", + "From the beginning": "Alusta lähtien", + "Are you sure you want to exit during this export?": "Haluatko varmasti poistua tämän viennin aikana?", + "File Attached": "Tiedosto liitetty", + "Topic: %(topic)s": "Aihe: %(topic)s" } From 8f10a1d3fb7f1aa63c99964c252fd5a91c1fc1ab Mon Sep 17 00:00:00 2001 From: Faye Duxovni Date: Thu, 14 Oct 2021 00:46:15 -0400 Subject: [PATCH 038/156] Update the button styling on the emoji comparison dialog during cross-signing Signed-off-by: Faye Duxovni --- .../verification/_VerificationShowSas.scss | 21 +++++++------------ .../verification/VerificationShowSas.tsx | 15 ++----------- 2 files changed, 9 insertions(+), 27 deletions(-) diff --git a/res/css/views/verification/_VerificationShowSas.scss b/res/css/views/verification/_VerificationShowSas.scss index af003112f7e..5910711fcd0 100644 --- a/res/css/views/verification/_VerificationShowSas.scss +++ b/res/css/views/verification/_VerificationShowSas.scss @@ -62,20 +62,13 @@ limitations under the License. flex-basis: 100%; } -.mx_VerificationShowSas { - .mx_Dialog_buttons { - // this is more specific than the DialogButtons css so gets preference - button.mx_VerificationShowSas_matchButton { - color: $accent-color; - background-color: $accent-bg-color; - border: none; - } +.mx_VerificationShowSas_buttonRow { + text-align: center; + display: flex; + flex-wrap: wrap; + justify-content: center; - // this is more specific than the DialogButtons css so gets preference - button.mx_VerificationShowSas_noMatchButton { - color: $notice-primary-color; - background-color: $notice-primary-bg-color; - border: none; - } + .mx_AccessibleButton { + margin-inline: 9px; } } diff --git a/src/components/views/verification/VerificationShowSas.tsx b/src/components/views/verification/VerificationShowSas.tsx index 609255a5655..fde79ea91e9 100644 --- a/src/components/views/verification/VerificationShowSas.tsx +++ b/src/components/views/verification/VerificationShowSas.tsx @@ -20,7 +20,6 @@ import { DeviceInfo } from "matrix-js-sdk/src//crypto/deviceinfo"; import { _t, _td } from '../../../languageHandler'; import { PendingActionSpinner } from "../right_panel/EncryptionInfo"; import AccessibleButton from "../elements/AccessibleButton"; -import DialogButtons from "../elements/DialogButtons"; import { fixupColorFonts } from '../../../utils/FontManager'; import { replaceableComponent } from "../../../utils/replaceableComponent"; @@ -143,25 +142,15 @@ export default class VerificationShowSas extends React.Component text = _t("Cancelling…"); } confirm = ; - } else if (this.props.inDialog) { - // FIXME: stop using DialogButtons here once this component is only used in the right panel verification - confirm = ; } else { - confirm = + confirm =
{ _t("They don't match") } { _t("They match") } - ; +
; } return
From eb68e22019f2b7268cb0096036190497fd8bfe5d Mon Sep 17 00:00:00 2001 From: Faye Duxovni Date: Thu, 14 Oct 2021 01:03:53 -0400 Subject: [PATCH 039/156] Rerun yarn i18n to put the strings in a different order --- src/i18n/strings/en_EN.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index 78b6382cd40..cf2403218f2 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -951,8 +951,8 @@ "Waiting for you to verify on your other session…": "Waiting for you to verify on your other session…", "Waiting for %(displayName)s to verify…": "Waiting for %(displayName)s to verify…", "Cancelling…": "Cancelling…", - "They match": "They match", "They don't match": "They don't match", + "They match": "They match", "To be secure, do this in person or use a trusted way to communicate.": "To be secure, do this in person or use a trusted way to communicate.", "Dog": "Dog", "Cat": "Cat", From 417ba9c2ff88d2e6f306357e820c4837aafc40fb Mon Sep 17 00:00:00 2001 From: sr093906 Date: Thu, 14 Oct 2021 00:44:38 +0000 Subject: [PATCH 040/156] Translated using Weblate (Chinese (Simplified)) Currently translated at 100.0% (3210 of 3210 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/zh_Hans/ --- src/i18n/strings/zh_Hans.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/zh_Hans.json b/src/i18n/strings/zh_Hans.json index bb4d9e47931..6e9154b1fe1 100644 --- a/src/i18n/strings/zh_Hans.json +++ b/src/i18n/strings/zh_Hans.json @@ -3217,5 +3217,7 @@ "Waiting for you to verify on your other session…": "等待您验证您的其他会话…", "Waiting for you to verify on your other session, %(deviceName)s (%(deviceId)s)…": "等待您验证您的其他会话,%(deviceName)s%(deviceId)s…", "Creating Space...": "正在创建空间…", - "Fetching data...": "获取数据中…" + "Fetching data...": "获取数据中…", + "Create poll": "创建投票", + "Polls (under active development)": "投票 (在积极开发中)" } From d5c93d772abbe229950cf81ac4e798a917a22090 Mon Sep 17 00:00:00 2001 From: Jeff Huang Date: Thu, 14 Oct 2021 02:41:01 +0000 Subject: [PATCH 041/156] Translated using Weblate (Chinese (Traditional)) Currently translated at 100.0% (3210 of 3210 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/zh_Hant/ --- src/i18n/strings/zh_Hant.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/zh_Hant.json b/src/i18n/strings/zh_Hant.json index 3e46dc15a3e..7e6a3b8d2b0 100644 --- a/src/i18n/strings/zh_Hant.json +++ b/src/i18n/strings/zh_Hant.json @@ -3220,5 +3220,7 @@ "Waiting for you to verify on your other session…": "正在等待您驗證您的其他工作階段……", "Waiting for you to verify on your other session, %(deviceName)s (%(deviceId)s)…": "正在等待您驗證您的其他工作階段,%(deviceName)s (%(deviceId)s)……", "Creating Space...": "正在建立空間……", - "Fetching data...": "正在擷取資料……" + "Fetching data...": "正在擷取資料……", + "Create poll": "建立投票", + "Polls (under active development)": "投票(正在積極開發中)" } From ffa823e0d4527cf19d33f46fd1aa8a5885543f1e Mon Sep 17 00:00:00 2001 From: Szimszon Date: Wed, 13 Oct 2021 18:32:00 +0000 Subject: [PATCH 042/156] Translated using Weblate (Hungarian) Currently translated at 100.0% (3210 of 3210 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/hu/ --- src/i18n/strings/hu.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/hu.json b/src/i18n/strings/hu.json index 80b15dd861e..be59570c691 100644 --- a/src/i18n/strings/hu.json +++ b/src/i18n/strings/hu.json @@ -3217,5 +3217,7 @@ "It looks like you don't have a Security Key or any other devices you can verify against. This device will not be able to access old encrypted messages. In order to verify your identity on this device, you'll need to reset your verification keys.": "Úgy tűnik nem rendelkezik Biztonsági Kulccsal vagy másik eszközzel amivel ellenőrizni lehetne. Ezzel az eszközzel nem fér majd hozzá a régi titkosított üzenetekhez. Ahhoz, hogy a személyazonosságát ezen az eszközön ellenőrizni lehessen a kulcsokat alaphelyzetbe kell állítani.", "Select from the options below to export chats from your timeline": "Az idővonalon a beszélgetés kimentéséhez tartozó beállítások kiválasztása", "Waiting for you to verify on your other session, %(deviceName)s (%(deviceId)s)…": "Várakozás a másik munkamenetből való ellenőrzésre, %(deviceName)s (%(deviceId)s)…", - "This is the start of export of . Exported by at %(exportDate)s.": "Ez az exportálás kezdete ehhez a szobához: . Kimentette: , időpont: %(exportDate)s." + "This is the start of export of . Exported by at %(exportDate)s.": "Ez az exportálás kezdete ehhez a szobához: . Kimentette: , időpont: %(exportDate)s.", + "Create poll": "Szavazás létrehozása", + "Polls (under active development)": "Szavazások (intenzív fejlesztés alatt)" } From cc8d2e3776b7af1be25d3983fc2f6a8f2bb4a715 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Priit=20J=C3=B5er=C3=BC=C3=BCt?= Date: Wed, 13 Oct 2021 22:16:06 +0000 Subject: [PATCH 043/156] Translated using Weblate (Estonian) Currently translated at 99.9% (3209 of 3210 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/et/ --- src/i18n/strings/et.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/et.json b/src/i18n/strings/et.json index f54a44f3776..5ee279e7168 100644 --- a/src/i18n/strings/et.json +++ b/src/i18n/strings/et.json @@ -3216,5 +3216,7 @@ "Waiting for you to verify on your other session…": "Ootan, et sa verifitseeriksid teises sessioonis…", "Waiting for you to verify on your other session, %(deviceName)s (%(deviceId)s)…": "Ootan, et sa verifitseerid oma teises sessioonis: %(deviceName)s (%(deviceId)s)…", "Creating Space...": "Loon kogukonnakeskust…", - "Fetching data...": "Laadin andmeid..." + "Fetching data...": "Laadin andmeid...", + "Polls (under active development)": "Küsitlused (aktiivses arendusjärgus)", + "Create poll": "Koosta üks küsitlus" } From c6be65d86da0b3e2e3169ee623fa4e0ec333587e Mon Sep 17 00:00:00 2001 From: Besnik Bleta Date: Thu, 14 Oct 2021 06:54:39 +0000 Subject: [PATCH 044/156] Translated using Weblate (Albanian) Currently translated at 99.6% (3199 of 3210 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/sq/ --- src/i18n/strings/sq.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/sq.json b/src/i18n/strings/sq.json index 2c849a83197..929ee8db03e 100644 --- a/src/i18n/strings/sq.json +++ b/src/i18n/strings/sq.json @@ -3211,5 +3211,7 @@ "Waiting for you to verify on your other session…": "Po pritet që ju të bëni verifikimin në sesionin tuaj tjetër…", "Waiting for you to verify on your other session, %(deviceName)s (%(deviceId)s)…": "Po pritet që ju të bëni verifikimin në sesionin tuaj tjetër, %(deviceName)s (%(deviceId)s)…", "Creating Space...": "Po Krijohet Hapësirë…", - "Fetching data...": "Po sillen të dhëna…" + "Fetching data...": "Po sillen të dhëna…", + "Create poll": "Krijoni anketim", + "Polls (under active development)": "Anketime (në zhvillim aktiv)" } From f64daf25229ed0b3c2ef7911e104a8465b0975d8 Mon Sep 17 00:00:00 2001 From: Nikita Epifanov Date: Wed, 13 Oct 2021 20:40:23 +0000 Subject: [PATCH 045/156] Translated using Weblate (Russian) Currently translated at 98.2% (3153 of 3210 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/ru/ --- src/i18n/strings/ru.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/ru.json b/src/i18n/strings/ru.json index e60b3b3109a..042692fd5b5 100644 --- a/src/i18n/strings/ru.json +++ b/src/i18n/strings/ru.json @@ -3211,5 +3211,9 @@ "Unable to verify this login": "Невозможно проверить этот логин", "To proceed, please accept the verification request on your other login.": "Чтобы продолжить, пожалуйста, примите запрос на проверку на другом логине.", "Waiting for you to verify on your other session…": "Ожидаем проверки на другом сеансе…", - "Waiting for you to verify on your other session, %(deviceName)s (%(deviceId)s)…": "Ожидаем проверки на другом сеансе, %(deviceName)s (%(deviceId)s)…" + "Waiting for you to verify on your other session, %(deviceName)s (%(deviceId)s)…": "Ожидаем проверки на другом сеансе, %(deviceName)s (%(deviceId)s)…", + "Creating Space...": "Создание пространства…", + "Fetching data...": "Получение данных…", + "Create poll": "Создать опрос", + "Polls (under active development)": "Опросы (в стадии активной разработки)" } From 124e75b2f074802fe7c78f1ed89e2a307acbe120 Mon Sep 17 00:00:00 2001 From: Szimszon Date: Thu, 14 Oct 2021 09:40:14 +0000 Subject: [PATCH 046/156] Translated using Weblate (Hungarian) Currently translated at 100.0% (3210 of 3210 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/hu/ --- src/i18n/strings/hu.json | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/hu.json b/src/i18n/strings/hu.json index be59570c691..092624355ec 100644 --- a/src/i18n/strings/hu.json +++ b/src/i18n/strings/hu.json @@ -3219,5 +3219,11 @@ "Waiting for you to verify on your other session, %(deviceName)s (%(deviceId)s)…": "Várakozás a másik munkamenetből való ellenőrzésre, %(deviceName)s (%(deviceId)s)…", "This is the start of export of . Exported by at %(exportDate)s.": "Ez az exportálás kezdete ehhez a szobához: . Kimentette: , időpont: %(exportDate)s.", "Create poll": "Szavazás létrehozása", - "Polls (under active development)": "Szavazások (intenzív fejlesztés alatt)" + "Polls (under active development)": "Szavazások (intenzív fejlesztés alatt)", + "Updating spaces... (%(progress)s out of %(count)s)|one": "Terek frissítése…", + "Updating spaces... (%(progress)s out of %(count)s)|other": "Terek frissítése… (%(progress)s / %(count)s)", + "Sending invites... (%(progress)s out of %(count)s)|one": "Meghívók küldése…", + "Sending invites... (%(progress)s out of %(count)s)|other": "Meghívók küldése… (%(progress)s / %(count)s)", + "Loading new room": "Új szoba betöltése", + "Upgrading room": "Szoba fejlesztése" } From 63abf9e2c15fe75ca59141eaf3e547b8ed880373 Mon Sep 17 00:00:00 2001 From: sr093906 Date: Thu, 14 Oct 2021 09:28:47 +0000 Subject: [PATCH 047/156] Translated using Weblate (Chinese (Simplified)) Currently translated at 100.0% (3210 of 3210 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/zh_Hans/ --- src/i18n/strings/zh_Hans.json | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/zh_Hans.json b/src/i18n/strings/zh_Hans.json index 6e9154b1fe1..db189a0564f 100644 --- a/src/i18n/strings/zh_Hans.json +++ b/src/i18n/strings/zh_Hans.json @@ -3219,5 +3219,11 @@ "Creating Space...": "正在创建空间…", "Fetching data...": "获取数据中…", "Create poll": "创建投票", - "Polls (under active development)": "投票 (在积极开发中)" + "Polls (under active development)": "投票 (在积极开发中)", + "Updating spaces... (%(progress)s out of %(count)s)|other": "正在更新聊天室… (%(count)s 中的 %(progress)s)", + "Updating spaces... (%(progress)s out of %(count)s)|one": "正在更新空间…", + "Sending invites... (%(progress)s out of %(count)s)|one": "正在发送邀请…", + "Sending invites... (%(progress)s out of %(count)s)|other": "正在发送邀请… (%(count)s 中的 %(progress)s)", + "Loading new room": "正在加载新聊天室", + "Upgrading room": "正在升级聊天室" } From ae29ac4b3822ed1235ef59d69fe8840951369afd Mon Sep 17 00:00:00 2001 From: Besnik Bleta Date: Thu, 14 Oct 2021 09:45:09 +0000 Subject: [PATCH 048/156] Translated using Weblate (Albanian) Currently translated at 99.6% (3199 of 3210 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/sq/ --- src/i18n/strings/sq.json | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/sq.json b/src/i18n/strings/sq.json index 929ee8db03e..f9ed14aae75 100644 --- a/src/i18n/strings/sq.json +++ b/src/i18n/strings/sq.json @@ -3213,5 +3213,11 @@ "Creating Space...": "Po Krijohet Hapësirë…", "Fetching data...": "Po sillen të dhëna…", "Create poll": "Krijoni anketim", - "Polls (under active development)": "Anketime (në zhvillim aktiv)" + "Polls (under active development)": "Anketime (në zhvillim aktiv)", + "Updating spaces... (%(progress)s out of %(count)s)|one": "Po përditësohet hapësirë…", + "Updating spaces... (%(progress)s out of %(count)s)|other": "Po përditësohen hapësira… (%(progress)s nga %(count)s) gjithsej", + "Sending invites... (%(progress)s out of %(count)s)|one": "Po dërgohen ftesa…", + "Sending invites... (%(progress)s out of %(count)s)|other": "Po dërgohen ftesa… (%(progress)s nga %(count)s) gjithsej", + "Loading new room": "Po ngarkohet dhomë e re", + "Upgrading room": "Përmirësim dhome" } From 3f8076b9f740e6bb342469bc8862ecb7b3cdbc84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Priit=20J=C3=B5er=C3=BC=C3=BCt?= Date: Thu, 14 Oct 2021 09:49:49 +0000 Subject: [PATCH 049/156] Translated using Weblate (Estonian) Currently translated at 100.0% (3210 of 3210 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/et/ --- src/i18n/strings/et.json | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/et.json b/src/i18n/strings/et.json index 5ee279e7168..31459c63477 100644 --- a/src/i18n/strings/et.json +++ b/src/i18n/strings/et.json @@ -3218,5 +3218,12 @@ "Creating Space...": "Loon kogukonnakeskust…", "Fetching data...": "Laadin andmeid...", "Polls (under active development)": "Küsitlused (aktiivses arendusjärgus)", - "Create poll": "Koosta üks küsitlus" + "Create poll": "Koosta üks küsitlus", + "Space Autocomplete": "Kogukonnakeskuste dünaamiline otsing", + "Updating spaces... (%(progress)s out of %(count)s)|one": "Uuendan kogukonnakeskust...", + "Updating spaces... (%(progress)s out of %(count)s)|other": "Uuendan kogukonnakeskuseid... (%(progress)s / %(count)s)", + "Sending invites... (%(progress)s out of %(count)s)|one": "Saadan kutset...", + "Sending invites... (%(progress)s out of %(count)s)|other": "Saadan kutseid... (%(progress)s / %(count)s)", + "Loading new room": "Laadin uut jututuba", + "Upgrading room": "Uuendan jututoa versiooni" } From f37d6b135a88d74b0ba331144ccc1018152ba8b5 Mon Sep 17 00:00:00 2001 From: random Date: Thu, 14 Oct 2021 10:41:16 +0000 Subject: [PATCH 050/156] Translated using Weblate (Italian) Currently translated at 100.0% (3210 of 3210 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/it/ --- src/i18n/strings/it.json | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/it.json b/src/i18n/strings/it.json index 8efabc19ce7..42f291423f2 100644 --- a/src/i18n/strings/it.json +++ b/src/i18n/strings/it.json @@ -3220,5 +3220,13 @@ "This is the start of export of . Exported by at %(exportDate)s.": "Questo è l'inizio dell'esportazione di . Esportata da il %(exportDate)s.", "%(creatorName)s created this room.": "%(creatorName)s ha creato questa stanza.", "Media omitted - file size limit exceeded": "File omesso - superata dimensione massima", - "Media omitted": "File omesso" + "Media omitted": "File omesso", + "Create poll": "Crea sondaggio", + "Updating spaces... (%(progress)s out of %(count)s)|one": "Aggiornamento spazio...", + "Updating spaces... (%(progress)s out of %(count)s)|other": "Aggiornamento spazi... (%(progress)s di %(count)s)", + "Sending invites... (%(progress)s out of %(count)s)|one": "Spedizione invito...", + "Sending invites... (%(progress)s out of %(count)s)|other": "Spedizione inviti... (%(progress)s di %(count)s)", + "Loading new room": "Caricamento nuova stanza", + "Upgrading room": "Aggiornamento stanza", + "Polls (under active development)": "Sondaggi (in sviluppo)" } From 748fe59eaa84ec286dee1b62dcb8a401406f1aef Mon Sep 17 00:00:00 2001 From: Leonidas Shear Date: Thu, 14 Oct 2021 13:08:44 +0000 Subject: [PATCH 051/156] Translated using Weblate (Russian) Currently translated at 98.3% (3158 of 3210 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/ru/ --- src/i18n/strings/ru.json | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/ru.json b/src/i18n/strings/ru.json index 042692fd5b5..f31217997e2 100644 --- a/src/i18n/strings/ru.json +++ b/src/i18n/strings/ru.json @@ -3215,5 +3215,16 @@ "Creating Space...": "Создание пространства…", "Fetching data...": "Получение данных…", "Create poll": "Создать опрос", - "Polls (under active development)": "Опросы (в стадии активной разработки)" + "Polls (under active development)": "Опросы (в стадии активной разработки)", + "Thread": "Статьи", + "Show threads": "Показать статьи", + "Reply to thread…": "Ответить на тему…", + "Reply to encrypted thread…": "Ответить на зашифрованный поток…", + "Updating spaces... (%(progress)s out of %(count)s)|one": "Обновление пространств...", + "Updating spaces... (%(progress)s out of %(count)s)|other": "Обновление пространств... (%(progress)s из %(count)s)", + "Sending invites... (%(progress)s out of %(count)s)|one": "Отправка приглашений...", + "Sending invites... (%(progress)s out of %(count)s)|other": "Отправка приглашений... (%(progress)s из %(count)s)", + "Loading new room": "Загрузка новой комнаты", + "Upgrading room": "Обновление комнаты", + "Threaded messaging": "Потоковая передача сообщений" } From f8b45aca0fb2cb40cc57ec4d4c32d00ab282b4a3 Mon Sep 17 00:00:00 2001 From: sr093906 Date: Thu, 14 Oct 2021 14:31:30 +0000 Subject: [PATCH 052/156] Translated using Weblate (Chinese (Simplified)) Currently translated at 99.5% (3212 of 3228 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/zh_Hans/ --- src/i18n/strings/zh_Hans.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/zh_Hans.json b/src/i18n/strings/zh_Hans.json index db189a0564f..a85e06bcdfd 100644 --- a/src/i18n/strings/zh_Hans.json +++ b/src/i18n/strings/zh_Hans.json @@ -3225,5 +3225,7 @@ "Sending invites... (%(progress)s out of %(count)s)|one": "正在发送邀请…", "Sending invites... (%(progress)s out of %(count)s)|other": "正在发送邀请… (%(count)s 中的 %(progress)s)", "Loading new room": "正在加载新聊天室", - "Upgrading room": "正在升级聊天室" + "Upgrading room": "正在升级聊天室", + "Kick from %(roomName)s": "从 %(roomName)s 中踢出去", + "Threads": "帖子" } From a7365f75b8bd06250c6dd4a8464ca455f11cce36 Mon Sep 17 00:00:00 2001 From: sr093906 Date: Thu, 14 Oct 2021 15:01:55 +0000 Subject: [PATCH 053/156] Translated using Weblate (Chinese (Simplified)) Currently translated at 100.0% (3228 of 3228 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/zh_Hans/ --- src/i18n/strings/zh_Hans.json | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/src/i18n/strings/zh_Hans.json b/src/i18n/strings/zh_Hans.json index a85e06bcdfd..40cfdd48951 100644 --- a/src/i18n/strings/zh_Hans.json +++ b/src/i18n/strings/zh_Hans.json @@ -429,7 +429,7 @@ "Flair": "个性徽章", "Code": "代码", "Remove from community": "从社群中移除", - "Disinvite this user from community?": "是否不再邀请此用户加入本社群?", + "Disinvite this user from community?": "是否取消邀请此用户加入本社群?", "Remove this user from community?": "是否要从社群中移除此用户?", "Failed to withdraw invitation": "撤回邀请失败", "Failed to remove user from community": "移除用户失败", @@ -3227,5 +3227,21 @@ "Loading new room": "正在加载新聊天室", "Upgrading room": "正在升级聊天室", "Kick from %(roomName)s": "从 %(roomName)s 中踢出去", - "Threads": "帖子" + "Threads": "帖子", + "Disinvite from %(roomName)s": "取消邀请加入 %(roomName)s", + "Show:": "显示:", + "Shows all threads from current room": "显示当前聊天室的所有帖子", + "All threads": "所有帖子", + "Shows all threads you’ve participated in": "显示所有你已参与的帖子", + "My threads": "我的帖子", + "They won't be able to access whatever you're not an admin of.": "他们将无法访问你不是管理员的一切。", + "Ban them from specific things I'm able to": "禁止这些人做某些我有权决定的事", + "Unban them from specific things I'm able to": "解除我权限范围内对这些人的某些禁令", + "Ban them from everything I'm able to": "禁止这些人做任何我有权决定的事", + "Unban them from everything I'm able to": "解除我权限范围内对这些人的所有禁令", + "Ban from %(roomName)s": "禁止进入 %(roomName)s", + "Unban from %(roomName)s": "解除 %(roomName)s 禁令", + "They'll still be able to access whatever you're not an admin of.": "他们仍然可以访问任何你不是管理员的一切东西。", + "Kick them from specific things I'm able to": "禁止这些人做某些我有权决定的事", + "Kick them from everything I'm able to": "禁止这些人做任何我有权决定的事" } From 378536ee2a298c9a07abe6bd888775f76fae5389 Mon Sep 17 00:00:00 2001 From: Germain Souquet Date: Thu, 14 Oct 2021 17:22:06 +0100 Subject: [PATCH 054/156] Add 'm.thread' relation for replies to a threaded event --- src/components/views/elements/ReplyThread.tsx | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/src/components/views/elements/ReplyThread.tsx b/src/components/views/elements/ReplyThread.tsx index 7dd81f469a8..3243d5ee034 100644 --- a/src/components/views/elements/ReplyThread.tsx +++ b/src/components/views/elements/ReplyThread.tsx @@ -35,6 +35,8 @@ import Spinner from './Spinner'; import ReplyTile from "../rooms/ReplyTile"; import Pill from './Pill'; import { Room } from 'matrix-js-sdk/src/models/room'; +import { threadId } from 'worker_threads'; +import { RelationType } from 'matrix-js-sdk/src/@types/event'; /** * This number is based on the previous behavior - if we have message of height @@ -226,13 +228,30 @@ export default class ReplyThread extends React.Component { public static makeReplyMixIn(ev: MatrixEvent) { if (!ev) return {}; - return { + + const mixin: any = { 'm.relates_to': { 'm.in_reply_to': { 'event_id': ev.getId(), }, }, }; + + /** + * If the event replied is part of a thread + * Add the `m.thread` relation so that clients + * that know how to handle that relation will + * be able to render them more accurately + */ + if (ev.isThreadRelation) { + mixin['m.relates_to'] = { + ...mixin['m.relates_to'], + rel_type: RelationType.Thread, + event_id: ev.threadRootId, + }; + } + + return mixin; } public static hasThreadReply(event: MatrixEvent) { From 5fccbd4ef72b84c9db0c6a90d6f0e69641103baf Mon Sep 17 00:00:00 2001 From: Germain Souquet Date: Thu, 14 Oct 2021 17:40:00 +0100 Subject: [PATCH 055/156] Remove auto-import --- src/components/views/elements/ReplyThread.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/views/elements/ReplyThread.tsx b/src/components/views/elements/ReplyThread.tsx index 3243d5ee034..e0cca0c81ee 100644 --- a/src/components/views/elements/ReplyThread.tsx +++ b/src/components/views/elements/ReplyThread.tsx @@ -35,7 +35,6 @@ import Spinner from './Spinner'; import ReplyTile from "../rooms/ReplyTile"; import Pill from './Pill'; import { Room } from 'matrix-js-sdk/src/models/room'; -import { threadId } from 'worker_threads'; import { RelationType } from 'matrix-js-sdk/src/@types/event'; /** From 318f75fef37fb6c45112d17be6f89ddc9d907caf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Priit=20J=C3=B5er=C3=BC=C3=BCt?= Date: Thu, 14 Oct 2021 18:43:53 +0000 Subject: [PATCH 056/156] Translated using Weblate (Estonian) Currently translated at 100.0% (3228 of 3228 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/et/ --- src/i18n/strings/et.json | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/et.json b/src/i18n/strings/et.json index 31459c63477..c5d26879c89 100644 --- a/src/i18n/strings/et.json +++ b/src/i18n/strings/et.json @@ -3225,5 +3225,23 @@ "Sending invites... (%(progress)s out of %(count)s)|one": "Saadan kutset...", "Sending invites... (%(progress)s out of %(count)s)|other": "Saadan kutseid... (%(progress)s / %(count)s)", "Loading new room": "Laadin uut jututuba", - "Upgrading room": "Uuendan jututoa versiooni" + "Upgrading room": "Uuendan jututoa versiooni", + "Show:": "Näita:", + "Shows all threads from current room": "Näitab kõiki praeguse jututoa jutulõngasid", + "All threads": "Kõik jutulõngad", + "Shows all threads you’ve participated in": "Näitab kõiki jutulõngasid, kus sa oled osalenud", + "My threads": "Minu jutulõngad", + "They won't be able to access whatever you're not an admin of.": "Kasutaja ei saa ligi kohtadele, kus sul pole peakasutaja õigusi.", + "Ban them from specific things I'm able to": "Määra kasutajale suhtluskeeld valitud kohtades, kust ma saan", + "Unban them from specific things I'm able to": "Eemalda kasutajalt suhtluskeeld valitud kohtadest, kust ma saan", + "Ban them from everything I'm able to": "Määra kasutajale suhtluskeeld kõikjal, kus ma saan", + "Unban them from everything I'm able to": "Eemalda kasutajalt suhtluskeeld kõikjalt, kust ma saan", + "Ban from %(roomName)s": "Määra suhtluskeeld %(roomName)s jututoas", + "Unban from %(roomName)s": "Eemalda suhtluskeeld %(roomName)s jututoas", + "They'll still be able to access whatever you're not an admin of.": "Kasutaja saab jätkuvalt ligi kohtadele, kus sul pole peakasutaja õigusi.", + "Kick them from specific things I'm able to": "Müksa kasutaja välja valitud kohtadest, kust ma saan", + "Disinvite from %(roomName)s": "Võta tagasi %(roomName)s jututoa kutse", + "Kick them from everything I'm able to": "Müksa kasutaja välja kõikjalt, kust ma saan", + "Kick from %(roomName)s": "Müksa %(roomName)s jututoast välja", + "Threads": "Jutulõngad" } From 6b61cd1267d682c72c0029c5a7650f84530c767f Mon Sep 17 00:00:00 2001 From: waclaw66 Date: Thu, 14 Oct 2021 17:31:59 +0000 Subject: [PATCH 057/156] Translated using Weblate (Czech) Currently translated at 100.0% (3228 of 3228 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/cs/ --- src/i18n/strings/cs.json | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/cs.json b/src/i18n/strings/cs.json index dcfcb9b4d0a..c5ba697e0ec 100644 --- a/src/i18n/strings/cs.json +++ b/src/i18n/strings/cs.json @@ -3220,5 +3220,31 @@ "Waiting for you to verify on your other session…": "Čekáme, až provedete ověření v jiné relaci…", "Waiting for you to verify on your other session, %(deviceName)s (%(deviceId)s)…": "Čekáme, až provedete ověření v jiné relaci, %(deviceName)s (%(deviceId)s)…", "Creating Space...": "Vytváření prostoru...", - "Fetching data...": "Načítání dat..." + "Fetching data...": "Načítání dat...", + "Show:": "Zobrazit:", + "Shows all threads from current room": "Zobrazí všechna vlákna z aktuální místnosti", + "All threads": "Všechna vlákna", + "Shows all threads you’ve participated in": "Zobrazí všechna vlákna, kterých jste se zúčastnili", + "My threads": "Moje vlákna", + "They won't be able to access whatever you're not an admin of.": "Nebudou mít přístup ke všemu, čeho nejste správcem.", + "Unban them from specific things I'm able to": "Přijmout je zpět do konkrétních míst, do kterých jsem schopen", + "Unban them from everything I'm able to": "Přijmout zpět všude, kam můžu", + "Ban them from specific things I'm able to": "Vykopnout je z konkrétních míst, ze kterých jsem schopen", + "Kick them from specific things I'm able to": "Vykopnout je z konkrétních míst, ze kterých jsem schopen", + "Ban them from everything I'm able to": "Vykázat je všude, kam můžu", + "Ban from %(roomName)s": "Vykázat z %(roomName)s", + "Unban from %(roomName)s": "Přijmout zpět do %(roomName)s", + "They'll still be able to access whatever you're not an admin of.": "Stále budou mít přístup ke všemu, čeho nejste správcem.", + "Kick them from everything I'm able to": "Vykopnout je ze všeho, co to jde", + "Kick from %(roomName)s": "Vykopnout z %(roomName)s", + "Disinvite from %(roomName)s": "Zrušit pozvánku do %(roomName)s", + "Threads": "Vlákna", + "Create poll": "Vytvořit anketu", + "Updating spaces... (%(progress)s out of %(count)s)|one": "Aktualizace prostoru...", + "Updating spaces... (%(progress)s out of %(count)s)|other": "Aktualizace prostorů... (%(progress)s z %(count)s)", + "Sending invites... (%(progress)s out of %(count)s)|one": "Odeslání pozvánky...", + "Sending invites... (%(progress)s out of %(count)s)|other": "Odesílání pozvánek... (%(progress)s z %(count)s)", + "Loading new room": "Načítání nové místnosti", + "Upgrading room": "Upgrade místnosti", + "Polls (under active development)": "Ankety (v aktivním vývoji)" } From 0f94d6d81c3f72e0af543cb0bf5b22ab0c40f20d Mon Sep 17 00:00:00 2001 From: Jeff Huang Date: Fri, 15 Oct 2021 01:54:38 +0000 Subject: [PATCH 058/156] Translated using Weblate (Chinese (Traditional)) Currently translated at 100.0% (3228 of 3228 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/zh_Hant/ --- src/i18n/strings/zh_Hant.json | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/zh_Hant.json b/src/i18n/strings/zh_Hant.json index 7e6a3b8d2b0..39fb1a9ca49 100644 --- a/src/i18n/strings/zh_Hant.json +++ b/src/i18n/strings/zh_Hant.json @@ -3222,5 +3222,29 @@ "Creating Space...": "正在建立空間……", "Fetching data...": "正在擷取資料……", "Create poll": "建立投票", - "Polls (under active development)": "投票(正在積極開發中)" + "Polls (under active development)": "投票(正在積極開發中)", + "Show:": "顯示:", + "Shows all threads from current room": "顯示從目前聊天室而來的所有討論串", + "All threads": "所有討論串", + "Shows all threads you’ve participated in": "顯示您參與的所有討論串", + "My threads": "我的討論串", + "They won't be able to access whatever you're not an admin of.": "他們將無法存取您不是管理員的任何地方。", + "Ban them from specific things I'm able to": "從我有權限的特定地方封鎖他們", + "Unban them from specific things I'm able to": "從我有權限的特定地方取消封鎖他們", + "Ban them from everything I'm able to": "從我有權限的所有地方封鎖他們", + "Unban them from everything I'm able to": "從我有權限的所有地方取消封鎖他們", + "Ban from %(roomName)s": "從 %(roomName)s 封鎖", + "Unban from %(roomName)s": "從 %(roomName)s 取消封鎖", + "They'll still be able to access whatever you're not an admin of.": "他們仍然可以存取您不是管理員的任何地方。", + "Kick them from specific things I'm able to": "從我有權限的特定地方踢除他們", + "Kick them from everything I'm able to": "從我有權限的所有地方踢除他們", + "Kick from %(roomName)s": "從 %(roomName)s 踢出", + "Disinvite from %(roomName)s": "拒絕來自 %(roomName)s 的邀請", + "Threads": "討論串", + "Updating spaces... (%(progress)s out of %(count)s)|one": "正在更新空間……", + "Updating spaces... (%(progress)s out of %(count)s)|other": "正在更新空間……(%(count)s 中的第 %(progress)s 個)", + "Sending invites... (%(progress)s out of %(count)s)|one": "正在傳送邀請……", + "Sending invites... (%(progress)s out of %(count)s)|other": "正在傳送邀請……(%(count)s 中的第 %(progress)s 個)", + "Loading new room": "正在載入新的聊天室", + "Upgrading room": "正在升級聊天室" } From 3dcf0d0b7edf6a641d74baa7b4b102f6decb1694 Mon Sep 17 00:00:00 2001 From: Germain Souquet Date: Fri, 15 Oct 2021 10:25:42 +0100 Subject: [PATCH 059/156] Fix incorrect logic to hide thread relations --- src/components/structures/MessagePanel.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/structures/MessagePanel.tsx b/src/components/structures/MessagePanel.tsx index c1d22ecedff..79aeea8321c 100644 --- a/src/components/structures/MessagePanel.tsx +++ b/src/components/structures/MessagePanel.tsx @@ -460,7 +460,7 @@ export default class MessagePanel extends React.Component { // Checking if the message has a "parentEventId" as we do not // want to hide the root event of the thread - if (mxEv.isThreadRoot && this.props.hideThreadedMessages + if (mxEv.isThreadRelation && this.props.hideThreadedMessages && SettingsStore.getValue("feature_thread")) { return false; } From 17c4cc91afaa0b41ceb8634039bc65add5e5e507 Mon Sep 17 00:00:00 2001 From: Germain Souquet Date: Fri, 15 Oct 2021 10:26:04 +0100 Subject: [PATCH 060/156] Reconcile threads root with its children before displaying it --- src/components/views/rooms/EventTile.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/views/rooms/EventTile.tsx b/src/components/views/rooms/EventTile.tsx index 9d608c2833c..c6798f1f15b 100644 --- a/src/components/views/rooms/EventTile.tsx +++ b/src/components/views/rooms/EventTile.tsx @@ -531,8 +531,13 @@ export default class EventTile extends React.Component { return null; } - const thread = this.state.thread; const room = MatrixClientPeg.get().getRoom(this.props.mxEvent.getRoomId()); + const thread = room.threads.get(this.props.mxEvent.getId()); + + if (thread && !thread.ready) { + thread.addEvent(this.props.mxEvent, true); + } + if (!thread || this.props.showThreadInfo === false || thread.length <= 1) { return null; } From 6baa6c8f65035633b86d4e7aec2e571b201c68ef Mon Sep 17 00:00:00 2001 From: Germain Souquet Date: Fri, 15 Oct 2021 11:08:33 +0100 Subject: [PATCH 061/156] Listen to new thread to render info on timeline --- src/components/structures/ThreadView.tsx | 15 ++++++++++++--- src/components/views/rooms/EventTile.tsx | 14 ++++++++++++++ 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/src/components/structures/ThreadView.tsx b/src/components/structures/ThreadView.tsx index 34622128349..7bd6415cd33 100644 --- a/src/components/structures/ThreadView.tsx +++ b/src/components/structures/ThreadView.tsx @@ -48,10 +48,8 @@ interface IProps { } interface IState { - replyToEvent?: MatrixEvent; thread?: Thread; editState?: EditorStateTransfer; - } @replaceableComponent("structures.ThreadView") @@ -69,11 +67,16 @@ export default class ThreadView extends React.Component { public componentDidMount(): void { this.setupThread(this.props.mxEvent); this.dispatcherRef = dis.register(this.onAction); + + const room = MatrixClientPeg.get().getRoom(this.props.mxEvent.getRoomId()); + room.on(ThreadEvent.New, this.onNewThread); } public componentWillUnmount(): void { this.teardownThread(); dis.unregister(this.dispatcherRef); + const room = MatrixClientPeg.get().getRoom(this.props.mxEvent.getRoomId()); + room.on(ThreadEvent.New, this.onNewThread); } public componentDidUpdate(prevProps) { @@ -135,11 +138,17 @@ export default class ThreadView extends React.Component { } }; + private onNewThread = (thread: Thread) => { + if (thread.id === this.props.mxEvent.getId()) { + this.teardownThread(); + this.setupThread(this.props.mxEvent); + } + }; + private updateThread = (thread?: Thread) => { if (thread) { this.setState({ thread, - replyToEvent: thread.replyToEvent, }); } diff --git a/src/components/views/rooms/EventTile.tsx b/src/components/views/rooms/EventTile.tsx index c6798f1f15b..9fd9a567302 100644 --- a/src/components/views/rooms/EventTile.tsx +++ b/src/components/views/rooms/EventTile.tsx @@ -475,6 +475,9 @@ export default class EventTile extends React.Component { this.props.mxEvent.once(ThreadEvent.Ready, this.updateThread); this.props.mxEvent.on(ThreadEvent.Update, this.updateThread); } + + const room = this.context.getRoom(this.props.mxEvent.getRoomId()); + room.on(ThreadEvent.New, this.onNewThread); } private updateThread = (thread) => { @@ -516,6 +519,9 @@ export default class EventTile extends React.Component { this.props.mxEvent.off(ThreadEvent.Ready, this.updateThread); this.props.mxEvent.off(ThreadEvent.Update, this.updateThread); } + + const room = this.context.getRoom(this.props.mxEvent.getRoomId()); + room.off(ThreadEvent.New, this.onNewThread); } componentDidUpdate(prevProps, prevState, snapshot) { @@ -526,6 +532,14 @@ export default class EventTile extends React.Component { } } + private onNewThread = (thread: Thread) => { + if (thread.id === this.props.mxEvent.getId()) { + this.updateThread(thread); + const room = this.context.getRoom(this.props.mxEvent.getRoomId()); + room.off(ThreadEvent.New, this.onNewThread); + } + }; + private renderThreadInfo(): React.ReactNode { if (!SettingsStore.getValue("feature_thread")) { return null; From 8cdb1c667df0d42901ecb5bb9079af8403cb089e Mon Sep 17 00:00:00 2001 From: Aaron Raimist Date: Fri, 15 Oct 2021 05:23:59 -0500 Subject: [PATCH 062/156] Fix tooltip when downloading unencrypted file --- src/components/views/messages/DownloadActionButton.tsx | 10 ++++++++-- src/i18n/strings/en_EN.json | 1 + 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/components/views/messages/DownloadActionButton.tsx b/src/components/views/messages/DownloadActionButton.tsx index 6dc48b09363..35fd5c49bea 100644 --- a/src/components/views/messages/DownloadActionButton.tsx +++ b/src/components/views/messages/DownloadActionButton.tsx @@ -20,7 +20,7 @@ import React from "react"; import { RovingAccessibleTooltipButton } from "../../../accessibility/RovingTabIndex"; import Spinner from "../elements/Spinner"; import classNames from "classnames"; -import { _t } from "../../../languageHandler"; +import { _t, _td } from "../../../languageHandler"; import { replaceableComponent } from "../../../utils/replaceableComponent"; import { FileDownloader } from "../../../utils/FileDownloader"; @@ -36,6 +36,7 @@ interface IProps { interface IState { loading: boolean; blob?: Blob; + tooltip: string; } @replaceableComponent("views.messages.DownloadActionButton") @@ -47,12 +48,17 @@ export default class DownloadActionButton extends React.PureComponent { if (this.state.loading) return; + if (this.props.mediaEventHelperGet().media.isEncrypted) { + this.setState({ tooltip: _td("Decrypting") }); + } + this.setState({ loading: true }); if (this.state.blob) { @@ -87,7 +93,7 @@ export default class DownloadActionButton extends React.PureComponent diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index 3e61146acb0..a46d48b6550 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -1959,6 +1959,7 @@ "Saturday": "Saturday", "Today": "Today", "Yesterday": "Yesterday", + "Downloading": "Downloading", "Decrypting": "Decrypting", "Download": "Download", "View Source": "View Source", From 7edec291acacd687f7a335ee26e5a42b67ba4c43 Mon Sep 17 00:00:00 2001 From: Andy Balaam Date: Fri, 15 Oct 2021 11:49:27 +0100 Subject: [PATCH 063/156] Switch DevicesPanel to use table (for screen readers) --- res/css/views/settings/_DevicesPanel.scss | 18 +++++-------- .../views/settings/DevicesPanel.tsx | 26 +++++++++++-------- .../views/settings/DevicesPanelEntry.tsx | 20 +++++++------- 3 files changed, 32 insertions(+), 32 deletions(-) diff --git a/res/css/views/settings/_DevicesPanel.scss b/res/css/views/settings/_DevicesPanel.scss index 7e836e0d87c..1354f6d0511 100644 --- a/res/css/views/settings/_DevicesPanel.scss +++ b/res/css/views/settings/_DevicesPanel.scss @@ -15,7 +15,6 @@ limitations under the License. */ .mx_DevicesPanel { - display: table; table-layout: fixed; // Normally the panel is 880px, however this can easily overflow the container. // TODO: Fix the table to not be squishy @@ -25,16 +24,16 @@ limitations under the License. } .mx_DevicesPanel_header { - display: table-header-group; font-weight: bold; } -.mx_DevicesPanel_header > .mx_DevicesPanel_deviceButtons { +.mx_DevicesPanel_header .mx_DevicesPanel_deviceButtons { height: 48px; // make this tall so the table doesn't move down when the delete button appears } -.mx_DevicesPanel_header > div { - display: table-cell; +.mx_DevicesPanel_header th { + padding: 0px; + text-align: left; vertical-align: middle; } @@ -50,12 +49,9 @@ limitations under the License. width: 20%; } -.mx_DevicesPanel_device { - display: table-row; -} - -.mx_DevicesPanel_device > div { - display: table-cell; +.mx_DevicesPanel_device td { + vertical-align: baseline; + padding: 0px; } .mx_DevicesPanel_myDevice { diff --git a/src/components/views/settings/DevicesPanel.tsx b/src/components/views/settings/DevicesPanel.tsx index 9a1321619e0..d66d0f42ebd 100644 --- a/src/components/views/settings/DevicesPanel.tsx +++ b/src/components/views/settings/DevicesPanel.tsx @@ -218,17 +218,21 @@ export default class DevicesPanel extends React.Component { const classes = classNames(this.props.className, "mx_DevicesPanel"); return ( -
-
-
{ _t("ID") }
-
{ _t("Public Name") }
-
{ _t("Last seen") }
-
- { this.state.selectedDevices.length > 0 ? deleteButton : null } -
-
- { devices.map(this.renderDevice) } -
+ + + + + + + + + + + { devices.map(this.renderDevice) } + +
{ _t("ID") }{ _t("Public Name") }{ _t("Last seen") } + { this.state.selectedDevices.length > 0 ? deleteButton : null } +
); } } diff --git a/src/components/views/settings/DevicesPanelEntry.tsx b/src/components/views/settings/DevicesPanelEntry.tsx index d033bc41a9d..11311145567 100644 --- a/src/components/views/settings/DevicesPanelEntry.tsx +++ b/src/components/views/settings/DevicesPanelEntry.tsx @@ -66,23 +66,23 @@ export default class DevicesPanelEntry extends React.Component { } return ( -
-
+ + { device.device_id } -
-
+ + -
-
+ + { lastSeen } -
-
+ + -
-
+ + ); } } From 690893ea6b5c2d0d7f51a2b7d578f1a7371cac90 Mon Sep 17 00:00:00 2001 From: Andy Balaam Date: Fri, 15 Oct 2021 13:32:39 +0100 Subject: [PATCH 064/156] Merge duplicate CSS selectors --- res/css/views/settings/_DevicesPanel.scss | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/res/css/views/settings/_DevicesPanel.scss b/res/css/views/settings/_DevicesPanel.scss index 1354f6d0511..7d6db7bc96b 100644 --- a/res/css/views/settings/_DevicesPanel.scss +++ b/res/css/views/settings/_DevicesPanel.scss @@ -29,6 +29,7 @@ limitations under the License. .mx_DevicesPanel_header .mx_DevicesPanel_deviceButtons { height: 48px; // make this tall so the table doesn't move down when the delete button appears + width: 20%; } .mx_DevicesPanel_header th { @@ -45,10 +46,6 @@ limitations under the License. width: 30%; } -.mx_DevicesPanel_header .mx_DevicesPanel_deviceButtons { - width: 20%; -} - .mx_DevicesPanel_device td { vertical-align: baseline; padding: 0px; From f761723671c7736f60f2992fc07bb14c294ae979 Mon Sep 17 00:00:00 2001 From: Glandos Date: Fri, 15 Oct 2021 11:30:02 +0000 Subject: [PATCH 065/156] Translated using Weblate (French) Currently translated at 99.9% (3226 of 3229 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/fr/ --- src/i18n/strings/fr.json | 45 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/fr.json b/src/i18n/strings/fr.json index afc18991603..405aa922cef 100644 --- a/src/i18n/strings/fr.json +++ b/src/i18n/strings/fr.json @@ -3204,5 +3204,48 @@ "Are you sure you want to exit during this export?": "Êtes vous sûr de vouloir quitter pendant cet export ?", "%(senderDisplayName)s sent a sticker.": "%(senderDisplayName)s a envoyé un autocollant.", "%(senderDisplayName)s changed the room avatar.": "%(senderDisplayName)s a changé l’avatar du salon.", - "%(date)s at %(time)s": "%(date)s à %(time)s" + "%(date)s at %(time)s": "%(date)s à %(time)s", + "Resetting your verification keys cannot be undone. After resetting, you won't have access to old encrypted messages, and any friends who have previously verified you will see security warnings until you re-verify with them.": "La réinitialisation de vos clés de vérification ne peut pas être annulé. Après la réinitialisation, vous n’aurez plus accès à vos anciens messages chiffrés, et tous les amis que vous aviez précédemment vérifiés verront des avertissement de sécurité jusqu'à ce vous les vérifiiez à nouveau.", + "Downloading": "Téléchargement en cours", + "Polls (under active development)": "Sondages (en cours de développement)", + "Please only proceed if you're sure you've lost all of your other devices and your security key.": "Veuillez ne continuer que si vous êtes certain d’avoir perdu tous vos autres appareils et votre clé de sécurité.", + "I'll verify later": "Je ferai la vérification plus tard", + "Verify with another login": "Vérifier avec une autre connexion", + "Verify with Security Key": "Vérifié avec une clé de sécurité", + "Verify with Security Key or Phrase": "Vérifier avec une clé de sécurité ou une phrase", + "Proceed with reset": "Faire la réinitialisation", + "It looks like you don't have a Security Key or any other devices you can verify against. This device will not be able to access old encrypted messages. In order to verify your identity on this device, you'll need to reset your verification keys.": "Il semblerait que vous n’avez pas de clé de sécurité ou d’autres appareils pour faire la vérification. Cet appareil ne pourra pas accéder aux anciens messages chiffrés. Afin de vérifier votre identité sur cet appareil, vous devrez réinitialiser vos clés de vérifications.", + "Skip verification for now": "Ignorer la vérification pour l’instant", + "Really reset verification keys?": "Réinitialiser les clés de vérification, c’est certain ?", + "Unable to verify this login": "Impossible de vérifier cette connexion", + "Show:": "Affiche :", + "Shows all threads from current room": "Affiche tous les fils de discussion du salon actuel", + "All threads": "Tous les fils de discussion", + "Shows all threads you’ve participated in": "Affiche tous les fils de discussion auxquels vous avez participé", + "My threads": "Mes fils de discussion", + "Creating Space...": "Création de l’espace…", + "Fetching data...": "Récupération des données…", + "They won't be able to access whatever you're not an admin of.": "Ils ne pourront plus accéder aux endroits dans lesquels vous n’êtes pas administrateur.", + "Ban them from specific things I'm able to": "Les bannir de certains endroits où j’ai le droit de le faire", + "Unban them from specific things I'm able to": "Annuler le bannissement de certains endroits où j’ai le droit de le faire", + "Ban them from everything I'm able to": "Les bannir de partout où j’ai le droit de le faire", + "Unban them from everything I'm able to": "Annuler le bannissement de partout où j’ai le droit de le faire", + "Ban from %(roomName)s": "Bannir de %(roomName)s", + "Unban from %(roomName)s": "Annuler le bannissement de %(roomName)s", + "They'll still be able to access whatever you're not an admin of.": "Ils pourront toujours accéder aux endroits dans lesquels vous n’êtes pas administrateur.", + "Kick them from specific things I'm able to": "Les expulser de certains endroits où j’ai le droit de le faire", + "Kick them from everything I'm able to": "Les expulser de partout où j’ai le droit de le faire", + "Kick from %(roomName)s": "Expulser de %(roomName)s", + "Disinvite from %(roomName)s": "Annuler l’invitation à %(roomName)s", + "Threads": "Fils", + "To proceed, please accept the verification request on your other login.": "Pour continuer, veuillez accepter la demande de vérification sur votre autre connexion.", + "Create poll": "Créer un sondage", + "Updating spaces... (%(progress)s out of %(count)s)|one": "Mise-à-jour de l’espace…", + "Updating spaces... (%(progress)s out of %(count)s)|other": "Mise-à-jour des espaces… (%(progress)s sur %(count)s)", + "Sending invites... (%(progress)s out of %(count)s)|one": "Envoi de l’invitation…", + "Sending invites... (%(progress)s out of %(count)s)|other": "Envoi des invitations… (%(progress)s sur %(count)s)", + "Loading new room": "Chargement du nouveau salon", + "Upgrading room": "Mise-à-jour du salon", + "Waiting for you to verify on your other session…": "En attente de votre vérification sur votre autre session…", + "Waiting for you to verify on your other session, %(deviceName)s (%(deviceId)s)…": "En attente de votre vérification sur votre autre session, %(deviceName)s (%(deviceId)s)…" } From 193720ff00516b4c7748c04449331c2fa5eb01a9 Mon Sep 17 00:00:00 2001 From: sr093906 Date: Fri, 15 Oct 2021 12:40:00 +0000 Subject: [PATCH 066/156] Translated using Weblate (Chinese (Simplified)) Currently translated at 100.0% (3229 of 3229 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/zh_Hans/ --- src/i18n/strings/zh_Hans.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/i18n/strings/zh_Hans.json b/src/i18n/strings/zh_Hans.json index 40cfdd48951..6fb1ae7a4f8 100644 --- a/src/i18n/strings/zh_Hans.json +++ b/src/i18n/strings/zh_Hans.json @@ -3241,7 +3241,8 @@ "Unban them from everything I'm able to": "解除我权限范围内对这些人的所有禁令", "Ban from %(roomName)s": "禁止进入 %(roomName)s", "Unban from %(roomName)s": "解除 %(roomName)s 禁令", - "They'll still be able to access whatever you're not an admin of.": "他们仍然可以访问任何你不是管理员的一切东西。", + "They'll still be able to access whatever you're not an admin of.": "这些人仍然可以访问你不是管理员的一切东西。", "Kick them from specific things I'm able to": "禁止这些人做某些我有权决定的事", - "Kick them from everything I'm able to": "禁止这些人做任何我有权决定的事" + "Kick them from everything I'm able to": "禁止这些人做任何我有权决定的事", + "Downloading": "下载中" } From ad16b10a6875fd295d6aee5ebf0afd1e903272ff Mon Sep 17 00:00:00 2001 From: waclaw66 Date: Fri, 15 Oct 2021 11:53:20 +0000 Subject: [PATCH 067/156] Translated using Weblate (Czech) Currently translated at 100.0% (3229 of 3229 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/cs/ --- src/i18n/strings/cs.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/cs.json b/src/i18n/strings/cs.json index c5ba697e0ec..6c3d57a235c 100644 --- a/src/i18n/strings/cs.json +++ b/src/i18n/strings/cs.json @@ -3246,5 +3246,6 @@ "Sending invites... (%(progress)s out of %(count)s)|other": "Odesílání pozvánek... (%(progress)s z %(count)s)", "Loading new room": "Načítání nové místnosti", "Upgrading room": "Upgrade místnosti", - "Polls (under active development)": "Ankety (v aktivním vývoji)" + "Polls (under active development)": "Ankety (v aktivním vývoji)", + "Downloading": "Stahování" } From 5a2c3fc70211b7c8782489204e91d929a4947c84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Priit=20J=C3=B5er=C3=BC=C3=BCt?= Date: Fri, 15 Oct 2021 12:56:59 +0000 Subject: [PATCH 068/156] Translated using Weblate (Estonian) Currently translated at 100.0% (3229 of 3229 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/et/ --- src/i18n/strings/et.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/et.json b/src/i18n/strings/et.json index c5d26879c89..0213535fa3e 100644 --- a/src/i18n/strings/et.json +++ b/src/i18n/strings/et.json @@ -3243,5 +3243,6 @@ "Disinvite from %(roomName)s": "Võta tagasi %(roomName)s jututoa kutse", "Kick them from everything I'm able to": "Müksa kasutaja välja kõikjalt, kust ma saan", "Kick from %(roomName)s": "Müksa %(roomName)s jututoast välja", - "Threads": "Jutulõngad" + "Threads": "Jutulõngad", + "Downloading": "Laadin alla" } From bc9395457782a18de029b2d097f30675a832be78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Fri, 15 Oct 2021 15:24:19 +0200 Subject: [PATCH 069/156] Remove repeated comment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Šimon Brandner --- res/themes/legacy-light/css/_legacy-light.scss | 2 -- 1 file changed, 2 deletions(-) diff --git a/res/themes/legacy-light/css/_legacy-light.scss b/res/themes/legacy-light/css/_legacy-light.scss index a9c1c71c6b8..cc61b371411 100644 --- a/res/themes/legacy-light/css/_legacy-light.scss +++ b/res/themes/legacy-light/css/_legacy-light.scss @@ -284,8 +284,6 @@ $progressbar-bg-color: rgba(141, 151, 165, 0.2); $room-warning-bg-color: $yellow-background; -// Legacy theme backports - // Legacy theme backports $accent: #0DBD8B; $alert: #FF5B55; From f8c516d927ec7dd2b5f82bce5a334839ba7b0227 Mon Sep 17 00:00:00 2001 From: Dariusz Niemczyk <3636685+Palid@users.noreply.github.com> Date: Fri, 15 Oct 2021 15:29:17 +0200 Subject: [PATCH 070/156] Add new thread message preview (#18958) (#6953) Closes https://github.com/vector-im/element-web/issues/18958 --- res/css/views/rooms/_EventTile.scss | 51 ++++++++++++++++++- res/img/element-icons/thread-summary.svg | 1 + src/components/views/rooms/EventTile.tsx | 23 ++++++--- src/i18n/strings/en_EN.json | 2 + src/stores/room-list/MessagePreviewStore.ts | 10 ++++ .../room-list/previews/MessageEventPreview.ts | 4 +- .../previews/ReactionEventPreview.ts | 4 +- .../room-list/previews/StickerEventPreview.ts | 4 +- 8 files changed, 83 insertions(+), 16 deletions(-) create mode 100644 res/img/element-icons/thread-summary.svg diff --git a/res/css/views/rooms/_EventTile.scss b/res/css/views/rooms/_EventTile.scss index 470851654b2..74fc141b480 100644 --- a/res/css/views/rooms/_EventTile.scss +++ b/res/css/views/rooms/_EventTile.scss @@ -676,10 +676,57 @@ $hover-select-border: 4px; } } -.mx_ThreadInfo:hover { - cursor: pointer; +.mx_ThreadInfo { + height: 35px; + position: relative; + background-color: $system; + padding-left: 12px; + display: flex; + align-items: center; + border-radius: 8px; + padding-right: 16px; + padding-top: 8px; + padding-bottom: 8px; + font-size: 12px; + color: $secondary-content; + box-sizing: border-box; + justify-content: flex-start; + + &:hover, &-active { + cursor: pointer; + border: 1px solid $quinary-content; + padding-top: 7px; + padding-bottom: 7px; + padding-left: 11px; + padding-right: 15px; + } + + .mx_ThreadInfo_content { + text-overflow: ellipsis; + overflow: hidden; + white-space: nowrap; + padding-left: 8px; + } + + .mx_ThreadInfo_thread-icon { + mask-image: url('$(res)/img/element-icons/thread-summary.svg'); + mask-position: center; + height: 16px; + min-width: 16px; + background-color: $secondary-content; + mask-repeat: no-repeat; + mask-size: contain; + } + .mx_ThreadInfo_threads-amount { + font-weight: 600; + position: relative; + padding: 0 8px; + white-space: nowrap; + } } + + .mx_ThreadView { display: flex; flex-direction: column; diff --git a/res/img/element-icons/thread-summary.svg b/res/img/element-icons/thread-summary.svg new file mode 100644 index 00000000000..2c4f0ead0cf --- /dev/null +++ b/res/img/element-icons/thread-summary.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/components/views/rooms/EventTile.tsx b/src/components/views/rooms/EventTile.tsx index 9d608c2833c..1aab27ee5d0 100644 --- a/src/components/views/rooms/EventTile.tsx +++ b/src/components/views/rooms/EventTile.tsx @@ -59,6 +59,7 @@ import { getEventDisplayInfo } from '../../../utils/EventUtils'; import SettingsStore from "../../../settings/SettingsStore"; import MKeyVerificationConclusion from "../messages/MKeyVerificationConclusion"; import { dispatchShowThreadEvent } from '../../../dispatcher/dispatch-actions/threads'; +import { MessagePreviewStore } from '../../../stores/room-list/MessagePreviewStore'; const eventTileTypes = { [EventType.RoomMessage]: 'messages.MessageEvent', @@ -532,15 +533,13 @@ export default class EventTile extends React.Component { } const thread = this.state.thread; - const room = MatrixClientPeg.get().getRoom(this.props.mxEvent.getRoomId()); if (!thread || this.props.showThreadInfo === false || thread.length <= 1) { return null; } - const avatars = Array.from(thread.participants).map((mxId: string) => { - const member = room.getMember(mxId); - return ; - }); + const threadMessagePreview = MessagePreviewStore.instance.generateThreadPreview(this.state.thread); + + if (!threadMessagePreview) return null; return (
{ dispatchShowThreadEvent(this.props.mxEvent); }} > - - { avatars } + + + { _t("%(count)s reply", { + count: thread.length - 1, + }) } - { thread.length - 1 } { thread.length === 2 ? 'reply' : 'replies' } + +
+ + { threadMessagePreview } + +
); } diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index a46d48b6550..781642089c1 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -1551,6 +1551,8 @@ "Send as message": "Send as message", "Edit message": "Edit message", "Mod": "Mod", + "%(count)s reply|other": "%(count)s replies", + "%(count)s reply|one": "%(count)s reply", "This event could not be displayed": "This event could not be displayed", "Your key share request has been sent - please check your other sessions for key share requests.": "Your key share request has been sent - please check your other sessions for key share requests.", "Key share requests are sent to your other sessions automatically. If you rejected or dismissed the key share request on your other sessions, click here to request the keys for this session again.": "Key share requests are sent to your other sessions automatically. If you rejected or dismissed the key share request on your other sessions, click here to request the keys for this session again.", diff --git a/src/stores/room-list/MessagePreviewStore.ts b/src/stores/room-list/MessagePreviewStore.ts index 44ec173e083..ab22baf5d1a 100644 --- a/src/stores/room-list/MessagePreviewStore.ts +++ b/src/stores/room-list/MessagePreviewStore.ts @@ -27,6 +27,7 @@ import { CallHangupEvent } from "./previews/CallHangupEvent"; import { StickerEventPreview } from "./previews/StickerEventPreview"; import { ReactionEventPreview } from "./previews/ReactionEventPreview"; import { UPDATE_EVENT } from "../AsyncStore"; +import { Thread } from "matrix-js-sdk/src/models/thread"; // Emitted event for when a room's preview has changed. First argument will the room for which // the change happened. @@ -108,6 +109,15 @@ export class MessagePreviewStore extends AsyncStoreWithClient { return previews.get(inTagId); } + public generateThreadPreview(thread: Thread): string { + const lastEvent = thread.replyToEvent; + const previewDef = PREVIEWS[lastEvent.getType()]; + // TODO: Handle case where we don't have + if (!previewDef) return ''; + const previewText = previewDef.previewer.getTextFor(lastEvent, null, true); + return previewText ?? ''; + } + private async generatePreview(room: Room, tagId?: TagID) { const events = room.timeline; if (!events) return; // should only happen in tests diff --git a/src/stores/room-list/previews/MessageEventPreview.ts b/src/stores/room-list/previews/MessageEventPreview.ts index 961f27fda1d..e105c27ac2f 100644 --- a/src/stores/room-list/previews/MessageEventPreview.ts +++ b/src/stores/room-list/previews/MessageEventPreview.ts @@ -23,7 +23,7 @@ import ReplyThread from "../../../components/views/elements/ReplyThread"; import { getHtmlText } from "../../../HtmlUtils"; export class MessageEventPreview implements IPreview { - public getTextFor(event: MatrixEvent, tagId?: TagID): string { + public getTextFor(event: MatrixEvent, tagId?: TagID, isThread?: boolean): string { let eventContent = event.getContent(); if (event.isRelation("m.replace")) { @@ -64,7 +64,7 @@ export class MessageEventPreview implements IPreview { return _t("* %(senderName)s %(emote)s", { senderName: getSenderName(event), emote: body }); } - if (isSelf(event) || !shouldPrefixMessagesIn(event.getRoomId(), tagId)) { + if (isThread || isSelf(event) || !shouldPrefixMessagesIn(event.getRoomId(), tagId)) { return body; } else { return _t("%(senderName)s: %(message)s", { senderName: getSenderName(event), message: body }); diff --git a/src/stores/room-list/previews/ReactionEventPreview.ts b/src/stores/room-list/previews/ReactionEventPreview.ts index 25f8e0b61aa..4e2c175055a 100644 --- a/src/stores/room-list/previews/ReactionEventPreview.ts +++ b/src/stores/room-list/previews/ReactionEventPreview.ts @@ -23,7 +23,7 @@ import SettingsStore from "../../../settings/SettingsStore"; import DMRoomMap from "../../../utils/DMRoomMap"; export class ReactionEventPreview implements IPreview { - public getTextFor(event: MatrixEvent, tagId?: TagID): string { + public getTextFor(event: MatrixEvent, tagId?: TagID, isThread?: boolean): string { const showDms = SettingsStore.getValue("feature_roomlist_preview_reactions_dms"); const showAll = SettingsStore.getValue("feature_roomlist_preview_reactions_all"); @@ -41,7 +41,7 @@ export class ReactionEventPreview implements IPreview { const reaction = relation.key; if (!reaction) return null; // invalid reaction (unknown format) - if (isSelf(event) || !shouldPrefixMessagesIn(event.getRoomId(), tagId)) { + if (isThread || isSelf(event) || !shouldPrefixMessagesIn(event.getRoomId(), tagId)) { return reaction; } else { return _t("%(senderName)s: %(reaction)s", { senderName: getSenderName(event), reaction }); diff --git a/src/stores/room-list/previews/StickerEventPreview.ts b/src/stores/room-list/previews/StickerEventPreview.ts index 56746568af2..6ad43ef3e13 100644 --- a/src/stores/room-list/previews/StickerEventPreview.ts +++ b/src/stores/room-list/previews/StickerEventPreview.ts @@ -21,11 +21,11 @@ import { getSenderName, isSelf, shouldPrefixMessagesIn } from "./utils"; import { _t } from "../../../languageHandler"; export class StickerEventPreview implements IPreview { - public getTextFor(event: MatrixEvent, tagId?: TagID): string { + public getTextFor(event: MatrixEvent, tagId?: TagID, isThread?: boolean): string { const stickerName = event.getContent()['body']; if (!stickerName) return null; - if (isSelf(event) || !shouldPrefixMessagesIn(event.getRoomId(), tagId)) { + if (isThread || isSelf(event) || !shouldPrefixMessagesIn(event.getRoomId(), tagId)) { return stickerName; } else { return _t("%(senderName)s: %(stickerName)s", { senderName: getSenderName(event), stickerName }); From ade53a5bd7943d5813fecc29171ff447b532e015 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Fri, 15 Oct 2021 15:35:06 +0200 Subject: [PATCH 071/156] Do more re-ordering to keep things working MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Šimon Brandner --- .../legacy-light/css/_legacy-light.scss | 51 ++++++++----------- 1 file changed, 21 insertions(+), 30 deletions(-) diff --git a/res/themes/legacy-light/css/_legacy-light.scss b/res/themes/legacy-light/css/_legacy-light.scss index cc61b371411..fc625876f37 100644 --- a/res/themes/legacy-light/css/_legacy-light.scss +++ b/res/themes/legacy-light/css/_legacy-light.scss @@ -173,8 +173,6 @@ $roomtopic-color: #9e9e9e; $composer-e2e-icon-color: #91a1c0; $header-divider-color: #91a1c0; -$voipcall-plinth-color: $system; - // ******************** $theme-button-bg-color: #e3e8f0; @@ -196,8 +194,29 @@ $presence-online: $accent-color; $presence-away: #d9b072; $presence-offline: #e3e8f0; +// Legacy theme backports +$accent: #0DBD8B; +$alert: #FF5B55; +$links: #0086e6; +$primary-content: $primary-fg-color; +$secondary-content: $secondary-fg-color; +$tertiary-content: $tertiary-fg-color; +$quaternary-content: #6F7882; +$quinary-content: $quaternary-content; +$system: #F4F6FA; +$background: $primary-bg-color; +$panels: rgba($system, 0.9); +$panel-base: #8D97A5; // This color is not intended for use in the app +$panel-selected: rgba($tertiary-content, 0.3); +$panel-hover: rgba($tertiary-content, 0.1); +$panel-actions: $roomtile-selected-bg-color; +$space-nav: rgba($tertiary-content, 0.15); +// Legacy theme backports + // ******************** +$voipcall-plinth-color: $system; + $username-variant1-color: #368bd6; $username-variant2-color: #ac3ba8; $username-variant3-color: #03b381; @@ -284,25 +303,6 @@ $progressbar-bg-color: rgba(141, 151, 165, 0.2); $room-warning-bg-color: $yellow-background; -// Legacy theme backports -$accent: #0DBD8B; -$alert: #FF5B55; -$links: #0086e6; -$primary-content: $primary-fg-color; -$secondary-content: $secondary-fg-color; -$tertiary-content: $tertiary-fg-color; -$quaternary-content: #6F7882; -$quinary-content: $quaternary-content; -$system: #F4F6FA; -$background: $primary-bg-color; -$panels: rgba($system, 0.9); -$panel-base: #8D97A5; // This color is not intended for use in the app -$panel-selected: rgba($tertiary-content, 0.3); -$panel-hover: rgba($tertiary-content, 0.1); -$panel-actions: $roomtile-selected-bg-color; -$space-nav: rgba($tertiary-content, 0.15); -// Legacy theme backports - $memberstatus-placeholder-color: $muted-fg-color; $authpage-bg-color: #2e3649; @@ -355,15 +355,6 @@ $eventbubble-bg-hover: #FAFBFD; $eventbubble-avatar-outline: #fff; $eventbubble-reply-color: #C1C6CD; -// Legacy theme backports -$primary-content: $primary-fg-color; -$secondary-content: $secondary-fg-color; -$tertiary-content: $tertiary-fg-color; -$quaternary-content: #C1C6CD; -$quinary-content: #e3e8f0; -$background: $primary-bg-color; -$panel-actions: $roomtile-selected-bg-color; - // ***** Mixins! ***** @define-mixin mx_DialogButton { From 93fc24c875e15526c10cf29cd60443d78d5798c4 Mon Sep 17 00:00:00 2001 From: Germain Souquet Date: Fri, 15 Oct 2021 14:47:02 +0100 Subject: [PATCH 072/156] Adding renderThreadInfo comment to explain data accessor --- src/components/views/rooms/EventTile.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/components/views/rooms/EventTile.tsx b/src/components/views/rooms/EventTile.tsx index 467481c6797..44bf500f50b 100644 --- a/src/components/views/rooms/EventTile.tsx +++ b/src/components/views/rooms/EventTile.tsx @@ -546,6 +546,12 @@ export default class EventTile extends React.Component { return null; } + /** + * Accessing the threads value through the room due to a race condition + * that will be solved when there are proper backend support for threads + * We currently have no reliable way to discover than an event is a thread + * when we are at the sync stage + */ const room = MatrixClientPeg.get().getRoom(this.props.mxEvent.getRoomId()); const thread = room.threads.get(this.props.mxEvent.getId()); From 9a9d152adae0968ca38cb7c6f3d36bb5fd585ce9 Mon Sep 17 00:00:00 2001 From: sr093906 Date: Fri, 15 Oct 2021 13:58:17 +0000 Subject: [PATCH 073/156] Translated using Weblate (Chinese (Simplified)) Currently translated at 100.0% (3231 of 3231 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/zh_Hans/ --- src/i18n/strings/zh_Hans.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/zh_Hans.json b/src/i18n/strings/zh_Hans.json index 6fb1ae7a4f8..672acdd0d34 100644 --- a/src/i18n/strings/zh_Hans.json +++ b/src/i18n/strings/zh_Hans.json @@ -3244,5 +3244,7 @@ "They'll still be able to access whatever you're not an admin of.": "这些人仍然可以访问你不是管理员的一切东西。", "Kick them from specific things I'm able to": "禁止这些人做某些我有权决定的事", "Kick them from everything I'm able to": "禁止这些人做任何我有权决定的事", - "Downloading": "下载中" + "Downloading": "下载中", + "%(count)s reply|one": "%(count)s 条回复", + "%(count)s reply|other": "%(count)s 条回复" } From ac23afe9f1a8f4396a34ade5d3dfa6995682c810 Mon Sep 17 00:00:00 2001 From: Germain Souquet Date: Fri, 15 Oct 2021 15:36:06 +0100 Subject: [PATCH 074/156] Allow EventTile to be rendered with mock events --- src/components/views/rooms/EventTile.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/views/rooms/EventTile.tsx b/src/components/views/rooms/EventTile.tsx index 44bf500f50b..8a50284a938 100644 --- a/src/components/views/rooms/EventTile.tsx +++ b/src/components/views/rooms/EventTile.tsx @@ -478,7 +478,7 @@ export default class EventTile extends React.Component { } const room = this.context.getRoom(this.props.mxEvent.getRoomId()); - room.on(ThreadEvent.New, this.onNewThread); + room?.on(ThreadEvent.New, this.onNewThread); } private updateThread = (thread) => { @@ -522,7 +522,7 @@ export default class EventTile extends React.Component { } const room = this.context.getRoom(this.props.mxEvent.getRoomId()); - room.off(ThreadEvent.New, this.onNewThread); + room?.off(ThreadEvent.New, this.onNewThread); } componentDidUpdate(prevProps, prevState, snapshot) { @@ -553,7 +553,7 @@ export default class EventTile extends React.Component { * when we are at the sync stage */ const room = MatrixClientPeg.get().getRoom(this.props.mxEvent.getRoomId()); - const thread = room.threads.get(this.props.mxEvent.getId()); + const thread = room?.threads.get(this.props.mxEvent.getId()); if (thread && !thread.ready) { thread.addEvent(this.props.mxEvent, true); From a547ee4654b19c7fded422fa9be4ed21570bce01 Mon Sep 17 00:00:00 2001 From: Andy Balaam Date: Fri, 15 Oct 2021 15:06:55 +0100 Subject: [PATCH 075/156] Break 'Cryptography' settings into a separate component --- res/css/_components.scss | 1 + .../views/settings/_CryptographyPanel.scss | 22 ++++ .../tabs/user/_SecurityUserSettingsTab.scss | 23 ---- .../views/settings/CryptographyPanel.tsx | 110 ++++++++++++++++++ .../tabs/user/SecurityUserSettingsTab.tsx | 75 +----------- .../views/settings/CryptographyPanel-test.tsx | 38 ++++++ .../end-to-end-tests/src/usecases/settings.js | 2 +- 7 files changed, 174 insertions(+), 97 deletions(-) create mode 100644 res/css/views/settings/_CryptographyPanel.scss create mode 100644 src/components/views/settings/CryptographyPanel.tsx create mode 100644 test/components/views/settings/CryptographyPanel-test.tsx diff --git a/res/css/_components.scss b/res/css/_components.scss index 4abcbbc9d4a..9e3988a2fe2 100644 --- a/res/css/_components.scss +++ b/res/css/_components.scss @@ -244,6 +244,7 @@ @import "./views/rooms/_WhoIsTypingTile.scss"; @import "./views/settings/_AvatarSetting.scss"; @import "./views/settings/_CrossSigningPanel.scss"; +@import "./views/settings/_CryptographyPanel.scss"; @import "./views/settings/_DevicesPanel.scss"; @import "./views/settings/_E2eAdvancedPanel.scss"; @import "./views/settings/_EmailAddresses.scss"; diff --git a/res/css/views/settings/_CryptographyPanel.scss b/res/css/views/settings/_CryptographyPanel.scss new file mode 100644 index 00000000000..b97ca1e1d50 --- /dev/null +++ b/res/css/views/settings/_CryptographyPanel.scss @@ -0,0 +1,22 @@ +.mx_CryptographyPanel { + display: table; + padding-left: 0; +} + +.mx_CryptographyPanel > li { + display: table-row; +} + +.mx_CryptographyPanel > li > label, +.mx_CryptographyPanel > li > span { + display: table-cell; + padding-right: 1em; +} + +.mx_CryptographyPanel_importExportButtons .mx_AccessibleButton { + margin-right: 10px; +} + +.mx_CryptographyPanel_importExportButtons { + margin-bottom: 15px; +} diff --git a/res/css/views/settings/tabs/user/_SecurityUserSettingsTab.scss b/res/css/views/settings/tabs/user/_SecurityUserSettingsTab.scss index 8cc51e7e352..f1ad2352f22 100644 --- a/res/css/views/settings/tabs/user/_SecurityUserSettingsTab.scss +++ b/res/css/views/settings/tabs/user/_SecurityUserSettingsTab.scss @@ -14,33 +14,10 @@ See the License for the specific language governing permissions and limitations under the License. */ -.mx_SecurityUserSettingsTab_deviceInfo { - display: table; - padding-left: 0; -} - -.mx_SecurityUserSettingsTab_deviceInfo > li { - display: table-row; -} - -.mx_SecurityUserSettingsTab_deviceInfo > li > label, -.mx_SecurityUserSettingsTab_deviceInfo > li > span { - display: table-cell; - padding-right: 1em; -} - -.mx_SecurityUserSettingsTab_importExportButtons .mx_AccessibleButton { - margin-right: 10px; -} - .mx_SecurityUserSettingsTab_bulkOptions .mx_AccessibleButton { margin-right: 10px; } -.mx_SecurityUserSettingsTab_importExportButtons { - margin-bottom: 15px; -} - .mx_SecurityUserSettingsTab_ignoredUser { margin-bottom: 5px; } diff --git a/src/components/views/settings/CryptographyPanel.tsx b/src/components/views/settings/CryptographyPanel.tsx new file mode 100644 index 00000000000..a4e192aaeda --- /dev/null +++ b/src/components/views/settings/CryptographyPanel.tsx @@ -0,0 +1,110 @@ +/* +Copyright 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 { MatrixClientPeg } from '../../../MatrixClientPeg'; +import { _t } from '../../../languageHandler'; +import Modal from '../../../Modal'; +import { replaceableComponent } from "../../../utils/replaceableComponent"; +import AccessibleButton from "../elements/AccessibleButton"; +import * as FormattingUtils from "../../../utils/FormattingUtils"; +import SettingsStore from "../../../settings/SettingsStore"; +import SettingsFlag from "../elements/SettingsFlag"; +import { SettingLevel } from "../../../settings/SettingLevel"; + +interface IProps { +} + +interface IState { +} + +@replaceableComponent("views.settings.CryptographyPanel") +export default class CryptographyPanel extends React.Component { + constructor(props: IProps) { + super(props); + } + + public render(): JSX.Element { + const client = MatrixClientPeg.get(); + const deviceId = client.deviceId; + let identityKey = client.getDeviceEd25519Key(); + if (!identityKey) { + identityKey = _t(""); + } else { + identityKey = FormattingUtils.formatCryptoKey(identityKey); + } + + let importExportButtons = null; + if (client.isCryptoEnabled()) { + importExportButtons = ( +
+ + { _t("Export E2E room keys") } + + + { _t("Import E2E room keys") } + +
+ ); + } + + let noSendUnverifiedSetting; + if (SettingsStore.isEnabled("blacklistUnverifiedDevices")) { + noSendUnverifiedSetting = ; + } + + return ( +
+ { _t("Cryptography") } +
    +
  • + + { deviceId } +
  • +
  • + + { identityKey } +
  • +
+ { importExportButtons } + { noSendUnverifiedSetting } +
+ ); + } + + private onExportE2eKeysClicked = (): void => { + Modal.createTrackedDialogAsync('Export E2E Keys', '', + import('../../../async-components/views/dialogs/security/ExportE2eKeysDialog'), + { matrixClient: MatrixClientPeg.get() }, + ); + }; + + private onImportE2eKeysClicked = (): void => { + Modal.createTrackedDialogAsync('Import E2E Keys', '', + import('../../../async-components/views/dialogs/security/ImportE2eKeysDialog'), + { matrixClient: MatrixClientPeg.get() }, + ); + }; + + private updateBlacklistDevicesFlag = (checked): void => { + MatrixClientPeg.get().setGlobalBlacklistUnverifiedDevices(checked); + }; +} diff --git a/src/components/views/settings/tabs/user/SecurityUserSettingsTab.tsx b/src/components/views/settings/tabs/user/SecurityUserSettingsTab.tsx index 6aa45d05b63..a9e02fa8a28 100644 --- a/src/components/views/settings/tabs/user/SecurityUserSettingsTab.tsx +++ b/src/components/views/settings/tabs/user/SecurityUserSettingsTab.tsx @@ -21,10 +21,8 @@ import { sleep } from "matrix-js-sdk/src/utils"; import { _t } from "../../../../../languageHandler"; import SdkConfig from "../../../../../SdkConfig"; import { MatrixClientPeg } from "../../../../../MatrixClientPeg"; -import * as FormattingUtils from "../../../../../utils/FormattingUtils"; import AccessibleButton from "../../../elements/AccessibleButton"; import Analytics from "../../../../../Analytics"; -import Modal from "../../../../../Modal"; import dis from "../../../../../dispatcher/dispatcher"; import { privateShouldBeEncrypted } from "../../../../../createRoom"; import { SettingLevel } from "../../../../../settings/SettingLevel"; @@ -37,6 +35,7 @@ import { replaceableComponent } from "../../../../../utils/replaceableComponent" import { PosthogAnalytics } from "../../../../../PosthogAnalytics"; import { ActionPayload } from "../../../../../dispatcher/payloads"; import { Room } from "matrix-js-sdk/src/models/room"; +import CryptographyPanel from "../../CryptographyPanel"; import DevicesPanel from "../../DevicesPanel"; import SettingsFlag from "../../../elements/SettingsFlag"; import CrossSigningPanel from "../../CrossSigningPanel"; @@ -112,30 +111,12 @@ export default class SecurityUserSettingsTab extends React.Component { - MatrixClientPeg.get().setGlobalBlacklistUnverifiedDevices(checked); - }; - private updateAnalytics = (checked: boolean): void => { checked ? Analytics.enable() : Analytics.disable(); CountlyAnalytics.instance.enable(/* anonymous = */ !checked); PosthogAnalytics.instance.updateAnonymityFromSettings(MatrixClientPeg.get().getUserId()); }; - private onExportE2eKeysClicked = (): void => { - Modal.createTrackedDialogAsync('Export E2E Keys', '', - import('../../../../../async-components/views/dialogs/security/ExportE2eKeysDialog'), - { matrixClient: MatrixClientPeg.get() }, - ); - }; - - private onImportE2eKeysClicked = (): void => { - Modal.createTrackedDialogAsync('Import E2E Keys', '', - import('../../../../../async-components/views/dialogs/security/ImportE2eKeysDialog'), - { matrixClient: MatrixClientPeg.get() }, - ); - }; - private onGoToUserProfileClick = (): void => { dis.dispatch({ action: 'view_user_info', @@ -211,58 +192,6 @@ export default class SecurityUserSettingsTab extends React.Component"); - } else { - identityKey = FormattingUtils.formatCryptoKey(identityKey); - } - - let importExportButtons = null; - if (client.isCryptoEnabled()) { - importExportButtons = ( -
- - { _t("Export E2E room keys") } - - - { _t("Import E2E room keys") } - -
- ); - } - - let noSendUnverifiedSetting; - if (SettingsStore.isEnabled("blacklistUnverifiedDevices")) { - noSendUnverifiedSetting = ; - } - - return ( -
- { _t("Cryptography") } -
    -
  • - - { deviceId } -
  • -
  • - - { identityKey } -
  • -
- { importExportButtons } - { noSendUnverifiedSetting } -
- ); - } - private renderIgnoredUsers(): JSX.Element { const { waitingUnignored, ignoredUserIds } = this.state; @@ -418,7 +347,7 @@ export default class SecurityUserSettingsTab extends React.Component
{ privacySection } { advancedSection } diff --git a/test/components/views/settings/CryptographyPanel-test.tsx b/test/components/views/settings/CryptographyPanel-test.tsx new file mode 100644 index 00000000000..56056b53ec1 --- /dev/null +++ b/test/components/views/settings/CryptographyPanel-test.tsx @@ -0,0 +1,38 @@ +import '../../../skinned-sdk'; +import * as TestUtils from '../../../test-utils'; + +import { MatrixClientPeg } from '../../../../src/MatrixClientPeg'; +import React, { ReactElement } from 'react'; +import ReactDOM from 'react-dom'; + +import { MatrixClient } from 'matrix-js-sdk'; +import CryptographyPanel from '../../../../src/components/views/settings/CryptographyPanel'; + +describe('CryptographyPanel', () => { + it('shows the session ID and key', () => { + const sessionId = "ABCDEFGHIJ"; + const sessionKey = "AbCDeFghIJK7L/m4nOPqRSTUVW4xyzaBCDef6gHIJkl"; + const sessionKeyFormatted = "AbCD eFgh IJK7 L/m4 nOPq RSTU VW4x yzaB CDef 6gHI Jkl"; + + TestUtils.stubClient(); + const client: MatrixClient = MatrixClientPeg.get(); + client.deviceId = sessionId; + client.getDeviceEd25519Key = () => sessionKey; + + // When we render the CryptographyPanel + const rendered = render(); + + // Then it displays info about the user's session + const codes = rendered.querySelectorAll("code"); + expect(codes.length).toEqual(2); + expect(codes[0].innerHTML).toEqual(sessionId); + expect(codes[1].innerHTML).toEqual(sessionKeyFormatted); + }); +}); + +function render(component: ReactElement): HTMLDivElement { + const parentDiv = document.createElement('div'); + document.body.appendChild(parentDiv); + ReactDOM.render(component, parentDiv); + return parentDiv; +} diff --git a/test/end-to-end-tests/src/usecases/settings.js b/test/end-to-end-tests/src/usecases/settings.js index 509e0b4a07b..372bdead104 100644 --- a/test/end-to-end-tests/src/usecases/settings.js +++ b/test/end-to-end-tests/src/usecases/settings.js @@ -44,7 +44,7 @@ module.exports.enableLazyLoading = async function(session) { module.exports.getE2EDeviceFromSettings = async function(session) { session.log.step(`gets e2e device/key from settings`); await openSettings(session, "security"); - const deviceAndKey = await session.queryAll(".mx_SettingsTab_section .mx_SecurityUserSettingsTab_deviceInfo code"); + const deviceAndKey = await session.queryAll(".mx_SettingsTab_section .mx_CryptographyPanel code"); assert.equal(deviceAndKey.length, 2); const id = await (await deviceAndKey[0].getProperty("innerText")).jsonValue(); const key = await (await deviceAndKey[1].getProperty("innerText")).jsonValue(); From 0941b38b5d8feb1da55671b776629eaf4a257a9f Mon Sep 17 00:00:00 2001 From: Andy Balaam Date: Fri, 15 Oct 2021 16:09:36 +0100 Subject: [PATCH 076/156] Name CryptographyPanel CSS classes consistent with style --- res/css/views/settings/_CryptographyPanel.scss | 8 ++++---- src/components/views/settings/CryptographyPanel.tsx | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/res/css/views/settings/_CryptographyPanel.scss b/res/css/views/settings/_CryptographyPanel.scss index b97ca1e1d50..2290791d5db 100644 --- a/res/css/views/settings/_CryptographyPanel.scss +++ b/res/css/views/settings/_CryptographyPanel.scss @@ -1,14 +1,14 @@ -.mx_CryptographyPanel { +.mx_CryptographyPanel_sessionInfo { display: table; padding-left: 0; } -.mx_CryptographyPanel > li { +.mx_CryptographyPanel_sessionInfo > li { display: table-row; } -.mx_CryptographyPanel > li > label, -.mx_CryptographyPanel > li > span { +.mx_CryptographyPanel_sessionInfo > li > label, +.mx_CryptographyPanel_sessionInfo > li > span { display: table-cell; padding-right: 1em; } diff --git a/src/components/views/settings/CryptographyPanel.tsx b/src/components/views/settings/CryptographyPanel.tsx index a4e192aaeda..1e1cb3ba681 100644 --- a/src/components/views/settings/CryptographyPanel.tsx +++ b/src/components/views/settings/CryptographyPanel.tsx @@ -72,9 +72,9 @@ export default class CryptographyPanel extends React.Component { } return ( -
+
{ _t("Cryptography") } -
    +
    • { deviceId } From 5a7c0d87b6515a06bea905cf59ba7983722fa26c Mon Sep 17 00:00:00 2001 From: Germain Souquet Date: Fri, 15 Oct 2021 17:42:44 +0100 Subject: [PATCH 077/156] Rename ReplyThread to ReplyChain to avoid confusion with m.thread --- res/css/_components.scss | 2 +- .../{_ReplyThread.scss => _ReplyChain.scss} | 22 +++++------ res/css/views/rooms/_EventBubbleTile.scss | 6 +-- res/css/views/rooms/_IRCLayout.scss | 2 +- src/HtmlUtils.tsx | 6 +-- .../context_menus/MessageContextMenu.tsx | 16 ++++---- .../{ReplyThread.tsx => ReplyChain.tsx} | 38 +++++++++---------- .../views/messages/MessageActionBar.tsx | 16 ++++---- src/components/views/messages/TextualBody.tsx | 4 +- src/components/views/rooms/EventTile.tsx | 12 +++--- .../views/rooms/SendMessageComposer.tsx | 6 +-- .../room-list/previews/MessageEventPreview.ts | 6 +-- src/utils/exportUtils/exportCustomCSS.css | 2 +- .../views/dialogs/ForwardDialog-test.js | 2 +- ...ReplyThread-test.js => ReplyChain-test.js} | 14 +++---- 15 files changed, 77 insertions(+), 77 deletions(-) rename res/css/views/elements/{_ReplyThread.scss => _ReplyChain.scss} (83%) rename src/components/views/elements/{ReplyThread.tsx => ReplyChain.tsx} (92%) rename test/components/views/elements/{ReplyThread-test.js => ReplyChain-test.js} (93%) diff --git a/res/css/_components.scss b/res/css/_components.scss index 4abcbbc9d4a..12b71cd39f0 100644 --- a/res/css/_components.scss +++ b/res/css/_components.scss @@ -148,7 +148,7 @@ @import "./views/elements/_PowerSelector.scss"; @import "./views/elements/_ProgressBar.scss"; @import "./views/elements/_QRCode.scss"; -@import "./views/elements/_ReplyThread.scss"; +@import "./views/elements/_ReplyChain.scss"; @import "./views/elements/_ResizeHandle.scss"; @import "./views/elements/_RichText.scss"; @import "./views/elements/_RoleButton.scss"; diff --git a/res/css/views/elements/_ReplyThread.scss b/res/css/views/elements/_ReplyChain.scss similarity index 83% rename from res/css/views/elements/_ReplyThread.scss rename to res/css/views/elements/_ReplyChain.scss index e19be82e251..c6b9c2bbaac 100644 --- a/res/css/views/elements/_ReplyThread.scss +++ b/res/css/views/elements/_ReplyChain.scss @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -.mx_ReplyThread { +.mx_ReplyChain { margin-top: 0; margin-left: 0; margin-right: 0; @@ -23,44 +23,44 @@ limitations under the License. border-left: 2px solid $button-bg-color; border-radius: 2px; - .mx_ReplyThread_show { + .mx_ReplyChain_show { cursor: pointer; } - &.mx_ReplyThread_color1 { + &.mx_ReplyChain_color1 { border-left-color: $username-variant1-color; } - &.mx_ReplyThread_color2 { + &.mx_ReplyChain_color2 { border-left-color: $username-variant2-color; } - &.mx_ReplyThread_color3 { + &.mx_ReplyChain_color3 { border-left-color: $username-variant3-color; } - &.mx_ReplyThread_color4 { + &.mx_ReplyChain_color4 { border-left-color: $username-variant4-color; } - &.mx_ReplyThread_color5 { + &.mx_ReplyChain_color5 { border-left-color: $username-variant5-color; } - &.mx_ReplyThread_color6 { + &.mx_ReplyChain_color6 { border-left-color: $username-variant6-color; } - &.mx_ReplyThread_color7 { + &.mx_ReplyChain_color7 { border-left-color: $username-variant7-color; } - &.mx_ReplyThread_color8 { + &.mx_ReplyChain_color8 { border-left-color: $username-variant8-color; } } -.mx_ReplyThread--expanded { +.mx_ReplyChain--expanded { .mx_EventTile_body { display: block; overflow-y: scroll !important; diff --git a/res/css/views/rooms/_EventBubbleTile.scss b/res/css/views/rooms/_EventBubbleTile.scss index 389a5c97061..72920936aaa 100644 --- a/res/css/views/rooms/_EventBubbleTile.scss +++ b/res/css/views/rooms/_EventBubbleTile.scss @@ -192,11 +192,11 @@ limitations under the License. flex-direction: column; } - .mx_ReplyThread_show { + .mx_ReplyChain_show { order: 99999; } - .mx_ReplyThread { + .mx_ReplyChain { .mx_EventTile_reply { max-width: 90%; padding: 0; @@ -247,7 +247,7 @@ limitations under the License. .mx_EventTile_keyRequestInfo { grid-area: link; } - .mx_ReplyThread_wrapper { + .mx_ReplyChain_wrapper { grid-area: reply; } } diff --git a/res/css/views/rooms/_IRCLayout.scss b/res/css/views/rooms/_IRCLayout.scss index 578c0325d22..7edfff1e857 100644 --- a/res/css/views/rooms/_IRCLayout.scss +++ b/res/css/views/rooms/_IRCLayout.scss @@ -200,7 +200,7 @@ $irc-line-height: $font-18px; } } - .mx_ReplyThread { + .mx_ReplyChain { margin: 0; .mx_SenderProfile { order: unset; diff --git a/src/HtmlUtils.tsx b/src/HtmlUtils.tsx index 2eee5214af5..7087386128d 100644 --- a/src/HtmlUtils.tsx +++ b/src/HtmlUtils.tsx @@ -34,7 +34,7 @@ import linkifyMatrix from './linkify-matrix'; import SettingsStore from './settings/SettingsStore'; import { tryTransformPermalinkToLocalHref } from "./utils/permalinks/Permalinks"; import { getEmojiFromUnicode } from "./emoji"; -import ReplyThread from "./components/views/elements/ReplyThread"; +import ReplyChain from "./components/views/elements/ReplyChain"; import { mediaFromMxc } from "./customisations/Media"; linkifyMatrix(linkify); @@ -446,8 +446,8 @@ export function bodyToHtml(content: IContent, highlights: string[], opts: IOpts let formattedBody = typeof content.formatted_body === 'string' ? content.formatted_body : null; const plainBody = typeof content.body === 'string' ? content.body : ""; - if (opts.stripReplyFallback && formattedBody) formattedBody = ReplyThread.stripHTMLReply(formattedBody); - strippedBody = opts.stripReplyFallback ? ReplyThread.stripPlainReply(plainBody) : plainBody; + if (opts.stripReplyFallback && formattedBody) formattedBody = ReplyChain.stripHTMLReply(formattedBody); + strippedBody = opts.stripReplyFallback ? ReplyChain.stripPlainReply(plainBody) : plainBody; bodyHasEmoji = mightContainEmoji(isHtmlMessage ? formattedBody : plainBody); diff --git a/src/components/views/context_menus/MessageContextMenu.tsx b/src/components/views/context_menus/MessageContextMenu.tsx index 22dd3ac4387..7447b8e32a7 100644 --- a/src/components/views/context_menus/MessageContextMenu.tsx +++ b/src/components/views/context_menus/MessageContextMenu.tsx @@ -60,7 +60,7 @@ interface IProps extends IPosition { eventTileOps?: IEventTileOps; permalinkCreator?: RoomPermalinkCreator; /* an optional function to be called when the user clicks collapse thread, if not provided hide button */ - collapseReplyThread?(): void; + collapseReplyChain?(): void; /* callback called when the menu is dismissed */ onFinished(): void; /* if the menu is inside a dialog, we sometimes need to close that dialog after click (forwarding) */ @@ -203,8 +203,8 @@ export default class MessageContextMenu extends React.Component this.closeMenu(); }; - private onCollapseReplyThreadClick = (): void => { - this.props.collapseReplyThread(); + private onCollapseReplyChainClick = (): void => { + this.props.collapseReplyChain(); this.closeMenu(); }; @@ -240,7 +240,7 @@ export default class MessageContextMenu extends React.Component let unhidePreviewButton: JSX.Element; let externalURLButton: JSX.Element; let quoteButton: JSX.Element; - let collapseReplyThread: JSX.Element; + let collapseReplyChain: JSX.Element; let redactItemList: JSX.Element; // status is SENT before remote-echo, null after @@ -360,12 +360,12 @@ export default class MessageContextMenu extends React.Component ); } - if (this.props.collapseReplyThread) { - collapseReplyThread = ( + if (this.props.collapseReplyChain) { + collapseReplyChain = ( ); } @@ -392,7 +392,7 @@ export default class MessageContextMenu extends React.Component { unhidePreviewButton } { viewSourceButton } { resendReactionsButton } - { collapseReplyThread } + { collapseReplyChain } ); diff --git a/src/components/views/elements/ReplyThread.tsx b/src/components/views/elements/ReplyChain.tsx similarity index 92% rename from src/components/views/elements/ReplyThread.tsx rename to src/components/views/elements/ReplyChain.tsx index e0cca0c81ee..50efdc92fb5 100644 --- a/src/components/views/elements/ReplyThread.tsx +++ b/src/components/views/elements/ReplyChain.tsx @@ -46,7 +46,7 @@ const SHOW_EXPAND_QUOTE_PIXELS = 60; interface IProps { // the latest event in this chain of replies parentEv?: MatrixEvent; - // called when the ReplyThread contents has changed, including EventTiles thereof + // called when the ReplyChain contents has changed, including EventTiles thereof onHeightChanged: () => void; permalinkCreator: RoomPermalinkCreator; // Specifies which layout to use. @@ -72,8 +72,8 @@ interface IState { // This component does no cycle detection, simply because the only way to make such a cycle would be to // craft event_id's, using a homeserver that generates predictable event IDs; even then the impact would // be low as each event being loaded (after the first) is triggered by an explicit user action. -@replaceableComponent("views.elements.ReplyThread") -export default class ReplyThread extends React.Component { +@replaceableComponent("views.elements.ReplyChain") +export default class ReplyChain extends React.Component { static contextType = MatrixClientContext; private unmounted = false; private room: Room; @@ -253,8 +253,8 @@ export default class ReplyThread extends React.Component { return mixin; } - public static hasThreadReply(event: MatrixEvent) { - return Boolean(ReplyThread.getParentEventId(event)); + public static hasReply(event: MatrixEvent) { + return Boolean(ReplyChain.getParentEventId(event)); } componentDidMount() { @@ -288,7 +288,7 @@ export default class ReplyThread extends React.Component { private async initialize(): Promise { const { parentEv } = this.props; // at time of making this component we checked that props.parentEv has a parentEventId - const ev = await this.getEvent(ReplyThread.getParentEventId(parentEv)); + const ev = await this.getEvent(ReplyChain.getParentEventId(parentEv)); if (this.unmounted) return; @@ -306,7 +306,7 @@ export default class ReplyThread extends React.Component { private async getNextEvent(ev: MatrixEvent): Promise { try { - const inReplyToEventId = ReplyThread.getParentEventId(ev); + const inReplyToEventId = ReplyChain.getParentEventId(ev); return await this.getEvent(inReplyToEventId); } catch (e) { return null; @@ -354,15 +354,15 @@ export default class ReplyThread extends React.Component { dis.fire(Action.FocusSendMessageComposer); }; - private getReplyThreadColorClass(ev: MatrixEvent): string { - return getUserNameColorClass(ev.getSender()).replace("Username", "ReplyThread"); + private getReplyChainColorClass(ev: MatrixEvent): string { + return getUserNameColorClass(ev.getSender()).replace("Username", "ReplyChain"); } render() { let header = null; if (this.state.err) { - header =
      + header =
      { _t('Unable to load event that was replied to, ' + 'it either does not exist or you do not have permission to view it.') @@ -371,10 +371,10 @@ export default class ReplyThread extends React.Component { } else if (this.state.loadedEv) { const ev = this.state.loadedEv; const room = this.context.getRoom(ev.getRoomId()); - header =
      + header =
      { _t('In reply to ', {}, { - 'a': (sub) => { sub }, + 'a': (sub) => { sub }, 'pill': ( { }
      ; } else if (this.props.forExport) { - const eventId = ReplyThread.getParentEventId(this.props.parentEv); - header =

      + const eventId = ReplyChain.getParentEventId(this.props.parentEv); + header =

      { _t("In reply to this message", {}, { a: (sub) => ( @@ -404,12 +404,12 @@ export default class ReplyThread extends React.Component { const { isQuoteExpanded } = this.props; const evTiles = this.state.events.map((ev) => { const classname = classNames({ - 'mx_ReplyThread': true, - [this.getReplyThreadColorClass(ev)]: true, + 'mx_ReplyChain': true, + [this.getReplyChainColorClass(ev)]: true, // We don't want to add the class if it's undefined, it should only be expanded/collapsed when it's true/false - 'mx_ReplyThread--expanded': isQuoteExpanded === true, + 'mx_ReplyChain--expanded': isQuoteExpanded === true, // We don't want to add the class if it's undefined, it should only be expanded/collapsed when it's true/false - 'mx_ReplyThread--collapsed': isQuoteExpanded === false, + 'mx_ReplyChain--collapsed': isQuoteExpanded === false, }); return (

      @@ -423,7 +423,7 @@ export default class ReplyThread extends React.Component { ); }); - return
      + return
      { header }
      { evTiles }
      ; diff --git a/src/components/views/messages/MessageActionBar.tsx b/src/components/views/messages/MessageActionBar.tsx index 2246d2bacce..dffe8be7a61 100644 --- a/src/components/views/messages/MessageActionBar.tsx +++ b/src/components/views/messages/MessageActionBar.tsx @@ -41,19 +41,19 @@ import classNames from 'classnames'; import SettingsStore from '../../../settings/SettingsStore'; import { RoomPermalinkCreator } from '../../../utils/permalinks/Permalinks'; -import ReplyThread from '../elements/ReplyThread'; +import ReplyChain from '../elements/ReplyChain'; interface IOptionsButtonProps { mxEvent: MatrixEvent; // TODO: Types getTile: () => any | null; - getReplyThread: () => ReplyThread; + getReplyChain: () => ReplyChain; permalinkCreator: RoomPermalinkCreator; onFocusChange: (menuDisplayed: boolean) => void; } const OptionsButton: React.FC = - ({ mxEvent, getTile, getReplyThread, permalinkCreator, onFocusChange }) => { + ({ mxEvent, getTile, getReplyChain, permalinkCreator, onFocusChange }) => { const [menuDisplayed, button, openMenu, closeMenu] = useContextMenu(); const [onFocus, isActive, ref] = useRovingTabIndex(button); useEffect(() => { @@ -63,7 +63,7 @@ const OptionsButton: React.FC = let contextMenu; if (menuDisplayed) { const tile = getTile && getTile(); - const replyThread = getReplyThread && getReplyThread(); + const replyThread = getReplyChain && getReplyChain(); const buttonRect = button.current.getBoundingClientRect(); contextMenu = = mxEvent={mxEvent} permalinkCreator={permalinkCreator} eventTileOps={tile && tile.getEventTileOps ? tile.getEventTileOps() : undefined} - collapseReplyThread={replyThread && replyThread.canCollapse() ? replyThread.collapse : undefined} + collapseReplyChain={replyThread && replyThread.canCollapse() ? replyThread.collapse : undefined} onFinished={closeMenu} />; } @@ -133,7 +133,7 @@ interface IMessageActionBarProps { reactions?: Relations; // TODO: Types getTile: () => any | null; - getReplyThread: () => ReplyThread | undefined; + getReplyChain: () => ReplyChain | undefined; permalinkCreator?: RoomPermalinkCreator; onFocusChange?: (menuDisplayed: boolean) => void; toggleThreadExpanded: () => void; @@ -343,7 +343,7 @@ export default class MessageActionBar extends React.PureComponent { const content = mxEvent.getContent(); // only strip reply if this is the original replying event, edits thereafter do not have the fallback - const stripReply = !mxEvent.replacingEvent() && !!ReplyThread.getParentEventId(mxEvent); + const stripReply = !mxEvent.replacingEvent() && !!ReplyChain.getParentEventId(mxEvent); let body = HtmlUtils.bodyToHtml(content, this.props.highlights, { disableBigEmoji: content.msgtype === MsgType.Emote || !SettingsStore.getValue('TextualBody.enableBigEmoji'), diff --git a/src/components/views/rooms/EventTile.tsx b/src/components/views/rooms/EventTile.tsx index 8a50284a938..3e3ef902e36 100644 --- a/src/components/views/rooms/EventTile.tsx +++ b/src/components/views/rooms/EventTile.tsx @@ -23,7 +23,7 @@ import { Relations } from "matrix-js-sdk/src/models/relations"; import { RoomMember } from "matrix-js-sdk/src/models/room-member"; import { Thread, ThreadEvent } from 'matrix-js-sdk/src/models/thread'; -import ReplyThread from "../elements/ReplyThread"; +import ReplyChain from "../elements/ReplyChain"; import { _t } from '../../../languageHandler'; import { hasText } from "../../../TextForEvent"; import * as sdk from "../../../index"; @@ -337,7 +337,7 @@ export default class EventTile extends React.Component { private isListeningForReceipts: boolean; // TODO: Types private tile = React.createRef(); - private replyThread = React.createRef(); + private replyThread = React.createRef(); public readonly ref = createRef(); @@ -931,7 +931,7 @@ export default class EventTile extends React.Component { // TODO: Types getTile: () => any | null = () => this.tile.current; - getReplyThread = () => this.replyThread.current; + getReplyChain = () => this.replyThread.current; getReactions = () => { if ( @@ -1100,7 +1100,7 @@ export default class EventTile extends React.Component { reactions={this.state.reactions} permalinkCreator={this.props.permalinkCreator} getTile={this.getTile} - getReplyThread={this.getReplyThread} + getReplyChain={this.getReplyChain} onFocusChange={this.onActionBarFocusChange} isQuoteExpanded={isQuoteExpanded} toggleThreadExpanded={() => this.setQuoteExpanded(!isQuoteExpanded)} @@ -1281,8 +1281,8 @@ export default class EventTile extends React.Component { default: { const thread = haveTileForEvent(this.props.mxEvent) && - ReplyThread.hasThreadReply(this.props.mxEvent) ? ( - { }); const wrapper = await mountForwardDialog(replyMessage); - expect(wrapper.find("ReplyThread")).toBeTruthy(); + expect(wrapper.find("ReplyChain")).toBeTruthy(); }); it("disables buttons for rooms without send permissions", async () => { diff --git a/test/components/views/elements/ReplyThread-test.js b/test/components/views/elements/ReplyChain-test.js similarity index 93% rename from test/components/views/elements/ReplyThread-test.js rename to test/components/views/elements/ReplyChain-test.js index ee81c2f210c..35344929e47 100644 --- a/test/components/views/elements/ReplyThread-test.js +++ b/test/components/views/elements/ReplyChain-test.js @@ -1,8 +1,8 @@ import "../../../skinned-sdk"; import * as testUtils from '../../../test-utils'; -import ReplyThread from '../../../../src/components/views/elements/ReplyThread'; +import ReplyChain from '../../../../src/components/views/elements/ReplyChain'; -describe("ReplyThread", () => { +describe("ReplyChain", () => { describe('getParentEventId', () => { it('retrieves relation reply from unedited event', () => { const originalEventWithRelation = testUtils.mkEvent({ @@ -21,7 +21,7 @@ describe("ReplyThread", () => { room: "room_id", }); - expect(ReplyThread.getParentEventId(originalEventWithRelation)) + expect(ReplyChain.getParentEventId(originalEventWithRelation)) .toStrictEqual('$qkjmFBTEc0VvfVyzq1CJuh1QZi_xDIgNEFjZ4Pq34og'); }); @@ -65,7 +65,7 @@ describe("ReplyThread", () => { originalEventWithRelation.makeReplaced(editEvent); // The relation should be pulled from the original event - expect(ReplyThread.getParentEventId(originalEventWithRelation)) + expect(ReplyChain.getParentEventId(originalEventWithRelation)) .toStrictEqual('$qkjmFBTEc0VvfVyzq1CJuh1QZi_xDIgNEFjZ4Pq34og'); }); @@ -109,7 +109,7 @@ describe("ReplyThread", () => { originalEvent.makeReplaced(editEvent); // The relation should be pulled from the edit event - expect(ReplyThread.getParentEventId(originalEvent)) + expect(ReplyChain.getParentEventId(originalEvent)) .toStrictEqual('$qkjmFBTEc0VvfVyzq1CJuh1QZi_xDIgNEFjZ4Pq34og'); }); @@ -158,7 +158,7 @@ describe("ReplyThread", () => { originalEventWithRelation.makeReplaced(editEvent); // The relation should be pulled from the edit event - expect(ReplyThread.getParentEventId(originalEventWithRelation)).toStrictEqual('$999'); + expect(ReplyChain.getParentEventId(originalEventWithRelation)).toStrictEqual('$999'); }); it('able to clear relation reply from original event by providing empty relation field', () => { @@ -203,7 +203,7 @@ describe("ReplyThread", () => { originalEventWithRelation.makeReplaced(editEvent); // The relation should be pulled from the edit event - expect(ReplyThread.getParentEventId(originalEventWithRelation)).toStrictEqual(undefined); + expect(ReplyChain.getParentEventId(originalEventWithRelation)).toStrictEqual(undefined); }); }); }); From 2fb802eb9e76813d016f74d1b63d6577d545082c Mon Sep 17 00:00:00 2001 From: Rafael Goncalves Date: Fri, 15 Oct 2021 16:01:35 -0300 Subject: [PATCH 078/156] Move error message closer to password field Signed-off-by: Rafael Goncalves --- src/components/views/auth/InteractiveAuthEntryComponents.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/views/auth/InteractiveAuthEntryComponents.tsx b/src/components/views/auth/InteractiveAuthEntryComponents.tsx index 53eef7031c7..e6ded475d8a 100644 --- a/src/components/views/auth/InteractiveAuthEntryComponents.tsx +++ b/src/components/views/auth/InteractiveAuthEntryComponents.tsx @@ -175,11 +175,11 @@ export class PasswordAuthEntry extends React.Component + { errorSection }
      { submitButtonOrSpinner }
      - { errorSection }
      ); } From 7b893366f2957660706b8097f4a3050d44eddc12 Mon Sep 17 00:00:00 2001 From: CicadaCinema <52425971+CicadaCinema@users.noreply.github.com> Date: Sat, 16 Oct 2021 14:52:29 +0100 Subject: [PATCH 079/156] Add spacing to Room settings - Notifications subsection --- res/css/views/settings/_Notifications.scss | 4 ++++ .../tabs/room/NotificationSettingsTab.tsx | 16 ++++++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/res/css/views/settings/_Notifications.scss b/res/css/views/settings/_Notifications.scss index a0e46c00717..571d8141ec9 100644 --- a/res/css/views/settings/_Notifications.scss +++ b/res/css/views/settings/_Notifications.scss @@ -90,3 +90,7 @@ limitations under the License. margin-top: 35px; // lots of distance from the last line of the table } } + +.mx_AccessibleButton.mx_NotificationSound_browse { + margin-right: 10px; +} diff --git a/src/components/views/settings/tabs/room/NotificationSettingsTab.tsx b/src/components/views/settings/tabs/room/NotificationSettingsTab.tsx index 32453b5a259..ab4929a5c1e 100644 --- a/src/components/views/settings/tabs/room/NotificationSettingsTab.tsx +++ b/src/components/views/settings/tabs/room/NotificationSettingsTab.tsx @@ -158,18 +158,22 @@ export default class NotificationsSettingsTab extends React.Component { _t("Sounds") }
      - { _t("Notification sound") }: { this.state.currentSound }
      +
      + { _t("Notification sound") }: { this.state.currentSound } +
      { _t("Reset") }

      { _t("Set a new custom sound") }

      -
      - -
      - - { currentUploadedFile } +
      +
      + +
      + + { currentUploadedFile } +
      { _t("Browse") } From a9c9e5b778b4f46485f6b711418cd77f5ee0777c Mon Sep 17 00:00:00 2001 From: CicadaCinema <52425971+CicadaCinema@users.noreply.github.com> Date: Sat, 16 Oct 2021 14:58:10 +0100 Subject: [PATCH 080/156] appease the linter --- .../views/settings/tabs/room/NotificationSettingsTab.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/views/settings/tabs/room/NotificationSettingsTab.tsx b/src/components/views/settings/tabs/room/NotificationSettingsTab.tsx index ab4929a5c1e..3060d570a21 100644 --- a/src/components/views/settings/tabs/room/NotificationSettingsTab.tsx +++ b/src/components/views/settings/tabs/room/NotificationSettingsTab.tsx @@ -158,7 +158,7 @@ export default class NotificationsSettingsTab extends React.Component { _t("Sounds") }
      -
      +
      { _t("Notification sound") }: { this.state.currentSound }
      @@ -167,11 +167,11 @@ export default class NotificationsSettingsTab extends React.Component

      { _t("Set a new custom sound") }

      -
      +
      - + { currentUploadedFile }
      From 1691127ad243eccb11a4ed56779e15f2a8b3f4bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Sat, 16 Oct 2021 18:26:05 +0200 Subject: [PATCH 081/156] $field-focused-label-bg-color -> $background MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Šimon Brandner --- res/css/views/elements/_Field.scss | 4 ++-- res/themes/dark/css/_dark.scss | 2 -- res/themes/legacy-dark/css/_legacy-dark.scss | 2 +- res/themes/legacy-light/css/_legacy-light.scss | 2 -- res/themes/light-custom/css/_custom.scss | 1 - res/themes/light/css/_light.scss | 2 -- 6 files changed, 3 insertions(+), 10 deletions(-) diff --git a/res/css/views/elements/_Field.scss b/res/css/views/elements/_Field.scss index 37d335b76d5..7bbb91a066a 100644 --- a/res/css/views/elements/_Field.scss +++ b/res/css/views/elements/_Field.scss @@ -128,7 +128,7 @@ limitations under the License. font-size: $font-10px; transform: translateY(-13px); padding: 0 2px; - background-color: $field-focused-label-bg-color; + background-color: $background; pointer-events: initial; } @@ -144,7 +144,7 @@ limitations under the License. .mx_Field input:disabled + label, .mx_Field textarea:disabled, .mx_Field textarea:disabled + label { - background-color: $field-focused-label-bg-color; + background-color: $background; color: $greyed-fg-color; } diff --git a/res/themes/dark/css/_dark.scss b/res/themes/dark/css/_dark.scss index 75637455e47..f373585ff2f 100644 --- a/res/themes/dark/css/_dark.scss +++ b/res/themes/dark/css/_dark.scss @@ -71,8 +71,6 @@ $input-focused-border-color: #238cf5; $input-valid-border-color: $accent-color; $input-invalid-border-color: $warning-color; -$field-focused-label-bg-color: $background; - $resend-button-divider-color: #b9bec64a; // muted-text with a 4A opacity. // scrollbars diff --git a/res/themes/legacy-dark/css/_legacy-dark.scss b/res/themes/legacy-dark/css/_legacy-dark.scss index 778b7cc6d15..eaee1f4dcf7 100644 --- a/res/themes/legacy-dark/css/_legacy-dark.scss +++ b/res/themes/legacy-dark/css/_legacy-dark.scss @@ -64,7 +64,7 @@ $input-focused-border-color: #238cf5; $input-valid-border-color: $accent-color; $input-invalid-border-color: $warning-color; -$field-focused-label-bg-color: $bg-color; +$background: $bg-color; $resend-button-divider-color: $muted-fg-color; diff --git a/res/themes/legacy-light/css/_legacy-light.scss b/res/themes/legacy-light/css/_legacy-light.scss index fc625876f37..34b6bd6886b 100644 --- a/res/themes/legacy-light/css/_legacy-light.scss +++ b/res/themes/legacy-light/css/_legacy-light.scss @@ -95,8 +95,6 @@ $input-focused-border-color: #238cf5; $input-valid-border-color: $accent-color; $input-invalid-border-color: $warning-color; -$field-focused-label-bg-color: #ffffff; - $resend-button-divider-color: $input-darker-bg-color; $button-bg-color: $accent-color; diff --git a/res/themes/light-custom/css/_custom.scss b/res/themes/light-custom/css/_custom.scss index 99cfc4148b4..26a859635aa 100644 --- a/res/themes/light-custom/css/_custom.scss +++ b/res/themes/light-custom/css/_custom.scss @@ -52,7 +52,6 @@ $accent-color-50pct: var(--accent-color-50pct); //still needs alpha at .5 // --timeline-background-color $authpage-body-bg-color: var(--timeline-background-color); $button-secondary-bg-color: var(--timeline-background-color); -$field-focused-label-bg-color: var(--timeline-background-color); $lightbox-border-color: var(--timeline-background-color); $menu-bg-color: var(--timeline-background-color); $avatar-bg-color: var(--timeline-background-color); diff --git a/res/themes/light/css/_light.scss b/res/themes/light/css/_light.scss index d8088c99889..952bfd01538 100644 --- a/res/themes/light/css/_light.scss +++ b/res/themes/light/css/_light.scss @@ -101,8 +101,6 @@ $input-focused-border-color: #238cf5; $input-valid-border-color: $accent-color; $input-invalid-border-color: $warning-color; -$field-focused-label-bg-color: $background; - $button-bg-color: $accent-color; $button-fg-color: white; From 36531be8ca5fc79555be86cee39228d321e89041 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Sat, 16 Oct 2021 18:27:43 +0200 Subject: [PATCH 082/156] $roomtile-preview-color -> $secondary-content MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Šimon Brandner --- res/css/views/rooms/_RoomSublist.scss | 2 +- res/css/views/rooms/_RoomTile.scss | 2 +- res/themes/dark/css/_dark.scss | 1 - res/themes/legacy-dark/css/_legacy-dark.scss | 1 - res/themes/legacy-light/css/_legacy-light.scss | 1 - res/themes/light-custom/css/_custom.scss | 1 - res/themes/light/css/_light.scss | 1 - 7 files changed, 2 insertions(+), 7 deletions(-) diff --git a/res/css/views/rooms/_RoomSublist.scss b/res/css/views/rooms/_RoomSublist.scss index 0cf5f5a9e0c..58b94a614e3 100644 --- a/res/css/views/rooms/_RoomSublist.scss +++ b/res/css/views/rooms/_RoomSublist.scss @@ -236,7 +236,7 @@ limitations under the License. cursor: pointer; font-size: $font-13px; line-height: $font-18px; - color: $roomtile-preview-color; + color: $secondary-content; // Update the render() function for RoomSublist if these change // Update the ListLayout class for minVisibleTiles if these change. diff --git a/res/css/views/rooms/_RoomTile.scss b/res/css/views/rooms/_RoomTile.scss index 0ec0b3988e3..5cd75fd69ed 100644 --- a/res/css/views/rooms/_RoomTile.scss +++ b/res/css/views/rooms/_RoomTile.scss @@ -71,7 +71,7 @@ limitations under the License. .mx_RoomTile_messagePreview { font-size: $font-13px; line-height: $font-18px; - color: $roomtile-preview-color; + color: $secondary-content; } .mx_RoomTile_nameWithPreview { diff --git a/res/themes/dark/css/_dark.scss b/res/themes/dark/css/_dark.scss index f373585ff2f..0e30c273727 100644 --- a/res/themes/dark/css/_dark.scss +++ b/res/themes/dark/css/_dark.scss @@ -128,7 +128,6 @@ $roomsublist-skeleton-ui-bg: linear-gradient(180deg, #3e444c 0%, #3e444c00 100%) $groupFilterPanel-divider-color: $roomlist-header-color; -$roomtile-preview-color: $secondary-content; $roomtile-default-badge-bg-color: #61708b; // ******************** diff --git a/res/themes/legacy-dark/css/_legacy-dark.scss b/res/themes/legacy-dark/css/_legacy-dark.scss index eaee1f4dcf7..125484dfbc1 100644 --- a/res/themes/legacy-dark/css/_legacy-dark.scss +++ b/res/themes/legacy-dark/css/_legacy-dark.scss @@ -125,7 +125,6 @@ $roomsublist-skeleton-ui-bg: linear-gradient(180deg, #3e444c 0%, #3e444c00 100%) $groupFilterPanel-divider-color: $roomlist-header-color; -$roomtile-preview-color: #9e9e9e; $roomtile-default-badge-bg-color: #61708b; $roomtile-selected-bg-color: #1A1D23; diff --git a/res/themes/legacy-light/css/_legacy-light.scss b/res/themes/legacy-light/css/_legacy-light.scss index 34b6bd6886b..364f5ff3715 100644 --- a/res/themes/legacy-light/css/_legacy-light.scss +++ b/res/themes/legacy-light/css/_legacy-light.scss @@ -184,7 +184,6 @@ $roomsublist-skeleton-ui-bg: linear-gradient(180deg, #ffffff 0%, #ffffff00 100%) $groupFilterPanel-divider-color: $roomlist-header-color; -$roomtile-preview-color: #9e9e9e; $roomtile-default-badge-bg-color: #61708b; $roomtile-selected-bg-color: #fff; diff --git a/res/themes/light-custom/css/_custom.scss b/res/themes/light-custom/css/_custom.scss index 26a859635aa..5fedb480c33 100644 --- a/res/themes/light-custom/css/_custom.scss +++ b/res/themes/light-custom/css/_custom.scss @@ -102,7 +102,6 @@ $roomheader-color: var(--timeline-text-color); // was #232f32 $authpage-primary-color: var(--timeline-text-color); // --roomlist-text-secondary-color -$roomtile-preview-color: var(--roomlist-text-secondary-color); $roomlist-header-color: var(--roomlist-text-secondary-color); $roomtile-default-badge-bg-color: var(--roomlist-text-secondary-color); diff --git a/res/themes/light/css/_light.scss b/res/themes/light/css/_light.scss index 952bfd01538..483ac268425 100644 --- a/res/themes/light/css/_light.scss +++ b/res/themes/light/css/_light.scss @@ -190,7 +190,6 @@ $roomsublist-skeleton-ui-bg: linear-gradient(180deg, #ffffff 0%, #ffffff00 100%) $groupFilterPanel-divider-color: $roomlist-header-color; -$roomtile-preview-color: $secondary-content; $roomtile-default-badge-bg-color: #61708b; $presence-online: $accent-color; From 79efd61b66725bad2b25c3cbc3fcd8c5cca428e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Sat, 16 Oct 2021 18:30:04 +0200 Subject: [PATCH 083/156] $roomsublist-divider-color -> $primary-content MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Šimon Brandner --- res/css/views/rooms/_RoomSublist.scss | 2 +- res/themes/dark/css/_dark.scss | 1 - res/themes/legacy-dark/css/_legacy-dark.scss | 3 --- res/themes/legacy-light/css/_legacy-light.scss | 1 - res/themes/light-custom/css/_custom.scss | 1 - res/themes/light/css/_light.scss | 1 - 6 files changed, 1 insertion(+), 8 deletions(-) diff --git a/res/css/views/rooms/_RoomSublist.scss b/res/css/views/rooms/_RoomSublist.scss index 58b94a614e3..70c9296dbcf 100644 --- a/res/css/views/rooms/_RoomSublist.scss +++ b/res/css/views/rooms/_RoomSublist.scss @@ -368,7 +368,7 @@ limitations under the License. margin-top: 16px; margin-bottom: 16px; margin-right: 16px; // additional 16px - border: 1px solid $roomsublist-divider-color; + border: 1px solid $primary-content; opacity: 0.1; } diff --git a/res/themes/dark/css/_dark.scss b/res/themes/dark/css/_dark.scss index 0e30c273727..ff718af5126 100644 --- a/res/themes/dark/css/_dark.scss +++ b/res/themes/dark/css/_dark.scss @@ -123,7 +123,6 @@ $theme-button-bg-color: #e3e8f0; $roomlist-button-bg-color: rgba(141, 151, 165, 0.2); // Buttons include the filter box, explore button, and sublist buttons $roomlist-bg-color: rgba(33, 38, 44, 0.90); $roomlist-header-color: $tertiary-content; -$roomsublist-divider-color: $primary-content; $roomsublist-skeleton-ui-bg: linear-gradient(180deg, #3e444c 0%, #3e444c00 100%); $groupFilterPanel-divider-color: $roomlist-header-color; diff --git a/res/themes/legacy-dark/css/_legacy-dark.scss b/res/themes/legacy-dark/css/_legacy-dark.scss index 125484dfbc1..55fdb8c977b 100644 --- a/res/themes/legacy-dark/css/_legacy-dark.scss +++ b/res/themes/legacy-dark/css/_legacy-dark.scss @@ -64,8 +64,6 @@ $input-focused-border-color: #238cf5; $input-valid-border-color: $accent-color; $input-invalid-border-color: $warning-color; -$background: $bg-color; - $resend-button-divider-color: $muted-fg-color; // scrollbars @@ -120,7 +118,6 @@ $roomlist-button-bg-color: #1A1D23; // Buttons include the filter box, explore b $roomlist-filter-active-bg-color: $roomlist-button-bg-color; $roomlist-bg-color: $header-panel-bg-color; -$roomsublist-divider-color: $primary-fg-color; $roomsublist-skeleton-ui-bg: linear-gradient(180deg, #3e444c 0%, #3e444c00 100%); $groupFilterPanel-divider-color: $roomlist-header-color; diff --git a/res/themes/legacy-light/css/_legacy-light.scss b/res/themes/legacy-light/css/_legacy-light.scss index 364f5ff3715..3065f7cf0eb 100644 --- a/res/themes/legacy-light/css/_legacy-light.scss +++ b/res/themes/legacy-light/css/_legacy-light.scss @@ -179,7 +179,6 @@ $roomlist-button-bg-color: #fff; // Buttons include the filter box, explore butt $roomlist-filter-active-bg-color: $roomlist-button-bg-color; $roomlist-bg-color: $header-panel-bg-color; $roomlist-header-color: $primary-fg-color; -$roomsublist-divider-color: $primary-fg-color; $roomsublist-skeleton-ui-bg: linear-gradient(180deg, #ffffff 0%, #ffffff00 100%); $groupFilterPanel-divider-color: $roomlist-header-color; diff --git a/res/themes/light-custom/css/_custom.scss b/res/themes/light-custom/css/_custom.scss index 5fedb480c33..dcdc834f1a3 100644 --- a/res/themes/light-custom/css/_custom.scss +++ b/res/themes/light-custom/css/_custom.scss @@ -110,7 +110,6 @@ $roomtile-default-badge-bg-color: var(--roomlist-text-secondary-color); $input-darker-bg-color: var(--roomlist-separator-color); $panel-divider-color: var(--roomlist-separator-color);// originally #dee1f3, but close enough $primary-hairline-color: var(--roomlist-separator-color);// originally #e5e5e5, but close enough -$roomsublist-divider-color: var(--roomlist-separator-color); // // --timeline-text-secondary-color $authpage-secondary-color: var(--timeline-text-secondary-color); diff --git a/res/themes/light/css/_light.scss b/res/themes/light/css/_light.scss index 483ac268425..1f7bfef33d0 100644 --- a/res/themes/light/css/_light.scss +++ b/res/themes/light/css/_light.scss @@ -185,7 +185,6 @@ $theme-button-bg-color: $quinary-content; $roomlist-button-bg-color: rgba(141, 151, 165, 0.2); // Buttons include the filter box, explore button, and sublist buttons $roomlist-bg-color: rgba(245, 245, 245, 0.90); $roomlist-header-color: $tertiary-content; -$roomsublist-divider-color: $primary-content; $roomsublist-skeleton-ui-bg: linear-gradient(180deg, #ffffff 0%, #ffffff00 100%); $groupFilterPanel-divider-color: $roomlist-header-color; From ca6ed648117c0b297da50cd784afaf7b93666f31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Sat, 16 Oct 2021 18:31:18 +0200 Subject: [PATCH 084/156] $roomlist-header-color -> $tertiary-content MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Šimon Brandner --- res/css/structures/_LeftPanelWidget.scss | 4 ++-- res/css/structures/_SpacePanel.scss | 4 ++-- res/css/views/rooms/_RoomSublist.scss | 6 +++--- res/themes/dark/css/_dark.scss | 5 ++--- res/themes/legacy-dark/css/_legacy-dark.scss | 2 +- res/themes/legacy-light/css/_legacy-light.scss | 2 +- res/themes/light-custom/css/_custom.scss | 1 - res/themes/light/css/_light.scss | 5 ++--- 8 files changed, 13 insertions(+), 16 deletions(-) diff --git a/res/css/structures/_LeftPanelWidget.scss b/res/css/structures/_LeftPanelWidget.scss index 93c2898395b..bb04b856245 100644 --- a/res/css/structures/_LeftPanelWidget.scss +++ b/res/css/structures/_LeftPanelWidget.scss @@ -24,7 +24,7 @@ limitations under the License. align-items: center; height: 24px; - color: $roomlist-header-color; + color: $tertiary-content; margin-top: 4px; .mx_LeftPanelWidget_stickable { @@ -62,7 +62,7 @@ limitations under the License. mask-position: center; mask-size: contain; mask-repeat: no-repeat; - background-color: $roomlist-header-color; + background-color: $tertiary-content; mask-image: url('$(res)/img/feather-customised/chevron-down.svg'); } diff --git a/res/css/structures/_SpacePanel.scss b/res/css/structures/_SpacePanel.scss index 149436960ed..c9e88d43424 100644 --- a/res/css/structures/_SpacePanel.scss +++ b/res/css/structures/_SpacePanel.scss @@ -49,7 +49,7 @@ $activeBorderColor: $secondary-content; mask-repeat: no-repeat; margin-left: $gutterSize; margin-bottom: 12px; - background-color: $roomlist-header-color; + background-color: $tertiary-content; mask-image: url('$(res)/img/element-icons/expand-space-panel.svg'); &.expanded { @@ -170,7 +170,7 @@ $activeBorderColor: $secondary-content; mask-position: center; mask-size: 20px; mask-repeat: no-repeat; - background-color: $roomlist-header-color; + background-color: $tertiary-content; mask-image: url('$(res)/img/feather-customised/chevron-down.svg'); } diff --git a/res/css/views/rooms/_RoomSublist.scss b/res/css/views/rooms/_RoomSublist.scss index 70c9296dbcf..011824d9d40 100644 --- a/res/css/views/rooms/_RoomSublist.scss +++ b/res/css/views/rooms/_RoomSublist.scss @@ -48,7 +48,7 @@ limitations under the License. // to work correctly. padding-bottom: 8px; height: 24px; - color: $roomlist-header-color; + color: $tertiary-content; .mx_RoomSublist_stickable { flex: 1; @@ -165,7 +165,7 @@ limitations under the License. mask-position: center; mask-size: contain; mask-repeat: no-repeat; - background-color: $roomlist-header-color; + background-color: $tertiary-content; mask-image: url('$(res)/img/feather-customised/chevron-down.svg'); } @@ -256,7 +256,7 @@ limitations under the License. mask-position: center; mask-size: contain; mask-repeat: no-repeat; - background: $roomlist-header-color; + background: $tertiary-content; left: -1px; // adjust for image position } diff --git a/res/themes/dark/css/_dark.scss b/res/themes/dark/css/_dark.scss index ff718af5126..dbfa53a7294 100644 --- a/res/themes/dark/css/_dark.scss +++ b/res/themes/dark/css/_dark.scss @@ -122,16 +122,15 @@ $theme-button-bg-color: #e3e8f0; $roomlist-button-bg-color: rgba(141, 151, 165, 0.2); // Buttons include the filter box, explore button, and sublist buttons $roomlist-bg-color: rgba(33, 38, 44, 0.90); -$roomlist-header-color: $tertiary-content; $roomsublist-skeleton-ui-bg: linear-gradient(180deg, #3e444c 0%, #3e444c00 100%); -$groupFilterPanel-divider-color: $roomlist-header-color; +$groupFilterPanel-divider-color: $tertiary-content; $roomtile-default-badge-bg-color: #61708b; // ******************** -$notice-secondary-color: $roomlist-header-color; +$notice-secondary-color: $tertiary-content; $panel-divider-color: transparent; diff --git a/res/themes/legacy-dark/css/_legacy-dark.scss b/res/themes/legacy-dark/css/_legacy-dark.scss index 55fdb8c977b..ce8a800d4b1 100644 --- a/res/themes/legacy-dark/css/_legacy-dark.scss +++ b/res/themes/legacy-dark/css/_legacy-dark.scss @@ -120,7 +120,7 @@ $roomlist-bg-color: $header-panel-bg-color; $roomsublist-skeleton-ui-bg: linear-gradient(180deg, #3e444c 0%, #3e444c00 100%); -$groupFilterPanel-divider-color: $roomlist-header-color; +$groupFilterPanel-divider-color: $tertiary-content; $roomtile-default-badge-bg-color: #61708b; $roomtile-selected-bg-color: #1A1D23; diff --git a/res/themes/legacy-light/css/_legacy-light.scss b/res/themes/legacy-light/css/_legacy-light.scss index 3065f7cf0eb..4b8a9abc16a 100644 --- a/res/themes/legacy-light/css/_legacy-light.scss +++ b/res/themes/legacy-light/css/_legacy-light.scss @@ -181,7 +181,7 @@ $roomlist-bg-color: $header-panel-bg-color; $roomlist-header-color: $primary-fg-color; $roomsublist-skeleton-ui-bg: linear-gradient(180deg, #ffffff 0%, #ffffff00 100%); -$groupFilterPanel-divider-color: $roomlist-header-color; +$groupFilterPanel-divider-color: $tertiary-content; $roomtile-default-badge-bg-color: #61708b; $roomtile-selected-bg-color: #fff; diff --git a/res/themes/light-custom/css/_custom.scss b/res/themes/light-custom/css/_custom.scss index dcdc834f1a3..f34e1d1191f 100644 --- a/res/themes/light-custom/css/_custom.scss +++ b/res/themes/light-custom/css/_custom.scss @@ -102,7 +102,6 @@ $roomheader-color: var(--timeline-text-color); // was #232f32 $authpage-primary-color: var(--timeline-text-color); // --roomlist-text-secondary-color -$roomlist-header-color: var(--roomlist-text-secondary-color); $roomtile-default-badge-bg-color: var(--roomlist-text-secondary-color); // diff --git a/res/themes/light/css/_light.scss b/res/themes/light/css/_light.scss index 1f7bfef33d0..d3b56a47b37 100644 --- a/res/themes/light/css/_light.scss +++ b/res/themes/light/css/_light.scss @@ -184,10 +184,9 @@ $theme-button-bg-color: $quinary-content; $roomlist-button-bg-color: rgba(141, 151, 165, 0.2); // Buttons include the filter box, explore button, and sublist buttons $roomlist-bg-color: rgba(245, 245, 245, 0.90); -$roomlist-header-color: $tertiary-content; $roomsublist-skeleton-ui-bg: linear-gradient(180deg, #ffffff 0%, #ffffff00 100%); -$groupFilterPanel-divider-color: $roomlist-header-color; +$groupFilterPanel-divider-color: $tertiary-content; $roomtile-default-badge-bg-color: #61708b; @@ -206,7 +205,7 @@ $username-variant6-color: #2dc2c5; $username-variant7-color: #5c56f5; $username-variant8-color: #74d12c; -$notice-secondary-color: $roomlist-header-color; +$notice-secondary-color: $tertiary-content; $panel-divider-color: transparent; From 0794be1e9818354e3357d0e6a09bb927a7e22404 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Sat, 16 Oct 2021 19:54:00 +0200 Subject: [PATCH 085/156] $notice-secondary-color -> $tertiary-content MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Šimon Brandner --- res/css/structures/auth/_CompleteSecurity.scss | 2 +- res/css/views/dialogs/_NewSessionReviewDialog.scss | 2 +- res/css/views/messages/_common_CryptoEvent.scss | 2 +- res/css/views/right_panel/_UserInfo.scss | 2 +- res/css/views/rooms/_EntityTile.scss | 2 +- res/themes/dark/css/_dark.scss | 2 -- res/themes/legacy-light/css/_legacy-light.scss | 3 +-- res/themes/light-custom/css/_custom.scss | 1 - res/themes/light/css/_light.scss | 4 +--- 9 files changed, 7 insertions(+), 13 deletions(-) diff --git a/res/css/structures/auth/_CompleteSecurity.scss b/res/css/structures/auth/_CompleteSecurity.scss index 566507211c3..2c45069cfe1 100644 --- a/res/css/structures/auth/_CompleteSecurity.scss +++ b/res/css/structures/auth/_CompleteSecurity.scss @@ -51,7 +51,7 @@ limitations under the License. } .mx_CompleteSecurity_waiting { - color: $notice-secondary-color; + color: $tertiary-content; } .mx_CompleteSecurity_actionRow { diff --git a/res/css/views/dialogs/_NewSessionReviewDialog.scss b/res/css/views/dialogs/_NewSessionReviewDialog.scss index b35c570c804..0016b5b91ba 100644 --- a/res/css/views/dialogs/_NewSessionReviewDialog.scss +++ b/res/css/views/dialogs/_NewSessionReviewDialog.scss @@ -33,5 +33,5 @@ limitations under the License. .mx_NewSessionReviewDialog_deviceID { font-size: $font-12px; - color: $notice-secondary-color; + color: $tertiary-content; } diff --git a/res/css/views/messages/_common_CryptoEvent.scss b/res/css/views/messages/_common_CryptoEvent.scss index afaed50fa4f..b400a933aec 100644 --- a/res/css/views/messages/_common_CryptoEvent.scss +++ b/res/css/views/messages/_common_CryptoEvent.scss @@ -56,7 +56,7 @@ limitations under the License. padding: 10px 20px; margin: auto 0; text-align: center; - color: $notice-secondary-color; + color: $tertiary-content; overflow-wrap: break-word; font-size: $font-12px; } diff --git a/res/css/views/right_panel/_UserInfo.scss b/res/css/views/right_panel/_UserInfo.scss index edc82cfdbf1..9a09d96bc96 100644 --- a/res/css/views/right_panel/_UserInfo.scss +++ b/res/css/views/right_panel/_UserInfo.scss @@ -122,7 +122,7 @@ limitations under the License. h3 { text-transform: uppercase; - color: $notice-secondary-color; + color: $tertiary-content; font-weight: 600; font-size: $font-12px; margin: 4px 0; diff --git a/res/css/views/rooms/_EntityTile.scss b/res/css/views/rooms/_EntityTile.scss index a2ebd6c11b2..23a5ffc99f5 100644 --- a/res/css/views/rooms/_EntityTile.scss +++ b/res/css/views/rooms/_EntityTile.scss @@ -122,7 +122,7 @@ limitations under the License. .mx_EntityTile_power { padding-inline-start: 6px; font-size: $font-10px; - color: $notice-secondary-color; + color: $tertiary-content; max-width: 6em; overflow: hidden; text-overflow: ellipsis; diff --git a/res/themes/dark/css/_dark.scss b/res/themes/dark/css/_dark.scss index dbfa53a7294..b0c1474c25e 100644 --- a/res/themes/dark/css/_dark.scss +++ b/res/themes/dark/css/_dark.scss @@ -130,8 +130,6 @@ $roomtile-default-badge-bg-color: #61708b; // ******************** -$notice-secondary-color: $tertiary-content; - $panel-divider-color: transparent; $widget-menu-bar-bg-color: $header-panel-bg-color; diff --git a/res/themes/legacy-light/css/_legacy-light.scss b/res/themes/legacy-light/css/_legacy-light.scss index 4b8a9abc16a..f3c9f7229f5 100644 --- a/res/themes/legacy-light/css/_legacy-light.scss +++ b/res/themes/legacy-light/css/_legacy-light.scss @@ -18,7 +18,6 @@ $accent-color: #03b381; $accent-bg-color: rgba(3, 179, 129, 0.16); $notice-primary-color: #ff4b55; $notice-primary-bg-color: rgba(255, 75, 85, 0.16); -$notice-secondary-color: #61708b; $header-panel-bg-color: #f3f8fd; // typical text (dark-on-white in light skin) @@ -55,7 +54,7 @@ $other-user-pill-bg-color: rgba(0, 0, 0, 0.1); // pinned events indicator $pinned-unread-color: $notice-primary-color; -$pinned-color: $notice-secondary-color; +$pinned-color: $tertiary-content; // informational plinth $info-plinth-bg-color: #f7f7f7; diff --git a/res/themes/light-custom/css/_custom.scss b/res/themes/light-custom/css/_custom.scss index f34e1d1191f..2fbb91c5236 100644 --- a/res/themes/light-custom/css/_custom.scss +++ b/res/themes/light-custom/css/_custom.scss @@ -113,7 +113,6 @@ $primary-hairline-color: var(--roomlist-separator-color);// originally #e5e5e5, // --timeline-text-secondary-color $authpage-secondary-color: var(--timeline-text-secondary-color); $memberstatus-placeholder-color: var(--timeline-text-secondary-color); -$notice-secondary-color: var(--timeline-text-secondary-color); $pinned-color: var(--timeline-text-secondary-color); $settings-subsection-fg-color: var(--timeline-text-secondary-color); $roomheader-addroom-bg-color: var(--timeline-text-secondary-color); diff --git a/res/themes/light/css/_light.scss b/res/themes/light/css/_light.scss index d3b56a47b37..a6286005691 100644 --- a/res/themes/light/css/_light.scss +++ b/res/themes/light/css/_light.scss @@ -205,13 +205,11 @@ $username-variant6-color: #2dc2c5; $username-variant7-color: #5c56f5; $username-variant8-color: #74d12c; -$notice-secondary-color: $tertiary-content; - $panel-divider-color: transparent; // pinned events indicator $pinned-unread-color: $notice-primary-color; -$pinned-color: $notice-secondary-color; +$pinned-color: $tertiary-content; // ******************** From ee7c1265960bd3edd2683b0b502ff6443502b1c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Sat, 16 Oct 2021 19:55:17 +0200 Subject: [PATCH 086/156] $groupFilterPanel-divider-color -> $tertiary-content MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Šimon Brandner --- res/css/structures/_GroupFilterPanel.scss | 2 +- res/themes/dark/css/_dark.scss | 2 -- res/themes/light/css/_light.scss | 2 -- 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/res/css/structures/_GroupFilterPanel.scss b/res/css/structures/_GroupFilterPanel.scss index ceea20ed790..a101aba7e5a 100644 --- a/res/css/structures/_GroupFilterPanel.scss +++ b/res/css/structures/_GroupFilterPanel.scss @@ -51,7 +51,7 @@ $groupFilterPanelWidth: 56px; // only applies in this file, used for calculation height: 0px; width: 90%; border: none; - border-bottom: 1px solid $groupFilterPanel-divider-color; + border-bottom: 1px solid $tertiary-content; } .mx_GroupFilterPanel .mx_GroupFilterPanel_scroller { diff --git a/res/themes/dark/css/_dark.scss b/res/themes/dark/css/_dark.scss index b0c1474c25e..eed7ffc6778 100644 --- a/res/themes/dark/css/_dark.scss +++ b/res/themes/dark/css/_dark.scss @@ -124,8 +124,6 @@ $roomlist-button-bg-color: rgba(141, 151, 165, 0.2); // Buttons include the filt $roomlist-bg-color: rgba(33, 38, 44, 0.90); $roomsublist-skeleton-ui-bg: linear-gradient(180deg, #3e444c 0%, #3e444c00 100%); -$groupFilterPanel-divider-color: $tertiary-content; - $roomtile-default-badge-bg-color: #61708b; // ******************** diff --git a/res/themes/light/css/_light.scss b/res/themes/light/css/_light.scss index a6286005691..66b77e2fee1 100644 --- a/res/themes/light/css/_light.scss +++ b/res/themes/light/css/_light.scss @@ -186,8 +186,6 @@ $roomlist-button-bg-color: rgba(141, 151, 165, 0.2); // Buttons include the filt $roomlist-bg-color: rgba(245, 245, 245, 0.90); $roomsublist-skeleton-ui-bg: linear-gradient(180deg, #ffffff 0%, #ffffff00 100%); -$groupFilterPanel-divider-color: $tertiary-content; - $roomtile-default-badge-bg-color: #61708b; $presence-online: $accent-color; From 707f0c6bc9bfff9b99ba2e17ee214da40bdb4059 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Sat, 16 Oct 2021 20:28:01 +0200 Subject: [PATCH 087/156] $voice-playback-button-fg-color -> $secondary-content MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Šimon Brandner --- res/css/views/audio_messages/_PlayPauseButton.scss | 2 +- res/themes/dark/css/_dark.scss | 1 - res/themes/legacy-dark/css/_legacy-dark.scss | 1 - res/themes/legacy-light/css/_legacy-light.scss | 1 - res/themes/light/css/_light.scss | 1 - 5 files changed, 1 insertion(+), 5 deletions(-) diff --git a/res/css/views/audio_messages/_PlayPauseButton.scss b/res/css/views/audio_messages/_PlayPauseButton.scss index 714da3e6053..0de839d6f6a 100644 --- a/res/css/views/audio_messages/_PlayPauseButton.scss +++ b/res/css/views/audio_messages/_PlayPauseButton.scss @@ -26,7 +26,7 @@ limitations under the License. &::before { content: ''; position: absolute; // sizing varies by icon - background-color: $voice-playback-button-fg-color; + background-color: $secondary-content; mask-repeat: no-repeat; mask-size: contain; } diff --git a/res/themes/dark/css/_dark.scss b/res/themes/dark/css/_dark.scss index eed7ffc6778..5c73f12454f 100644 --- a/res/themes/dark/css/_dark.scss +++ b/res/themes/dark/css/_dark.scss @@ -200,7 +200,6 @@ $voice-record-stop-border-color: $quaternary-content; $voice-record-waveform-incomplete-fg-color: $quaternary-content; $voice-record-icon-color: $quaternary-content; $voice-playback-button-bg-color: $system; -$voice-playback-button-fg-color: $secondary-content; // Appearance tab colors $appearance-tab-border-color: $room-highlight-color; diff --git a/res/themes/legacy-dark/css/_legacy-dark.scss b/res/themes/legacy-dark/css/_legacy-dark.scss index ce8a800d4b1..46efe256389 100644 --- a/res/themes/legacy-dark/css/_legacy-dark.scss +++ b/res/themes/legacy-dark/css/_legacy-dark.scss @@ -197,7 +197,6 @@ $voice-record-stop-border-color: #6F7882; $voice-record-waveform-incomplete-fg-color: #6F7882; $voice-record-icon-color: #6F7882; $voice-playback-button-bg-color: $tertiary-fg-color; -$voice-playback-button-fg-color: #21262C; // Appearance tab colors $appearance-tab-border-color: $room-highlight-color; diff --git a/res/themes/legacy-light/css/_legacy-light.scss b/res/themes/legacy-light/css/_legacy-light.scss index f3c9f7229f5..eba7264ce05 100644 --- a/res/themes/legacy-light/css/_legacy-light.scss +++ b/res/themes/legacy-light/css/_legacy-light.scss @@ -336,7 +336,6 @@ $voice-record-stop-border-color: #E3E8F0; $voice-record-waveform-incomplete-fg-color: #C1C6CD; $voice-record-icon-color: $tertiary-fg-color; $voice-playback-button-bg-color: $system; -$voice-playback-button-fg-color: $secondary-content; // FontSlider colors $appearance-tab-border-color: $input-darker-bg-color; diff --git a/res/themes/light/css/_light.scss b/res/themes/light/css/_light.scss index 66b77e2fee1..9465dd29adf 100644 --- a/res/themes/light/css/_light.scss +++ b/res/themes/light/css/_light.scss @@ -325,7 +325,6 @@ $voice-record-stop-border-color: $quinary-content; $voice-record-waveform-incomplete-fg-color: $quaternary-content; $voice-record-icon-color: $tertiary-content; $voice-playback-button-bg-color: $system; -$voice-playback-button-fg-color: $secondary-content; // FontSlider colors $appearance-tab-border-color: $input-darker-bg-color; From aad4e6f312b4b9ef2f12d48bc4a585248940672c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Sat, 16 Oct 2021 20:29:03 +0200 Subject: [PATCH 088/156] $voice-playback-button-bg-color -> $system MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Šimon Brandner --- res/css/views/audio_messages/_PlayPauseButton.scss | 2 +- res/themes/dark/css/_dark.scss | 1 - res/themes/legacy-dark/css/_legacy-dark.scss | 1 - res/themes/legacy-light/css/_legacy-light.scss | 1 - res/themes/light/css/_light.scss | 1 - 5 files changed, 1 insertion(+), 5 deletions(-) diff --git a/res/css/views/audio_messages/_PlayPauseButton.scss b/res/css/views/audio_messages/_PlayPauseButton.scss index 0de839d6f6a..9548b62dfda 100644 --- a/res/css/views/audio_messages/_PlayPauseButton.scss +++ b/res/css/views/audio_messages/_PlayPauseButton.scss @@ -21,7 +21,7 @@ limitations under the License. min-width: 32px; // for when the button is used in a flexbox min-height: 32px; // for when the button is used in a flexbox border-radius: 32px; - background-color: $voice-playback-button-bg-color; + background-color: $system; &::before { content: ''; diff --git a/res/themes/dark/css/_dark.scss b/res/themes/dark/css/_dark.scss index 5c73f12454f..0cb624d0818 100644 --- a/res/themes/dark/css/_dark.scss +++ b/res/themes/dark/css/_dark.scss @@ -199,7 +199,6 @@ $breadcrumb-placeholder-bg-color: #272c35; $voice-record-stop-border-color: $quaternary-content; $voice-record-waveform-incomplete-fg-color: $quaternary-content; $voice-record-icon-color: $quaternary-content; -$voice-playback-button-bg-color: $system; // Appearance tab colors $appearance-tab-border-color: $room-highlight-color; diff --git a/res/themes/legacy-dark/css/_legacy-dark.scss b/res/themes/legacy-dark/css/_legacy-dark.scss index 46efe256389..4c457183e5b 100644 --- a/res/themes/legacy-dark/css/_legacy-dark.scss +++ b/res/themes/legacy-dark/css/_legacy-dark.scss @@ -196,7 +196,6 @@ $breadcrumb-placeholder-bg-color: #272c35; $voice-record-stop-border-color: #6F7882; $voice-record-waveform-incomplete-fg-color: #6F7882; $voice-record-icon-color: #6F7882; -$voice-playback-button-bg-color: $tertiary-fg-color; // Appearance tab colors $appearance-tab-border-color: $room-highlight-color; diff --git a/res/themes/legacy-light/css/_legacy-light.scss b/res/themes/legacy-light/css/_legacy-light.scss index eba7264ce05..792d256a9de 100644 --- a/res/themes/legacy-light/css/_legacy-light.scss +++ b/res/themes/legacy-light/css/_legacy-light.scss @@ -335,7 +335,6 @@ $voice-record-live-circle-color: #ff4b55; $voice-record-stop-border-color: #E3E8F0; $voice-record-waveform-incomplete-fg-color: #C1C6CD; $voice-record-icon-color: $tertiary-fg-color; -$voice-playback-button-bg-color: $system; // FontSlider colors $appearance-tab-border-color: $input-darker-bg-color; diff --git a/res/themes/light/css/_light.scss b/res/themes/light/css/_light.scss index 9465dd29adf..9f8275da086 100644 --- a/res/themes/light/css/_light.scss +++ b/res/themes/light/css/_light.scss @@ -324,7 +324,6 @@ $voice-record-live-circle-color: #ff4b55; $voice-record-stop-border-color: $quinary-content; $voice-record-waveform-incomplete-fg-color: $quaternary-content; $voice-record-icon-color: $tertiary-content; -$voice-playback-button-bg-color: $system; // FontSlider colors $appearance-tab-border-color: $input-darker-bg-color; From a3cde0e5e6cc920654e812361e7c83f5d16aa72f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Sat, 16 Oct 2021 20:34:24 +0200 Subject: [PATCH 089/156] $voice-record-waveform-incomplete-fg-color -> $quaternary-content MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Šimon Brandner --- res/css/views/audio_messages/_PlaybackContainer.scss | 2 +- res/themes/dark/css/_dark.scss | 1 - res/themes/legacy-dark/css/_legacy-dark.scss | 1 - res/themes/legacy-light/css/_legacy-light.scss | 1 - res/themes/light/css/_light.scss | 1 - 5 files changed, 1 insertion(+), 5 deletions(-) diff --git a/res/css/views/audio_messages/_PlaybackContainer.scss b/res/css/views/audio_messages/_PlaybackContainer.scss index 3886e385834..408a2953893 100644 --- a/res/css/views/audio_messages/_PlaybackContainer.scss +++ b/res/css/views/audio_messages/_PlaybackContainer.scss @@ -31,7 +31,7 @@ limitations under the License. .mx_Waveform { .mx_Waveform_bar { - background-color: $voice-record-waveform-incomplete-fg-color; + background-color: $quaternary-content; height: 100%; /* Variable set by a JS component */ transform: scaleY(max(0.05, var(--barHeight))); diff --git a/res/themes/dark/css/_dark.scss b/res/themes/dark/css/_dark.scss index 0cb624d0818..ca06d38b1f3 100644 --- a/res/themes/dark/css/_dark.scss +++ b/res/themes/dark/css/_dark.scss @@ -197,7 +197,6 @@ $tooltip-timeline-fg-color: $primary-content; $breadcrumb-placeholder-bg-color: #272c35; $voice-record-stop-border-color: $quaternary-content; -$voice-record-waveform-incomplete-fg-color: $quaternary-content; $voice-record-icon-color: $quaternary-content; // Appearance tab colors diff --git a/res/themes/legacy-dark/css/_legacy-dark.scss b/res/themes/legacy-dark/css/_legacy-dark.scss index 4c457183e5b..15c9652af8a 100644 --- a/res/themes/legacy-dark/css/_legacy-dark.scss +++ b/res/themes/legacy-dark/css/_legacy-dark.scss @@ -194,7 +194,6 @@ $breadcrumb-placeholder-bg-color: #272c35; // See non-legacy dark for variable information $voice-record-stop-border-color: #6F7882; -$voice-record-waveform-incomplete-fg-color: #6F7882; $voice-record-icon-color: #6F7882; // Appearance tab colors diff --git a/res/themes/legacy-light/css/_legacy-light.scss b/res/themes/legacy-light/css/_legacy-light.scss index 792d256a9de..682bebc4a63 100644 --- a/res/themes/legacy-light/css/_legacy-light.scss +++ b/res/themes/legacy-light/css/_legacy-light.scss @@ -333,7 +333,6 @@ $breadcrumb-placeholder-bg-color: #e8eef5; $voice-record-stop-symbol-color: #ff4b55; $voice-record-live-circle-color: #ff4b55; $voice-record-stop-border-color: #E3E8F0; -$voice-record-waveform-incomplete-fg-color: #C1C6CD; $voice-record-icon-color: $tertiary-fg-color; // FontSlider colors diff --git a/res/themes/light/css/_light.scss b/res/themes/light/css/_light.scss index 9f8275da086..1733831b951 100644 --- a/res/themes/light/css/_light.scss +++ b/res/themes/light/css/_light.scss @@ -322,7 +322,6 @@ $voice-record-stop-symbol-color: #ff4b55; $voice-record-live-circle-color: #ff4b55; $voice-record-stop-border-color: $quinary-content; -$voice-record-waveform-incomplete-fg-color: $quaternary-content; $voice-record-icon-color: $tertiary-content; // FontSlider colors From 6693ec340101c3912f6095dcb5efef950e155e06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Sat, 16 Oct 2021 20:54:23 +0200 Subject: [PATCH 090/156] Reorder things to make it work MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Šimon Brandner --- res/themes/legacy-dark/css/_legacy-dark.scss | 20 +++++++++---------- .../legacy-light/css/_legacy-light.scss | 12 +++++------ 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/res/themes/legacy-dark/css/_legacy-dark.scss b/res/themes/legacy-dark/css/_legacy-dark.scss index 15c9652af8a..b27b7f920ba 100644 --- a/res/themes/legacy-dark/css/_legacy-dark.scss +++ b/res/themes/legacy-dark/css/_legacy-dark.scss @@ -109,6 +109,16 @@ $roomtopic-color: $text-secondary-color; $header-divider-color: $header-panel-text-primary-color; $composer-e2e-icon-color: $header-panel-text-primary-color; +// Legacy theme backports +$primary-content: $primary-fg-color; +$secondary-content: $secondary-fg-color; +$tertiary-content: $tertiary-fg-color; +$quaternary-content: #6F7882; +$quinary-content: $quaternary-content; +$background: $primary-bg-color; +$panel-actions: $roomtile-selected-bg-color; +// Legacy theme backports + // ******************** $theme-button-bg-color: #e3e8f0; @@ -208,16 +218,6 @@ $eventbubble-bg-hover: #1C2026; $eventbubble-avatar-outline: $bg-color; $eventbubble-reply-color: #C1C6CD; -// Legacy theme backports -$primary-content: $primary-fg-color; -$secondary-content: $secondary-fg-color; -$tertiary-content: $tertiary-fg-color; -$quaternary-content: #6F7882; -$quinary-content: $quaternary-content; -$background: $primary-bg-color; -$panel-actions: $roomtile-selected-bg-color; -// Legacy theme backports - // ***** Mixins! ***** @define-mixin mx_DialogButton { diff --git a/res/themes/legacy-light/css/_legacy-light.scss b/res/themes/legacy-light/css/_legacy-light.scss index 682bebc4a63..09dd46d1511 100644 --- a/res/themes/legacy-light/css/_legacy-light.scss +++ b/res/themes/legacy-light/css/_legacy-light.scss @@ -52,10 +52,6 @@ $info-bg-color: #2a9edf; $mention-user-pill-bg-color: $warning-color; $other-user-pill-bg-color: rgba(0, 0, 0, 0.1); -// pinned events indicator -$pinned-unread-color: $notice-primary-color; -$pinned-color: $tertiary-content; - // informational plinth $info-plinth-bg-color: #f7f7f7; $info-plinth-fg-color: #888; @@ -180,8 +176,6 @@ $roomlist-bg-color: $header-panel-bg-color; $roomlist-header-color: $primary-fg-color; $roomsublist-skeleton-ui-bg: linear-gradient(180deg, #ffffff 0%, #ffffff00 100%); -$groupFilterPanel-divider-color: $tertiary-content; - $roomtile-default-badge-bg-color: #61708b; $roomtile-selected-bg-color: #fff; @@ -347,6 +341,12 @@ $eventbubble-bg-hover: #FAFBFD; $eventbubble-avatar-outline: #fff; $eventbubble-reply-color: #C1C6CD; +// pinned events indicator +$pinned-unread-color: $notice-primary-color; +$pinned-color: $tertiary-content; + +$groupFilterPanel-divider-color: $tertiary-content; + // ***** Mixins! ***** @define-mixin mx_DialogButton { From 459f3661cf79bf4a6145efc04b08dffdc712b4dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Sat, 16 Oct 2021 20:56:02 +0200 Subject: [PATCH 091/156] Add a few fallback colors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Šimon Brandner --- res/themes/legacy-dark/css/_legacy-dark.scss | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/res/themes/legacy-dark/css/_legacy-dark.scss b/res/themes/legacy-dark/css/_legacy-dark.scss index b27b7f920ba..0fe9f22dde8 100644 --- a/res/themes/legacy-dark/css/_legacy-dark.scss +++ b/res/themes/legacy-dark/css/_legacy-dark.scss @@ -110,13 +110,23 @@ $header-divider-color: $header-panel-text-primary-color; $composer-e2e-icon-color: $header-panel-text-primary-color; // Legacy theme backports +$accent: #0DBD8B; +$alert: #FF5B55; +$links: #0086e6; $primary-content: $primary-fg-color; $secondary-content: $secondary-fg-color; $tertiary-content: $tertiary-fg-color; $quaternary-content: #6F7882; $quinary-content: $quaternary-content; +$system: #21262C; $background: $primary-bg-color; +$panels: rgba($system, 0.9); +$panel-base: #8D97A5; // This color is not intended for use in the app +$panel-selected: rgba($panel-base, 0.3); +$panel-hover: rgba($panel-base, 0.1); $panel-actions: $roomtile-selected-bg-color; +$space-nav: rgba($panel-base, 0.1); + // Legacy theme backports // ******************** From 1935620e4367d67c3a06c59022ce6bdbbc0981f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Sun, 17 Oct 2021 09:40:42 +0200 Subject: [PATCH 092/156] Convert emoticon to emoji at the end of a line on send even if the cursor isn't there MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Šimon Brandner --- src/components/views/rooms/SendMessageComposer.tsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/components/views/rooms/SendMessageComposer.tsx b/src/components/views/rooms/SendMessageComposer.tsx index f35cba3cb93..536c6dbe844 100644 --- a/src/components/views/rooms/SendMessageComposer.tsx +++ b/src/components/views/rooms/SendMessageComposer.tsx @@ -57,6 +57,7 @@ import QuestionDialog from "../dialogs/QuestionDialog"; import { ActionPayload } from "../../../dispatcher/payloads"; import { decorateStartSendingTime, sendRoundTripMetric } from "../../../sendTimePerformanceMetrics"; import RoomContext from '../../../contexts/RoomContext'; +import DocumentPosition from "../../../editor/position"; function addReplyToMessageContent( content: IContent, @@ -391,9 +392,12 @@ export class SendMessageComposer extends React.Component Date: Sun, 17 Oct 2021 21:24:01 +0000 Subject: [PATCH 093/156] Translated using Weblate (Spanish) Currently translated at 100.0% (3231 of 3231 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/es/ --- src/i18n/strings/es.json | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/es.json b/src/i18n/strings/es.json index c8a28079dfe..ee910cca97b 100644 --- a/src/i18n/strings/es.json +++ b/src/i18n/strings/es.json @@ -3217,5 +3217,34 @@ "Creating Space...": "Creando el espacio…", "Fetching data...": "Pidiendo los datos…", "To proceed, please accept the verification request on your other login.": "Antes de continuar, acepta la solicitud de verificación en algún otro sitio donde tengas tu sesión iniciada, por favor.", - "Number of messages can only be a number between %(min)s and %(max)s": "El número de mensajes solo puede ser de %(min)s a %(max)s" + "Number of messages can only be a number between %(min)s and %(max)s": "El número de mensajes solo puede ser de %(min)s a %(max)s", + "They won't be able to access whatever you're not an admin of.": "No podrán acceder a donde no tengas permisos de administración.", + "Show:": "Mostrar:", + "Shows all threads from current room": "Muestra todos los hilos de la sala actual", + "All threads": "Todos los hilos", + "Shows all threads you’ve participated in": "Muestra todos los hilos en los que has participado", + "My threads": "Mis hilos", + "Downloading": "Descargando", + "Unban them from specific things I'm able to": "Quitar veto de algunos sitios donde tenga los permisos suficientes", + "Ban them from specific things I'm able to": "Vetar de algunos sitios donde tenga los permisos suficientes", + "Ban them from everything I'm able to": "Vetar de todos los sitios donde tenga los permisos suficientes", + "Unban them from everything I'm able to": "Quitar veto de todos los sitios donde tenga los permisos suficientes", + "Ban from %(roomName)s": "Vetar de %(roomName)s", + "Unban from %(roomName)s": "Quitar veto de %(roomName)s", + "They'll still be able to access whatever you're not an admin of.": "Podrán seguir accediendo a donde no tengas permisos de administración.", + "Kick them from specific things I'm able to": "Echar de alguna sala en concreto donde tenga los permisos suficientes", + "Kick them from everything I'm able to": "Echar de todas las salas donde tenga los permisos suficientes", + "Kick from %(roomName)s": "Echar de %(roomName)s", + "Disinvite from %(roomName)s": "Anular la invitación a %(roomName)s", + "Threads": "Hilos", + "Create poll": "Crear una encuesta", + "%(count)s reply|one": "%(count)s respuesta", + "%(count)s reply|other": "%(count)s respuestas", + "Updating spaces... (%(progress)s out of %(count)s)|one": "Actualizando espacio…", + "Updating spaces... (%(progress)s out of %(count)s)|other": "Actualizando espacios… (%(progress)s de %(count)s)", + "Sending invites... (%(progress)s out of %(count)s)|one": "Enviando invitación…", + "Sending invites... (%(progress)s out of %(count)s)|other": "Enviando invitaciones… (%(progress)s de %(count)s)", + "Loading new room": "Cargando la nueva sala", + "Upgrading room": "Actualizar sala", + "Polls (under active development)": "Encuestas (en construcción)" } From 6076d65181c11f91f1c293078d0986759d5bcd6f Mon Sep 17 00:00:00 2001 From: Szimszon Date: Sat, 16 Oct 2021 09:36:27 +0000 Subject: [PATCH 094/156] Translated using Weblate (Hungarian) Currently translated at 100.0% (3231 of 3231 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/hu/ --- src/i18n/strings/hu.json | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/hu.json b/src/i18n/strings/hu.json index 092624355ec..2cc9735ae05 100644 --- a/src/i18n/strings/hu.json +++ b/src/i18n/strings/hu.json @@ -3225,5 +3225,26 @@ "Sending invites... (%(progress)s out of %(count)s)|one": "Meghívók küldése…", "Sending invites... (%(progress)s out of %(count)s)|other": "Meghívók küldése… (%(progress)s / %(count)s)", "Loading new room": "Új szoba betöltése", - "Upgrading room": "Szoba fejlesztése" + "Upgrading room": "Szoba fejlesztése", + "Show:": "Mutat:", + "Shows all threads from current room": "Minden üzenetszál megjelenítése a szobából", + "All threads": "Minden üzenetszál", + "Shows all threads you’ve participated in": "Minden üzenetszál megjelenítése ahol szerepel", + "My threads": "Üzenetszálak", + "Downloading": "Letöltés", + "They won't be able to access whatever you're not an admin of.": "Később nem férhetnek hozzá olyan helyekhez ahol ön nem adminisztrátor.", + "Ban them from specific things I'm able to": "Kitiltani őket bizonyos helyekről ahonnan joga van hozzá", + "Unban them from specific things I'm able to": "Kitiltásuk visszavonása bizonyos helyekről ahol joga van hozzá", + "Ban them from everything I'm able to": "Kitiltani őket mindenhonnan ahonnan joga van hozzá", + "Unban them from everything I'm able to": "Kitiltásuk visszavonása mindenhonnan ahol joga van hozzá", + "Ban from %(roomName)s": "Kitiltás innen: %(roomName)s", + "Unban from %(roomName)s": "Kitiltás visszavonása innen: %(roomName)s", + "Kick from %(roomName)s": "Kirúg innen: %(roomName)s", + "Disinvite from %(roomName)s": "Meghívó visszavonása innen: %(roomName)s", + "They'll still be able to access whatever you're not an admin of.": "Továbbra is hozzáférhetnek olyan helyekhez ahol ön nem adminisztrátor.", + "Kick them from specific things I'm able to": "Kirúgni őket bizonyos helyekről ahonnan joga van hozzá", + "Kick them from everything I'm able to": "Kirúgni őket mindenhonnan ahonnan joga van hozzá", + "Threads": "Üzenetszálak", + "%(count)s reply|one": "%(count)s válasz", + "%(count)s reply|other": "%(count)s válasz" } From a8df63230519e73045496a6b329465cfa2dd888e Mon Sep 17 00:00:00 2001 From: Nikita Epifanov Date: Fri, 15 Oct 2021 19:32:56 +0000 Subject: [PATCH 095/156] Translated using Weblate (Russian) Currently translated at 97.8% (3163 of 3231 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/ru/ --- src/i18n/strings/ru.json | 39 ++++++++++++++++++++++++++++++--------- 1 file changed, 30 insertions(+), 9 deletions(-) diff --git a/src/i18n/strings/ru.json b/src/i18n/strings/ru.json index f31217997e2..752f6e23db6 100644 --- a/src/i18n/strings/ru.json +++ b/src/i18n/strings/ru.json @@ -2746,7 +2746,7 @@ "Not a valid identity server (status code %(code)s)": "Неправильный Сервер идентификации (код статуса %(code)s)", "Identity server URL must be HTTPS": "URL-адрес сервера идентификации должен быть HTTPS", "Consulting with %(transferTarget)s. Transfer to %(transferee)s": "Общение с %(transferTarget)s. Перевод на %(transferee)s", - "[number]": "[номер]", + "[number]": "[цифра]", "Enter your Security Phrase a second time to confirm it.": "Введите секретную фразу второй раз, чтобы подтвердить ее.", "Space Autocomplete": "Автозаполнение пространства", "Without verifying, you won’t have access to all your messages and may appear as untrusted to others.": "Без проверки вы не сможете получить доступ ко всем своим сообщениям и можете показаться другим людям недоверенным.", @@ -2793,7 +2793,7 @@ "Manage & explore rooms": "Управление и список комнат", "Add space": "Добавить простанство", "Report": "Сообщить", - "Collapse reply thread": "Свернуть ответы", + "Collapse reply thread": "Свернуть ответы ветки", "Show preview": "Предпросмотр", "View source": "Исходный код", "Forward": "Переслать", @@ -3216,15 +3216,36 @@ "Fetching data...": "Получение данных…", "Create poll": "Создать опрос", "Polls (under active development)": "Опросы (в стадии активной разработки)", - "Thread": "Статьи", - "Show threads": "Показать статьи", - "Reply to thread…": "Ответить на тему…", - "Reply to encrypted thread…": "Ответить на зашифрованный поток…", - "Updating spaces... (%(progress)s out of %(count)s)|one": "Обновление пространств...", + "Thread": "Ветка", + "Show threads": "Показать ветки", + "Reply to thread…": "Ответить на ветку…", + "Reply to encrypted thread…": "Ответить на зашифрованную ветку…", + "Updating spaces... (%(progress)s out of %(count)s)|one": "Обновление пространства…", "Updating spaces... (%(progress)s out of %(count)s)|other": "Обновление пространств... (%(progress)s из %(count)s)", - "Sending invites... (%(progress)s out of %(count)s)|one": "Отправка приглашений...", + "Sending invites... (%(progress)s out of %(count)s)|one": "Отправка приглашения…", "Sending invites... (%(progress)s out of %(count)s)|other": "Отправка приглашений... (%(progress)s из %(count)s)", "Loading new room": "Загрузка новой комнаты", "Upgrading room": "Обновление комнаты", - "Threaded messaging": "Потоковая передача сообщений" + "Threaded messaging": "Сообщение в ветке", + "Ban from %(roomName)s": "Заблокировать в %(roomName)s", + "Unban from %(roomName)s": "Разблокировать в %(roomName)s", + "Show:": "Показать:", + "They won't be able to access whatever you're not an admin of.": "Они не смогут получить доступ к тем местам, где вы не являетесь администратором.", + "Ban them from specific things I'm able to": "Заблокировать их в определённых местах, где я могу это сделать", + "Unban them from specific things I'm able to": "Разблокировать их из определённых мест, где я могу это сделать", + "Ban them from everything I'm able to": "Заблокировать их везде, где я могу это сделать", + "Unban them from everything I'm able to": "Разблокировать их везде, где я могу это сделать", + "Kick them from specific things I'm able to": "Выгнать их из определенных мест, где я могу это сделать", + "Kick them from everything I'm able to": "Выгнать их из любого места, где я могу это сделать", + "Shows all threads from current room": "Показывает все ветки из текущей комнаты", + "All threads": "Все ветки", + "Shows all threads you’ve participated in": "Показывает все ветки, в которых вы принимали участие", + "My threads": "Мои ветки", + "Downloading": "Загрузка", + "They'll still be able to access whatever you're not an admin of.": "Они по-прежнему смогут получить доступ ко всему, где вы не являетесь администратором.", + "Kick from %(roomName)s": "Выгнать из %(roomName)s", + "Disinvite from %(roomName)s": "Отменить приглашение из %(roomName)s", + "Threads": "Ветки", + "%(count)s reply|one": "%(count)s ответ", + "%(count)s reply|other": "%(count)s ответов" } From 84baafd4bf199060af30c7fb0a0514f8ba663c5a Mon Sep 17 00:00:00 2001 From: joshua Date: Sun, 17 Oct 2021 10:19:56 +0000 Subject: [PATCH 096/156] Translated using Weblate (Swedish) Currently translated at 97.9% (3165 of 3231 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/sv/ --- src/i18n/strings/sv.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/i18n/strings/sv.json b/src/i18n/strings/sv.json index 30c418f140f..c7d97b59157 100644 --- a/src/i18n/strings/sv.json +++ b/src/i18n/strings/sv.json @@ -427,7 +427,7 @@ "File to import": "Fil att importera", "Which officially provided instance you are using, if any": "Vilken officiellt tillhandahållen instans du använder, om någon", "Drop file here to upload": "Släpp en fil här för att ladda upp", - "Options": "Alternativ", + "Options": "Inställningar", "Replying": "Svarar", "Kick this user?": "Kicka användaren?", "This room": "Detta rum", From 91ecde9a20f825eebc01c0262df42d87de043ead Mon Sep 17 00:00:00 2001 From: LinAGKar Date: Fri, 15 Oct 2021 18:54:52 +0000 Subject: [PATCH 097/156] Translated using Weblate (Swedish) Currently translated at 97.9% (3165 of 3231 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/sv/ --- src/i18n/strings/sv.json | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/sv.json b/src/i18n/strings/sv.json index c7d97b59157..e81fa23f317 100644 --- a/src/i18n/strings/sv.json +++ b/src/i18n/strings/sv.json @@ -3167,5 +3167,18 @@ "Don't leave any rooms": "Lämna inga rum", "%(senderDisplayName)s sent a sticker.": "%(senderDisplayName)s skickade en dekal.", "%(senderDisplayName)s changed the room avatar.": "%(senderDisplayName)s bytte rummets avatar.", - "%(date)s at %(time)s": "%(date)s vid %(time)s" + "%(date)s at %(time)s": "%(date)s vid %(time)s", + "Error fetching file": "Fel vid hämtning av fil", + "Topic: %(topic)s": "Ämne: %(topic)s", + "This is the start of export of . Exported by at %(exportDate)s.": "Det här är början på exporten av . Exporterad av vid %(exportDate)s.", + "%(creatorName)s created this room.": "%(creatorName)s skapade det här rummet.", + "Media omitted - file size limit exceeded": "Media uteslutet - filstorleksgräns överskriden", + "Media omitted": "Media uteslutet", + "Current Timeline": "Nuvarande tidslinje", + "Specify a number of messages": "Specificera ett antal meddelanden", + "From the beginning": "Från början", + "Plain Text": "Vanlig text", + "JSON": "JSON", + "HTML": "HTML", + "Are you sure you want to exit during this export?": "Är du säker på att du vill avsluta under den här exporten?" } From 9fc43b3037dbf65dcef4f9617cc6a31e62f1106c Mon Sep 17 00:00:00 2001 From: Jeff Huang Date: Mon, 18 Oct 2021 01:58:41 +0000 Subject: [PATCH 098/156] Translated using Weblate (Chinese (Traditional)) Currently translated at 100.0% (3231 of 3231 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/zh_Hant/ --- src/i18n/strings/zh_Hant.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/zh_Hant.json b/src/i18n/strings/zh_Hant.json index 39fb1a9ca49..20abf4a36d8 100644 --- a/src/i18n/strings/zh_Hant.json +++ b/src/i18n/strings/zh_Hant.json @@ -3246,5 +3246,8 @@ "Sending invites... (%(progress)s out of %(count)s)|one": "正在傳送邀請……", "Sending invites... (%(progress)s out of %(count)s)|other": "正在傳送邀請……(%(count)s 中的第 %(progress)s 個)", "Loading new room": "正在載入新的聊天室", - "Upgrading room": "正在升級聊天室" + "Upgrading room": "正在升級聊天室", + "Downloading": "正在下載", + "%(count)s reply|one": "%(count)s 回覆", + "%(count)s reply|other": "%(count)s 回覆" } From f9ae5d0adb9b60e137502524c44f1c381a6f4d29 Mon Sep 17 00:00:00 2001 From: Imre Kristoffer Eilertsen Date: Fri, 15 Oct 2021 22:18:19 +0000 Subject: [PATCH 099/156] =?UTF-8?q?Translated=20using=20Weblate=20(Norwegi?= =?UTF-8?q?an=20Bokm=C3=A5l)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently translated at 55.6% (1798 of 3231 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/nb_NO/ --- src/i18n/strings/nb_NO.json | 79 ++++++++++++++++++++++++++++++++++++- 1 file changed, 78 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/nb_NO.json b/src/i18n/strings/nb_NO.json index 93fe437e3d2..648b9fd7b33 100644 --- a/src/i18n/strings/nb_NO.json +++ b/src/i18n/strings/nb_NO.json @@ -1735,5 +1735,82 @@ "Use an integration manager (%(serverName)s) to manage bots, widgets, and sticker packs.": "Bruk en integreringsbehandler (%(serverName)s) til å behandle botter, moduler, og klistremerkepakker.", "Identity server": "Identitetstjener", "Identity server (%(server)s)": "Identitetstjener (%(server)s)", - "Could not connect to identity server": "Kunne ikke koble til identitetsserveren" + "Could not connect to identity server": "Kunne ikke koble til identitetsserveren", + "Show:": "Vis:", + "Results": "Resultat", + "Retry all": "Prøv alle igjen", + "Play": "Spill av", + "Pause": "Pause", + "Beta": "Beta", + "Move down": "Gå ned", + "Move up": "Gå opp", + "Report": "Rapporter", + "Forward": "Videresend", + "Forward message": "Videresend melding", + "Open link": "Åpne lenken", + "Sent": "Sendt", + "Sending": "Sender", + "Format": "Format", + "Stop": "Stopp avspilling", + "MB": "MB", + "Zoom in": "Forstørr", + "Zoom out": "Forminske", + "Add reaction": "Legg til reaksjon", + "Image": "Bilde", + "Sticker": "Klistremerke", + "Thread": "Tråd", + "Downloading": "Laster ned", + "Connection failed": "Tilkobling mislyktes", + "Message": "Melding", + "Threads": "Tråder", + "Send a sticker": "Send et klistremerke", + "Keyboard shortcuts": "Tastatursnarveier", + "Global": "Globalt", + "Keyword": "Nøkkelord", + "IRC": "IRC", + "Collapse": "Trekk sammen", + "Expand": "Utvid", + "Visibility": "Synlighet", + "Address": "Adresse", + "Delete avatar": "Slett profilbilde", + "Corn": "Mais", + "Cloud": "Sky", + "Mute the microphone": "Demp mikrofonen", + "Unmute the microphone": "Opphev demping av mikrofonen", + "Dialpad": "Nummerpanel", + "More": "Mer", + "Stop the camera": "Stopp kameraet", + "Start the camera": "Start kameraet", + "Connecting": "Kobler til", + "Plain Text": "Ren tekst", + "JSON": "JSON", + "HTML": "HTML", + "Change the name of this room": "Endre rommets navn", + "%(senderDisplayName)s changed guest access to %(rule)s": "%(senderDisplayName)s endret gjestetilgangen til %(rule)s", + "%(senderDisplayName)s made the room invite only.": "%(senderDisplayName)s merket rommet som kun for inviterte.", + "%(senderDisplayName)s changed the room avatar.": "%(senderDisplayName)s endret rommets avatar.", + "%(senderName)s kicked %(targetName)s": "%(senderName)s sparket ut %(targetName)s", + "%(senderName)s kicked %(targetName)s: %(reason)s": "%(senderName)s sparket ut %(targetName)s: %(reason)s", + "%(senderName)s withdrew %(targetName)s's invitation: %(reason)s": "%(senderName)s trakk tilbake invitasjonen til %(targetName)s: %(reason)s", + "%(senderName)s unbanned %(targetName)s": "%(senderName)s opphevde bannlysningen av %(targetName)s", + "%(targetName)s left the room": "%(targetName)s forlot rommet", + "%(targetName)s left the room: %(reason)s": "%(targetName)s forlot rommet: %(reason)s", + "%(targetName)s rejected the invitation": "%(targetName)s avslo invitasjonen", + "%(targetName)s joined the room": "%(targetName)s ble med i rommet", + "%(senderName)s made no change": "%(senderName)s gjorde ingen endringer", + "%(senderName)s set a profile picture": "%(senderName)s valgte seg et profilbilde", + "%(senderName)s changed their profile picture": "%(senderName)s endret profilbildet sitt", + "%(senderName)s removed their profile picture": "%(senderName)s fjernet profilbildet sitt", + "%(senderName)s removed their display name (%(oldDisplayName)s)": "%(senderName)s fjernet visningsnavnet sitt (%(oldDisplayName)s)", + "%(senderName)s set their display name to %(displayName)s": "%(senderName)s satte visningsnavnet sitt til %(displayName)s", + "%(oldDisplayName)s changed their display name to %(displayName)s": "%(oldDisplayName)s endret visningsnavnet sitt til %(displayName)s", + "%(senderName)s banned %(targetName)s": "%(senderName)s bannlyste %(targetName)s", + "%(senderName)s banned %(targetName)s: %(reason)s": "%(senderName)s bannlyste %(targetName)s: %(reason)s", + "%(senderName)s invited %(targetName)s": "%(senderName)s inviterte %(targetName)s", + "%(targetName)s accepted an invitation": "%(targetName)s aksepterte en invitasjon", + "%(targetName)s accepted the invitation for %(displayName)s": "%(targetName)s aksepterte invitasjonen til %(displayName)s", + "St. Pierre & Miquelon": "Saint-Pierre og Miquelon", + "St. Martin": "Saint Martin", + "St. Barthélemy": "Saint Barthélemy", + "%(date)s at %(time)s": "%(date)s klokken %(time)s" } From 2f8642928fe6413ffaf005c21c816b1a6422c8ea Mon Sep 17 00:00:00 2001 From: waclaw66 Date: Mon, 18 Oct 2021 05:12:34 +0000 Subject: [PATCH 100/156] Translated using Weblate (Czech) Currently translated at 100.0% (3231 of 3231 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/cs/ --- src/i18n/strings/cs.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/cs.json b/src/i18n/strings/cs.json index 6c3d57a235c..bfda5a542f9 100644 --- a/src/i18n/strings/cs.json +++ b/src/i18n/strings/cs.json @@ -3247,5 +3247,7 @@ "Loading new room": "Načítání nové místnosti", "Upgrading room": "Upgrade místnosti", "Polls (under active development)": "Ankety (v aktivním vývoji)", - "Downloading": "Stahování" + "Downloading": "Stahování", + "%(count)s reply|one": "%(count)s odpověď", + "%(count)s reply|other": "%(count)s odpovědí" } From efbf686526d94e34493734d82392b284761b591f Mon Sep 17 00:00:00 2001 From: XoseM Date: Sat, 16 Oct 2021 04:23:35 +0000 Subject: [PATCH 101/156] Translated using Weblate (Galician) Currently translated at 100.0% (3231 of 3231 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/gl/ --- src/i18n/strings/gl.json | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/gl.json b/src/i18n/strings/gl.json index 38493e76a12..1b38af30aba 100644 --- a/src/i18n/strings/gl.json +++ b/src/i18n/strings/gl.json @@ -3217,5 +3217,34 @@ "Are you sure you want to exit during this export?": "Tes a certeza de querer saír durante esta exportación?", "%(senderDisplayName)s sent a sticker.": "%(senderDisplayName)s enviou un adhesivo.", "%(senderDisplayName)s changed the room avatar.": "%(senderDisplayName)s cambiou o avatar da sala.", - "%(date)s at %(time)s": "%(date)s ás %(time)s" + "%(date)s at %(time)s": "%(date)s ás %(time)s", + "Show:": "Mostrar:", + "Shows all threads from current room": "Mostra tódalas conversas da sala actual", + "All threads": "Tódalas conversas", + "Shows all threads you’ve participated in": "Mostra tódalas conversas nas que participaches", + "My threads": "As miñas conversas", + "Downloading": "Descargando", + "They won't be able to access whatever you're not an admin of.": "Non poderán acceder a calquera lugar no que non sexas administradora.", + "Ban them from specific things I'm able to": "Vetalos en lugares específicos nos que eu poida", + "Unban them from specific things I'm able to": "Retirar o veto de lugares específicos que eu poida", + "Ban them from everything I'm able to": "Vetalos en tódolos sitios nos que eu poida", + "Unban them from everything I'm able to": "Devolverlle o acceso a tódolos sitios onde eu poida", + "Ban from %(roomName)s": "Vetar en %(roomName)s", + "Unban from %(roomName)s": "Permitir acceso a %(roomName)s", + "They'll still be able to access whatever you're not an admin of.": "Poderán seguir accedendo a sitios onde ti non es administradora.", + "Kick them from specific things I'm able to": "Expulsalos de sitios específicos que eu poida", + "Kick them from everything I'm able to": "Expulsalos de todos os lugares que eu poida", + "Kick from %(roomName)s": "Expulsar de %(roomName)s", + "Disinvite from %(roomName)s": "Retirar o convite para %(roomName)s", + "Threads": "Conversas", + "Create poll": "Crear enquisa", + "%(count)s reply|one": "%(count)s resposta", + "%(count)s reply|other": "%(count)s respostas", + "Updating spaces... (%(progress)s out of %(count)s)|one": "Actualizando espazo...", + "Updating spaces... (%(progress)s out of %(count)s)|other": "Actualizando espazos... (%(progress)s de %(count)s)", + "Sending invites... (%(progress)s out of %(count)s)|one": "Enviando convite...", + "Sending invites... (%(progress)s out of %(count)s)|other": "Enviando convites... (%(progress)s de %(count)s)", + "Loading new room": "Cargando nova sala", + "Upgrading room": "Actualizando sala", + "Polls (under active development)": "Enquisas (en desenvolvemento activo)" } From b8a9afcbeebe39d83511e836fabc2063a4c9303c Mon Sep 17 00:00:00 2001 From: Besnik Bleta Date: Sun, 17 Oct 2021 08:51:32 +0000 Subject: [PATCH 102/156] Translated using Weblate (Albanian) Currently translated at 99.7% (3223 of 3231 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/sq/ --- src/i18n/strings/sq.json | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/src/i18n/strings/sq.json b/src/i18n/strings/sq.json index f9ed14aae75..ade819129dd 100644 --- a/src/i18n/strings/sq.json +++ b/src/i18n/strings/sq.json @@ -3204,7 +3204,7 @@ "Verify with another login": "Verifikoje nga tjetër skenë hyrjesh", "Verify with Security Key": "Verifikoje me Kyç Sigurie", "Verify with Security Key or Phrase": "Verifikojeni me Kyç ose Frazë Sigurie", - "It looks like you don't have a Security Key or any other devices you can verify against. This device will not be able to access old encrypted messages. In order to verify your identity on this device, you'll need to reset your verification keys.": "Duket sikur s’keni Kyç Sigurie ose ndonjë pajisje tjetër nga e cila mund të bëni sërish verifikimin. Kjo pajisje s’do të jetë në gjendje të hyjë te mesazhe të dikurshëm të fshehtëzuar. Që të mund të verifikohet identiteti juaj në këtë pajisje, you'll need to reset your verification keys.", + "It looks like you don't have a Security Key or any other devices you can verify against. This device will not be able to access old encrypted messages. In order to verify your identity on this device, you'll need to reset your verification keys.": "Duket sikur s’keni Kyç Sigurie ose ndonjë pajisje tjetër nga e cila mund të bëni verifikimin. Kjo pajisje s’do të jetë në gjendje të hyjë te mesazhe të dikurshëm të fshehtëzuar. Që të mund të verifikohet identiteti juaj në këtë pajisje, you'll need to reset your verification keys.", "Skip verification for now": "Anashkaloje verifikimin hëpërhë", "Unable to verify this login": "S’arrihet të verifikohet kjo hyrje", "To proceed, please accept the verification request on your other login.": "Që të vazhdohet, ju lutemi, pranoni kërkesën për verifikim në skenën(pajisjen) tuaj tjetër për hyrje.", @@ -3219,5 +3219,29 @@ "Sending invites... (%(progress)s out of %(count)s)|one": "Po dërgohen ftesa…", "Sending invites... (%(progress)s out of %(count)s)|other": "Po dërgohen ftesa… (%(progress)s nga %(count)s) gjithsej", "Loading new room": "Po ngarkohet dhomë e re", - "Upgrading room": "Përmirësim dhome" + "Upgrading room": "Përmirësim dhome", + "Downloading": "Shkarkim", + "They won't be able to access whatever you're not an admin of.": "S’do të jenë në gjendje të hyjnë kudo qoftë ku s’jeni përgjegjës.", + "Ban them from specific things I'm able to": "Dëboji prej gjërash të caktuara ku mundem ta bëj këtë", + "Unban them from specific things I'm able to": "Hiqua dëbimin prej gjërash të caktuara ku mundem ta bëj këtë", + "Ban them from everything I'm able to": "Dëboji prej gjithçkaje ku mundem ta bëj këtë", + "Unban them from everything I'm able to": "Hiqua dëbimin prej gjithçkaje ku mundem ta bëj këtë", + "Resetting your verification keys cannot be undone. After resetting, you won't have access to old encrypted messages, and any friends who have previously verified you will see security warnings until you re-verify with them.": "Rikthimi te parazgjedhjet i kyçeve tuaj të verifikimit s’mund të zhbëhet. Pas rikthimit te parazgjedhjet, s’do të mund të hyni dot te mesazhe të dikurshëm të fshehtëzuar dhe, cilido shok që ju ka verifikuar më parë, do të shohë një sinjalizim sigurie deri sa të ribëni verifikimin me ta.", + "Proceed with reset": "Vazhdo me rikthimin te parazgjedhjet", + "Really reset verification keys?": "Të kthehen vërtet te parazgjedhjet kyçet e verifikimit?", + "Show:": "Shfaq:", + "Shows all threads from current room": "Shfaq krejt rrjedhat në dhomën e tanishme", + "All threads": "Krejt rrjedhat", + "Shows all threads you’ve participated in": "Shfaq krejt rrjedhat ku keni marrë pjesë", + "My threads": "Rrjedhat e mia", + "Ban from %(roomName)s": "Dëboje prej %(roomName)s", + "Unban from %(roomName)s": "Hiqja dëbimin prej %(roomName)s", + "They'll still be able to access whatever you're not an admin of.": "Do të jenë prapë në gjendje të hyjnë kudo ku nuk jeni përgjegjës.", + "Kick them from specific things I'm able to": "Përzëri prej gjërash specifike që jam në gjendje të bëj", + "Kick them from everything I'm able to": "Përzëri prej gjithçkaje ku jam në gjendje ta bëj", + "Kick from %(roomName)s": "Përzëreni nga %(roomName)s", + "Disinvite from %(roomName)s": "Hiqja ftesën për %(roomName)s", + "Threads": "Rrjedha", + "%(count)s reply|one": "%(count)s përgjigje", + "%(count)s reply|other": "%(count)s përgjigje" } From d8e4e066d8cad89d62001b265178eac9b813332f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Priit=20J=C3=B5er=C3=BC=C3=BCt?= Date: Sat, 16 Oct 2021 16:19:18 +0000 Subject: [PATCH 103/156] Translated using Weblate (Estonian) Currently translated at 100.0% (3231 of 3231 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/et/ --- src/i18n/strings/et.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/et.json b/src/i18n/strings/et.json index 0213535fa3e..898cb198f31 100644 --- a/src/i18n/strings/et.json +++ b/src/i18n/strings/et.json @@ -3244,5 +3244,7 @@ "Kick them from everything I'm able to": "Müksa kasutaja välja kõikjalt, kust ma saan", "Kick from %(roomName)s": "Müksa %(roomName)s jututoast välja", "Threads": "Jutulõngad", - "Downloading": "Laadin alla" + "Downloading": "Laadin alla", + "%(count)s reply|one": "%(count)s vastus", + "%(count)s reply|other": "%(count)s vastust" } From 78890ab3aad4f05a45983d510fb4afd704af7719 Mon Sep 17 00:00:00 2001 From: Andy Balaam Date: Mon, 18 Oct 2021 09:20:58 +0100 Subject: [PATCH 104/156] Run i18n generation --- src/i18n/strings/en_EN.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index 3e61146acb0..3c0b0ddceb2 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -1128,6 +1128,11 @@ "User signing private key:": "User signing private key:", "Homeserver feature support:": "Homeserver feature support:", "exists": "exists", + "": "", + "Import E2E room keys": "Import E2E room keys", + "Cryptography": "Cryptography", + "Session ID:": "Session ID:", + "Session key:": "Session key:", "Your homeserver does not support session management.": "Your homeserver does not support session management.", "Unable to load session list": "Unable to load session list", "Confirm deleting these sessions by using Single Sign On to prove your identity.|other": "Confirm deleting these sessions by using Single Sign On to prove your identity.", @@ -1393,11 +1398,6 @@ "Read Marker lifetime (ms)": "Read Marker lifetime (ms)", "Read Marker off-screen lifetime (ms)": "Read Marker off-screen lifetime (ms)", "Unignore": "Unignore", - "": "", - "Import E2E room keys": "Import E2E room keys", - "Cryptography": "Cryptography", - "Session ID:": "Session ID:", - "Session key:": "Session key:", "You have no ignored users.": "You have no ignored users.", "Bulk options": "Bulk options", "Accept all %(invitedRooms)s invites": "Accept all %(invitedRooms)s invites", From c0d9c69f16b2a9a0924aaad04440779c96ef3a9f Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Mon, 18 Oct 2021 09:22:44 +0100 Subject: [PATCH 105/156] Fix leave space cancel button exploding --- src/components/views/dialogs/LeaveSpaceDialog.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/views/dialogs/LeaveSpaceDialog.tsx b/src/components/views/dialogs/LeaveSpaceDialog.tsx index 23a56eadaeb..3793deee634 100644 --- a/src/components/views/dialogs/LeaveSpaceDialog.tsx +++ b/src/components/views/dialogs/LeaveSpaceDialog.tsx @@ -100,7 +100,7 @@ const LeaveSpaceDialog: React.FC = ({ space, onFinished }) => { primaryButton={_t("Leave space")} onPrimaryButtonClick={() => onFinished(true, roomsToLeave)} hasCancel={true} - onCancel={onFinished} + onCancel={() => onFinished(false)} /> ; }; From 6a23aee7252000b4940d469b651ec4bb0d2c58dc Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Mon, 18 Oct 2021 09:30:57 +0100 Subject: [PATCH 106/156] Swap order of private space creation and tweak copy --- src/components/structures/SpaceRoomView.tsx | 8 ++++---- src/i18n/strings/en_EN.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/structures/SpaceRoomView.tsx b/src/components/structures/SpaceRoomView.tsx index 383524b738b..cc3bd22c298 100644 --- a/src/components/structures/SpaceRoomView.tsx +++ b/src/components/structures/SpaceRoomView.tsx @@ -906,21 +906,21 @@ export default class SpaceRoomView extends React.PureComponent { space={this.props.space} justCreatedOpts={this.props.justCreatedOpts} onFinished={(invite: boolean) => { - this.setState({ phase: invite ? Phase.PrivateInvite : Phase.PrivateExistingRooms }); + this.setState({ phase: invite ? Phase.PrivateCreateRooms : Phase.PrivateExistingRooms }); }} />; case Phase.PrivateInvite: return this.setState({ phase: Phase.PrivateCreateRooms })} + onFinished={() => this.setState({ phase: Phase.Landing })} />; case Phase.PrivateCreateRooms: return this.setState({ phase: Phase.Landing, firstRoomId })} + onFinished={(firstRoomId: string) => this.setState({ phase: Phase.PrivateInvite, firstRoomId })} />; case Phase.PrivateExistingRooms: return Date: Fri, 15 Oct 2021 17:19:22 +0100 Subject: [PATCH 107/156] Convert CryptographyPanel to a table --- .../views/settings/_CryptographyPanel.scss | 18 +++++++++-------- .../views/settings/CryptographyPanel.tsx | 20 +++++++++---------- 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/res/css/views/settings/_CryptographyPanel.scss b/res/css/views/settings/_CryptographyPanel.scss index 2290791d5db..432dfa22e0c 100644 --- a/res/css/views/settings/_CryptographyPanel.scss +++ b/res/css/views/settings/_CryptographyPanel.scss @@ -1,16 +1,18 @@ .mx_CryptographyPanel_sessionInfo { - display: table; - padding-left: 0; + padding: 0em; + border-spacing: 0px; } - -.mx_CryptographyPanel_sessionInfo > li { - display: table-row; +.mx_CryptographyPanel_sessionInfo > tr { + vertical-align: baseline; + padding: 0em; } -.mx_CryptographyPanel_sessionInfo > li > label, -.mx_CryptographyPanel_sessionInfo > li > span { - display: table-cell; +.mx_CryptographyPanel_sessionInfo > tr > td, +.mx_CryptographyPanel_sessionInfo > tr > td { + padding-bottom: 0em; + padding-left: 0em; padding-right: 1em; + padding-top: 0em; } .mx_CryptographyPanel_importExportButtons .mx_AccessibleButton { diff --git a/src/components/views/settings/CryptographyPanel.tsx b/src/components/views/settings/CryptographyPanel.tsx index 1e1cb3ba681..67a3e8aa75e 100644 --- a/src/components/views/settings/CryptographyPanel.tsx +++ b/src/components/views/settings/CryptographyPanel.tsx @@ -74,16 +74,16 @@ export default class CryptographyPanel extends React.Component { return (
      { _t("Cryptography") } -
        -
      • - - { deviceId } -
      • -
      • - - { identityKey } -
      • -
      + + + + + + + + + +
      { _t("Session ID:") }{ deviceId }
      { _t("Session key:") }{ identityKey }
      { importExportButtons } { noSendUnverifiedSetting }
      From 61a5b495b7fc1360d5f41a3691f8182c276547d8 Mon Sep 17 00:00:00 2001 From: Andy Balaam Date: Mon, 18 Oct 2021 12:23:09 +0100 Subject: [PATCH 108/156] Remove duplicate CSS selector --- res/css/views/settings/_CryptographyPanel.scss | 1 - 1 file changed, 1 deletion(-) diff --git a/res/css/views/settings/_CryptographyPanel.scss b/res/css/views/settings/_CryptographyPanel.scss index 432dfa22e0c..095218addff 100644 --- a/res/css/views/settings/_CryptographyPanel.scss +++ b/res/css/views/settings/_CryptographyPanel.scss @@ -7,7 +7,6 @@ padding: 0em; } -.mx_CryptographyPanel_sessionInfo > tr > td, .mx_CryptographyPanel_sessionInfo > tr > td { padding-bottom: 0em; padding-left: 0em; From 12632318ef7b90c38a97b97a73761316a3dc377b Mon Sep 17 00:00:00 2001 From: Dariusz Niemczyk Date: Fri, 15 Oct 2021 16:25:59 +0200 Subject: [PATCH 109/156] Add missing parenthesis for await calls --- src/components/views/settings/discovery/EmailAddresses.tsx | 2 +- src/components/views/settings/discovery/PhoneNumbers.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/views/settings/discovery/EmailAddresses.tsx b/src/components/views/settings/discovery/EmailAddresses.tsx index e1fe1ad1fd2..a1375a0f689 100644 --- a/src/components/views/settings/discovery/EmailAddresses.tsx +++ b/src/components/views/settings/discovery/EmailAddresses.tsx @@ -75,7 +75,7 @@ export class EmailAddress extends React.Component { - if (!await MatrixClientPeg.get().doesServerSupportSeparateAddAndBind()) { + if (!(await MatrixClientPeg.get().doesServerSupportSeparateAddAndBind())) { return this.changeBindingTangledAddBind({ bind, label, errorTitle }); } diff --git a/src/components/views/settings/discovery/PhoneNumbers.tsx b/src/components/views/settings/discovery/PhoneNumbers.tsx index 3abf1e3f6c4..2e7e951888e 100644 --- a/src/components/views/settings/discovery/PhoneNumbers.tsx +++ b/src/components/views/settings/discovery/PhoneNumbers.tsx @@ -71,7 +71,7 @@ export class PhoneNumber extends React.Component { - if (!await MatrixClientPeg.get().doesServerSupportSeparateAddAndBind()) { + if (!(await MatrixClientPeg.get().doesServerSupportSeparateAddAndBind())) { return this.changeBindingTangledAddBind({ bind, label, errorTitle }); } From 9c594a8a96d0594ce8fd73f8f580847e22918c1a Mon Sep 17 00:00:00 2001 From: Dariusz Niemczyk Date: Fri, 15 Oct 2021 16:26:54 +0200 Subject: [PATCH 110/156] Replace console.logs to logger.log Related https://github.com/vector-im/element-web/issues/18425 --- src/utils/exportUtils/Exporter.ts | 10 ++++++---- src/utils/exportUtils/HtmlExport.tsx | 8 +++++--- src/utils/exportUtils/JSONExport.ts | 8 +++++--- src/utils/exportUtils/PlainTextExport.ts | 8 +++++--- 4 files changed, 21 insertions(+), 13 deletions(-) diff --git a/src/utils/exportUtils/Exporter.ts b/src/utils/exportUtils/Exporter.ts index db28508c683..b23c1153e04 100644 --- a/src/utils/exportUtils/Exporter.ts +++ b/src/utils/exportUtils/Exporter.ts @@ -29,6 +29,8 @@ import { saveAs } from "file-saver"; import { _t } from "../../languageHandler"; import SdkConfig from "../../SdkConfig"; +import { logger } from "matrix-js-sdk/src/logger"; + type BlobFile = { name: string; blob: Blob; @@ -61,7 +63,7 @@ export default abstract class Exporter { } protected updateProgress(progress: string, log = true, show = true): void { - if (log) console.log(progress); + if (log) logger.log(progress); if (show) this.setProgressText(progress); } @@ -91,13 +93,13 @@ export default abstract class Exporter { } protected cleanUp(): string { - console.log("Cleaning up..."); + logger.log("Cleaning up..."); window.removeEventListener("beforeunload", this.onBeforeUnload); return ""; } public async cancelExport(): Promise { - console.log("Cancelling export..."); + logger.log("Cancelling export..."); this.cancelled = true; } @@ -212,7 +214,7 @@ export default abstract class Exporter { blob = await image.blob(); } } catch (err) { - console.log("Error decrypting media"); + logger.log("Error decrypting media"); } return blob; } diff --git a/src/utils/exportUtils/HtmlExport.tsx b/src/utils/exportUtils/HtmlExport.tsx index 5f8413fad89..cd440537df6 100644 --- a/src/utils/exportUtils/HtmlExport.tsx +++ b/src/utils/exportUtils/HtmlExport.tsx @@ -38,6 +38,8 @@ import MatrixClientContext from "../../contexts/MatrixClientContext"; import getExportCSS from "./exportCSS"; import { textForEvent } from "../../TextForEvent"; +import { logger } from "matrix-js-sdk/src/logger"; + export default class HTMLExporter extends Exporter { protected avatars: Map; protected permalinkCreator: RoomPermalinkCreator; @@ -70,7 +72,7 @@ export default class HTMLExporter extends Exporter { this.totalSize += blob.size; this.addFile(avatarPath, blob); } catch (err) { - console.log("Failed to fetch room's avatar" + err); + logger.log("Failed to fetch room's avatar" + err); } } const avatar = ( @@ -238,7 +240,7 @@ export default class HTMLExporter extends Exporter { const blob = await image.blob(); this.addFile(`users/${member.userId.replace(/:/g, '-')}.png`, blob); } catch (err) { - console.log("Failed to fetch user's avatar" + err); + logger.log("Failed to fetch user's avatar" + err); } } } @@ -362,7 +364,7 @@ export default class HTMLExporter extends Exporter { this.addFile(filePath, blob); } } catch (e) { - console.log("Error while fetching file" + e); + logger.log("Error while fetching file" + e); eventTile = await this.getEventTileMarkup( this.createModifiedEvent(_t("Error fetching file"), mxEv), joined, diff --git a/src/utils/exportUtils/JSONExport.ts b/src/utils/exportUtils/JSONExport.ts index 4d862e69e31..41d9142a45b 100644 --- a/src/utils/exportUtils/JSONExport.ts +++ b/src/utils/exportUtils/JSONExport.ts @@ -23,6 +23,8 @@ import { ExportType } from "./exportUtils"; import { IExportOptions } from "./exportUtils"; import { EventType } from "matrix-js-sdk/src/@types/event"; +import { logger } from "matrix-js-sdk/src/logger"; + export default class JSONExporter extends Exporter { protected totalSize = 0; protected messages: Record[] = []; @@ -67,7 +69,7 @@ export default class JSONExporter extends Exporter { this.addFile(filePath, blob); } } catch (err) { - console.log("Error fetching file: " + err); + logger.log("Error fetching file: " + err); } } const jsonEvent: any = mxEv.toJSON(); @@ -94,7 +96,7 @@ export default class JSONExporter extends Exporter { const res = await this.getRequiredEvents(); const fetchEnd = performance.now(); - console.log(`Fetched ${res.length} events in ${(fetchEnd - fetchStart)/1000}s`); + logger.log(`Fetched ${res.length} events in ${(fetchEnd - fetchStart)/1000}s`); console.info("Creating output..."); const text = await this.createOutput(res); @@ -113,7 +115,7 @@ export default class JSONExporter extends Exporter { console.info("Export cancelled successfully"); } else { console.info("Export successful!"); - console.log(`Exported ${res.length} events in ${(exportEnd - fetchStart)/1000} seconds`); + logger.log(`Exported ${res.length} events in ${(exportEnd - fetchStart)/1000} seconds`); } this.cleanUp(); diff --git a/src/utils/exportUtils/PlainTextExport.ts b/src/utils/exportUtils/PlainTextExport.ts index 8e3ba81c4e0..fc122bca6e0 100644 --- a/src/utils/exportUtils/PlainTextExport.ts +++ b/src/utils/exportUtils/PlainTextExport.ts @@ -24,6 +24,8 @@ import { ExportType } from "./exportUtils"; import { IExportOptions } from "./exportUtils"; import { textForEvent } from "../../TextForEvent"; +import { logger } from "matrix-js-sdk/src/logger"; + export default class PlainTextExporter extends Exporter { protected totalSize: number; protected mediaOmitText: string; @@ -94,7 +96,7 @@ export default class PlainTextExporter extends Exporter { } } catch (error) { mediaText = " (" + _t("Error fetching file") + ")"; - console.log("Error fetching file " + error); + logger.log("Error fetching file " + error); } } else mediaText = ` (${this.mediaOmitText})`; } @@ -123,7 +125,7 @@ export default class PlainTextExporter extends Exporter { const res = await this.getRequiredEvents(); const fetchEnd = performance.now(); - console.log(`Fetched ${res.length} events in ${(fetchEnd - fetchStart)/1000}s`); + logger.log(`Fetched ${res.length} events in ${(fetchEnd - fetchStart)/1000}s`); this.updateProgress("Creating output..."); const text = await this.createOutput(res); @@ -142,7 +144,7 @@ export default class PlainTextExporter extends Exporter { console.info("Export cancelled successfully"); } else { console.info("Export successful!"); - console.log(`Exported ${res.length} events in ${(exportEnd - fetchStart)/1000} seconds`); + logger.log(`Exported ${res.length} events in ${(exportEnd - fetchStart)/1000} seconds`); } this.cleanUp(); From 5e73a212f4ba6739c404ba8170fa703786788132 Mon Sep 17 00:00:00 2001 From: Dariusz Niemczyk Date: Fri, 15 Oct 2021 16:30:53 +0200 Subject: [PATCH 111/156] Replace console.error with logger.error Related https://github.com/vector-im/element-web/issues/18425 --- src/Analytics.tsx | 6 ++++-- src/BasePlatform.ts | 6 ++++-- src/CallHandler.tsx | 8 ++++---- src/ContentMessages.tsx | 2 +- src/CountlyAnalytics.ts | 4 +++- src/Lifecycle.ts | 10 +++++----- src/MatrixClientPeg.ts | 4 ++-- src/Notifier.ts | 2 +- src/Presence.ts | 4 +++- src/RoomInvite.tsx | 4 +++- src/ScalarMessaging.ts | 4 ++-- src/SecurityManager.ts | 2 +- src/actions/RoomListActions.ts | 8 +++++--- .../dialogs/security/CreateKeyBackupDialog.js | 4 +++- .../security/CreateSecretStorageDialog.js | 2 +- .../dialogs/security/ExportE2eKeysDialog.js | 4 +++- .../dialogs/security/ImportE2eKeysDialog.js | 4 +++- src/audio/Playback.ts | 6 +++--- src/audio/VoiceRecording.ts | 6 ++++-- src/components/structures/FilePanel.tsx | 6 ++++-- src/components/structures/GroupView.js | 14 +++++++------ src/components/structures/InteractiveAuth.tsx | 4 +++- src/components/structures/MatrixChat.tsx | 4 ++-- .../structures/NotificationPanel.tsx | 4 +++- src/components/structures/RoomDirectory.tsx | 6 ++++-- src/components/structures/RoomView.tsx | 12 +++++------ src/components/structures/ScrollPanel.tsx | 2 +- src/components/structures/SpaceRoomView.tsx | 4 ++-- src/components/structures/TabbedView.tsx | 4 +++- src/components/structures/TimelinePanel.tsx | 6 +++--- .../structures/auth/ForgotPassword.tsx | 4 +++- src/components/structures/auth/Login.tsx | 2 +- .../structures/auth/Registration.tsx | 6 +++--- src/components/structures/auth/SoftLogout.tsx | 6 +++--- .../views/audio_messages/AudioPlayerBase.tsx | 4 +++- src/components/views/auth/CaptchaForm.tsx | 4 ++-- .../views/auth/RegistrationForm.tsx | 4 +++- src/components/views/avatars/MemberAvatar.tsx | 4 +++- .../GroupInviteTileContextMenu.js | 4 +++- .../views/context_menus/WidgetContextMenu.tsx | 8 +++++--- .../dialogs/AddExistingToSpaceDialog.tsx | 4 +++- .../views/dialogs/AddressPickerDialog.tsx | 10 ++++++---- .../CommunityPrototypeInviteDialog.tsx | 4 +++- .../CreateCommunityPrototypeDialog.tsx | 4 +++- .../CreateSpaceFromCommunityDialog.tsx | 4 +++- .../views/dialogs/CreateSubspaceDialog.tsx | 4 +++- .../views/dialogs/DeactivateAccountDialog.tsx | 6 ++++-- .../dialogs/EditCommunityPrototypeDialog.tsx | 4 +++- src/components/views/dialogs/ExportDialog.tsx | 4 +++- src/components/views/dialogs/InviteDialog.tsx | 20 +++++++++---------- .../dialogs/MessageEditHistoryDialog.tsx | 4 +++- .../views/dialogs/ServerPickerDialog.tsx | 8 +++++--- .../views/dialogs/SetEmailDialog.tsx | 6 ++++-- .../TabbedIntegrationManagerDialog.tsx | 4 +++- .../security/AccessSecretStorageDialog.tsx | 4 +++- .../security/CreateCrossSigningDialog.tsx | 2 +- src/components/views/elements/AppTile.tsx | 2 +- .../views/elements/ErrorBoundary.tsx | 6 ++++-- src/components/views/elements/Flair.js | 4 +++- src/components/views/elements/Pill.js | 4 +++- src/components/views/groups/GroupRoomInfo.js | 6 ++++-- src/components/views/groups/GroupTile.js | 4 +++- .../views/groups/GroupUserSettings.js | 4 +++- .../messages/MKeyVerificationRequest.tsx | 6 ++++-- .../views/right_panel/PinnedMessagesCard.tsx | 6 ++++-- src/components/views/right_panel/UserInfo.tsx | 20 +++++++++---------- .../views/right_panel/VerificationPanel.tsx | 8 +++++--- .../views/room_settings/AliasSettings.tsx | 10 ++++++---- .../room_settings/RelatedGroupSettings.js | 4 +++- .../views/rooms/BasicMessageComposer.tsx | 6 ++++-- .../views/rooms/EditMessageComposer.tsx | 4 ++-- .../views/rooms/LinkPreviewGroup.tsx | 4 +++- .../views/rooms/SendMessageComposer.tsx | 4 ++-- src/components/views/rooms/Stickerpicker.tsx | 10 +++++----- .../views/rooms/ThirdPartyMemberInfo.tsx | 4 +++- .../views/rooms/VoiceRecordComposerTile.tsx | 10 ++++++---- .../views/settings/CrossSigningPanel.tsx | 4 +++- .../views/settings/DevicesPanel.tsx | 6 ++++-- .../views/settings/DevicesPanelEntry.tsx | 4 +++- .../views/settings/Notifications.tsx | 12 ++++++----- .../views/settings/SecureBackupPanel.tsx | 2 +- src/components/views/settings/SetIdServer.tsx | 4 +++- .../views/settings/SetIntegrationManager.tsx | 6 ++++-- .../views/settings/account/EmailAddresses.tsx | 8 +++++--- .../views/settings/account/PhoneNumbers.tsx | 8 +++++--- .../settings/discovery/EmailAddresses.tsx | 8 +++++--- .../views/settings/discovery/PhoneNumbers.tsx | 8 +++++--- .../tabs/room/NotificationSettingsTab.tsx | 6 ++++-- .../tabs/room/RolesRoomSettingsTab.tsx | 8 +++++--- .../tabs/room/SecurityRoomSettingsTab.tsx | 8 +++++--- .../tabs/user/AppearanceUserSettingsTab.tsx | 4 +++- .../tabs/user/GeneralUserSettingsTab.tsx | 4 +++- .../tabs/user/HelpUserSettingsTab.tsx | 4 ++-- .../tabs/user/MjolnirUserSettingsTab.tsx | 10 ++++++---- .../views/spaces/SpaceCreateMenu.tsx | 4 +++- .../views/spaces/SpaceSettingsGeneralTab.tsx | 4 +++- .../views/toasts/VerificationRequestToast.tsx | 6 ++++-- src/components/views/voip/AudioFeed.tsx | 2 +- src/createRoom.ts | 6 ++++-- .../IntegrationManagerInstance.ts | 4 +++- src/integrations/IntegrationManagers.ts | 2 +- src/languageHandler.tsx | 4 ++-- .../VectorPushRulesDefinitions.ts | 4 +++- src/rageshake/rageshake.ts | 6 +++--- src/settings/SettingsStore.ts | 12 +++++------ src/stores/FlairStore.js | 2 +- src/stores/GroupStore.js | 4 +++- src/stores/ModalWidgetStore.ts | 4 +++- src/stores/RoomViewStore.tsx | 2 +- src/stores/SetupEncryptionStore.ts | 2 +- src/stores/SpaceStore.ts | 4 +++- src/stores/widgets/StopGapWidget.ts | 4 ++-- src/stores/widgets/StopGapWidgetDriver.ts | 4 +++- src/utils/AutoDiscoveryUtils.tsx | 10 ++++++---- src/utils/FontManager.ts | 4 ++-- src/utils/IdentityServerUtils.ts | 4 +++- src/utils/MultiInviter.ts | 2 +- src/utils/RoomUpgrade.ts | 4 +++- src/utils/StorageManager.ts | 2 +- src/utils/Whenable.ts | 4 +++- src/utils/WidgetUtils.ts | 6 ++++-- src/utils/exportUtils/HtmlExport.tsx | 2 +- src/utils/strings.ts | 5 +++-- src/widgets/ManagedHybrid.ts | 10 ++++++---- 124 files changed, 417 insertions(+), 250 deletions(-) diff --git a/src/Analytics.tsx b/src/Analytics.tsx index fc4664039f6..5db8c95a845 100644 --- a/src/Analytics.tsx +++ b/src/Analytics.tsx @@ -23,6 +23,8 @@ import SdkConfig from './SdkConfig'; import Modal from './Modal'; import * as sdk from './index'; +import { logger } from "matrix-js-sdk/src/logger"; + const hashRegex = /#\/(groups?|room|user|settings|register|login|forgot_password|home|directory)/; const hashVarRegex = /#\/(group|room|user)\/.*$/; @@ -156,7 +158,7 @@ function getUid(): string { } return data; } catch (e) { - console.error("Analytics error: ", e); + logger.error("Analytics error: ", e); return ""; } } @@ -299,7 +301,7 @@ export class Analytics { redirect: "follow", }); } catch (e) { - console.error("Analytics error: ", e); + logger.error("Analytics error: ", e); } } diff --git a/src/BasePlatform.ts b/src/BasePlatform.ts index 5b4b15cc674..f3b26ec5104 100644 --- a/src/BasePlatform.ts +++ b/src/BasePlatform.ts @@ -28,6 +28,8 @@ import { hideToast as hideUpdateToast } from "./toasts/UpdateToast"; import { MatrixClientPeg } from "./MatrixClientPeg"; import { idbLoad, idbSave, idbDelete } from "./utils/StorageManager"; +import { logger } from "matrix-js-sdk/src/logger"; + export const SSO_HOMESERVER_URL_KEY = "mx_sso_hs_url"; export const SSO_ID_SERVER_URL_KEY = "mx_sso_is_url"; export const SSO_IDP_ID_KEY = "mx_sso_idp_id"; @@ -320,7 +322,7 @@ export default abstract class BasePlatform { return null; } if (!data.encrypted || !data.iv || !data.cryptoKey) { - console.error("Badly formatted pickle key"); + logger.error("Badly formatted pickle key"); return null; } @@ -340,7 +342,7 @@ export default abstract class BasePlatform { ); return encodeUnpaddedBase64(key); } catch (e) { - console.error("Error decrypting pickle key"); + logger.error("Error decrypting pickle key"); return null; } } diff --git a/src/CallHandler.tsx b/src/CallHandler.tsx index bc9ccc4bcd7..30171aca893 100644 --- a/src/CallHandler.tsx +++ b/src/CallHandler.tsx @@ -444,7 +444,7 @@ export default class CallHandler extends EventEmitter { if (!this.matchesCallForThisRoom(call)) return; Analytics.trackEvent('voip', 'callError', 'error', err.toString()); - console.error("Call error:", err); + logger.error("Call error:", err); if (err.code === CallErrorCode.NoUserMedia) { this.showMediaCaptureError(call); @@ -777,7 +777,7 @@ export default class CallHandler extends EventEmitter { } else if (type === 'video') { call.placeVideoCall(); } else { - console.error("Unknown conf call type: " + type); + logger.error("Unknown conf call type: " + type); } } @@ -811,7 +811,7 @@ export default class CallHandler extends EventEmitter { const room = MatrixClientPeg.get().getRoom(payload.room_id); if (!room) { - console.error(`Room ${payload.room_id} does not exist.`); + logger.error(`Room ${payload.room_id} does not exist.`); return; } @@ -1112,7 +1112,7 @@ export default class CallHandler extends EventEmitter { description: _t("You do not have permission to start a conference call in this room"), }); } - console.error(e); + logger.error(e); }); } diff --git a/src/ContentMessages.tsx b/src/ContentMessages.tsx index 60242b373a2..2f9b17a89bd 100644 --- a/src/ContentMessages.tsx +++ b/src/ContentMessages.tsx @@ -559,7 +559,7 @@ export default class ContentMessages { Object.assign(content.info, imageInfo); resolve(); }, (e) => { - console.error(e); + logger.error(e); content.msgtype = 'm.file'; resolve(); }); diff --git a/src/CountlyAnalytics.ts b/src/CountlyAnalytics.ts index aa47d3063f5..af26a4fbc3f 100644 --- a/src/CountlyAnalytics.ts +++ b/src/CountlyAnalytics.ts @@ -25,6 +25,8 @@ import { MatrixClientPeg } from "./MatrixClientPeg"; import RoomViewStore from "./stores/RoomViewStore"; import { Action } from "./dispatcher/actions"; +import { logger } from "matrix-js-sdk/src/logger"; + const INACTIVITY_TIME = 20; // seconds const HEARTBEAT_INTERVAL = 5_000; // ms const SESSION_UPDATE_INTERVAL = 60; // seconds @@ -651,7 +653,7 @@ export default class CountlyAnalytics { body: params, }); } catch (e) { - console.error("Analytics error: ", e); + logger.error("Analytics error: ", e); } } diff --git a/src/Lifecycle.ts b/src/Lifecycle.ts index 3685f7b9388..dc7a0e52524 100644 --- a/src/Lifecycle.ts +++ b/src/Lifecycle.ts @@ -234,8 +234,8 @@ export function attemptTokenLogin( } }, }); - console.error("Failed to log in with login token:"); - console.error(err); + logger.error("Failed to log in with login token:"); + logger.error(err); return false; }); } @@ -297,7 +297,7 @@ function registerAsGuest( guest: true, }, true).then(() => true); }, (err) => { - console.error("Failed to register as guest", err); + logger.error("Failed to register as guest", err); return false; }); } @@ -452,7 +452,7 @@ export async function restoreFromLocalStorage(opts?: { ignoreGuest?: boolean }): } async function handleLoadSessionFailure(e: Error): Promise { - console.error("Unable to load session", e); + logger.error("Unable to load session", e); const modal = Modal.createTrackedDialog('Session Restore Error', '', SessionRestoreErrorDialog, { error: e.message, @@ -676,7 +676,7 @@ async function persistCredentials(credentials: IMatrixClientCreds): Promise { - console.error(err.stack); + logger.error(err.stack); Modal.createTrackedDialog('Failed to invite', '', ErrorDialog, { title: _t("Failed to invite"), description: ((err && err.message) ? err.message : _t("Operation failed")), diff --git a/src/ScalarMessaging.ts b/src/ScalarMessaging.ts index d068c1f9247..47a5dff94be 100644 --- a/src/ScalarMessaging.ts +++ b/src/ScalarMessaging.ts @@ -272,7 +272,7 @@ function sendResponse(event: MessageEvent, res: any): void { } function sendError(event: MessageEvent, msg: string, nestedError?: Error): void { - console.error("Action:" + event.data.action + " failed with message: " + msg); + logger.error("Action:" + event.data.action + " failed with message: " + msg); const data = objectClone(event.data); data.response = { error: { @@ -721,7 +721,7 @@ export function stopListening(): void { "ScalarMessaging: mismatched startListening / stopListening detected." + " Negative count", ); - console.error(e); + logger.error(e); } } diff --git a/src/SecurityManager.ts b/src/SecurityManager.ts index 925b023584a..af1a4814095 100644 --- a/src/SecurityManager.ts +++ b/src/SecurityManager.ts @@ -399,7 +399,7 @@ export async function accessSecretStorage(func = async () => { }, forceReset = f return await func(); } catch (e) { SecurityCustomisations.catchAccessSecretStorageError?.(e); - console.error(e); + logger.error(e); // Re-throw so that higher level logic can abort as needed throw e; } finally { diff --git a/src/actions/RoomListActions.ts b/src/actions/RoomListActions.ts index a7f629c40de..d248197f7f7 100644 --- a/src/actions/RoomListActions.ts +++ b/src/actions/RoomListActions.ts @@ -27,6 +27,8 @@ import { SortAlgorithm } from "../stores/room-list/algorithms/models"; import { DefaultTagID } from "../stores/room-list/models"; import ErrorDialog from '../components/views/dialogs/ErrorDialog'; +import { logger } from "matrix-js-sdk/src/logger"; + export default class RoomListActions { /** * Creates an action thunk that will do an asynchronous request to @@ -88,7 +90,7 @@ export default class RoomListActions { return Rooms.guessAndSetDMRoom( room, newTag === DefaultTagID.DM, ).catch((err) => { - console.error("Failed to set direct chat tag " + err); + logger.error("Failed to set direct chat tag " + err); Modal.createTrackedDialog('Failed to set direct chat tag', '', ErrorDialog, { title: _t('Failed to set direct chat tag'), description: ((err && err.message) ? err.message : _t('Operation failed')), @@ -108,7 +110,7 @@ export default class RoomListActions { const promiseToDelete = matrixClient.deleteRoomTag( roomId, oldTag, ).catch(function(err) { - console.error("Failed to remove tag " + oldTag + " from room: " + err); + logger.error("Failed to remove tag " + oldTag + " from room: " + err); Modal.createTrackedDialog('Failed to remove tag from room', '', ErrorDialog, { title: _t('Failed to remove tag %(tagName)s from room', { tagName: oldTag }), description: ((err && err.message) ? err.message : _t('Operation failed')), @@ -127,7 +129,7 @@ export default class RoomListActions { metaData = metaData || {}; const promiseToAdd = matrixClient.setRoomTag(roomId, newTag, metaData).catch(function(err) { - console.error("Failed to add tag " + newTag + " to room: " + err); + logger.error("Failed to add tag " + newTag + " to room: " + err); Modal.createTrackedDialog('Failed to add tag to room', '', ErrorDialog, { title: _t('Failed to add tag %(tagName)s to room', { tagName: newTag }), description: ((err && err.message) ? err.message : _t('Operation failed')), diff --git a/src/async-components/views/dialogs/security/CreateKeyBackupDialog.js b/src/async-components/views/dialogs/security/CreateKeyBackupDialog.js index 2cef1c0e417..8527f788959 100644 --- a/src/async-components/views/dialogs/security/CreateKeyBackupDialog.js +++ b/src/async-components/views/dialogs/security/CreateKeyBackupDialog.js @@ -26,6 +26,8 @@ import AccessibleButton from "../../../../components/views/elements/AccessibleBu import { copyNode } from "../../../../utils/strings"; import PassphraseField from "../../../../components/views/auth/PassphraseField"; +import { logger } from "matrix-js-sdk/src/logger"; + const PHASE_PASSPHRASE = 0; const PHASE_PASSPHRASE_CONFIRM = 1; const PHASE_SHOWKEY = 2; @@ -129,7 +131,7 @@ export default class CreateKeyBackupDialog extends React.PureComponent { phase: PHASE_DONE, }); } catch (e) { - console.error("Error creating key backup", e); + logger.error("Error creating key backup", e); // TODO: If creating a version succeeds, but backup fails, should we // delete the version, disable backup, or do nothing? If we just // disable without deleting, we'll enable on next app reload since diff --git a/src/async-components/views/dialogs/security/CreateSecretStorageDialog.js b/src/async-components/views/dialogs/security/CreateSecretStorageDialog.js index 5fbc97d2f15..7a21b7075bb 100644 --- a/src/async-components/views/dialogs/security/CreateSecretStorageDialog.js +++ b/src/async-components/views/dialogs/security/CreateSecretStorageDialog.js @@ -349,7 +349,7 @@ export default class CreateSecretStorageDialog extends React.PureComponent { } else { this.setState({ error: e }); } - console.error("Error bootstrapping secret storage", e); + logger.error("Error bootstrapping secret storage", e); } } diff --git a/src/async-components/views/dialogs/security/ExportE2eKeysDialog.js b/src/async-components/views/dialogs/security/ExportE2eKeysDialog.js index dbed9f39683..c21e17a7a12 100644 --- a/src/async-components/views/dialogs/security/ExportE2eKeysDialog.js +++ b/src/async-components/views/dialogs/security/ExportE2eKeysDialog.js @@ -23,6 +23,8 @@ import { MatrixClient } from 'matrix-js-sdk/src/client'; import * as MegolmExportEncryption from '../../../../utils/MegolmExportEncryption'; import * as sdk from '../../../../index'; +import { logger } from "matrix-js-sdk/src/logger"; + const PHASE_EDIT = 1; const PHASE_EXPORTING = 2; @@ -83,7 +85,7 @@ export default class ExportE2eKeysDialog extends React.Component { FileSaver.saveAs(blob, 'element-keys.txt'); this.props.onFinished(true); }).catch((e) => { - console.error("Error exporting e2e keys:", e); + logger.error("Error exporting e2e keys:", e); if (this._unmounted) { return; } diff --git a/src/async-components/views/dialogs/security/ImportE2eKeysDialog.js b/src/async-components/views/dialogs/security/ImportE2eKeysDialog.js index 0936ad696d4..51d2861396f 100644 --- a/src/async-components/views/dialogs/security/ImportE2eKeysDialog.js +++ b/src/async-components/views/dialogs/security/ImportE2eKeysDialog.js @@ -22,6 +22,8 @@ import * as MegolmExportEncryption from '../../../../utils/MegolmExportEncryptio import * as sdk from '../../../../index'; import { _t } from '../../../../languageHandler'; +import { logger } from "matrix-js-sdk/src/logger"; + function readFileAsArrayBuffer(file) { return new Promise((resolve, reject) => { const reader = new FileReader(); @@ -91,7 +93,7 @@ export default class ImportE2eKeysDialog extends React.Component { // TODO: it would probably be nice to give some feedback about what we've imported here. this.props.onFinished(true); }).catch((e) => { - console.error("Error importing e2e keys:", e); + logger.error("Error importing e2e keys:", e); if (this._unmounted) { return; } diff --git a/src/audio/Playback.ts b/src/audio/Playback.ts index 9ad4c85df52..7e62daab567 100644 --- a/src/audio/Playback.ts +++ b/src/audio/Playback.ts @@ -156,18 +156,18 @@ export class Playback extends EventEmitter implements IDestroyable { try { // This error handler is largely for Safari as well, which doesn't support Opus/Ogg // very well. - console.error("Error decoding recording: ", e); + logger.error("Error decoding recording: ", e); console.warn("Trying to re-encode to WAV instead..."); const wav = await decodeOgg(this.buf); // noinspection ES6MissingAwait - not needed when using callbacks this.context.decodeAudioData(wav, b => resolve(b), e => { - console.error("Still failed to decode recording: ", e); + logger.error("Still failed to decode recording: ", e); reject(e); }); } catch (e) { - console.error("Caught decoding error:", e); + logger.error("Caught decoding error:", e); reject(e); } }); diff --git a/src/audio/VoiceRecording.ts b/src/audio/VoiceRecording.ts index 67b2acda0c2..3ff02be7749 100644 --- a/src/audio/VoiceRecording.ts +++ b/src/audio/VoiceRecording.ts @@ -32,6 +32,8 @@ import { FixedRollingArray } from "../utils/FixedRollingArray"; import { clamp } from "../utils/numbers"; import mxRecorderWorkletPath from "./RecorderWorklet"; +import { logger } from "matrix-js-sdk/src/logger"; + const CHANNELS = 1; // stereo isn't important export const SAMPLE_RATE = 48000; // 48khz is what WebRTC uses. 12khz is where we lose quality. const BITRATE = 24000; // 24kbps is pretty high quality for our use case in opus. @@ -171,9 +173,9 @@ export class VoiceRecording extends EventEmitter implements IDestroyable { this.buffer = newBuf; }; } catch (e) { - console.error("Error starting recording: ", e); + logger.error("Error starting recording: ", e); if (e instanceof DOMException) { // Unhelpful DOMExceptions are common - parse them sanely - console.error(`${e.name} (${e.code}): ${e.message}`); + logger.error(`${e.name} (${e.code}): ${e.message}`); } // Clean up as best as possible diff --git a/src/components/structures/FilePanel.tsx b/src/components/structures/FilePanel.tsx index 77629839d93..c57c2f7ecf2 100644 --- a/src/components/structures/FilePanel.tsx +++ b/src/components/structures/FilePanel.tsx @@ -39,6 +39,8 @@ import { TileShape } from '../views/rooms/EventTile'; import { Layout } from "../../settings/Layout"; import RoomContext, { TimelineRenderingType } from '../../contexts/RoomContext'; +import { logger } from "matrix-js-sdk/src/logger"; + interface IProps { roomId: string; onClose: () => void; @@ -210,10 +212,10 @@ class FilePanel extends React.Component { this.setState({ timelineSet: timelineSet }); } catch (error) { - console.error("Failed to get or create file panel filter", error); + logger.error("Failed to get or create file panel filter", error); } } else { - console.error("Failed to add filtered timelineSet for FilePanel as no room!"); + logger.error("Failed to add filtered timelineSet for FilePanel as no room!"); } } diff --git a/src/components/structures/GroupView.js b/src/components/structures/GroupView.js index f4f1d50d634..298fa0a4b64 100644 --- a/src/components/structures/GroupView.js +++ b/src/components/structures/GroupView.js @@ -45,6 +45,8 @@ import { createSpaceFromCommunity } from "../../utils/space"; import { Action } from "../../dispatcher/actions"; import { RightPanelPhases } from "../../stores/RightPanelStorePhases"; +import { logger } from "matrix-js-sdk/src/logger"; + const LONG_DESC_PLACEHOLDER = _td( `

      HTML for your community's page

      @@ -186,7 +188,7 @@ class FeaturedRoom extends React.Component { this.props.groupId, this.props.summaryInfo.room_id, ).catch((err) => { - console.error('Error whilst removing room from group summary', err); + logger.error('Error whilst removing room from group summary', err); const roomName = this.props.summaryInfo.name || this.props.summaryInfo.canonical_alias || this.props.summaryInfo.room_id; @@ -352,7 +354,7 @@ class FeaturedUser extends React.Component { this.props.groupId, this.props.summaryInfo.user_id, ).catch((err) => { - console.error('Error whilst removing user from group summary', err); + logger.error('Error whilst removing user from group summary', err); const displayName = this.props.summaryInfo.displayname || this.props.summaryInfo.user_id; const ErrorDialog = sdk.getComponent("dialogs.ErrorDialog"); Modal.createTrackedDialog( @@ -551,7 +553,7 @@ export default class GroupView extends React.Component { }, }); }).catch((e) => { - console.error('Error getting group inviter profile', e); + logger.error('Error getting group inviter profile', e); }).finally(() => { if (this._unmounted) return; this.setState({ @@ -641,7 +643,7 @@ export default class GroupView extends React.Component { }).catch((e) => { this.setState({ uploadingAvatar: false }); const ErrorDialog = sdk.getComponent("dialogs.ErrorDialog"); - console.error("Failed to upload avatar image", e); + logger.error("Failed to upload avatar image", e); Modal.createTrackedDialog('Failed to upload image', '', ErrorDialog, { title: _t('Error'), description: _t('Failed to upload image'), @@ -675,7 +677,7 @@ export default class GroupView extends React.Component { saving: false, }); const ErrorDialog = sdk.getComponent("dialogs.ErrorDialog"); - console.error("Failed to save community profile", e); + logger.error("Failed to save community profile", e); Modal.createTrackedDialog('Failed to update group', '', ErrorDialog, { title: _t('Error'), description: _t('Failed to update community'), @@ -1421,7 +1423,7 @@ export default class GroupView extends React.Component { ); } } else { - console.error("Invalid state for GroupView"); + logger.error("Invalid state for GroupView"); return

      ; } } diff --git a/src/components/structures/InteractiveAuth.tsx b/src/components/structures/InteractiveAuth.tsx index 970ea26309c..36489ac4a04 100644 --- a/src/components/structures/InteractiveAuth.tsx +++ b/src/components/structures/InteractiveAuth.tsx @@ -29,6 +29,8 @@ import getEntryComponentForLoginType, { IStageComponent } from '../views/auth/In import Spinner from "../views/elements/Spinner"; import { replaceableComponent } from "../../utils/replaceableComponent"; +import { logger } from "matrix-js-sdk/src/logger"; + export const ERROR_USER_CANCELLED = new Error("User cancelled auth session"); interface IProps { @@ -137,7 +139,7 @@ export default class InteractiveAuthComponent extends React.Component { this.props.onAuthFinished(false, error); - console.error("Error during user-interactive auth:", error); + logger.error("Error during user-interactive auth:", error); if (this.unmounted) { return; } diff --git a/src/components/structures/MatrixChat.tsx b/src/components/structures/MatrixChat.tsx index d649c702bcf..13eca3265a3 100644 --- a/src/components/structures/MatrixChat.tsx +++ b/src/components/structures/MatrixChat.tsx @@ -1580,7 +1580,7 @@ export default class MatrixChat extends React.PureComponent { newVersionInfo = await MatrixClientPeg.get().getKeyBackupVersion(); if (newVersionInfo !== null) haveNewVersion = true; } catch (e) { - console.error("Saw key backup error but failed to check backup version!", e); + logger.error("Saw key backup error but failed to check backup version!", e); return; } } @@ -2121,7 +2121,7 @@ export default class MatrixChat extends React.PureComponent { /> ); } else { - console.error(`Unknown view ${this.state.view}`); + logger.error(`Unknown view ${this.state.view}`); } return diff --git a/src/components/structures/NotificationPanel.tsx b/src/components/structures/NotificationPanel.tsx index c37eeca0913..52046c18559 100644 --- a/src/components/structures/NotificationPanel.tsx +++ b/src/components/structures/NotificationPanel.tsx @@ -26,6 +26,8 @@ import { TileShape } from "../views/rooms/EventTile"; import { Layout } from "../../settings/Layout"; import RoomContext, { TimelineRenderingType } from "../../contexts/RoomContext"; +import { logger } from "matrix-js-sdk/src/logger"; + interface IProps { onClose(): void; } @@ -59,7 +61,7 @@ export default class NotificationPanel extends React.PureComponent { /> ); } else { - console.error("No notifTimelineSet available!"); + logger.error("No notifTimelineSet available!"); content = ; } diff --git a/src/components/structures/RoomDirectory.tsx b/src/components/structures/RoomDirectory.tsx index 3c5f99cc7de..8e9be291031 100644 --- a/src/components/structures/RoomDirectory.tsx +++ b/src/components/structures/RoomDirectory.tsx @@ -48,6 +48,8 @@ import Spinner from "../views/elements/Spinner"; import { ActionPayload } from "../../dispatcher/payloads"; import { getDisplayAliasForAliasSet } from "../../Rooms"; +import { logger } from "matrix-js-sdk/src/logger"; + const MAX_NAME_LENGTH = 80; const MAX_TOPIC_LENGTH = 800; @@ -285,7 +287,7 @@ export default class RoomDirectory extends React.Component { return false; } - console.error("Failed to get publicRooms: %s", JSON.stringify(err)); + logger.error("Failed to get publicRooms: %s", JSON.stringify(err)); track('Failed to get public room list'); const brand = SdkConfig.get().brand; this.setState({ @@ -335,7 +337,7 @@ export default class RoomDirectory extends React.Component { }, (err) => { modal.close(); this.refreshRoomList(); - console.error("Failed to " + step + ": " + err); + logger.error("Failed to " + step + ": " + err); Modal.createTrackedDialog('Remove from Directory Error', '', ErrorDialog, { title: _t('Error'), description: (err && err.message) diff --git a/src/components/structures/RoomView.tsx b/src/components/structures/RoomView.tsx index e5067f1fcf5..51404a17d93 100644 --- a/src/components/structures/RoomView.tsx +++ b/src/components/structures/RoomView.tsx @@ -963,8 +963,8 @@ export class RoomView extends React.Component { } catch (err) { const errorMessage = `Fetching room members for ${room.roomId} failed.` + " Room members will appear incomplete."; - console.error(errorMessage); - console.error(err); + logger.error(errorMessage); + logger.error(err); } } } @@ -1315,7 +1315,7 @@ export class RoomView extends React.Component { return searchPromise.then((results) => { debuglog("search complete"); if (this.unmounted || !this.state.searching || this.searchId != localSearchId) { - console.error("Discarding stale search results"); + logger.error("Discarding stale search results"); return false; } @@ -1341,7 +1341,7 @@ export class RoomView extends React.Component { searchResults: results, }); }, (error) => { - console.error("Search failed", error); + logger.error("Search failed", error); Modal.createTrackedDialog('Search failed', '', ErrorDialog, { title: _t("Search failed"), description: ((error && error.message) ? error.message : @@ -1472,7 +1472,7 @@ export class RoomView extends React.Component { rejecting: false, }); }, (error) => { - console.error("Failed to reject invite: %s", error); + logger.error("Failed to reject invite: %s", error); const msg = error.message ? error.message : JSON.stringify(error); Modal.createTrackedDialog('Failed to reject invite', '', ErrorDialog, { @@ -1505,7 +1505,7 @@ export class RoomView extends React.Component { rejecting: false, }); } catch (error) { - console.error("Failed to reject invite: %s", error); + logger.error("Failed to reject invite: %s", error); const msg = error.message ? error.message : JSON.stringify(error); Modal.createTrackedDialog('Failed to reject invite', '', ErrorDialog, { diff --git a/src/components/structures/ScrollPanel.tsx b/src/components/structures/ScrollPanel.tsx index 0ea070627a1..1699b535d99 100644 --- a/src/components/structures/ScrollPanel.tsx +++ b/src/components/structures/ScrollPanel.tsx @@ -408,7 +408,7 @@ export default class ScrollPanel extends React.Component { try { await Promise.all(fillPromises); } catch (err) { - console.error(err); + logger.error(err); } } if (isFirstCall) { diff --git a/src/components/structures/SpaceRoomView.tsx b/src/components/structures/SpaceRoomView.tsx index 383524b738b..423bcdd3056 100644 --- a/src/components/structures/SpaceRoomView.tsx +++ b/src/components/structures/SpaceRoomView.tsx @@ -536,7 +536,7 @@ const SpaceSetupFirstRooms = ({ space, title, description, onFinished }) => { })); onFinished(roomIds[0]); } catch (e) { - console.error("Failed to create initial space rooms", e); + logger.error("Failed to create initial space rooms", e); setError(_t("Failed to create initial space rooms")); } setBusy(false); @@ -713,7 +713,7 @@ const SpaceSetupPrivateInvite = ({ space, onFinished }) => { onFinished(); } } catch (err) { - console.error("Failed to invite users to space: ", err); + logger.error("Failed to invite users to space: ", err); setError(_t("We couldn't invite those users. Please check the users you want to invite and try again.")); } setBusy(false); diff --git a/src/components/structures/TabbedView.tsx b/src/components/structures/TabbedView.tsx index 037c33a600a..efa11434433 100644 --- a/src/components/structures/TabbedView.tsx +++ b/src/components/structures/TabbedView.tsx @@ -23,6 +23,8 @@ import { replaceableComponent } from "../../utils/replaceableComponent"; import classNames from "classnames"; import AccessibleButton from "../views/elements/AccessibleButton"; +import { logger } from "matrix-js-sdk/src/logger"; + /** * Represents a tab for the TabbedView. */ @@ -90,7 +92,7 @@ export default class TabbedView extends React.Component { if (this.props.onChange) this.props.onChange(tab.id); this.setState({ activeTabIndex: idx }); } else { - console.error("Could not find tab " + tab.label + " in tabs"); + logger.error("Could not find tab " + tab.label + " in tabs"); } } diff --git a/src/components/structures/TimelinePanel.tsx b/src/components/structures/TimelinePanel.tsx index 69241811327..e07a27cf04b 100644 --- a/src/components/structures/TimelinePanel.tsx +++ b/src/components/structures/TimelinePanel.tsx @@ -799,11 +799,11 @@ class TimelinePanel extends React.Component { lastReadEvent, {}, ).catch((e) => { - console.error(e); + logger.error(e); this.lastRRSentEventId = undefined; }); } else { - console.error(e); + logger.error(e); } // it failed, so allow retries next time the user is active this.lastRRSentEventId = undefined; @@ -1121,7 +1121,7 @@ class TimelinePanel extends React.Component { if (this.unmounted) return; this.setState({ timelineLoading: false }); - console.error( + logger.error( `Error loading timeline panel at ${eventId}: ${error}`, ); diff --git a/src/components/structures/auth/ForgotPassword.tsx b/src/components/structures/auth/ForgotPassword.tsx index 24b47bfa032..2cb2a2a1a9c 100644 --- a/src/components/structures/auth/ForgotPassword.tsx +++ b/src/components/structures/auth/ForgotPassword.tsx @@ -33,6 +33,8 @@ import { PASSWORD_MIN_SCORE } from '../../views/auth/RegistrationForm'; import { IValidationResult } from "../../views/elements/Validation"; import InlineSpinner from '../../views/elements/InlineSpinner'; +import { logger } from "matrix-js-sdk/src/logger"; + enum Phase { // Show the forgot password inputs Forgot = 1, @@ -147,7 +149,7 @@ export default class ForgotPassword extends React.Component { private onVerify = async (ev: React.MouseEvent): Promise => { ev.preventDefault(); if (!this.reset) { - console.error("onVerify called before submitPasswordReset!"); + logger.error("onVerify called before submitPasswordReset!"); return; } if (this.state.currentHttpRequest) return; diff --git a/src/components/structures/auth/Login.tsx b/src/components/structures/auth/Login.tsx index c8f208476ba..403c013e64d 100644 --- a/src/components/structures/auth/Login.tsx +++ b/src/components/structures/auth/Login.tsx @@ -309,7 +309,7 @@ export default class LoginComponent extends React.PureComponent busy: false, }); } catch (e) { - console.error("Problem parsing URL or unhandled error doing .well-known discovery:", e); + logger.error("Problem parsing URL or unhandled error doing .well-known discovery:", e); let message = _t("Failed to perform homeserver discovery"); if (e.translatedMessage) { diff --git a/src/components/structures/auth/Registration.tsx b/src/components/structures/auth/Registration.tsx index 4cffed4348b..3c66a1ab86d 100644 --- a/src/components/structures/auth/Registration.tsx +++ b/src/components/structures/auth/Registration.tsx @@ -195,7 +195,7 @@ export default class Registration extends React.Component { const loginFlows = await this.loginLogic.getFlows(); ssoFlow = loginFlows.find(f => f.type === "m.login.sso" || f.type === "m.login.cas") as ISSOFlow; } catch (e) { - console.error("Failed to get login flows to check for SSO support", e); + logger.error("Failed to get login flows to check for SSO support", e); } this.setState({ @@ -370,12 +370,12 @@ export default class Registration extends React.Component { matrixClient.setPusher(emailPusher).then(() => { logger.log("Set email branding to " + this.props.brand); }, (error) => { - console.error("Couldn't set email branding: " + error); + logger.error("Couldn't set email branding: " + error); }); } } }, (error) => { - console.error("Couldn't get pushers: " + error); + logger.error("Couldn't get pushers: " + error); }); } diff --git a/src/components/structures/auth/SoftLogout.tsx b/src/components/structures/auth/SoftLogout.tsx index a943f47e66d..db93d30c27f 100644 --- a/src/components/structures/auth/SoftLogout.tsx +++ b/src/components/structures/auth/SoftLogout.tsx @@ -173,7 +173,7 @@ export default class SoftLogout extends React.Component { } Lifecycle.hydrateSession(credentials).catch((e) => { - console.error(e); + logger.error(e); this.setState({ busy: false, errorText: _t("Failed to re-authenticate") }); }); }; @@ -193,7 +193,7 @@ export default class SoftLogout extends React.Component { try { credentials = await sendLoginRequest(hsUrl, isUrl, loginType, loginParams); } catch (e) { - console.error(e); + logger.error(e); this.setState({ busy: false, loginView: LOGIN_VIEW.UNSUPPORTED }); return; } @@ -201,7 +201,7 @@ export default class SoftLogout extends React.Component { Lifecycle.hydrateSession(credentials).then(() => { if (this.props.onTokenLoginCompleted) this.props.onTokenLoginCompleted(); }).catch((e) => { - console.error(e); + logger.error(e); this.setState({ busy: false, loginView: LOGIN_VIEW.UNSUPPORTED }); }); } diff --git a/src/components/views/audio_messages/AudioPlayerBase.tsx b/src/components/views/audio_messages/AudioPlayerBase.tsx index d8fc9d507f4..5158e878270 100644 --- a/src/components/views/audio_messages/AudioPlayerBase.tsx +++ b/src/components/views/audio_messages/AudioPlayerBase.tsx @@ -21,6 +21,8 @@ import { UPDATE_EVENT } from "../../../stores/AsyncStore"; import { replaceableComponent } from "../../../utils/replaceableComponent"; import { _t } from "../../../languageHandler"; +import { logger } from "matrix-js-sdk/src/logger"; + interface IProps { // Playback instance to render. Cannot change during component lifecycle: create // an all-new component instead. @@ -50,7 +52,7 @@ export default abstract class AudioPlayerBase extends React.PureComponent { - console.error("Error processing audio file:", e); + logger.error("Error processing audio file:", e); this.setState({ error: true }); }); } diff --git a/src/components/views/auth/CaptchaForm.tsx b/src/components/views/auth/CaptchaForm.tsx index db0e07e0467..5820b9335b8 100644 --- a/src/components/views/auth/CaptchaForm.tsx +++ b/src/components/views/auth/CaptchaForm.tsx @@ -85,13 +85,13 @@ export default class CaptchaForm extends React.Component { static defaultProps = { - onValidationChange: console.error, + onValidationChange: logger.error, canSubmit: true, }; diff --git a/src/components/views/avatars/MemberAvatar.tsx b/src/components/views/avatars/MemberAvatar.tsx index 001df16d405..48b2575cd25 100644 --- a/src/components/views/avatars/MemberAvatar.tsx +++ b/src/components/views/avatars/MemberAvatar.tsx @@ -25,6 +25,8 @@ import BaseAvatar from "./BaseAvatar"; import { replaceableComponent } from "../../../utils/replaceableComponent"; import { mediaFromMxc } from "../../../customisations/Media"; +import { logger } from "matrix-js-sdk/src/logger"; + interface IProps extends Omit, "name" | "idName" | "url"> { member: RoomMember; fallbackUserId?: string; @@ -85,7 +87,7 @@ export default class MemberAvatar extends React.Component { title: props.fallbackUserId, }; } else { - console.error("MemberAvatar called somehow with null member or fallbackUserId"); + logger.error("MemberAvatar called somehow with null member or fallbackUserId"); } } diff --git a/src/components/views/context_menus/GroupInviteTileContextMenu.js b/src/components/views/context_menus/GroupInviteTileContextMenu.js index 1529723ac86..ed5a45d4323 100644 --- a/src/components/views/context_menus/GroupInviteTileContextMenu.js +++ b/src/components/views/context_menus/GroupInviteTileContextMenu.js @@ -25,6 +25,8 @@ import GroupStore from "../../../stores/GroupStore"; import { MenuItem } from "../../structures/ContextMenu"; import { replaceableComponent } from "../../../utils/replaceableComponent"; +import { logger } from "matrix-js-sdk/src/logger"; + @replaceableComponent("views.context_menus.GroupInviteTileContextMenu") export default class GroupInviteTileContextMenu extends React.Component { static propTypes = { @@ -62,7 +64,7 @@ export default class GroupInviteTileContextMenu extends React.Component { try { await GroupStore.leaveGroup(this.props.group.groupId); } catch (e) { - console.error("Error rejecting community invite: ", e); + logger.error("Error rejecting community invite: ", e); const ErrorDialog = sdk.getComponent("dialogs.ErrorDialog"); Modal.createTrackedDialog('Error rejecting invite', '', ErrorDialog, { title: _t("Error"), diff --git a/src/components/views/context_menus/WidgetContextMenu.tsx b/src/components/views/context_menus/WidgetContextMenu.tsx index 26d7b640a45..0c3b1dd788e 100644 --- a/src/components/views/context_menus/WidgetContextMenu.tsx +++ b/src/components/views/context_menus/WidgetContextMenu.tsx @@ -34,6 +34,8 @@ import MatrixClientContext from "../../../contexts/MatrixClientContext"; import { Container, WidgetLayoutStore } from "../../../stores/widgets/WidgetLayoutStore"; import { getConfigLivestreamUrl, startJitsiAudioLivestream } from "../../../Livestream"; +import { logger } from "matrix-js-sdk/src/logger"; + interface IProps extends React.ComponentProps { app: IApp; userWidget?: boolean; @@ -65,7 +67,7 @@ const WidgetContextMenu: React.FC = ({ try { await startJitsiAudioLivestream(widgetMessaging, roomId); } catch (err) { - console.error("Failed to start livestream", err); + logger.error("Failed to start livestream", err); // XXX: won't i18n well, but looks like widget api only support 'message'? const message = err.message || _t("Unable to start audio streaming."); Modal.createTrackedDialog('WidgetContext Menu', 'Livestream failed', ErrorDialog, { @@ -114,7 +116,7 @@ const WidgetContextMenu: React.FC = ({ file: data.screenshot, }); }).catch(err => { - console.error("Failed to take screenshot: ", err); + logger.error("Failed to take screenshot: ", err); }); onFinished(); }; @@ -165,7 +167,7 @@ const WidgetContextMenu: React.FC = ({ current[app.eventId] = false; const level = SettingsStore.firstSupportedLevel("allowedWidgets"); SettingsStore.setValue("allowedWidgets", roomId, level, current).catch(err => { - console.error(err); + logger.error(err); // We don't really need to do anything about this - the user will just hit the button again. }); onFinished(); diff --git a/src/components/views/dialogs/AddExistingToSpaceDialog.tsx b/src/components/views/dialogs/AddExistingToSpaceDialog.tsx index 01a767bf147..337941ce5fd 100644 --- a/src/components/views/dialogs/AddExistingToSpaceDialog.tsx +++ b/src/components/views/dialogs/AddExistingToSpaceDialog.tsx @@ -41,6 +41,8 @@ import TruncatedList from "../elements/TruncatedList"; import EntityTile from "../rooms/EntityTile"; import BaseAvatar from "../avatars/BaseAvatar"; +import { logger } from "matrix-js-sdk/src/logger"; + interface IProps { space: Room; onCreateRoomClick(): void; @@ -160,7 +162,7 @@ export const AddExistingToSpace: React.FC = ({ }); setProgress(i => i + 1); } catch (e) { - console.error("Failed to add rooms to space", e); + logger.error("Failed to add rooms to space", e); setError(error = e); break; } diff --git a/src/components/views/dialogs/AddressPickerDialog.tsx b/src/components/views/dialogs/AddressPickerDialog.tsx index 6b239ee5703..9484859509b 100644 --- a/src/components/views/dialogs/AddressPickerDialog.tsx +++ b/src/components/views/dialogs/AddressPickerDialog.tsx @@ -37,6 +37,8 @@ import AddressTile from '../elements/AddressTile'; import BaseDialog from "./BaseDialog"; import DialogButtons from "../elements/DialogButtons"; +import { logger } from "matrix-js-sdk/src/logger"; + const TRUNCATE_QUERY_LIST = 40; const QUERY_USER_DIRECTORY_DEBOUNCE_MS = 200; @@ -225,7 +227,7 @@ export default class AddressPickerDialog extends React.Component this.doRoomSearch(query); } } else { - console.error('Unknown pickerType', this.props.pickerType); + logger.error('Unknown pickerType', this.props.pickerType); } }, QUERY_USER_DIRECTORY_DEBOUNCE_MS); } else { @@ -282,7 +284,7 @@ export default class AddressPickerDialog extends React.Component }); this.processResults(results, query); }).catch((err) => { - console.error('Error whilst searching group rooms: ', err); + logger.error('Error whilst searching group rooms: ', err); this.setState({ searchError: err.errcode ? err.message : _t('Something went wrong!'), }); @@ -388,7 +390,7 @@ export default class AddressPickerDialog extends React.Component } this.processResults(resp.results, query); }).catch((err) => { - console.error('Error whilst searching user directory: ', err); + logger.error('Error whilst searching user directory: ', err); this.setState({ searchError: err.errcode ? err.message : _t('Something went wrong!'), }); @@ -582,7 +584,7 @@ export default class AddressPickerDialog extends React.Component }], }); } catch (e) { - console.error(e); + logger.error(e); this.setState({ searchError: _t('Something went wrong!'), }); diff --git a/src/components/views/dialogs/CommunityPrototypeInviteDialog.tsx b/src/components/views/dialogs/CommunityPrototypeInviteDialog.tsx index 6a8773ce45e..d5a54aaa237 100644 --- a/src/components/views/dialogs/CommunityPrototypeInviteDialog.tsx +++ b/src/components/views/dialogs/CommunityPrototypeInviteDialog.tsx @@ -33,6 +33,8 @@ import ErrorDialog from "./ErrorDialog"; import { replaceableComponent } from "../../../utils/replaceableComponent"; import { mediaFromMxc } from "../../../customisations/Media"; +import { logger } from "matrix-js-sdk/src/logger"; + interface IProps extends IDialogProps { roomId: string; communityName: string; @@ -99,7 +101,7 @@ export default class CommunityPrototypeInviteDialog extends React.PureComponent< } } catch (e) { this.setState({ busy: false }); - console.error(e); + logger.error(e); Modal.createTrackedDialog('Failed to invite', '', ErrorDialog, { title: _t("Failed to invite"), description: ((e && e.message) ? e.message : _t("Operation failed")), diff --git a/src/components/views/dialogs/CreateCommunityPrototypeDialog.tsx b/src/components/views/dialogs/CreateCommunityPrototypeDialog.tsx index ccac45fbcc2..ed48778b1d8 100644 --- a/src/components/views/dialogs/CreateCommunityPrototypeDialog.tsx +++ b/src/components/views/dialogs/CreateCommunityPrototypeDialog.tsx @@ -27,6 +27,8 @@ import { showCommunityRoomInviteDialog } from "../../../RoomInvite"; import GroupStore from "../../../stores/GroupStore"; import { replaceableComponent } from "../../../utils/replaceableComponent"; +import { logger } from "matrix-js-sdk/src/logger"; + interface IProps extends IDialogProps { } @@ -110,7 +112,7 @@ export default class CreateCommunityPrototypeDialog extends React.PureComponent< }); } } catch (e) { - console.error(e); + logger.error(e); this.setState({ busy: false, error: _t( diff --git a/src/components/views/dialogs/CreateSpaceFromCommunityDialog.tsx b/src/components/views/dialogs/CreateSpaceFromCommunityDialog.tsx index c7706c115cb..c241855f26e 100644 --- a/src/components/views/dialogs/CreateSpaceFromCommunityDialog.tsx +++ b/src/components/views/dialogs/CreateSpaceFromCommunityDialog.tsx @@ -42,6 +42,8 @@ import TagOrderActions from "../../../actions/TagOrderActions"; import { inviteUsersToRoom } from "../../../RoomInvite"; import ProgressBar from "../elements/ProgressBar"; +import { logger } from "matrix-js-sdk/src/logger"; + interface IProps { matrixClient: MatrixClient; groupId: string; @@ -271,7 +273,7 @@ const CreateSpaceFromCommunityDialog: React.FC = ({ matrixClient: cli, g }, }, "mx_CreateSpaceFromCommunityDialog_SuccessInfoDialog"); } catch (e) { - console.error(e); + logger.error(e); setError(e); } diff --git a/src/components/views/dialogs/CreateSubspaceDialog.tsx b/src/components/views/dialogs/CreateSubspaceDialog.tsx index 0d7facb4763..44ffd2afdd2 100644 --- a/src/components/views/dialogs/CreateSubspaceDialog.tsx +++ b/src/components/views/dialogs/CreateSubspaceDialog.tsx @@ -30,6 +30,8 @@ import { createSpace, SpaceCreateForm } from "../spaces/SpaceCreateMenu"; import { SubspaceSelector } from "./AddExistingToSpaceDialog"; import JoinRuleDropdown from "../elements/JoinRuleDropdown"; +import { logger } from "matrix-js-sdk/src/logger"; + interface IProps { space: Room; onAddExistingSpaceClick(): void; @@ -83,7 +85,7 @@ const CreateSubspaceDialog: React.FC = ({ space, onAddExistingSpaceClick onFinished(true); } catch (e) { - console.error(e); + logger.error(e); } }; diff --git a/src/components/views/dialogs/DeactivateAccountDialog.tsx b/src/components/views/dialogs/DeactivateAccountDialog.tsx index 6548bd78fcf..6930f46bb05 100644 --- a/src/components/views/dialogs/DeactivateAccountDialog.tsx +++ b/src/components/views/dialogs/DeactivateAccountDialog.tsx @@ -28,6 +28,8 @@ import StyledCheckbox from "../elements/StyledCheckbox"; import { replaceableComponent } from "../../../utils/replaceableComponent"; import BaseDialog from "./BaseDialog"; +import { logger } from "matrix-js-sdk/src/logger"; + interface IProps { onFinished: (success: boolean) => void; } @@ -112,7 +114,7 @@ export default class DeactivateAccountDialog extends React.Component { - console.error(e); + logger.error(e); this.setState({ errStr: _t("There was a problem communicating with the server. Please try again.") }); }); }; diff --git a/src/components/views/dialogs/EditCommunityPrototypeDialog.tsx b/src/components/views/dialogs/EditCommunityPrototypeDialog.tsx index a0e6046d710..7463c82cfb5 100644 --- a/src/components/views/dialogs/EditCommunityPrototypeDialog.tsx +++ b/src/components/views/dialogs/EditCommunityPrototypeDialog.tsx @@ -26,6 +26,8 @@ import FlairStore from "../../../stores/FlairStore"; import { replaceableComponent } from "../../../utils/replaceableComponent"; import { mediaFromMxc } from "../../../customisations/Media"; +import { logger } from "matrix-js-sdk/src/logger"; + interface IProps extends IDialogProps { communityId: string; } @@ -89,7 +91,7 @@ export default class EditCommunityPrototypeDialog extends React.PureComponent = ({ room, onFinished }) => { ); break; default: - console.error("Unknown export format"); + logger.error("Unknown export format"); return; } }; diff --git a/src/components/views/dialogs/InviteDialog.tsx b/src/components/views/dialogs/InviteDialog.tsx index c9ea1143de5..84392c8ba4c 100644 --- a/src/components/views/dialogs/InviteDialog.tsx +++ b/src/components/views/dialogs/InviteDialog.tsx @@ -731,7 +731,7 @@ export default class InviteDialog extends React.PureComponent { - console.error("Error searching user directory:"); - console.error(e); + logger.error("Error searching user directory:"); + logger.error(e); this.setState({ serverResultsMixin: [] }); // clear results because it's moderately fatal }); @@ -948,8 +948,8 @@ export default class InviteDialog extends React.PureComponent
      ; } else { - console.error("Unknown kind of InviteDialog: " + this.props.kind); + logger.error("Unknown kind of InviteDialog: " + this.props.kind); } const goButton = this.props.kind == KIND_CALL_TRANSFER ? null : reject(error)); return promise; diff --git a/src/components/views/dialogs/ServerPickerDialog.tsx b/src/components/views/dialogs/ServerPickerDialog.tsx index 7a79791b3c6..4c355c6c0e9 100644 --- a/src/components/views/dialogs/ServerPickerDialog.tsx +++ b/src/components/views/dialogs/ServerPickerDialog.tsx @@ -28,6 +28,8 @@ import TextWithTooltip from "../elements/TextWithTooltip"; import withValidation, { IFieldState } from "../elements/Validation"; import { replaceableComponent } from "../../../utils/replaceableComponent"; +import { logger } from "matrix-js-sdk/src/logger"; + interface IProps { title?: string; serverConfig: ValidatedServerConfig; @@ -93,7 +95,7 @@ export default class ServerPickerDialog extends React.PureComponent { }); }, (err) => { this.setState({ emailBusy: false }); - console.error("Unable to add email address " + emailAddress + " " + err); + logger.error("Unable to add email address " + emailAddress + " " + err); Modal.createTrackedDialog('Unable to add email address', '', ErrorDialog, { title: _t("Unable to add email address"), description: ((err && err.message) ? err.message : _t("Operation failed")), @@ -119,7 +121,7 @@ export default class SetEmailDialog extends React.Component { onFinished: this.onEmailDialogFinished, }); } else { - console.error("Unable to verify email address: " + err); + logger.error("Unable to verify email address: " + err); Modal.createTrackedDialog('Unable to verify email address', '', ErrorDialog, { title: _t("Unable to verify email address."), description: ((err && err.message) ? err.message : _t("Operation failed")), diff --git a/src/components/views/dialogs/TabbedIntegrationManagerDialog.tsx b/src/components/views/dialogs/TabbedIntegrationManagerDialog.tsx index 0f87b5c18de..dab1a1f222c 100644 --- a/src/components/views/dialogs/TabbedIntegrationManagerDialog.tsx +++ b/src/components/views/dialogs/TabbedIntegrationManagerDialog.tsx @@ -27,6 +27,8 @@ import AccessibleButton from "../elements/AccessibleButton"; import IntegrationManager from "../settings/IntegrationManager"; import { IDialogProps } from "./IDialogProps"; +import { logger } from "matrix-js-sdk/src/logger"; + interface IProps extends IDialogProps { /** * Optional room where the integration manager should be open to @@ -116,7 +118,7 @@ export default class TabbedIntegrationManagerDialog extends React.Component { // Fetch a token for the integration manager, now that we're allowed to this.startWidget(); }).catch(err => { - console.error(err); + logger.error(err); // We don't really need to do anything about this - the user will just hit the button again. }); }; diff --git a/src/components/views/elements/ErrorBoundary.tsx b/src/components/views/elements/ErrorBoundary.tsx index 50ea7d9a569..7e8686a35c4 100644 --- a/src/components/views/elements/ErrorBoundary.tsx +++ b/src/components/views/elements/ErrorBoundary.tsx @@ -25,6 +25,8 @@ import { replaceableComponent } from "../../../utils/replaceableComponent"; import BugReportDialog from '../dialogs/BugReportDialog'; import AccessibleButton from './AccessibleButton'; +import { logger } from "matrix-js-sdk/src/logger"; + interface IState { error: Error; } @@ -52,8 +54,8 @@ export default class ErrorBoundary extends React.PureComponent<{}, IState> { componentDidCatch(error: Error, { componentStack }: ErrorInfo): void { // Browser consoles are better at formatting output when native errors are passed // in their own `console.error` invocation. - console.error(error); - console.error( + logger.error(error); + logger.error( "The above error occured while React was rendering the following components:", componentStack, ); diff --git a/src/components/views/elements/Flair.js b/src/components/views/elements/Flair.js index 873d65d5bd4..280cac503e5 100644 --- a/src/components/views/elements/Flair.js +++ b/src/components/views/elements/Flair.js @@ -22,6 +22,8 @@ import MatrixClientContext from "../../../contexts/MatrixClientContext"; import { replaceableComponent } from "../../../utils/replaceableComponent"; import { mediaFromMxc } from "../../../customisations/Media"; +import { logger } from "matrix-js-sdk/src/logger"; + class FlairAvatar extends React.Component { constructor() { super(); @@ -92,7 +94,7 @@ export default class Flair extends React.Component { try { groupProfile = await FlairStore.getGroupProfileCached(this.context, groupId); } catch (err) { - console.error('Could not get profile for group', groupId, err); + logger.error('Could not get profile for group', groupId, err); } profiles.push(groupProfile); } diff --git a/src/components/views/elements/Pill.js b/src/components/views/elements/Pill.js index 95d29fc9ae8..4a2b39f8914 100644 --- a/src/components/views/elements/Pill.js +++ b/src/components/views/elements/Pill.js @@ -29,6 +29,8 @@ import { mediaFromMxc } from "../../../customisations/Media"; import Tooltip from './Tooltip'; import { replaceableComponent } from "../../../utils/replaceableComponent"; +import { logger } from "matrix-js-sdk/src/logger"; + @replaceableComponent("views.elements.Pill") class Pill extends React.Component { static roomNotifPos(text) { @@ -188,7 +190,7 @@ class Pill extends React.Component { }; this.setState({ member }); }).catch((err) => { - console.error('Could not retrieve profile data for ' + userId + ':', err); + logger.error('Could not retrieve profile data for ' + userId + ':', err); }); } diff --git a/src/components/views/groups/GroupRoomInfo.js b/src/components/views/groups/GroupRoomInfo.js index d8f086700d5..b59144a716a 100644 --- a/src/components/views/groups/GroupRoomInfo.js +++ b/src/components/views/groups/GroupRoomInfo.js @@ -27,6 +27,8 @@ import AutoHideScrollbar from "../../structures/AutoHideScrollbar"; import { replaceableComponent } from "../../../utils/replaceableComponent"; import { mediaFromMxc } from "../../../customisations/Media"; +import { logger } from "matrix-js-sdk/src/logger"; + @replaceableComponent("views.groups.GroupRoomInfo") export default class GroupRoomInfo extends React.Component { static contextType = MatrixClientContext; @@ -103,7 +105,7 @@ export default class GroupRoomInfo extends React.Component { action: "view_group_room_list", }); }).catch((err) => { - console.error(`Error whilst removing ${roomId} from ${groupId}`, err); + logger.error(`Error whilst removing ${roomId} from ${groupId}`, err); const ErrorDialog = sdk.getComponent("dialogs.ErrorDialog"); Modal.createTrackedDialog('Failed to remove room from group', '', ErrorDialog, { title: _t("Failed to remove room from community"), @@ -133,7 +135,7 @@ export default class GroupRoomInfo extends React.Component { const roomId = this.props.groupRoomId; const roomName = this.state.groupRoom.displayname; GroupStore.updateGroupRoomVisibility(this.props.groupId, roomId, isPublic).catch((err) => { - console.error(`Error whilst changing visibility of ${roomId} in ${groupId} to ${isPublic}`, err); + logger.error(`Error whilst changing visibility of ${roomId} in ${groupId} to ${isPublic}`, err); const ErrorDialog = sdk.getComponent("dialogs.ErrorDialog"); Modal.createTrackedDialog('Failed to remove room from group', '', ErrorDialog, { title: _t("Something went wrong!"), diff --git a/src/components/views/groups/GroupTile.js b/src/components/views/groups/GroupTile.js index 21308ac056a..cf1a5b91ce7 100644 --- a/src/components/views/groups/GroupTile.js +++ b/src/components/views/groups/GroupTile.js @@ -26,6 +26,8 @@ import { _t } from "../../../languageHandler"; import TagOrderActions from "../../../actions/TagOrderActions"; import GroupFilterOrderStore from "../../../stores/GroupFilterOrderStore"; +import { logger } from "matrix-js-sdk/src/logger"; + @replaceableComponent("views.groups.GroupTile") class GroupTile extends React.Component { static propTypes = { @@ -51,7 +53,7 @@ class GroupTile extends React.Component { FlairStore.getGroupProfileCached(this.context, this.props.groupId).then((profile) => { this.setState({ profile }); }).catch((err) => { - console.error('Error whilst getting cached profile for GroupTile', err); + logger.error('Error whilst getting cached profile for GroupTile', err); }); } diff --git a/src/components/views/groups/GroupUserSettings.js b/src/components/views/groups/GroupUserSettings.js index efb392c54f7..85fd15e2389 100644 --- a/src/components/views/groups/GroupUserSettings.js +++ b/src/components/views/groups/GroupUserSettings.js @@ -20,6 +20,8 @@ import { _t } from '../../../languageHandler'; import MatrixClientContext from "../../../contexts/MatrixClientContext"; import { replaceableComponent } from "../../../utils/replaceableComponent"; +import { logger } from "matrix-js-sdk/src/logger"; + @replaceableComponent("views.groups.GroupUserSettings") export default class GroupUserSettings extends React.Component { static contextType = MatrixClientContext; @@ -33,7 +35,7 @@ export default class GroupUserSettings extends React.Component { this.context.getJoinedGroups().then((result) => { this.setState({ groups: result.groups || [], error: null }); }, (err) => { - console.error(err); + logger.error(err); this.setState({ groups: null, error: err }); }); } diff --git a/src/components/views/messages/MKeyVerificationRequest.tsx b/src/components/views/messages/MKeyVerificationRequest.tsx index ce828beed04..e1b91f63d76 100644 --- a/src/components/views/messages/MKeyVerificationRequest.tsx +++ b/src/components/views/messages/MKeyVerificationRequest.tsx @@ -27,6 +27,8 @@ import EventTileBubble from "./EventTileBubble"; import { replaceableComponent } from "../../../utils/replaceableComponent"; import AccessibleButton from '../elements/AccessibleButton'; +import { logger } from "matrix-js-sdk/src/logger"; + interface IProps { mxEvent: MatrixEvent; } @@ -68,7 +70,7 @@ export default class MKeyVerificationRequest extends React.Component { this.openRequest(); await request.accept(); } catch (err) { - console.error(err.message); + logger.error(err.message); } } }; @@ -79,7 +81,7 @@ export default class MKeyVerificationRequest extends React.Component { try { await request.cancel(); } catch (err) { - console.error(err.message); + logger.error(err.message); } } }; diff --git a/src/components/views/right_panel/PinnedMessagesCard.tsx b/src/components/views/right_panel/PinnedMessagesCard.tsx index c82e5a3f803..bb6ddb0f741 100644 --- a/src/components/views/right_panel/PinnedMessagesCard.tsx +++ b/src/components/views/right_panel/PinnedMessagesCard.tsx @@ -29,6 +29,8 @@ import { useAsyncMemo } from "../../../hooks/useAsyncMemo"; import PinnedEventTile from "../rooms/PinnedEventTile"; import { useRoomState } from "../../../hooks/useRoomState"; +import { logger } from "matrix-js-sdk/src/logger"; + interface IProps { room: Room; onClose(): void; @@ -107,8 +109,8 @@ const PinnedMessagesCard = ({ room, onClose }: IProps) => { return event; } } catch (err) { - console.error("Error looking up pinned event " + eventId + " in room " + room.roomId); - console.error(err); + logger.error("Error looking up pinned event " + eventId + " in room " + room.roomId); + logger.error(err); } return null; }); diff --git a/src/components/views/right_panel/UserInfo.tsx b/src/components/views/right_panel/UserInfo.tsx index e73e51bcb8d..7d76da71a30 100644 --- a/src/components/views/right_panel/UserInfo.tsx +++ b/src/components/views/right_panel/UserInfo.tsx @@ -582,7 +582,7 @@ const RoomKickButton = ({ room, member, startUpdating, stopUpdating }: Omit = ({ member }) => { await cli.redactEvent(roomId, event.getId()); } catch (err) { // log and swallow errors - console.error("Could not redact", event.getId()); - console.error(err); + logger.error("Could not redact", event.getId()); + logger.error(err); } })); console.info(`Finished redacting recent ${count} messages for ${user} in ${roomId}`); @@ -744,7 +744,7 @@ const BanToggleButton = ({ room, member, startUpdating, stopUpdating }: Omit = ({ member, room, powerLevels, try { if (!(await warnSelfDemote(SpaceStore.spacesEnabled && room?.isSpaceRoom()))) return; } catch (e) { - console.error("Failed to warn about self demotion: ", e); + logger.error("Failed to warn about self demotion: ", e); return; } } @@ -817,7 +817,7 @@ const MuteToggleButton: React.FC = ({ member, room, powerLevels, // get out of sync if we force setState here! logger.log("Mute toggle success"); }, function(err) { - console.error("Mute error: " + err); + logger.error("Mute error: " + err); Modal.createTrackedDialog('Failed to mute user', '', ErrorDialog, { title: _t("Error"), description: _t("Failed to mute user"), @@ -1130,7 +1130,7 @@ const PowerLevelEditor: React.FC<{ // get out of sync if we force setState here! logger.log("Power change success"); }, function(err) { - console.error("Failed to change power level " + err); + logger.error("Failed to change power level " + err); Modal.createTrackedDialog('Failed to change power level', '', ErrorDialog, { title: _t("Error"), description: _t("Failed to change power level"), @@ -1166,7 +1166,7 @@ const PowerLevelEditor: React.FC<{ try { if (!(await warnSelfDemote(SpaceStore.spacesEnabled && room?.isSpaceRoom()))) return; } catch (e) { - console.error("Failed to warn about self demotion: ", e); + logger.error("Failed to warn about self demotion: ", e); } } @@ -1315,8 +1315,8 @@ const BasicUserInfo: React.FC<{ try { await cli.deactivateSynapseUser(member.userId); } catch (err) { - console.error("Failed to deactivate user"); - console.error(err); + logger.error("Failed to deactivate user"); + logger.error(err); Modal.createTrackedDialog('Failed to deactivate Synapse user', '', ErrorDialog, { title: _t('Failed to deactivate user'), diff --git a/src/components/views/right_panel/VerificationPanel.tsx b/src/components/views/right_panel/VerificationPanel.tsx index 8ed56bb2c3c..007b5d923c7 100644 --- a/src/components/views/right_panel/VerificationPanel.tsx +++ b/src/components/views/right_panel/VerificationPanel.tsx @@ -35,6 +35,8 @@ import { replaceableComponent } from "../../../utils/replaceableComponent"; import AccessibleButton from "../elements/AccessibleButton"; import VerificationShowSas from "../verification/VerificationShowSas"; +import { logger } from "matrix-js-sdk/src/logger"; + interface IProps { layout: string; request: VerificationRequest; @@ -335,7 +337,7 @@ export default class VerificationPanel extends React.PureComponent { MatrixClientPeg.get().sendStateEvent(this.props.roomId, "m.room.canonical_alias", eventContent, "").catch((err) => { - console.error(err); + logger.error(err); Modal.createTrackedDialog('Error updating main address', '', ErrorDialog, { title: _t("Error updating main address"), description: _t( @@ -204,7 +206,7 @@ export default class AliasSettings extends React.Component { MatrixClientPeg.get().sendStateEvent(this.props.roomId, "m.room.canonical_alias", eventContent, "").catch((err) => { - console.error(err); + logger.error(err); Modal.createTrackedDialog('Error updating alternative addresses', '', ErrorDialog, { title: _t("Error updating main address"), description: _t( @@ -236,7 +238,7 @@ export default class AliasSettings extends React.Component { this.changeCanonicalAlias(alias); } }).catch((err) => { - console.error(err); + logger.error(err); Modal.createTrackedDialog('Error creating address', '', ErrorDialog, { title: _t("Error creating address"), description: _t( @@ -259,7 +261,7 @@ export default class AliasSettings extends React.Component { this.changeCanonicalAlias(null); } }).catch((err) => { - console.error(err); + logger.error(err); let description; if (err.errcode === "M_FORBIDDEN") { description = _t("You don't have permission to delete the address."); diff --git a/src/components/views/room_settings/RelatedGroupSettings.js b/src/components/views/room_settings/RelatedGroupSettings.js index 23b497398a3..f815cd77ccb 100644 --- a/src/components/views/room_settings/RelatedGroupSettings.js +++ b/src/components/views/room_settings/RelatedGroupSettings.js @@ -24,6 +24,8 @@ import ErrorDialog from "../dialogs/ErrorDialog"; import MatrixClientContext from "../../../contexts/MatrixClientContext"; import { replaceableComponent } from "../../../utils/replaceableComponent"; +import { logger } from "matrix-js-sdk/src/logger"; + const GROUP_ID_REGEX = /\+\S+:\S+/; @replaceableComponent("views.room_settings.RelatedGroupSettings") @@ -53,7 +55,7 @@ export default class RelatedGroupSettings extends React.Component { this.context.sendStateEvent(this.props.roomId, 'm.room.related_groups', { groups: newGroupsList, }, '').catch((err) => { - console.error(err); + logger.error(err); Modal.createTrackedDialog('Error updating flair', '', ErrorDialog, { title: _t("Error updating flair"), description: _t( diff --git a/src/components/views/rooms/BasicMessageComposer.tsx b/src/components/views/rooms/BasicMessageComposer.tsx index edf4f515d25..4d13fab190b 100644 --- a/src/components/views/rooms/BasicMessageComposer.tsx +++ b/src/components/views/rooms/BasicMessageComposer.tsx @@ -49,6 +49,8 @@ import { ICompletion } from "../../../autocomplete/Autocompleter"; import { AutocompleteAction, getKeyBindingsManager, MessageComposerAction } from '../../../KeyBindingsManager'; import { replaceableComponent } from "../../../utils/replaceableComponent"; +import { logger } from "matrix-js-sdk/src/logger"; + // matches emoticons which follow the start of a line or whitespace const REGEX_EMOTICON_WHITESPACE = new RegExp('(?:^|\\s)(' + EMOTICON_REGEX.source + ')\\s|:^$'); export const REGEX_EMOTICON = new RegExp('(?:^|\\s)(' + EMOTICON_REGEX.source + ')$'); @@ -207,7 +209,7 @@ export default class BasicMessageEditor extends React.Component try { setSelection(this.editorRef.current, this.props.model, selection); } catch (err) { - console.error(err); + logger.error(err); } // if caret selection is a range, take the end position const position = selection instanceof Range ? selection.end : selection; @@ -596,7 +598,7 @@ export default class BasicMessageEditor extends React.Component this.setState({ showVisualBell: true }); } } catch (err) { - console.error(err); + logger.error(err); } } diff --git a/src/components/views/rooms/EditMessageComposer.tsx b/src/components/views/rooms/EditMessageComposer.tsx index 538de9afbf7..1e0a3677720 100644 --- a/src/components/views/rooms/EditMessageComposer.tsx +++ b/src/components/views/rooms/EditMessageComposer.tsx @@ -251,7 +251,7 @@ class EditMessageComposer extends React.Component partCreator.deserializePart(p)); return parts; } catch (e) { - console.error("Error parsing editing state: ", e); + logger.error("Error parsing editing state: ", e); } } } @@ -329,7 +329,7 @@ class EditMessageComposer extends React.Component a.filter(Boolean)) as Promise<[string, IPreviewUrlResponse][]>; }; diff --git a/src/components/views/rooms/SendMessageComposer.tsx b/src/components/views/rooms/SendMessageComposer.tsx index f35cba3cb93..dbda251c489 100644 --- a/src/components/views/rooms/SendMessageComposer.tsx +++ b/src/components/views/rooms/SendMessageComposer.tsx @@ -358,7 +358,7 @@ export class SendMessageComposer extends React.Component { scalarClient.disableWidgetAssets(WidgetType.STICKERPICKER, this.state.widgetId).then(() => { logger.log('Assets disabled'); }).catch((err) => { - console.error('Failed to disable assets'); + logger.error('Failed to disable assets'); }); } else { - console.error("Cannot disable assets: no scalar client"); + logger.error("Cannot disable assets: no scalar client"); } } else { console.warn('No widget ID specified, not disabling assets'); @@ -120,7 +120,7 @@ export default class Stickerpicker extends React.PureComponent { WidgetUtils.removeStickerpickerWidgets().then(() => { this.forceUpdate(); }).catch((e) => { - console.error('Failed to remove sticker picker widget', e); + logger.error('Failed to remove sticker picker widget', e); }); }; @@ -152,7 +152,7 @@ export default class Stickerpicker extends React.PureComponent { } private imError(errorMsg: string, e: Error): void { - console.error(errorMsg, e); + logger.error(errorMsg, e); this.setState({ imError: _t(errorMsg), }); @@ -230,7 +230,7 @@ export default class Stickerpicker extends React.PureComponent { const messaging = WidgetMessagingStore.instance.getMessagingForId(this.state.stickerpickerWidget.id); if (messaging && visible !== this.prevSentVisibility) { messaging.updateVisibility(visible).catch(err => { - console.error("Error updating widget visibility: ", err); + logger.error("Error updating widget visibility: ", err); }); this.prevSentVisibility = visible; } diff --git a/src/components/views/rooms/ThirdPartyMemberInfo.tsx b/src/components/views/rooms/ThirdPartyMemberInfo.tsx index 1590ce0871d..c29c558655d 100644 --- a/src/components/views/rooms/ThirdPartyMemberInfo.tsx +++ b/src/components/views/rooms/ThirdPartyMemberInfo.tsx @@ -29,6 +29,8 @@ import ErrorDialog from '../dialogs/ErrorDialog'; import AccessibleButton from '../elements/AccessibleButton'; import SpaceStore from "../../../stores/SpaceStore"; +import { logger } from "matrix-js-sdk/src/logger"; + interface IProps { event: MatrixEvent; } @@ -100,7 +102,7 @@ export default class ThirdPartyMemberInfo extends React.Component { MatrixClientPeg.get().sendStateEvent(this.state.roomId, "m.room.third_party_invite", {}, this.state.stateKey) .catch((err) => { - console.error(err); + logger.error(err); // Revert echo because of error this.setState({ invited: true }); diff --git a/src/components/views/rooms/VoiceRecordComposerTile.tsx b/src/components/views/rooms/VoiceRecordComposerTile.tsx index 288d97fc501..e50672ed4a7 100644 --- a/src/components/views/rooms/VoiceRecordComposerTile.tsx +++ b/src/components/views/rooms/VoiceRecordComposerTile.tsx @@ -36,6 +36,8 @@ import { NotificationColor } from "../../../stores/notifications/NotificationCol import InlineSpinner from "../elements/InlineSpinner"; import { PlaybackManager } from "../../../audio/PlaybackManager"; +import { logger } from "matrix-js-sdk/src/logger"; + interface IProps { room: Room; } @@ -75,7 +77,7 @@ export default class VoiceRecordComposerTile extends React.PureComponent { }); } catch (e) { this.setState({ error: e }); - console.error("Error bootstrapping cross-signing", e); + logger.error("Error bootstrapping cross-signing", e); } if (this.unmounted) return; this.getUpdatedStatus(); diff --git a/src/components/views/settings/DevicesPanel.tsx b/src/components/views/settings/DevicesPanel.tsx index d66d0f42ebd..c2dc924694e 100644 --- a/src/components/views/settings/DevicesPanel.tsx +++ b/src/components/views/settings/DevicesPanel.tsx @@ -28,6 +28,8 @@ import DevicesPanelEntry from "./DevicesPanelEntry"; import Spinner from "../elements/Spinner"; import AccessibleButton from "../elements/AccessibleButton"; +import { logger } from "matrix-js-sdk/src/logger"; + interface IProps { className?: string; } @@ -72,7 +74,7 @@ export default class DevicesPanel extends React.Component { // 404 probably means the HS doesn't yet support the API. errtxt = _t("Your homeserver does not support session management."); } else { - console.error("Error loading sessions:", error); + logger.error("Error loading sessions:", error); errtxt = _t("Unable to load session list"); } this.setState({ deviceLoadError: errtxt }); @@ -159,7 +161,7 @@ export default class DevicesPanel extends React.Component { }, }); }).catch((e) => { - console.error("Error deleting sessions", e); + logger.error("Error deleting sessions", e); if (this.unmounted) { return; } }).finally(() => { this.setState({ diff --git a/src/components/views/settings/DevicesPanelEntry.tsx b/src/components/views/settings/DevicesPanelEntry.tsx index 11311145567..6d73e1fe864 100644 --- a/src/components/views/settings/DevicesPanelEntry.tsx +++ b/src/components/views/settings/DevicesPanelEntry.tsx @@ -24,6 +24,8 @@ import StyledCheckbox from '../elements/StyledCheckbox'; import { replaceableComponent } from "../../../utils/replaceableComponent"; import EditableTextContainer from "../elements/EditableTextContainer"; +import { logger } from "matrix-js-sdk/src/logger"; + interface IProps { device?: IMyDevice; onDeviceToggled?: (device: IMyDevice) => void; @@ -41,7 +43,7 @@ export default class DevicesPanelEntry extends React.Component { return MatrixClientPeg.get().setDeviceDetails(device.device_id, { display_name: value, }).catch((e) => { - console.error("Error setting session display name", e); + logger.error("Error setting session display name", e); throw new Error(_t("Failed to set display name")); }); }; diff --git a/src/components/views/settings/Notifications.tsx b/src/components/views/settings/Notifications.tsx index 2f3f7abe4b2..133e9dda77c 100644 --- a/src/components/views/settings/Notifications.tsx +++ b/src/components/views/settings/Notifications.tsx @@ -39,6 +39,8 @@ import TagComposer from "../elements/TagComposer"; import { objectClone } from "../../../utils/objects"; import { arrayDiff } from "../../../utils/arrays"; +import { logger } from "matrix-js-sdk/src/logger"; + // TODO: this "view" component still has far too much application logic in it, // which should be factored out to other files. @@ -139,7 +141,7 @@ export default class Notifications extends React.PureComponent { phase: Phase.Ready, }); } catch (e) { - console.error("Error setting up notifications for settings: ", e); + logger.error("Error setting up notifications for settings: ", e); this.setState({ phase: Phase.Error }); } } @@ -264,7 +266,7 @@ export default class Notifications extends React.PureComponent { await this.refreshFromServer(); } catch (e) { this.setState({ phase: Phase.Error }); - console.error("Error updating master push rule:", e); + logger.error("Error updating master push rule:", e); this.showSaveError(); } }; @@ -298,7 +300,7 @@ export default class Notifications extends React.PureComponent { await this.refreshFromServer(); } catch (e) { this.setState({ phase: Phase.Error }); - console.error("Error updating email pusher:", e); + logger.error("Error updating email pusher:", e); this.showSaveError(); } }; @@ -367,7 +369,7 @@ export default class Notifications extends React.PureComponent { await this.refreshFromServer(); } catch (e) { this.setState({ phase: Phase.Error }); - console.error("Error updating push rule:", e); + logger.error("Error updating push rule:", e); this.showSaveError(); } }; @@ -427,7 +429,7 @@ export default class Notifications extends React.PureComponent { await this.refreshFromServer(); } catch (e) { this.setState({ phase: Phase.Error }); - console.error("Error updating keyword push rules:", e); + logger.error("Error updating keyword push rules:", e); this.showSaveError(); } } diff --git a/src/components/views/settings/SecureBackupPanel.tsx b/src/components/views/settings/SecureBackupPanel.tsx index 44c5c444125..d69cf250a6b 100644 --- a/src/components/views/settings/SecureBackupPanel.tsx +++ b/src/components/views/settings/SecureBackupPanel.tsx @@ -210,7 +210,7 @@ export default class SecureBackupPanel extends React.PureComponent<{}, IState> { try { await accessSecretStorage(async () => { }, /* forceReset = */ true); } catch (e) { - console.error("Error resetting secret storage", e); + logger.error("Error resetting secret storage", e); if (this.unmounted) return; this.setState({ error: e }); } diff --git a/src/components/views/settings/SetIdServer.tsx b/src/components/views/settings/SetIdServer.tsx index 1f488f1e677..d7cfc7b83a3 100644 --- a/src/components/views/settings/SetIdServer.tsx +++ b/src/components/views/settings/SetIdServer.tsx @@ -32,6 +32,8 @@ import AccessibleButton from '../elements/AccessibleButton'; import Field from '../elements/Field'; import QuestionDialog from "../dialogs/QuestionDialog"; +import { logger } from "matrix-js-sdk/src/logger"; + // We'll wait up to this long when checking for 3PID bindings on the IS. const REACHABILITY_TIMEOUT = 10000; // ms @@ -206,7 +208,7 @@ export default class SetIdServer extends React.Component { this.saveIdServer(fullUrl); } } catch (e) { - console.error(e); + logger.error(e); errStr = _t("Terms of service not accepted or the identity server is invalid."); } } diff --git a/src/components/views/settings/SetIntegrationManager.tsx b/src/components/views/settings/SetIntegrationManager.tsx index e083efae0ef..7ecc6d11345 100644 --- a/src/components/views/settings/SetIntegrationManager.tsx +++ b/src/components/views/settings/SetIntegrationManager.tsx @@ -23,6 +23,8 @@ import SettingsStore from "../../../settings/SettingsStore"; import { SettingLevel } from "../../../settings/SettingLevel"; import { replaceableComponent } from "../../../utils/replaceableComponent"; +import { logger } from "matrix-js-sdk/src/logger"; + interface IProps { } @@ -48,8 +50,8 @@ export default class SetIntegrationManager extends React.Component { const current = this.state.provisioningEnabled; SettingsStore.setValue("integrationProvisioning", null, SettingLevel.ACCOUNT, !current).catch(err => { - console.error("Error changing integration manager provisioning"); - console.error(err); + logger.error("Error changing integration manager provisioning"); + logger.error(err); this.setState({ provisioningEnabled: current }); }); diff --git a/src/components/views/settings/account/EmailAddresses.tsx b/src/components/views/settings/account/EmailAddresses.tsx index df440ebde00..039d20f3e88 100644 --- a/src/components/views/settings/account/EmailAddresses.tsx +++ b/src/components/views/settings/account/EmailAddresses.tsx @@ -27,6 +27,8 @@ import { replaceableComponent } from "../../../../utils/replaceableComponent"; import ErrorDialog from "../../dialogs/ErrorDialog"; import { IThreepid, ThreepidMedium } from "matrix-js-sdk/src/@types/threepids"; +import { logger } from "matrix-js-sdk/src/logger"; + /* TODO: Improve the UX for everything in here. It's very much placeholder, but it gets the job done. The old way of handling @@ -78,7 +80,7 @@ export class ExistingEmailAddress extends React.Component { return this.props.onRemoved(this.props.email); }).catch((err) => { - console.error("Unable to remove contact information: " + err); + logger.error("Unable to remove contact information: " + err); Modal.createTrackedDialog('Remove 3pid failed', '', ErrorDialog, { title: _t("Unable to remove contact information"), description: ((err && err.message) ? err.message : _t("Operation failed")), @@ -181,7 +183,7 @@ export default class EmailAddresses extends React.Component { task.addEmailAddress(email).then(() => { this.setState({ continueDisabled: false }); }).catch((err) => { - console.error("Unable to add email address " + email + " " + err); + logger.error("Unable to add email address " + email + " " + err); this.setState({ verifying: false, continueDisabled: false, addTask: null }); Modal.createTrackedDialog('Unable to add email address', '', ErrorDialog, { title: _t("Unable to add email address"), @@ -221,7 +223,7 @@ export default class EmailAddresses extends React.Component { "and then click continue again."), }); } else { - console.error("Unable to verify email address: ", err); + logger.error("Unable to verify email address: ", err); Modal.createTrackedDialog('Unable to verify email address', '', ErrorDialog, { title: _t("Unable to verify email address."), description: ((err && err.message) ? err.message : _t("Operation failed")), diff --git a/src/components/views/settings/account/PhoneNumbers.tsx b/src/components/views/settings/account/PhoneNumbers.tsx index 9105dfc3121..4a380980d83 100644 --- a/src/components/views/settings/account/PhoneNumbers.tsx +++ b/src/components/views/settings/account/PhoneNumbers.tsx @@ -28,6 +28,8 @@ import { IThreepid, ThreepidMedium } from "matrix-js-sdk/src/@types/threepids"; import ErrorDialog from "../../dialogs/ErrorDialog"; import { PhoneNumberCountryDefinition } from "../../../../phonenumber"; +import { logger } from "matrix-js-sdk/src/logger"; + /* TODO: Improve the UX for everything in here. This is a copy/paste of EmailAddresses, mostly. @@ -74,7 +76,7 @@ export class ExistingPhoneNumber extends React.Component { return this.props.onRemoved(this.props.msisdn); }).catch((err) => { - console.error("Unable to remove contact information: " + err); + logger.error("Unable to remove contact information: " + err); Modal.createTrackedDialog('Remove 3pid failed', '', ErrorDialog, { title: _t("Unable to remove contact information"), description: ((err && err.message) ? err.message : _t("Operation failed")), @@ -183,7 +185,7 @@ export default class PhoneNumbers extends React.Component { task.addMsisdn(phoneCountry, phoneNumber).then((response) => { this.setState({ continueDisabled: false, verifyMsisdn: response.msisdn }); }).catch((err) => { - console.error("Unable to add phone number " + phoneNumber + " " + err); + logger.error("Unable to add phone number " + phoneNumber + " " + err); this.setState({ verifying: false, continueDisabled: false, addTask: null }); Modal.createTrackedDialog('Add Phone Number Error', '', ErrorDialog, { title: _t("Error"), @@ -221,7 +223,7 @@ export default class PhoneNumbers extends React.Component { }).catch((err) => { this.setState({ continueDisabled: false }); if (err.errcode !== 'M_THREEPID_AUTH_FAILED') { - console.error("Unable to verify phone number: " + err); + logger.error("Unable to verify phone number: " + err); Modal.createTrackedDialog('Unable to verify phone number', '', ErrorDialog, { title: _t("Unable to verify phone number."), description: ((err && err.message) ? err.message : _t("Operation failed")), diff --git a/src/components/views/settings/discovery/EmailAddresses.tsx b/src/components/views/settings/discovery/EmailAddresses.tsx index a1375a0f689..48ccc13d726 100644 --- a/src/components/views/settings/discovery/EmailAddresses.tsx +++ b/src/components/views/settings/discovery/EmailAddresses.tsx @@ -26,6 +26,8 @@ import { IThreepid } from "matrix-js-sdk/src/@types/threepids"; import ErrorDialog from "../../dialogs/ErrorDialog"; import AccessibleButton from "../../elements/AccessibleButton"; +import { logger } from "matrix-js-sdk/src/logger"; + /* TODO: Improve the UX for everything in here. It's very much placeholder, but it gets the job done. The old way of handling @@ -98,7 +100,7 @@ export class EmailAddress extends React.Component { private onUnbanClick = (e) => { MatrixClientPeg.get().unban(this.props.member.roomId, this.props.member.userId).catch((err) => { - console.error("Failed to unban: " + err); + logger.error("Failed to unban: " + err); Modal.createTrackedDialog('Failed to unban', '', ErrorDialog, { title: _t('Error'), description: _t('Failed to unban'), @@ -167,7 +169,7 @@ export default class RolesRoomSettingsTab extends React.Component { } client.sendStateEvent(this.props.roomId, EventType.RoomPowerLevels, plContent).catch(e => { - console.error(e); + logger.error(e); Modal.createTrackedDialog('Power level requirement change failed', '', ErrorDialog, { title: _t('Error changing power level requirement'), @@ -193,7 +195,7 @@ export default class RolesRoomSettingsTab extends React.Component { plContent['users'][powerLevelKey] = value; client.sendStateEvent(this.props.roomId, EventType.RoomPowerLevels, plContent).catch(e => { - console.error(e); + logger.error(e); Modal.createTrackedDialog('Power level change failed', '', ErrorDialog, { title: _t('Error changing power level'), diff --git a/src/components/views/settings/tabs/room/SecurityRoomSettingsTab.tsx b/src/components/views/settings/tabs/room/SecurityRoomSettingsTab.tsx index d1c5bc8448b..0242ace0a61 100644 --- a/src/components/views/settings/tabs/room/SecurityRoomSettingsTab.tsx +++ b/src/components/views/settings/tabs/room/SecurityRoomSettingsTab.tsx @@ -36,6 +36,8 @@ import CreateRoomDialog from '../../../dialogs/CreateRoomDialog'; import JoinRuleSettings from "../../JoinRuleSettings"; import ErrorDialog from "../../../dialogs/ErrorDialog"; +import { logger } from "matrix-js-sdk/src/logger"; + interface IProps { roomId: string; closeSettingsFn: () => void; @@ -180,7 +182,7 @@ export default class SecurityRoomSettingsTab extends React.Component { - console.error(e); + logger.error(e); this.setState({ encrypted: beforeEncrypted }); }); }, @@ -198,7 +200,7 @@ export default class SecurityRoomSettingsTab extends React.Component { - console.error(e); + logger.error(e); this.setState({ guestAccess: beforeGuestAccess }); }); }; @@ -225,7 +227,7 @@ export default class SecurityRoomSettingsTab extends React.Component { - console.error(e); + logger.error(e); this.setState({ history: beforeHistory }); }); }; diff --git a/src/components/views/settings/tabs/user/AppearanceUserSettingsTab.tsx b/src/components/views/settings/tabs/user/AppearanceUserSettingsTab.tsx index bc54a8155c1..f2f4e34d79e 100644 --- a/src/components/views/settings/tabs/user/AppearanceUserSettingsTab.tsx +++ b/src/components/views/settings/tabs/user/AppearanceUserSettingsTab.tsx @@ -41,6 +41,8 @@ import { replaceableComponent } from "../../../../../utils/replaceableComponent" import { compare } from "../../../../../utils/strings"; import LayoutSwitcher from "../../LayoutSwitcher"; +import { logger } from "matrix-js-sdk/src/logger"; + interface IProps { } @@ -225,7 +227,7 @@ export default class AppearanceUserSettingsTab extends React.Component void; } @@ -253,7 +255,7 @@ export default class GeneralUserSettingsTab extends React.Component componentDidMount(): void { PlatformPeg.get().getAppVersion().then((ver) => this.setState({ appVersion: ver })).catch((e) => { - console.error("Error getting vector version: ", e); + logger.error("Error getting vector version: ", e); }); PlatformPeg.get().canSelfUpdate().then((v) => this.setState({ canUpdate: v })).catch((e) => { - console.error("Error getting self updatability: ", e); + logger.error("Error getting self updatability: ", e); }); } diff --git a/src/components/views/settings/tabs/user/MjolnirUserSettingsTab.tsx b/src/components/views/settings/tabs/user/MjolnirUserSettingsTab.tsx index 0653198aa0e..a05e2b6ee54 100644 --- a/src/components/views/settings/tabs/user/MjolnirUserSettingsTab.tsx +++ b/src/components/views/settings/tabs/user/MjolnirUserSettingsTab.tsx @@ -28,6 +28,8 @@ import QuestionDialog from "../../../dialogs/QuestionDialog"; import AccessibleButton from "../../../elements/AccessibleButton"; import Field from "../../../elements/Field"; +import { logger } from "matrix-js-sdk/src/logger"; + interface IState { busy: boolean; newPersonalRule: string; @@ -69,7 +71,7 @@ export default class MjolnirUserSettingsTab extends React.Component<{}, IState> await list.banEntity(kind, this.state.newPersonalRule, _t("Ignored/Blocked")); this.setState({ newPersonalRule: "" }); // this will also cause the new rule to be rendered } catch (e) { - console.error(e); + logger.error(e); Modal.createTrackedDialog('Failed to add Mjolnir rule', '', ErrorDialog, { title: _t('Error adding ignored user/server'), @@ -90,7 +92,7 @@ export default class MjolnirUserSettingsTab extends React.Component<{}, IState> await Mjolnir.sharedInstance().subscribeToList(room.roomId); this.setState({ newList: "" }); // this will also cause the new rule to be rendered } catch (e) { - console.error(e); + logger.error(e); Modal.createTrackedDialog('Failed to subscribe to Mjolnir list', '', ErrorDialog, { title: _t('Error subscribing to list'), @@ -107,7 +109,7 @@ export default class MjolnirUserSettingsTab extends React.Component<{}, IState> const list = Mjolnir.sharedInstance().getPersonalList(); await list.unbanEntity(rule.kind, rule.entity); } catch (e) { - console.error(e); + logger.error(e); Modal.createTrackedDialog('Failed to remove Mjolnir rule', '', ErrorDialog, { title: _t('Error removing ignored user/server'), @@ -124,7 +126,7 @@ export default class MjolnirUserSettingsTab extends React.Component<{}, IState> await Mjolnir.sharedInstance().unsubscribeFromList(list.roomId); await MatrixClientPeg.get().leave(list.roomId); } catch (e) { - console.error(e); + logger.error(e); Modal.createTrackedDialog('Failed to unsubscribe from Mjolnir list', '', ErrorDialog, { title: _t('Error unsubscribing from list'), diff --git a/src/components/views/spaces/SpaceCreateMenu.tsx b/src/components/views/spaces/SpaceCreateMenu.tsx index 22cbb4db656..5ec44e970b4 100644 --- a/src/components/views/spaces/SpaceCreateMenu.tsx +++ b/src/components/views/spaces/SpaceCreateMenu.tsx @@ -39,6 +39,8 @@ import { Action } from "../../../dispatcher/actions"; import { UserTab } from "../dialogs/UserSettingsDialog"; import { Key } from "../../../Keyboard"; +import { logger } from "matrix-js-sdk/src/logger"; + export const createSpace = async ( name: string, isPublic: boolean, @@ -255,7 +257,7 @@ const SpaceCreateMenu = ({ onFinished }) => { onFinished(); } catch (e) { - console.error(e); + logger.error(e); } }; diff --git a/src/components/views/spaces/SpaceSettingsGeneralTab.tsx b/src/components/views/spaces/SpaceSettingsGeneralTab.tsx index 595bdb24487..865df03f663 100644 --- a/src/components/views/spaces/SpaceSettingsGeneralTab.tsx +++ b/src/components/views/spaces/SpaceSettingsGeneralTab.tsx @@ -27,6 +27,8 @@ import { IDialogProps } from "../dialogs/IDialogProps"; import { getTopic } from "../elements/RoomTopic"; import { leaveSpace } from "../../../utils/space"; +import { logger } from "matrix-js-sdk/src/logger"; + interface IProps extends IDialogProps { matrixClient: MatrixClient; space: Room; @@ -83,7 +85,7 @@ const SpaceSettingsGeneralTab = ({ matrixClient: cli, space, onFinished }: IProp setBusy(false); const failures = results.filter(r => r.status === "rejected"); if (failures.length > 0) { - console.error("Failed to save space settings: ", failures); + logger.error("Failed to save space settings: ", failures); setError(_t("Failed to save space settings.")); } }; diff --git a/src/components/views/toasts/VerificationRequestToast.tsx b/src/components/views/toasts/VerificationRequestToast.tsx index 63e23bfdef4..c1f1050bc9a 100644 --- a/src/components/views/toasts/VerificationRequestToast.tsx +++ b/src/components/views/toasts/VerificationRequestToast.tsx @@ -31,6 +31,8 @@ import { Action } from "../../../dispatcher/actions"; import { replaceableComponent } from "../../../utils/replaceableComponent"; import VerificationRequestDialog from "../dialogs/VerificationRequestDialog"; +import { logger } from "matrix-js-sdk/src/logger"; + interface IProps { toastKey: string; request: VerificationRequest; @@ -98,7 +100,7 @@ export default class VerificationRequestToast extends React.PureComponent { // back to the default after the call is over - Dave element.setSinkId(audioOutput); } catch (e) { - console.error("Couldn't set requested audio output device: using default", e); + logger.error("Couldn't set requested audio output device: using default", e); logger.warn("Couldn't set requested audio output device: using default", e); } } diff --git a/src/createRoom.ts b/src/createRoom.ts index daf8594e23b..fae3d8cdc4b 100644 --- a/src/createRoom.ts +++ b/src/createRoom.ts @@ -46,6 +46,8 @@ import { Action } from "./dispatcher/actions"; import ErrorDialog from "./components/views/dialogs/ErrorDialog"; import Spinner from "./components/views/elements/Spinner"; +import { logger } from "matrix-js-sdk/src/logger"; + // we define a number of interfaces which take their names from the js-sdk /* eslint-disable camelcase */ @@ -278,7 +280,7 @@ export default async function createRoom(opts: IOpts): Promise { action: Action.JoinRoomError, roomId, }); - console.error("Failed to create room " + roomId + " " + err); + logger.error("Failed to create room " + roomId + " " + err); let description = _t("Server may be unavailable, overloaded, or you hit a bug."); if (err.errcode === "M_UNSUPPORTED_ROOM_VERSION") { // Technically not possible with the UI as of April 2019 because there's no @@ -356,7 +358,7 @@ export async function canEncryptToAllUsers(client: MatrixClient, userIds: string Object.keys(userDevices).length > 0, ); } catch (e) { - console.error("Error determining if it's possible to encrypt to all users: ", e); + logger.error("Error determining if it's possible to encrypt to all users: ", e); return false; // assume not } } diff --git a/src/integrations/IntegrationManagerInstance.ts b/src/integrations/IntegrationManagerInstance.ts index c3dcd41ee8d..51376ae2905 100644 --- a/src/integrations/IntegrationManagerInstance.ts +++ b/src/integrations/IntegrationManagerInstance.ts @@ -24,6 +24,8 @@ import SettingsStore from "../settings/SettingsStore"; import IntegrationManager from "../components/views/settings/IntegrationManager"; import { IntegrationManagers } from "./IntegrationManagers"; +import { logger } from "matrix-js-sdk/src/logger"; + export enum Kind { Account = "account", Config = "config", @@ -94,7 +96,7 @@ export class IntegrationManagerInstance { return; } - console.error(e); + logger.error(e); newProps["connected"] = false; } diff --git a/src/integrations/IntegrationManagers.ts b/src/integrations/IntegrationManagers.ts index a16792b1933..4ce3171d734 100644 --- a/src/integrations/IntegrationManagers.ts +++ b/src/integrations/IntegrationManagers.ts @@ -224,7 +224,7 @@ export class IntegrationManagers { const result = await fetch(`https://${domainName}/.well-known/matrix/integrations`); wkConfig = await result.json(); } catch (e) { - console.error(e); + logger.error(e); console.warn("Failed to locate integration manager"); return null; } diff --git a/src/languageHandler.tsx b/src/languageHandler.tsx index ad3e34c3f0e..822fe445d3e 100644 --- a/src/languageHandler.tsx +++ b/src/languageHandler.tsx @@ -353,7 +353,7 @@ export function setLanguage(preferredLangs: string | string[]) { if (!langToUse) { // Fallback to en_EN if none is found langToUse = 'en'; - console.error("Unable to find an appropriate language"); + logger.error("Unable to find an appropriate language"); } return getLanguageRetry(i18nFolder + availLangs[langToUse].fileName); @@ -521,7 +521,7 @@ function weblateToCounterpart(inTrs: object): object { async function getLanguageRetry(langPath: string, num = 3): Promise { return retry(() => getLanguage(langPath), num, e => { logger.log("Failed to load i18n", langPath); - console.error(e); + logger.error(e); return true; // always retry }); } diff --git a/src/notifications/VectorPushRulesDefinitions.ts b/src/notifications/VectorPushRulesDefinitions.ts index a8c617e786b..772a7a62ab0 100644 --- a/src/notifications/VectorPushRulesDefinitions.ts +++ b/src/notifications/VectorPushRulesDefinitions.ts @@ -20,6 +20,8 @@ import { PushRuleVectorState, VectorState } from "./PushRuleVectorState"; import { NotificationUtils } from "./NotificationUtils"; import { PushRuleAction, PushRuleKind } from "matrix-js-sdk/src/@types/PushRules"; +import { logger } from "matrix-js-sdk/src/logger"; + type StateToActionsMap = { [state in VectorState]?: PushRuleAction[]; }; @@ -70,7 +72,7 @@ class VectorPushRuleDefinition { } } - console.error(`Cannot translate rule actions into Vector rule state. ` + + logger.error(`Cannot translate rule actions into Vector rule state. ` + `Rule: ${JSON.stringify(rule)}, ` + `Expected: ${JSON.stringify(this.vectorStateToActions)}`); return undefined; diff --git a/src/rageshake/rageshake.ts b/src/rageshake/rageshake.ts index acf77c31c0b..f275b15a411 100644 --- a/src/rageshake/rageshake.ts +++ b/src/rageshake/rageshake.ts @@ -162,7 +162,7 @@ export class IndexedDBLogStore { // @ts-ignore "Failed to open log database: " + event.target.error.name ); - console.error(err); + logger.error(err); reject(new Error(err)); }; @@ -245,7 +245,7 @@ export class IndexedDBLogStore { resolve(); }; txn.onerror = (event) => { - console.error( + logger.error( "Failed to flush logs : ", event, ); reject( @@ -384,7 +384,7 @@ export class IndexedDBLogStore { Promise.all(removeLogIds.map((id) => deleteLogs(id))).then(() => { logger.log(`Removed ${removeLogIds.length} old logs.`); }, (err) => { - console.error(err); + logger.error(err); }); } return logs; diff --git a/src/settings/SettingsStore.ts b/src/settings/SettingsStore.ts index d2f55689888..df19438ea05 100644 --- a/src/settings/SettingsStore.ts +++ b/src/settings/SettingsStore.ts @@ -550,7 +550,7 @@ export default class SettingsStore { logger.log(`--- ${handlerName}@${roomId || ''} = ${JSON.stringify(value)}`); } catch (e) { logger.log(`--- ${handler}@${roomId || ''} THREW ERROR: ${e.message}`); - console.error(e); + logger.error(e); } if (roomId) { @@ -559,7 +559,7 @@ export default class SettingsStore { logger.log(`--- ${handlerName}@ = ${JSON.stringify(value)}`); } catch (e) { logger.log(`--- ${handler}@ THREW ERROR: ${e.message}`); - console.error(e); + logger.error(e); } } } @@ -572,7 +572,7 @@ export default class SettingsStore { logger.log(`--- SettingsStore#generic@${roomId || ''} = ${JSON.stringify(value)}`); } catch (e) { logger.log(`--- SettingsStore#generic@${roomId || ''} THREW ERROR: ${e.message}`); - console.error(e); + logger.error(e); } if (roomId) { @@ -581,7 +581,7 @@ export default class SettingsStore { logger.log(`--- SettingsStore#generic@ = ${JSON.stringify(value)}`); } catch (e) { logger.log(`--- SettingsStore#generic@$ THREW ERROR: ${e.message}`); - console.error(e); + logger.error(e); } } @@ -591,7 +591,7 @@ export default class SettingsStore { logger.log(`--- SettingsStore#${level}@${roomId || ''} = ${JSON.stringify(value)}`); } catch (e) { logger.log(`--- SettingsStore#${level}@${roomId || ''} THREW ERROR: ${e.message}`); - console.error(e); + logger.error(e); } if (roomId) { @@ -600,7 +600,7 @@ export default class SettingsStore { logger.log(`--- SettingsStore#${level}@ = ${JSON.stringify(value)}`); } catch (e) { logger.log(`--- SettingsStore#${level}@$ THREW ERROR: ${e.message}`); - console.error(e); + logger.error(e); } } } diff --git a/src/stores/FlairStore.js b/src/stores/FlairStore.js index 155d9beaf47..7de5f9405e9 100644 --- a/src/stores/FlairStore.js +++ b/src/stores/FlairStore.js @@ -103,7 +103,7 @@ class FlairStore extends EventEmitter { // Return silently to avoid spamming for non-supporting servers return; } - console.error('Could not get groups for user', userId, err); + logger.error('Could not get groups for user', userId, err); throw err; }).finally(() => { delete this._usersInFlight[userId]; diff --git a/src/stores/GroupStore.js b/src/stores/GroupStore.js index 63972b31fb7..0934cd9f90d 100644 --- a/src/stores/GroupStore.js +++ b/src/stores/GroupStore.js @@ -20,6 +20,8 @@ import FlairStore from './FlairStore'; import { MatrixClientPeg } from '../MatrixClientPeg'; import dis from '../dispatcher/dispatcher'; +import { logger } from "matrix-js-sdk/src/logger"; + export function parseMembersResponse(response) { return response.chunk.map((apiMember) => groupMemberFromApiObject(apiMember)); } @@ -144,7 +146,7 @@ class GroupStore extends EventEmitter { return; } - console.error(`Failed to get resource ${stateKey} for ${groupId}`, err); + logger.error(`Failed to get resource ${stateKey} for ${groupId}`, err); this.emit('error', err, groupId, stateKey); }).finally(() => { // Indicate finished request, allow for future fetches diff --git a/src/stores/ModalWidgetStore.ts b/src/stores/ModalWidgetStore.ts index 851cff3549b..abbf87d827f 100644 --- a/src/stores/ModalWidgetStore.ts +++ b/src/stores/ModalWidgetStore.ts @@ -22,6 +22,8 @@ import ModalWidgetDialog from "../components/views/dialogs/ModalWidgetDialog"; import { WidgetMessagingStore } from "./widgets/WidgetMessagingStore"; import { IModalWidgetOpenRequestData, IModalWidgetReturnData, Widget } from "matrix-widget-api"; +import { logger } from "matrix-js-sdk/src/logger"; + interface IState { modal?: IModal; openedFromId?: string; @@ -81,7 +83,7 @@ export class ModalWidgetStore extends AsyncStoreWithClient { const sourceMessaging = WidgetMessagingStore.instance.getMessaging(sourceWidget); if (!sourceMessaging) { - console.error("No source widget messaging for modal widget"); + logger.error("No source widget messaging for modal widget"); return; } sourceMessaging.notifyModalWidgetClose(data); diff --git a/src/stores/RoomViewStore.tsx b/src/stores/RoomViewStore.tsx index 0415044d3a3..b949ccabcf1 100644 --- a/src/stores/RoomViewStore.tsx +++ b/src/stores/RoomViewStore.tsx @@ -235,7 +235,7 @@ class RoomViewStore extends Store { storeRoomAliasInCache(payload.room_alias, result.room_id); roomId = result.room_id; } catch (err) { - console.error("RVS failed to get room id for alias: ", err); + logger.error("RVS failed to get room id for alias: ", err); dis.dispatch({ action: 'view_room_error', room_id: null, diff --git a/src/stores/SetupEncryptionStore.ts b/src/stores/SetupEncryptionStore.ts index e3d4d425914..eefe98c7a27 100644 --- a/src/stores/SetupEncryptionStore.ts +++ b/src/stores/SetupEncryptionStore.ts @@ -248,7 +248,7 @@ export class SetupEncryptionStore extends EventEmitter { this.phase = Phase.Finished; }, true); } catch (e) { - console.error("Error resetting cross-signing", e); + logger.error("Error resetting cross-signing", e); this.phase = Phase.Intro; } this.emit("update"); diff --git a/src/stores/SpaceStore.ts b/src/stores/SpaceStore.ts index b4a1889d3e0..966c4af40ff 100644 --- a/src/stores/SpaceStore.ts +++ b/src/stores/SpaceStore.ts @@ -41,6 +41,8 @@ import { reorderLexicographically } from "../utils/stringOrderField"; import { TAG_ORDER } from "../components/views/rooms/RoomList"; import { SettingUpdatedPayload } from "../dispatcher/payloads/SettingUpdatedPayload"; +import { logger } from "matrix-js-sdk/src/logger"; + type SpaceKey = string | symbol; interface IState {} @@ -261,7 +263,7 @@ export class SpaceStoreClass extends AsyncStoreWithClient { viaServers: Array.from(viaMap.get(roomInfo.room_id) || []), })); } catch (e) { - console.error(e); + logger.error(e); } return []; }; diff --git a/src/stores/widgets/StopGapWidget.ts b/src/stores/widgets/StopGapWidget.ts index e00c4c6c0b5..1293fe05483 100644 --- a/src/stores/widgets/StopGapWidget.ts +++ b/src/stores/widgets/StopGapWidget.ts @@ -401,7 +401,7 @@ export class StopGapWidget extends EventEmitter { } } catch (e) { // All errors are non-fatal - console.error("Error preparing widget communications: ", e); + logger.error("Error preparing widget communications: ", e); } } @@ -473,7 +473,7 @@ export class StopGapWidget extends EventEmitter { const raw = ev.getEffectiveEvent(); this.messaging.feedEvent(raw, this.eventListenerRoomId).catch(e => { - console.error("Error sending event to widget: ", e); + logger.error("Error sending event to widget: ", e); }); } } diff --git a/src/stores/widgets/StopGapWidgetDriver.ts b/src/stores/widgets/StopGapWidgetDriver.ts index 058a605380d..e8f550b92c4 100644 --- a/src/stores/widgets/StopGapWidgetDriver.ts +++ b/src/stores/widgets/StopGapWidgetDriver.ts @@ -46,6 +46,8 @@ import { tryTransformPermalinkToLocalHref } from "../../utils/permalinks/Permali import { IEvent, MatrixEvent } from "matrix-js-sdk/src/models/event"; import { Room } from "matrix-js-sdk/src/models/room"; +import { logger } from "matrix-js-sdk/src/logger"; + // TODO: Purge this from the universe function getRememberedCapabilitiesForWidget(widget: Widget): Capability[] { @@ -122,7 +124,7 @@ export class StopGapWidgetDriver extends WidgetDriver { (result.approved || []).forEach(cap => allowedSoFar.add(cap)); rememberApproved = result.remember; } catch (e) { - console.error("Non-fatal error getting capabilities: ", e); + logger.error("Non-fatal error getting capabilities: ", e); } } diff --git a/src/utils/AutoDiscoveryUtils.tsx b/src/utils/AutoDiscoveryUtils.tsx index bad87db2b93..ae804381cf3 100644 --- a/src/utils/AutoDiscoveryUtils.tsx +++ b/src/utils/AutoDiscoveryUtils.tsx @@ -20,6 +20,8 @@ import { _t, _td, newTranslatableError } from "../languageHandler"; import { makeType } from "./TypeUtils"; import SdkConfig from '../SdkConfig'; +import { logger } from "matrix-js-sdk/src/logger"; + const LIVELINESS_DISCOVERY_ERRORS: string[] = [ AutoDiscovery.ERROR_INVALID_HOMESERVER, AutoDiscovery.ERROR_INVALID_IDENTITY_SERVER, @@ -198,7 +200,7 @@ export default class AutoDiscoveryUtils { if (!discoveryResult || !discoveryResult["m.homeserver"]) { // This shouldn't happen without major misconfiguration, so we'll log a bit of information // in the log so we can find this bit of codee but otherwise tell teh user "it broke". - console.error("Ended up in a state of not knowing which homeserver to connect to."); + logger.error("Ended up in a state of not knowing which homeserver to connect to."); throw newTranslatableError(_td("Unexpected error resolving homeserver configuration")); } @@ -218,7 +220,7 @@ export default class AutoDiscoveryUtils { if (isResult && isResult.state === AutoDiscovery.SUCCESS) { preferredIdentityUrl = isResult["base_url"]; } else if (isResult && isResult.state !== AutoDiscovery.PROMPT) { - console.error("Error determining preferred identity server URL:", isResult); + logger.error("Error determining preferred identity server URL:", isResult); if (isResult.state === AutoDiscovery.FAIL_ERROR) { if (AutoDiscovery.ALL_ERRORS.indexOf(isResult.error) !== -1) { throw newTranslatableError(isResult.error); @@ -234,7 +236,7 @@ export default class AutoDiscoveryUtils { } if (hsResult.state !== AutoDiscovery.SUCCESS) { - console.error("Error processing homeserver config:", hsResult); + logger.error("Error processing homeserver config:", hsResult); if (!syntaxOnly || !AutoDiscoveryUtils.isLivelinessError(hsResult.error)) { if (AutoDiscovery.ALL_ERRORS.indexOf(hsResult.error) !== -1) { throw newTranslatableError(hsResult.error); @@ -251,7 +253,7 @@ export default class AutoDiscoveryUtils { // It should have been set by now, so check it if (!preferredHomeserverName) { - console.error("Failed to parse homeserver name from homeserver URL"); + logger.error("Failed to parse homeserver name from homeserver URL"); throw newTranslatableError(_td("Unexpected error resolving homeserver configuration")); } diff --git a/src/utils/FontManager.ts b/src/utils/FontManager.ts index b0a017be97c..24e5c69e245 100644 --- a/src/utils/FontManager.ts +++ b/src/utils/FontManager.ts @@ -39,7 +39,7 @@ function safariVersionCheck(ua: string): boolean { return colrFontSupported; } } catch (err) { - console.error("Error in Safari COLR version check", err); + logger.error("Error in Safari COLR version check", err); } console.warn("Couldn't determine Safari version to check COLR font support, assuming no."); return false; @@ -96,7 +96,7 @@ async function isColrFontSupported(): Promise { logger.log("Canvas check revealed COLR is supported? " + colrFontSupported); return colrFontSupported; } catch (e) { - console.error("Couldn't load COLR font", e); + logger.error("Couldn't load COLR font", e); return false; } } diff --git a/src/utils/IdentityServerUtils.ts b/src/utils/IdentityServerUtils.ts index 47226a17274..ef432f71df4 100644 --- a/src/utils/IdentityServerUtils.ts +++ b/src/utils/IdentityServerUtils.ts @@ -19,6 +19,8 @@ import { SERVICE_TYPES } from 'matrix-js-sdk/src/service-types'; import SdkConfig from '../SdkConfig'; import { MatrixClientPeg } from '../MatrixClientPeg'; +import { logger } from "matrix-js-sdk/src/logger"; + export function getDefaultIdentityServerUrl(): string { return SdkConfig.get()['validated_server_config']['isUrl']; } @@ -36,7 +38,7 @@ export async function doesIdentityServerHaveTerms(fullUrl: string): Promise = (w: Whenable) => void; /** @@ -73,7 +75,7 @@ export abstract class Whenable implements IDestroyable { try { listener.fn(this); } catch (e) { - console.error(`Error calling whenable listener for ${condition}:`, e); + logger.error(`Error calling whenable listener for ${condition}:`, e); } } } diff --git a/src/utils/WidgetUtils.ts b/src/utils/WidgetUtils.ts index ea56f2a563c..098f18ab09c 100644 --- a/src/utils/WidgetUtils.ts +++ b/src/utils/WidgetUtils.ts @@ -31,6 +31,8 @@ import { objectClone } from "./objects"; import { _t } from "../languageHandler"; import { IApp } from "../stores/WidgetStore"; +import { logger } from "matrix-js-sdk/src/logger"; + // How long we wait for the state event echo to come back from the server // before waitFor[Room/User]Widget rejects its promise const WIDGET_WAIT_TIME = 20000; @@ -92,7 +94,7 @@ export default class WidgetUtils { */ static isScalarUrl(testUrlString: string): boolean { if (!testUrlString) { - console.error('Scalar URL check failed. No URL specified'); + logger.error('Scalar URL check failed. No URL specified'); return false; } @@ -246,7 +248,7 @@ export default class WidgetUtils { try { delete userWidgets[widgetId]; } catch (e) { - console.error(`$widgetId is non-configurable`); + logger.error(`$widgetId is non-configurable`); } const addingWidget = Boolean(widgetUrl); diff --git a/src/utils/exportUtils/HtmlExport.tsx b/src/utils/exportUtils/HtmlExport.tsx index cd440537df6..a7486e06cf7 100644 --- a/src/utils/exportUtils/HtmlExport.tsx +++ b/src/utils/exportUtils/HtmlExport.tsx @@ -379,7 +379,7 @@ export default class HTMLExporter extends Exporter { } else eventTile = await this.getEventTileMarkup(mxEv, joined); } catch (e) { // TODO: Handle callEvent errors - console.error(e); + logger.error(e); eventTile = await this.getEventTileMarkup( this.createModifiedEvent(textForEvent(mxEv), mxEv, false), joined, diff --git a/src/utils/strings.ts b/src/utils/strings.ts index 6d12c889403..1ca7aee6301 100644 --- a/src/utils/strings.ts +++ b/src/utils/strings.ts @@ -13,7 +13,6 @@ 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. */ - /** * Copy plaintext to user's clipboard * It will overwrite user's selection range @@ -21,6 +20,8 @@ limitations under the License. * Tries to use new async clipboard API if available * @param text the plaintext to put in the user's clipboard */ +import { logger } from "matrix-js-sdk/src/logger"; + export async function copyPlaintext(text: string): Promise { try { if (navigator && navigator.clipboard && navigator.clipboard.writeText) { @@ -49,7 +50,7 @@ export async function copyPlaintext(text: string): Promise { return successful; } } catch (e) { - console.error("copyPlaintext failed", e); + logger.error("copyPlaintext failed", e); } return false; } diff --git a/src/widgets/ManagedHybrid.ts b/src/widgets/ManagedHybrid.ts index 2adb11da622..f623becbd8c 100644 --- a/src/widgets/ManagedHybrid.ts +++ b/src/widgets/ManagedHybrid.ts @@ -23,6 +23,8 @@ import WidgetEchoStore from "../stores/WidgetEchoStore"; import WidgetStore from "../stores/WidgetStore"; import SdkConfig from "../SdkConfig"; +import { logger } from "matrix-js-sdk/src/logger"; + /* eslint-disable camelcase */ interface IManagedHybridWidgetData { widget_id: string; @@ -52,7 +54,7 @@ export async function addManagedHybridWidget(roomId: string) { // Check for permission if (!WidgetUtils.canUserModifyWidgets(roomId)) { - console.error(`User not allowed to modify widgets in ${roomId}`); + logger.error(`User not allowed to modify widgets in ${roomId}`); return; } @@ -67,7 +69,7 @@ export async function addManagedHybridWidget(roomId: string) { const response = await fetch(`${widgetBuildUrl}?roomId=${roomId}`); widgetData = await response.json(); } catch (e) { - console.error(`Managed hybrid widget builder failed for room ${roomId}`, e); + logger.error(`Managed hybrid widget builder failed for room ${roomId}`, e); return; } if (!widgetData) { @@ -82,7 +84,7 @@ export async function addManagedHybridWidget(roomId: string) { WidgetEchoStore.roomHasPendingWidgets(roomId, []) ); if (existing) { - console.error(`Managed hybrid widget already present in room ${roomId}`); + logger.error(`Managed hybrid widget already present in room ${roomId}`); return; } @@ -90,7 +92,7 @@ export async function addManagedHybridWidget(roomId: string) { try { await WidgetUtils.setRoomWidgetContent(roomId, widgetId, widgetContent); } catch (e) { - console.error(`Unable to add managed hybrid widget in room ${roomId}`, e); + logger.error(`Unable to add managed hybrid widget in room ${roomId}`, e); return; } From 5290afcc4c0a7c56b425f2784b86f3e729f5fc64 Mon Sep 17 00:00:00 2001 From: Dariusz Niemczyk Date: Fri, 15 Oct 2021 16:31:29 +0200 Subject: [PATCH 112/156] Replace console.warn with logger.warn Related https://github.com/vector-im/element-web/issues/18425 --- src/ActiveRoomObserver.ts | 4 +++- src/Analytics.tsx | 4 ++-- src/AsyncWrapper.tsx | 2 +- src/ContentMessages.tsx | 2 +- src/CountlyAnalytics.ts | 2 +- src/Lifecycle.ts | 14 ++++++------ src/MatrixClientPeg.ts | 2 +- src/MediaDeviceHandler.ts | 4 +++- src/Notifier.ts | 6 ++--- src/ScalarMessaging.ts | 2 +- src/SecurityManager.ts | 4 ++-- src/SendHistoryManager.ts | 4 +++- src/TextForEvent.tsx | 4 +++- src/audio/Playback.ts | 2 +- src/audio/PlaybackQueue.ts | 6 +++-- src/components/structures/EmbeddedPage.tsx | 4 +++- src/components/structures/MatrixChat.tsx | 6 ++--- src/components/structures/RoomDirectory.tsx | 2 +- src/components/structures/TimelinePanel.tsx | 4 ++-- .../CreateSpaceFromCommunityDialog.tsx | 4 ++-- .../views/dialogs/DeactivateAccountDialog.tsx | 2 +- .../views/dialogs/DevtoolsDialog.tsx | 6 ++--- .../views/dialogs/HostSignupDialog.tsx | 4 +++- src/components/views/dialogs/InviteDialog.tsx | 14 ++++++------ src/components/views/elements/AppTile.tsx | 4 ++-- .../views/elements/DesktopBuildsNotice.tsx | 4 +++- .../views/elements/EffectsOverlay.tsx | 4 +++- src/components/views/elements/TagTile.js | 4 +++- src/components/views/messages/MAudioBody.tsx | 6 +++-- src/components/views/messages/MFileBody.tsx | 2 +- src/components/views/messages/MImageBody.tsx | 4 +++- src/components/views/messages/MVideoBody.tsx | 2 +- .../views/right_panel/VerificationPanel.tsx | 2 +- src/components/views/rooms/EventTile.tsx | 4 +++- src/components/views/rooms/MemberList.tsx | 6 +++-- .../views/rooms/ReadReceiptMarker.tsx | 4 +++- src/components/views/rooms/ReplyTile.tsx | 4 +++- src/components/views/rooms/RoomTile.tsx | 4 +++- src/components/views/rooms/Stickerpicker.tsx | 2 +- src/components/views/settings/BridgeTile.tsx | 6 +++-- src/components/views/settings/SetIdServer.tsx | 4 ++-- .../tabs/user/GeneralUserSettingsTab.tsx | 8 +++---- .../tabs/user/SecurityUserSettingsTab.tsx | 4 +++- src/createRoom.ts | 2 +- src/indexing/EventIndex.ts | 2 +- src/integrations/IntegrationManagers.ts | 6 ++--- src/languageHandler.tsx | 4 ++-- src/performance/index.ts | 6 +++-- src/settings/SettingsStore.ts | 2 +- .../controllers/NotificationControllers.ts | 4 +++- .../MatrixClientBackedSettingsHandler.ts | 4 +++- src/stores/CommunityPrototypeStore.ts | 4 +++- src/stores/FlairStore.js | 2 +- src/stores/RightPanelStore.ts | 4 +++- src/stores/SpaceStore.ts | 2 +- src/stores/WidgetStore.ts | 2 +- src/stores/room-list/RoomListLayoutStore.ts | 4 +++- src/stores/room-list/RoomListStore.ts | 14 ++++++------ src/stores/room-list/TagWatcher.ts | 6 +++-- src/stores/room-list/algorithms/Algorithm.ts | 22 ++++++++++--------- .../list-ordering/ImportanceAlgorithm.ts | 6 +++-- .../list-ordering/NaturalAlgorithm.ts | 4 +++- .../list-ordering/OrderingAlgorithm.ts | 4 +++- src/utils/DMRoomMap.ts | 4 +++- src/utils/FontManager.ts | 2 +- src/utils/MediaEventHelper.ts | 4 +++- src/utils/MessageDiffUtils.tsx | 4 +++- src/utils/MultiInviter.ts | 2 +- src/utils/RoomUpgrade.ts | 2 +- src/utils/WidgetUtils.ts | 10 ++++----- src/utils/permalinks/Permalinks.ts | 4 +++- 71 files changed, 195 insertions(+), 127 deletions(-) diff --git a/src/ActiveRoomObserver.ts b/src/ActiveRoomObserver.ts index c7423fab8fc..4638509cc9f 100644 --- a/src/ActiveRoomObserver.ts +++ b/src/ActiveRoomObserver.ts @@ -17,6 +17,8 @@ limitations under the License. import { EventSubscription } from 'fbemitter'; import RoomViewStore from './stores/RoomViewStore'; +import { logger } from "matrix-js-sdk/src/logger"; + type Listener = (isActive: boolean) => void; /** @@ -54,7 +56,7 @@ export class ActiveRoomObserver { this.listeners[roomId].splice(i, 1); } } else { - console.warn("Unregistering unrecognised listener (roomId=" + roomId + ")"); + logger.warn("Unregistering unrecognised listener (roomId=" + roomId + ")"); } } diff --git a/src/Analytics.tsx b/src/Analytics.tsx index 5db8c95a845..3ff7b2a7678 100644 --- a/src/Analytics.tsx +++ b/src/Analytics.tsx @@ -33,7 +33,7 @@ function getRedactedHash(hash: string): string { // Don't leak URLs we aren't expecting - they could contain tokens/PII const match = hashRegex.exec(hash); if (!match) { - console.warn(`Unexpected hash location "${hash}"`); + logger.warn(`Unexpected hash location "${hash}"`); return '#/'; } @@ -322,7 +322,7 @@ export class Analytics { } if (typeof generationTimeMs !== 'number') { - console.warn('Analytics.trackPageChange: expected generationTimeMs to be a number'); + logger.warn('Analytics.trackPageChange: expected generationTimeMs to be a number'); // But continue anyway because we still want to track the change } diff --git a/src/AsyncWrapper.tsx b/src/AsyncWrapper.tsx index 68e33e02fe9..aea0f42ac4c 100644 --- a/src/AsyncWrapper.tsx +++ b/src/AsyncWrapper.tsx @@ -61,7 +61,7 @@ export default class AsyncWrapper extends React.Component { : result as ComponentType; this.setState({ component }); }).catch((e) => { - console.warn('AsyncWrapper promise failed', e); + logger.warn('AsyncWrapper promise failed', e); this.setState({ error: e }); }); } diff --git a/src/ContentMessages.tsx b/src/ContentMessages.tsx index 2f9b17a89bd..9831a9b41db 100644 --- a/src/ContentMessages.tsx +++ b/src/ContentMessages.tsx @@ -419,7 +419,7 @@ export default class ContentMessages { sendStickerContentToRoom(url: string, roomId: string, info: IImageInfo, text: string, matrixClient: MatrixClient) { const startTime = CountlyAnalytics.getTimestamp(); const prom = matrixClient.sendStickerMessage(roomId, url, info, text).catch((e) => { - console.warn(`Failed to send content with URL ${url} to room ${roomId}`, e); + logger.warn(`Failed to send content with URL ${url} to room ${roomId}`, e); throw e; }); CountlyAnalytics.instance.trackSendMessage(startTime, prom, roomId, false, false, { msgtype: "m.sticker" }); diff --git a/src/CountlyAnalytics.ts b/src/CountlyAnalytics.ts index af26a4fbc3f..d99ec3d78a5 100644 --- a/src/CountlyAnalytics.ts +++ b/src/CountlyAnalytics.ts @@ -429,7 +429,7 @@ export default class CountlyAnalytics { try { this.appVersion = await platform.getAppVersion(); } catch (e) { - console.warn("Failed to get app version, using 'unknown'"); + logger.warn("Failed to get app version, using 'unknown'"); } // start heartbeat diff --git a/src/Lifecycle.ts b/src/Lifecycle.ts index dc7a0e52524..d351c46180a 100644 --- a/src/Lifecycle.ts +++ b/src/Lifecycle.ts @@ -111,7 +111,7 @@ export async function loadSession(opts: ILoadSessionOpts = {}): Promise const defaultDeviceDisplayName = opts.defaultDeviceDisplayName; if (enableGuest && !guestHsUrl) { - console.warn("Cannot enable guest access: can't determine HS URL to use"); + logger.warn("Cannot enable guest access: can't determine HS URL to use"); enableGuest = false; } @@ -188,7 +188,7 @@ export function attemptTokenLogin( const homeserver = localStorage.getItem(SSO_HOMESERVER_URL_KEY); const identityServer = localStorage.getItem(SSO_ID_SERVER_URL_KEY); if (!homeserver) { - console.warn("Cannot log in with token: can't determine HS URL to use"); + logger.warn("Cannot log in with token: can't determine HS URL to use"); Modal.createTrackedDialog("SSO", "Unknown HS", ErrorDialog, { title: _t("We couldn't log you in"), description: _t("We asked the browser to remember which homeserver you use to let you sign in, " + @@ -523,7 +523,7 @@ export function hydrateSession(credentials: IMatrixClientCreds): Promise { await EventIndexPeg.init(); await MatrixClientPeg.start(); } else { - console.warn("Caller requested only auxiliary services be started"); + logger.warn("Caller requested only auxiliary services be started"); await MatrixClientPeg.assign(); } diff --git a/src/MatrixClientPeg.ts b/src/MatrixClientPeg.ts index 8074e484fac..1a92f0f058b 100644 --- a/src/MatrixClientPeg.ts +++ b/src/MatrixClientPeg.ts @@ -207,7 +207,7 @@ class MatrixClientPegClass implements IMatrixClientPeg { } // this can happen for a number of reasons, the most likely being // that the olm library was missing. It's not fatal. - console.warn("Unable to initialise e2e", e); + logger.warn("Unable to initialise e2e", e); } const opts = utils.deepCopy(this.opts); diff --git a/src/MediaDeviceHandler.ts b/src/MediaDeviceHandler.ts index 154f167745a..9123d45bc3b 100644 --- a/src/MediaDeviceHandler.ts +++ b/src/MediaDeviceHandler.ts @@ -20,6 +20,8 @@ import { SettingLevel } from "./settings/SettingLevel"; import EventEmitter from 'events'; import { MatrixClientPeg } from "./MatrixClientPeg"; +import { logger } from "matrix-js-sdk/src/logger"; + // XXX: MediaDeviceKind is a union type, so we make our own enum export enum MediaDeviceKindEnum { AudioOutput = "audiooutput", @@ -63,7 +65,7 @@ export default class MediaDeviceHandler extends EventEmitter { devices.forEach((device) => output[device.kind].push(device)); return output; } catch (error) { - console.warn('Unable to refresh WebRTC Devices: ', error); + logger.warn('Unable to refresh WebRTC Devices: ', error); } } diff --git a/src/Notifier.ts b/src/Notifier.ts index ded95b21629..1acd028b084 100644 --- a/src/Notifier.ts +++ b/src/Notifier.ts @@ -141,12 +141,12 @@ export const Notifier = { } if (!content.url) { - console.warn(`${roomId} has custom notification sound event, but no url key`); + logger.warn(`${roomId} has custom notification sound event, but no url key`); return null; } if (!content.url.startsWith("mxc://")) { - console.warn(`${roomId} has custom notification sound event, but url is not a mxc url`); + logger.warn(`${roomId} has custom notification sound event, but url is not a mxc url`); return null; } @@ -181,7 +181,7 @@ export const Notifier = { } await audioElement.play(); } catch (ex) { - console.warn("Caught error when trying to fetch room notification sound:", ex); + logger.warn("Caught error when trying to fetch room notification sound:", ex); } }, diff --git a/src/ScalarMessaging.ts b/src/ScalarMessaging.ts index 47a5dff94be..3d390ea095d 100644 --- a/src/ScalarMessaging.ts +++ b/src/ScalarMessaging.ts @@ -695,7 +695,7 @@ const onMessage = function(event: MessageEvent): void { setBotPower(event, roomId, userId, event.data.level, event.data.ignoreIfGreater); break; default: - console.warn("Unhandled postMessage event with action '" + event.data.action +"'"); + logger.warn("Unhandled postMessage event with action '" + event.data.action +"'"); break; } }; diff --git a/src/SecurityManager.ts b/src/SecurityManager.ts index af1a4814095..a184e6e9cbd 100644 --- a/src/SecurityManager.ts +++ b/src/SecurityManager.ts @@ -283,7 +283,7 @@ async function onSecretRequested( } return key && encodeBase64(key); } - console.warn("onSecretRequested didn't recognise the secret named ", name); + logger.warn("onSecretRequested didn't recognise the secret named ", name); } export const crossSigningCallbacks: ICryptoCallbacks = { @@ -388,7 +388,7 @@ export async function accessSecretStorage(func = async () => { }, forceReset = f logger.log("Setting dehydration key"); await cli.setDehydrationKey(secretStorageKeys[keyId], dehydrationKeyInfo, "Backup device"); } else if (!keyId) { - console.warn("Not setting dehydration key: no SSSS key found"); + logger.warn("Not setting dehydration key: no SSSS key found"); } else { logger.log("Not setting dehydration key: feature disabled"); } diff --git a/src/SendHistoryManager.ts b/src/SendHistoryManager.ts index eeba643d81b..9a593adbee6 100644 --- a/src/SendHistoryManager.ts +++ b/src/SendHistoryManager.ts @@ -20,6 +20,8 @@ import { MatrixEvent } from "matrix-js-sdk/src/models/event"; import { SerializedPart } from "./editor/parts"; import EditorModel from "./editor/model"; +import { logger } from "matrix-js-sdk/src/logger"; + interface IHistoryItem { parts: SerializedPart[]; replyEventId?: string; @@ -42,7 +44,7 @@ export default class SendHistoryManager { try { this.history.push(JSON.parse(itemJSON)); } catch (e) { - console.warn("Throwing away unserialisable history", e); + logger.warn("Throwing away unserialisable history", e); break; } ++index; diff --git a/src/TextForEvent.tsx b/src/TextForEvent.tsx index 6fb4107d200..f853d86cc01 100644 --- a/src/TextForEvent.tsx +++ b/src/TextForEvent.tsx @@ -27,6 +27,8 @@ import { SetRightPanelPhasePayload } from './dispatcher/payloads/SetRightPanelPh import { MatrixEvent } from "matrix-js-sdk/src/models/event"; import { MatrixClientPeg } from "./MatrixClientPeg"; +import { logger } from "matrix-js-sdk/src/logger"; + // These functions are frequently used just to check whether an event has // any text to display at all. For this reason they return deferred values // to avoid the expense of looking up translations when they're not needed. @@ -122,7 +124,7 @@ function textForMemberEvent(ev: MatrixEvent, allowJSX: boolean, showHiddenEvents return null; } } else { - if (!ev.target) console.warn("Join message has no target! -- " + ev.getContent().state_key); + if (!ev.target) logger.warn("Join message has no target! -- " + ev.getContent().state_key); return () => _t('%(targetName)s joined the room', { targetName }); } case 'leave': diff --git a/src/audio/Playback.ts b/src/audio/Playback.ts index 7e62daab567..f3baa71a1ea 100644 --- a/src/audio/Playback.ts +++ b/src/audio/Playback.ts @@ -157,7 +157,7 @@ export class Playback extends EventEmitter implements IDestroyable { // This error handler is largely for Safari as well, which doesn't support Opus/Ogg // very well. logger.error("Error decoding recording: ", e); - console.warn("Trying to re-encode to WAV instead..."); + logger.warn("Trying to re-encode to WAV instead..."); const wav = await decodeOgg(this.buf); diff --git a/src/audio/PlaybackQueue.ts b/src/audio/PlaybackQueue.ts index 611b88938aa..a1a86f6613f 100644 --- a/src/audio/PlaybackQueue.ts +++ b/src/audio/PlaybackQueue.ts @@ -26,6 +26,8 @@ import { isVoiceMessage } from "../utils/EventUtils"; import RoomViewStore from "../stores/RoomViewStore"; import { EventType } from "matrix-js-sdk/src/@types/event"; +import { logger } from "matrix-js-sdk/src/logger"; + /** * Audio playback queue management for a given room. This keeps track of where the user * was at for each playback, what order the playbacks were played in, and triggers subsequent @@ -114,7 +116,7 @@ export class PlaybackQueue { if (next) { const instance = this.playbacks.get(next); if (!instance) { - console.warn( + logger.warn( "Voice message queue desync: Missing playback for next message: " + `Current=${this.currentPlaybackId} Last=${last} Next=${next}`, ); @@ -173,7 +175,7 @@ export class PlaybackQueue { } } } else { - console.warn( + logger.warn( "Voice message queue desync: Expected playback stop to be last in order. " + `Current=${this.currentPlaybackId} Last=${last} EventID=${mxEvent.getId()}`, ); diff --git a/src/components/structures/EmbeddedPage.tsx b/src/components/structures/EmbeddedPage.tsx index ec37eab2549..40aea55c703 100644 --- a/src/components/structures/EmbeddedPage.tsx +++ b/src/components/structures/EmbeddedPage.tsx @@ -27,6 +27,8 @@ import MatrixClientContext from "../../contexts/MatrixClientContext"; import AutoHideScrollbar from "./AutoHideScrollbar"; import { ActionPayload } from "../../dispatcher/payloads"; +import { logger } from "matrix-js-sdk/src/logger"; + interface IProps { // URL to request embedded page content from url?: string; @@ -79,7 +81,7 @@ export default class EmbeddedPage extends React.PureComponent { } if (err || response.status < 200 || response.status >= 300) { - console.warn(`Error loading page: ${err}`); + logger.warn(`Error loading page: ${err}`); this.setState({ page: _t("Couldn't load page") }); return; } diff --git a/src/components/structures/MatrixChat.tsx b/src/components/structures/MatrixChat.tsx index 13eca3265a3..61a8c5205cf 100644 --- a/src/components/structures/MatrixChat.tsx +++ b/src/components/structures/MatrixChat.tsx @@ -917,7 +917,7 @@ export default class MatrixChat extends React.PureComponent { let waitFor = Promise.resolve(null); if (!this.firstSyncComplete) { if (!this.firstSyncPromise) { - console.warn('Cannot view a room before first sync. room_id:', roomInfo.room_id); + logger.warn('Cannot view a room before first sync. room_id:', roomInfo.room_id); return; } waitFor = this.firstSyncPromise.promise; @@ -973,7 +973,7 @@ export default class MatrixChat extends React.PureComponent { // Wait for the first sync to complete if (!this.firstSyncComplete) { if (!this.firstSyncPromise) { - console.warn('Cannot view a group before first sync. group_id:', groupId); + logger.warn('Cannot view a group before first sync. group_id:', groupId); return; } await this.firstSyncPromise.promise; @@ -1475,7 +1475,7 @@ export default class MatrixChat extends React.PureComponent { Modal.closeCurrentModal('Session.logged_out'); if (errObj.httpStatus === 401 && errObj.data && errObj.data['soft_logout']) { - console.warn("Soft logout issued by server - avoiding data deletion"); + logger.warn("Soft logout issued by server - avoiding data deletion"); Lifecycle.softLogout(); return; } diff --git a/src/components/structures/RoomDirectory.tsx b/src/components/structures/RoomDirectory.tsx index 8e9be291031..56e6b2dfb81 100644 --- a/src/components/structures/RoomDirectory.tsx +++ b/src/components/structures/RoomDirectory.tsx @@ -133,7 +133,7 @@ export default class RoomDirectory extends React.Component { } this.setState({ protocolsLoading: false }); }, (err) => { - console.warn(`error loading third party protocols: ${err}`); + logger.warn(`error loading third party protocols: ${err}`); this.setState({ protocolsLoading: false }); if (MatrixClientPeg.get().isGuest()) { // Guests currently aren't allowed to use this API, so diff --git a/src/components/structures/TimelinePanel.tsx b/src/components/structures/TimelinePanel.tsx index e07a27cf04b..495d3c438ff 100644 --- a/src/components/structures/TimelinePanel.tsx +++ b/src/components/structures/TimelinePanel.tsx @@ -312,7 +312,7 @@ class TimelinePanel extends React.Component { // // for now, just warn about this. But we're going to end up paginating // both rooms separately, and it's all bad. - console.warn("Replacing timelineSet on a TimelinePanel - confusion may ensue"); + logger.warn("Replacing timelineSet on a TimelinePanel - confusion may ensue"); } const differentEventId = newProps.eventId != this.props.eventId; @@ -1266,7 +1266,7 @@ class TimelinePanel extends React.Component { // Somehow, it seems to be possible for live events to not have // a timeline, even though that should not happen. :( // https://github.com/vector-im/element-web/issues/12120 - console.warn( + logger.warn( `Event ${events[i].getId()} in room ${room.roomId} is live, ` + `but it does not have a timeline`, ); diff --git a/src/components/views/dialogs/CreateSpaceFromCommunityDialog.tsx b/src/components/views/dialogs/CreateSpaceFromCommunityDialog.tsx index c241855f26e..b19c8d64961 100644 --- a/src/components/views/dialogs/CreateSpaceFromCommunityDialog.tsx +++ b/src/components/views/dialogs/CreateSpaceFromCommunityDialog.tsx @@ -176,7 +176,7 @@ const CreateSpaceFromCommunityDialog: React.FC = ({ matrixClient: cli, g const { servers } = await cli.getRoomIdForAlias(canonicalAlias); viaMap.set(roomId, servers); } catch (e) { - console.warn("Failed to resolve alias during community migration", e); + logger.warn("Failed to resolve alias during community migration", e); } } @@ -221,7 +221,7 @@ const CreateSpaceFromCommunityDialog: React.FC = ({ matrixClient: cli, g _t("This community has been upgraded into a Space") + `
      ` + groupSummary.profile.long_description, } as IGroupSummary["profile"]).catch(e => { - console.warn("Failed to update community profile during migration", e); + logger.warn("Failed to update community profile during migration", e); }); onFinished(roomId); diff --git a/src/components/views/dialogs/DeactivateAccountDialog.tsx b/src/components/views/dialogs/DeactivateAccountDialog.tsx index 6930f46bb05..35556aacd99 100644 --- a/src/components/views/dialogs/DeactivateAccountDialog.tsx +++ b/src/components/views/dialogs/DeactivateAccountDialog.tsx @@ -158,7 +158,7 @@ export default class DeactivateAccountDialog extends React.Component { if (e && e.httpStatus === 401 && e.data) { diff --git a/src/components/views/dialogs/DevtoolsDialog.tsx b/src/components/views/dialogs/DevtoolsDialog.tsx index 7f34b75055f..377911d0958 100644 --- a/src/components/views/dialogs/DevtoolsDialog.tsx +++ b/src/components/views/dialogs/DevtoolsDialog.tsx @@ -991,7 +991,7 @@ class SettingsExplorer extends React.PureComponent b.lastActive - a.lastActive); @@ -873,8 +873,8 @@ export default class InviteDialog extends React.PureComponent { const u = url.parse(this.props.app.url); const childContentProtocol = u.protocol; if (parentContentProtocol === 'https:' && childContentProtocol !== 'https:') { - console.warn("Refusing to load mixed-content app:", + logger.warn("Refusing to load mixed-content app:", parentContentProtocol, childContentProtocol, window.location, this.props.app.url); return true; } @@ -305,7 +305,7 @@ export default class AppTile extends React.Component { dis.dispatch({ action: 'post_sticker_message', data: payload.data }); dis.dispatch({ action: 'stickerpicker_close' }); } else { - console.warn('Ignoring sticker message. Invalid capability'); + logger.warn('Ignoring sticker message. Invalid capability'); } break; } diff --git a/src/components/views/elements/DesktopBuildsNotice.tsx b/src/components/views/elements/DesktopBuildsNotice.tsx index f2441b83a47..5938bc6dfee 100644 --- a/src/components/views/elements/DesktopBuildsNotice.tsx +++ b/src/components/views/elements/DesktopBuildsNotice.tsx @@ -22,6 +22,8 @@ import dis from "../../../dispatcher/dispatcher"; import { Action } from "../../../dispatcher/actions"; import { UserTab } from "../dialogs/UserSettingsDialog"; +import { logger } from "matrix-js-sdk/src/logger"; + export enum WarningKind { Files, Search, @@ -83,7 +85,7 @@ export default function DesktopBuildsNotice({ isRoomEncrypted, kind }: IProps) { // for safety if (!text) { - console.warn("Unknown desktop builds warning kind: ", kind); + logger.warn("Unknown desktop builds warning kind: ", kind); return null; } diff --git a/src/components/views/elements/EffectsOverlay.tsx b/src/components/views/elements/EffectsOverlay.tsx index 9e6833696f2..3e90d9e3a5b 100644 --- a/src/components/views/elements/EffectsOverlay.tsx +++ b/src/components/views/elements/EffectsOverlay.tsx @@ -20,6 +20,8 @@ import ICanvasEffect from '../../../effects/ICanvasEffect'; import { CHAT_EFFECTS } from '../../../effects'; import UIStore, { UI_EVENTS } from "../../../stores/UIStore"; +import { logger } from "matrix-js-sdk/src/logger"; + interface IProps { roomWidth: number; } @@ -38,7 +40,7 @@ const EffectsOverlay: FunctionComponent = ({ roomWidth }) => { effect = new Effect(options); effectsRef.current[name] = effect; } catch (err) { - console.warn(`Unable to load effect module at '../../../effects/${name}.`, err); + logger.warn(`Unable to load effect module at '../../../effects/${name}.`, err); } } return effect; diff --git a/src/components/views/elements/TagTile.js b/src/components/views/elements/TagTile.js index 14a5ed8e6b6..1205a2050f1 100644 --- a/src/components/views/elements/TagTile.js +++ b/src/components/views/elements/TagTile.js @@ -33,6 +33,8 @@ import SettingsStore from "../../../settings/SettingsStore"; import { mediaFromMxc } from "../../../customisations/Media"; import { replaceableComponent } from "../../../utils/replaceableComponent"; +import { logger } from "matrix-js-sdk/src/logger"; + // A class for a child of GroupFilterPanel (possibly wrapped in a DNDTagTile) that represents // a thing to click on for the user to filter the visible rooms in the RoomList to: // - Rooms that are part of the group @@ -85,7 +87,7 @@ export default class TagTile extends React.Component { if (this.unmounted) return; this.setState({ profile }); }).catch((err) => { - console.warn('Could not fetch group profile for ' + this.props.tag, err); + logger.warn('Could not fetch group profile for ' + this.props.tag, err); }); }; diff --git a/src/components/views/messages/MAudioBody.tsx b/src/components/views/messages/MAudioBody.tsx index 3611435e559..61604f55bda 100644 --- a/src/components/views/messages/MAudioBody.tsx +++ b/src/components/views/messages/MAudioBody.tsx @@ -27,6 +27,8 @@ import { PlaybackManager } from "../../../audio/PlaybackManager"; import { isVoiceMessage } from "../../../utils/EventUtils"; import { PlaybackQueue } from "../../../audio/PlaybackQueue"; +import { logger } from "matrix-js-sdk/src/logger"; + interface IState { error?: Error; playback?: Playback; @@ -49,12 +51,12 @@ export default class MAudioBody extends React.PureComponent buffer = await blob.arrayBuffer(); } catch (e) { this.setState({ error: e }); - console.warn("Unable to decrypt audio message", e); + logger.warn("Unable to decrypt audio message", e); return; // stop processing the audio file } } catch (e) { this.setState({ error: e }); - console.warn("Unable to decrypt/download audio message", e); + logger.warn("Unable to decrypt/download audio message", e); return; // stop processing the audio file } diff --git a/src/components/views/messages/MFileBody.tsx b/src/components/views/messages/MFileBody.tsx index 80c6b16f0d1..f193b7c3244 100644 --- a/src/components/views/messages/MFileBody.tsx +++ b/src/components/views/messages/MFileBody.tsx @@ -170,7 +170,7 @@ export default class MFileBody extends React.Component { decryptedBlob: await this.props.mediaEventHelper.sourceBlob.value, }); } catch (err) { - console.warn("Unable to decrypt attachment: ", err); + logger.warn("Unable to decrypt attachment: ", err); Modal.createTrackedDialog('Error decrypting attachment', '', ErrorDialog, { title: _t("Error"), description: _t("Error decrypting attachment"), diff --git a/src/components/views/messages/MImageBody.tsx b/src/components/views/messages/MImageBody.tsx index 072e111c4b8..85821129a1e 100644 --- a/src/components/views/messages/MImageBody.tsx +++ b/src/components/views/messages/MImageBody.tsx @@ -34,6 +34,8 @@ import { IBodyProps } from "./IBodyProps"; import classNames from 'classnames'; import { CSSTransition, SwitchTransition } from 'react-transition-group'; +import { logger } from "matrix-js-sdk/src/logger"; + interface IState { decryptedUrl?: string; decryptedThumbnailUrl?: string; @@ -275,7 +277,7 @@ export default class MImageBody extends React.Component { }); } catch (err) { if (this.unmounted) return; - console.warn("Unable to decrypt attachment: ", err); + logger.warn("Unable to decrypt attachment: ", err); // Set a placeholder image when we can't decrypt the image. this.setState({ error: err, diff --git a/src/components/views/messages/MVideoBody.tsx b/src/components/views/messages/MVideoBody.tsx index d119662f8a9..b2e587e51ab 100644 --- a/src/components/views/messages/MVideoBody.tsx +++ b/src/components/views/messages/MVideoBody.tsx @@ -180,7 +180,7 @@ export default class MVideoBody extends React.PureComponent }); } } catch (err) { - console.warn("Unable to decrypt attachment: ", err); + logger.warn("Unable to decrypt attachment: ", err); // Set a placeholder image when we can't decrypt the image. this.setState({ error: err, diff --git a/src/components/views/right_panel/VerificationPanel.tsx b/src/components/views/right_panel/VerificationPanel.tsx index 007b5d923c7..eb59fbb15de 100644 --- a/src/components/views/right_panel/VerificationPanel.tsx +++ b/src/components/views/right_panel/VerificationPanel.tsx @@ -236,7 +236,7 @@ export default class VerificationPanel extends React.PureComponent { // before trying to instantiate us if (!tileHandler) { const { mxEvent } = this.props; - console.warn(`Event type not supported: type:${eventType} isState:${mxEvent.isState()}`); + logger.warn(`Event type not supported: type:${eventType} isState:${mxEvent.isState()}`); return
      { _t('This event could not be displayed') } diff --git a/src/components/views/rooms/MemberList.tsx b/src/components/views/rooms/MemberList.tsx index 139ec46e6f9..bf5411b0daa 100644 --- a/src/components/views/rooms/MemberList.tsx +++ b/src/components/views/rooms/MemberList.tsx @@ -48,6 +48,8 @@ import { shouldShowComponent } from "../../../customisations/helpers/UIComponent import { UIComponent } from "../../../settings/UIFeature"; import { JoinRule } from "matrix-js-sdk/src/@types/partials"; +import { logger } from "matrix-js-sdk/src/logger"; + const getSearchQueryLSKey = (roomId: string) => `mx_MemberList_searchQuarry_${roomId}`; const INITIAL_LOAD_NUM_MEMBERS = 30; @@ -184,7 +186,7 @@ export default class MemberList extends React.Component { try { searchQuery = window.localStorage.getItem(getSearchQueryLSKey(this.props.roomId)); } catch (error) { - console.warn("Failed to get last the MemberList search query", error); + logger.warn("Failed to get last the MemberList search query", error); } // set the state after determining showPresence to make sure it's @@ -433,7 +435,7 @@ export default class MemberList extends React.Component { try { window.localStorage.setItem(getSearchQueryLSKey(this.props.roomId), searchQuery); } catch (error) { - console.warn("Failed to set the last MemberList search query", error); + logger.warn("Failed to set the last MemberList search query", error); } this.setState({ diff --git a/src/components/views/rooms/ReadReceiptMarker.tsx b/src/components/views/rooms/ReadReceiptMarker.tsx index cfc535b23d5..f2ce7e39670 100644 --- a/src/components/views/rooms/ReadReceiptMarker.tsx +++ b/src/components/views/rooms/ReadReceiptMarker.tsx @@ -26,6 +26,8 @@ import { replaceableComponent } from "../../../utils/replaceableComponent"; import MemberAvatar from '../avatars/MemberAvatar'; +import { logger } from "matrix-js-sdk/src/logger"; + interface IProps { // the RoomMember to show the RR for member?: RoomMember; @@ -145,7 +147,7 @@ export default class ReadReceiptMarker extends React.PureComponent { // before trying to instantiate us if (!tileHandler) { const { mxEvent } = this.props; - console.warn(`Event type not supported: type:${mxEvent.getType()} isState:${mxEvent.isState()}`); + logger.warn(`Event type not supported: type:${mxEvent.getType()} isState:${mxEvent.isState()}`); return
      { _t('This event could not be displayed') }
      ; diff --git a/src/components/views/rooms/RoomTile.tsx b/src/components/views/rooms/RoomTile.tsx index dbefcbd3331..eb13d7e96e3 100644 --- a/src/components/views/rooms/RoomTile.tsx +++ b/src/components/views/rooms/RoomTile.tsx @@ -50,6 +50,8 @@ import IconizedContextMenu, { import { CommunityPrototypeStore, IRoomProfile } from "../../../stores/CommunityPrototypeStore"; import { replaceableComponent } from "../../../utils/replaceableComponent"; +import { logger } from "matrix-js-sdk/src/logger"; + interface IProps { room: Room; showMessagePreview: boolean; @@ -299,7 +301,7 @@ export default class RoomTile extends React.PureComponent { 0, )); } else { - console.warn(`Unexpected tag ${tagId} applied to ${this.props.room.roomId}`); + logger.warn(`Unexpected tag ${tagId} applied to ${this.props.room.roomId}`); } if ((ev as React.KeyboardEvent).key === Key.ENTER) { diff --git a/src/components/views/rooms/Stickerpicker.tsx b/src/components/views/rooms/Stickerpicker.tsx index 204b31cd2eb..1f59d3a71e6 100644 --- a/src/components/views/rooms/Stickerpicker.tsx +++ b/src/components/views/rooms/Stickerpicker.tsx @@ -113,7 +113,7 @@ export default class Stickerpicker extends React.PureComponent { logger.error("Cannot disable assets: no scalar client"); } } else { - console.warn('No widget ID specified, not disabling assets'); + logger.warn('No widget ID specified, not disabling assets'); } this.props.setShowStickers(false); diff --git a/src/components/views/settings/BridgeTile.tsx b/src/components/views/settings/BridgeTile.tsx index 5dd5ed9ba12..d8beeddfc55 100644 --- a/src/components/views/settings/BridgeTile.tsx +++ b/src/components/views/settings/BridgeTile.tsx @@ -27,6 +27,8 @@ import { isUrlPermitted } from '../../../HtmlUtils'; import { replaceableComponent } from "../../../utils/replaceableComponent"; import { mediaFromMxc } from "../../../customisations/Media"; +import { logger } from "matrix-js-sdk/src/logger"; + interface IProps { ev: MatrixEvent; room: Room; @@ -75,13 +77,13 @@ export default class BridgeTile extends React.PureComponent { const content: IBridgeStateEvent = this.props.ev.getContent(); // Validate if (!content.channel?.id || !content.protocol?.id) { - console.warn(`Bridge info event ${this.props.ev.getId()} has missing content. Tile will not render`); + logger.warn(`Bridge info event ${this.props.ev.getId()} has missing content. Tile will not render`); return null; } if (!content.bridgebot) { // Bridgebot was not required previously, so in order to not break rooms we are allowing // the sender to be used in place. When the proposal is merged, this should be removed. - console.warn(`Bridge info event ${this.props.ev.getId()} does not provide a 'bridgebot' key which` + logger.warn(`Bridge info event ${this.props.ev.getId()} does not provide a 'bridgebot' key which` + "is deprecated behaviour. Using sender for now."); content.bridgebot = this.props.ev.getSender(); } diff --git a/src/components/views/settings/SetIdServer.tsx b/src/components/views/settings/SetIdServer.tsx index d7cfc7b83a3..3eb6041a8f1 100644 --- a/src/components/views/settings/SetIdServer.tsx +++ b/src/components/views/settings/SetIdServer.tsx @@ -270,11 +270,11 @@ export default class SetIdServer extends React.Component { ); } catch (e) { currentServerReachable = false; - console.warn( + logger.warn( `Unable to reach identity server at ${currentClientIdServer} to check ` + `for 3PIDs during IS change flow`, ); - console.warn(e); + logger.warn(e); } const boundThreepids = threepids.filter(tp => tp.bound); let message; diff --git a/src/components/views/settings/tabs/user/GeneralUserSettingsTab.tsx b/src/components/views/settings/tabs/user/GeneralUserSettingsTab.tsx index 25e7ea71c64..b29c6ed87f4 100644 --- a/src/components/views/settings/tabs/user/GeneralUserSettingsTab.tsx +++ b/src/components/views/settings/tabs/user/GeneralUserSettingsTab.tsx @@ -168,11 +168,11 @@ export default class GeneralUserSettingsTab extends React.Component a.medium === 'email'), @@ -218,11 +218,11 @@ export default class GeneralUserSettingsTab extends React.Component void; @@ -174,7 +176,7 @@ export default class SecurityUserSettingsTab extends React.Component { // but the server denies them that permission (via room_list_publication_rules). // The check below responds by retrying without publishing the room. if (err.httpStatus === 403 && err.errcode === "M_UNKNOWN" && err.data.error === "Not allowed to publish room") { - console.warn("Failed to publish room, try again without publishing it"); + logger.warn("Failed to publish room, try again without publishing it"); createOpts.visibility = Visibility.Private; return client.createRoom(createOpts); } else { diff --git a/src/indexing/EventIndex.ts b/src/indexing/EventIndex.ts index 1c182cf9129..ad715e09cc4 100644 --- a/src/indexing/EventIndex.ts +++ b/src/indexing/EventIndex.ts @@ -583,7 +583,7 @@ export default class EventIndex extends EventEmitter { if (eventId) { await indexManager.deleteEvent(eventId); } else { - console.warn("EventIndex: Redaction event doesn't contain a valid associated event id", ev); + logger.warn("EventIndex: Redaction event doesn't contain a valid associated event id", ev); } } diff --git a/src/integrations/IntegrationManagers.ts b/src/integrations/IntegrationManagers.ts index 4ce3171d734..051b19279d2 100644 --- a/src/integrations/IntegrationManagers.ts +++ b/src/integrations/IntegrationManagers.ts @@ -225,18 +225,18 @@ export class IntegrationManagers { wkConfig = await result.json(); } catch (e) { logger.error(e); - console.warn("Failed to locate integration manager"); + logger.warn("Failed to locate integration manager"); return null; } if (!wkConfig || !wkConfig["m.integrations_widget"]) { - console.warn("Missing integrations widget on .well-known response"); + logger.warn("Missing integrations widget on .well-known response"); return null; } const widget = wkConfig["m.integrations_widget"]; if (!widget["url"] || !widget["data"] || !widget["data"]["api_url"]) { - console.warn("Malformed .well-known response for integrations widget"); + logger.warn("Malformed .well-known response for integrations widget"); return null; } diff --git a/src/languageHandler.tsx b/src/languageHandler.tsx index 822fe445d3e..63804b2a2cf 100644 --- a/src/languageHandler.tsx +++ b/src/languageHandler.tsx @@ -89,11 +89,11 @@ function safeCounterpartTranslate(text: string, options?: object) { count = options['count']; Object.keys(options).forEach((k) => { if (options[k] === undefined) { - console.warn("safeCounterpartTranslate called with undefined interpolation name: " + k); + logger.warn("safeCounterpartTranslate called with undefined interpolation name: " + k); options[k] = 'undefined'; } if (options[k] === null) { - console.warn("safeCounterpartTranslate called with null interpolation name: " + k); + logger.warn("safeCounterpartTranslate called with null interpolation name: " + k); options[k] = 'null'; } }); diff --git a/src/performance/index.ts b/src/performance/index.ts index cb808f91735..d2330dfb75f 100644 --- a/src/performance/index.ts +++ b/src/performance/index.ts @@ -16,6 +16,8 @@ limitations under the License. import { PerformanceEntryNames } from "./entry-names"; +import { logger } from "matrix-js-sdk/src/logger"; + interface GetEntriesOptions { name?: string; type?: string; @@ -57,7 +59,7 @@ export default class PerformanceMonitor { const key = this.buildKey(name, id); if (performance.getEntriesByName(this.START_PREFIX + key).length > 0) { - console.warn(`Recording already started for: ${name}`); + logger.warn(`Recording already started for: ${name}`); return; } @@ -77,7 +79,7 @@ export default class PerformanceMonitor { } const key = this.buildKey(name, id); if (performance.getEntriesByName(this.START_PREFIX + key).length === 0) { - console.warn(`No recording started for: ${name}`); + logger.warn(`No recording started for: ${name}`); return; } diff --git a/src/settings/SettingsStore.ts b/src/settings/SettingsStore.ts index df19438ea05..1222ca9231e 100644 --- a/src/settings/SettingsStore.ts +++ b/src/settings/SettingsStore.ts @@ -182,7 +182,7 @@ export default class SettingsStore { */ public static unwatchSetting(watcherReference: string) { if (!SettingsStore.watchers.has(watcherReference)) { - console.warn(`Ending non-existent watcher ID ${watcherReference}`); + logger.warn(`Ending non-existent watcher ID ${watcherReference}`); return; } diff --git a/src/settings/controllers/NotificationControllers.ts b/src/settings/controllers/NotificationControllers.ts index 09e4e1dd1aa..a7114325ae0 100644 --- a/src/settings/controllers/NotificationControllers.ts +++ b/src/settings/controllers/NotificationControllers.ts @@ -23,6 +23,8 @@ import { SettingLevel } from "../SettingLevel"; import { PushProcessor } from "matrix-js-sdk/src/pushprocessor"; import { PushRuleActionName } from "matrix-js-sdk/src/@types/PushRules"; +import { logger } from "matrix-js-sdk/src/logger"; + // .m.rule.master being enabled means all events match that push rule // default action on this rule is dont_notify, but it could be something else export function isPushNotifyDisabled(): boolean { @@ -31,7 +33,7 @@ export function isPushNotifyDisabled(): boolean { const masterRule = processor.getPushRuleById(".m.rule.master"); if (!masterRule) { - console.warn("No master push rule! Notifications are disabled for this user."); + logger.warn("No master push rule! Notifications are disabled for this user."); return true; } diff --git a/src/settings/handlers/MatrixClientBackedSettingsHandler.ts b/src/settings/handlers/MatrixClientBackedSettingsHandler.ts index 76825d13358..a475787f335 100644 --- a/src/settings/handlers/MatrixClientBackedSettingsHandler.ts +++ b/src/settings/handlers/MatrixClientBackedSettingsHandler.ts @@ -17,6 +17,8 @@ limitations under the License. import SettingsHandler from "./SettingsHandler"; import { MatrixClient } from "matrix-js-sdk/src/client"; +import { logger } from "matrix-js-sdk/src/logger"; + // Dev note: This whole class exists in the event someone logs out and back in - we want // to make sure the right MatrixClient is listening for changes. @@ -48,6 +50,6 @@ export default abstract class MatrixClientBackedSettingsHandler extends Settings } protected initMatrixClient(oldClient: MatrixClient, newClient: MatrixClient) { - console.warn("initMatrixClient not overridden"); + logger.warn("initMatrixClient not overridden"); } } diff --git a/src/stores/CommunityPrototypeStore.ts b/src/stores/CommunityPrototypeStore.ts index 0c364430ea3..6c5ab22c5f4 100644 --- a/src/stores/CommunityPrototypeStore.ts +++ b/src/stores/CommunityPrototypeStore.ts @@ -28,6 +28,8 @@ import GroupStore from "./GroupStore"; import dis from "../dispatcher/dispatcher"; import { isNullOrUndefined } from "matrix-js-sdk/src/utils"; +import { logger } from "matrix-js-sdk/src/logger"; + interface IState { // nothing of value - we use account data } @@ -134,7 +136,7 @@ export class CommunityPrototypeStore extends AsyncStoreWithClient { // we use global account data because per-room account data on invites is unreliable await this.matrixClient.setAccountData("im.vector.group_info." + room.roomId, profile); } catch (e) { - console.warn("Non-fatal error getting group information for invite:", e); + logger.warn("Non-fatal error getting group information for invite:", e); } } } else if (payload.action === "MatrixActions.accountData") { diff --git a/src/stores/FlairStore.js b/src/stores/FlairStore.js index 7de5f9405e9..971efd6cf60 100644 --- a/src/stores/FlairStore.js +++ b/src/stores/FlairStore.js @@ -98,7 +98,7 @@ class FlairStore extends EventEmitter { }).catch((err) => { // Indicate whether the homeserver supports groups if (err.errcode === 'M_UNRECOGNIZED') { - console.warn('Cannot display flair, server does not support groups'); + logger.warn('Cannot display flair, server does not support groups'); groupSupport = false; // Return silently to avoid spamming for non-supporting servers return; diff --git a/src/stores/RightPanelStore.ts b/src/stores/RightPanelStore.ts index b6f91bf8357..f9e0a578eb3 100644 --- a/src/stores/RightPanelStore.ts +++ b/src/stores/RightPanelStore.ts @@ -23,6 +23,8 @@ import { ActionPayload } from "../dispatcher/payloads"; import { Action } from '../dispatcher/actions'; import { SettingLevel } from "../settings/SettingLevel"; +import { logger } from "matrix-js-sdk/src/logger"; + interface RightPanelStoreState { // Whether or not to show the right panel at all. We split out rooms and groups // because they're different flows for the user to follow. @@ -180,7 +182,7 @@ export default class RightPanelStore extends Store { } } if (!RightPanelPhases[targetPhase]) { - console.warn(`Tried to switch right panel to unknown phase: ${targetPhase}`); + logger.warn(`Tried to switch right panel to unknown phase: ${targetPhase}`); return; } diff --git a/src/stores/SpaceStore.ts b/src/stores/SpaceStore.ts index 966c4af40ff..4ba10813253 100644 --- a/src/stores/SpaceStore.ts +++ b/src/stores/SpaceStore.ts @@ -867,7 +867,7 @@ export class SpaceStoreClass extends AsyncStoreWithClient { try { await this.matrixClient.setRoomAccountData(space.roomId, EventType.SpaceOrder, { order }); } catch (e) { - console.warn("Failed to set root space order", e); + logger.warn("Failed to set root space order", e); if (this.spaceOrderLocalEchoMap.get(space.roomId) === order) { this.spaceOrderLocalEchoMap.delete(space.roomId); } diff --git a/src/stores/WidgetStore.ts b/src/stores/WidgetStore.ts index 44c8327c047..ebe761aa80a 100644 --- a/src/stores/WidgetStore.ts +++ b/src/stores/WidgetStore.ts @@ -126,7 +126,7 @@ export default class WidgetStore extends AsyncStoreWithClient { // Sanity check for https://github.com/vector-im/element-web/issues/15705 const existingApp = this.widgetMap.get(widgetUid(app)); if (existingApp) { - console.warn( + logger.warn( `Possible widget ID conflict for ${app.id} - wants to store in room ${app.roomId} ` + `but is currently stored as ${existingApp.roomId} - letting the want win`, ); diff --git a/src/stores/room-list/RoomListLayoutStore.ts b/src/stores/room-list/RoomListLayoutStore.ts index 1443448a64d..d5b31fed935 100644 --- a/src/stores/room-list/RoomListLayoutStore.ts +++ b/src/stores/room-list/RoomListLayoutStore.ts @@ -20,6 +20,8 @@ import { AsyncStoreWithClient } from "../AsyncStoreWithClient"; import defaultDispatcher from "../../dispatcher/dispatcher"; import { ActionPayload } from "../../dispatcher/payloads"; +import { logger } from "matrix-js-sdk/src/logger"; + interface IState {} export default class RoomListLayoutStore extends AsyncStoreWithClient { @@ -53,7 +55,7 @@ export default class RoomListLayoutStore extends AsyncStoreWithClient { // Note: this primarily exists for debugging, and isn't really intended to be used by anything. public async resetLayouts() { - console.warn("Resetting layouts for room list"); + logger.warn("Resetting layouts for room list"); for (const layout of this.layoutMap.values()) { layout.reset(); } diff --git a/src/stores/room-list/RoomListStore.ts b/src/stores/room-list/RoomListStore.ts index ff90cb8caac..c4b1f012b1b 100644 --- a/src/stores/room-list/RoomListStore.ts +++ b/src/stores/room-list/RoomListStore.ts @@ -162,7 +162,7 @@ export class RoomListStoreClass extends AsyncStoreWithClient { } else if (activeRoomId) { const activeRoom = this.matrixClient.getRoom(activeRoomId); if (!activeRoom) { - console.warn(`${activeRoomId} is current in RVS but missing from client - clearing sticky room`); + logger.warn(`${activeRoomId} is current in RVS but missing from client - clearing sticky room`); this.algorithm.setStickyRoom(null); } else if (activeRoom !== this.algorithm.stickyRoom) { this.algorithm.setStickyRoom(activeRoom); @@ -226,7 +226,7 @@ export class RoomListStoreClass extends AsyncStoreWithClient { if (readReceiptChangeIsFor(payload.event, this.matrixClient)) { const room = payload.room; if (!room) { - console.warn(`Own read receipt was in unknown room ${room.roomId}`); + logger.warn(`Own read receipt was in unknown room ${room.roomId}`); return; } await this.handleRoomUpdate(room, RoomUpdateCause.ReadReceipt); @@ -258,8 +258,8 @@ export class RoomListStoreClass extends AsyncStoreWithClient { this.updateFn.trigger(); }; if (!room) { - console.warn(`Live timeline event ${eventPayload.event.getId()} received without associated room`); - console.warn(`Queuing failed room update for retry as a result.`); + logger.warn(`Live timeline event ${eventPayload.event.getId()} received without associated room`); + logger.warn(`Queuing failed room update for retry as a result.`); setTimeout(async () => { const updatedRoom = this.matrixClient.getRoom(roomId); await tryUpdate(updatedRoom); @@ -276,7 +276,7 @@ export class RoomListStoreClass extends AsyncStoreWithClient { } const room = this.matrixClient.getRoom(roomId); if (!room) { - console.warn(`Event ${eventPayload.event.getId()} was decrypted in an unknown room ${roomId}`); + logger.warn(`Event ${eventPayload.event.getId()} was decrypted in an unknown room ${roomId}`); return; } await this.handleRoomUpdate(room, RoomUpdateCause.Timeline); @@ -289,7 +289,7 @@ export class RoomListStoreClass extends AsyncStoreWithClient { for (const roomId of roomIds) { const room = this.matrixClient.getRoom(roomId); if (!room) { - console.warn(`${roomId} was found in DMs but the room is not in the store`); + logger.warn(`${roomId} was found in DMs but the room is not in the store`); continue; } @@ -550,7 +550,7 @@ export class RoomListStoreClass extends AsyncStoreWithClient { * be used if the calling code will manually trigger the update. */ public regenerateAllLists({ trigger = true }) { - console.warn("Regenerating all room lists"); + logger.warn("Regenerating all room lists"); const rooms = this.getPlausibleRooms(); diff --git a/src/stores/room-list/TagWatcher.ts b/src/stores/room-list/TagWatcher.ts index 7e809283e9c..09f6ec13cd4 100644 --- a/src/stores/room-list/TagWatcher.ts +++ b/src/stores/room-list/TagWatcher.ts @@ -19,6 +19,8 @@ import GroupFilterOrderStore from "../GroupFilterOrderStore"; import { CommunityFilterCondition } from "./filters/CommunityFilterCondition"; import { arrayDiff, arrayHasDiff } from "../../utils/arrays"; +import { logger } from "matrix-js-sdk/src/logger"; + /** * Watches for changes in groups to manage filters on the provided RoomListStore */ @@ -37,7 +39,7 @@ export class TagWatcher { // Selected tags changed, do some filtering if (!this.store.matrixClient) { - console.warn("Tag update without an associated matrix client - ignoring"); + logger.warn("Tag update without an associated matrix client - ignoring"); return; } @@ -47,7 +49,7 @@ export class TagWatcher { for (const tag of filterableTags) { const group = this.store.matrixClient.getGroup(tag); if (!group) { - console.warn(`Group selected with no group object available: ${tag}`); + logger.warn(`Group selected with no group object available: ${tag}`); continue; } diff --git a/src/stores/room-list/algorithms/Algorithm.ts b/src/stores/room-list/algorithms/Algorithm.ts index 1e2606686d0..5e98ef37ffb 100644 --- a/src/stores/room-list/algorithms/Algorithm.ts +++ b/src/stores/room-list/algorithms/Algorithm.ts @@ -36,6 +36,8 @@ import { getListAlgorithmInstance } from "./list-ordering"; import { VisibilityProvider } from "../filters/VisibilityProvider"; import SpaceStore from "../../SpaceStore"; +import { logger } from "matrix-js-sdk/src/logger"; + /** * Fired when the Algorithm has determined a list has been updated. */ @@ -126,7 +128,7 @@ export class Algorithm extends EventEmitter { try { this.updateStickyRoom(val); } catch (e) { - console.warn("Failed to update sticky room", e); + logger.warn("Failed to update sticky room", e); } } @@ -241,7 +243,7 @@ export class Algorithm extends EventEmitter { // to force the position to zero (top) to ensure we can properly handle it. const wasSticky = this._lastStickyRoom.room ? this._lastStickyRoom.room.roomId === val.roomId : false; if (this._lastStickyRoom.tag && tag !== this._lastStickyRoom.tag && wasSticky && position < 0) { - console.warn(`Sticky room ${val.roomId} changed tags during sticky room handling`); + logger.warn(`Sticky room ${val.roomId} changed tags during sticky room handling`); position = 0; } @@ -278,13 +280,13 @@ export class Algorithm extends EventEmitter { if (this._stickyRoom.room !== val) { // Check the room IDs just in case if (this._stickyRoom.room.roomId === val.roomId) { - console.warn("Sticky room changed references"); + logger.warn("Sticky room changed references"); } else { throw new Error("Sticky room changed while the sticky room was changing"); } } - console.warn(`Sticky room changed tag & position from ${tag} / ${position} ` + logger.warn(`Sticky room changed tag & position from ${tag} / ${position} ` + `to ${this._stickyRoom.tag} / ${this._stickyRoom.position}`); tag = this._stickyRoom.tag; @@ -322,7 +324,7 @@ export class Algorithm extends EventEmitter { return; } - console.warn("Recalculating filtered room list"); + logger.warn("Recalculating filtered room list"); const filters = Array.from(this.allowedByFilter.keys()); const newMap: ITagMap = {}; for (const tagId of Object.keys(this.cachedRooms)) { @@ -491,7 +493,7 @@ export class Algorithm extends EventEmitter { // We only log this if we're expecting to be publishing updates, which means that // this could be an unexpected invocation. If we're inhibited, then this is probably // an intentional invocation. - console.warn("Resetting known rooms, initiating regeneration"); + logger.warn("Resetting known rooms, initiating regeneration"); } // Before we go any further we need to clear (but remember) the sticky room to @@ -657,18 +659,18 @@ export class Algorithm extends EventEmitter { // pass the cause through as NewRoom, we'll fail to lie to the algorithm and thus // lose the room. if (hasTags && !isForLastSticky) { - console.warn(`${room.roomId} is reportedly new but is already known - assuming TagChange instead`); + logger.warn(`${room.roomId} is reportedly new but is already known - assuming TagChange instead`); cause = RoomUpdateCause.PossibleTagChange; } // Check to see if the room is known first let knownRoomRef = this.rooms.includes(room); if (hasTags && !knownRoomRef) { - console.warn(`${room.roomId} might be a reference change - attempting to update reference`); + logger.warn(`${room.roomId} might be a reference change - attempting to update reference`); this.rooms = this.rooms.map(r => r.roomId === room.roomId ? room : r); knownRoomRef = this.rooms.includes(room); if (!knownRoomRef) { - console.warn(`${room.roomId} is still not referenced. It may be sticky.`); + logger.warn(`${room.roomId} is still not referenced. It may be sticky.`); } } @@ -766,7 +768,7 @@ export class Algorithm extends EventEmitter { const tags = this.roomIdsToTags[room.roomId]; if (!tags) { - console.warn(`No tags known for "${room.name}" (${room.roomId})`); + logger.warn(`No tags known for "${room.name}" (${room.roomId})`); return false; } diff --git a/src/stores/room-list/algorithms/list-ordering/ImportanceAlgorithm.ts b/src/stores/room-list/algorithms/list-ordering/ImportanceAlgorithm.ts index 3cc393305eb..ef1f4629be5 100644 --- a/src/stores/room-list/algorithms/list-ordering/ImportanceAlgorithm.ts +++ b/src/stores/room-list/algorithms/list-ordering/ImportanceAlgorithm.ts @@ -23,6 +23,8 @@ import { OrderingAlgorithm } from "./OrderingAlgorithm"; import { NotificationColor } from "../../../notifications/NotificationColor"; import { RoomNotificationStateStore } from "../../../notifications/RoomNotificationStateStore"; +import { logger } from "matrix-js-sdk/src/logger"; + interface ICategorizedRoomMap { // @ts-ignore - TS wants this to be a string, but we know better [category: NotificationColor]: Room[]; @@ -130,7 +132,7 @@ export class ImportanceAlgorithm extends OrderingAlgorithm { } else if (cause === RoomUpdateCause.RoomRemoved) { const roomIdx = this.getRoomIndex(room); if (roomIdx === -1) { - console.warn(`Tried to remove unknown room from ${this.tagId}: ${room.roomId}`); + logger.warn(`Tried to remove unknown room from ${this.tagId}: ${room.roomId}`); return false; // no change } const oldCategory = this.getCategoryFromIndices(roomIdx, this.indices); @@ -263,7 +265,7 @@ export class ImportanceAlgorithm extends OrderingAlgorithm { if (indices[lastCat] > indices[thisCat]) { // "should never happen" disclaimer goes here - console.warn( + logger.warn( `!! Room list index corruption: ${lastCat} (i:${indices[lastCat]}) is greater ` + `than ${thisCat} (i:${indices[thisCat]}) - category indices are likely desynced from reality`); diff --git a/src/stores/room-list/algorithms/list-ordering/NaturalAlgorithm.ts b/src/stores/room-list/algorithms/list-ordering/NaturalAlgorithm.ts index 91182dee167..726987e7343 100644 --- a/src/stores/room-list/algorithms/list-ordering/NaturalAlgorithm.ts +++ b/src/stores/room-list/algorithms/list-ordering/NaturalAlgorithm.ts @@ -20,6 +20,8 @@ import { OrderingAlgorithm } from "./OrderingAlgorithm"; import { RoomUpdateCause, TagID } from "../../models"; import { Room } from "matrix-js-sdk/src/models/room"; +import { logger } from "matrix-js-sdk/src/logger"; + /** * Uses the natural tag sorting algorithm order to determine tag ordering. No * additional behavioural changes are present. @@ -47,7 +49,7 @@ export class NaturalAlgorithm extends OrderingAlgorithm { if (idx >= 0) { this.cachedOrderedRooms.splice(idx, 1); } else { - console.warn(`Tried to remove unknown room from ${this.tagId}: ${room.roomId}`); + logger.warn(`Tried to remove unknown room from ${this.tagId}: ${room.roomId}`); } } diff --git a/src/stores/room-list/algorithms/list-ordering/OrderingAlgorithm.ts b/src/stores/room-list/algorithms/list-ordering/OrderingAlgorithm.ts index 9d7b5f9ddb5..3afcd4f9d59 100644 --- a/src/stores/room-list/algorithms/list-ordering/OrderingAlgorithm.ts +++ b/src/stores/room-list/algorithms/list-ordering/OrderingAlgorithm.ts @@ -18,6 +18,8 @@ import { Room } from "matrix-js-sdk/src/models/room"; import { RoomUpdateCause, TagID } from "../../models"; import { SortAlgorithm } from "../models"; +import { logger } from "matrix-js-sdk/src/logger"; + /** * Represents a list ordering algorithm. Subclasses should populate the * `cachedOrderedRooms` field. @@ -71,7 +73,7 @@ export abstract class OrderingAlgorithm { protected getRoomIndex(room: Room): number { let roomIdx = this.cachedOrderedRooms.indexOf(room); if (roomIdx === -1) { // can only happen if the js-sdk's store goes sideways. - console.warn(`Degrading performance to find missing room in "${this.tagId}": ${room.roomId}`); + logger.warn(`Degrading performance to find missing room in "${this.tagId}": ${room.roomId}`); roomIdx = this.cachedOrderedRooms.findIndex(r => r.roomId === room.roomId); } return roomIdx; diff --git a/src/utils/DMRoomMap.ts b/src/utils/DMRoomMap.ts index 50f849b2ba0..089279cdcc0 100644 --- a/src/utils/DMRoomMap.ts +++ b/src/utils/DMRoomMap.ts @@ -20,6 +20,8 @@ import { MatrixClient } from "matrix-js-sdk/src/client"; import { MatrixClientPeg } from '../MatrixClientPeg'; +import { logger } from "matrix-js-sdk/src/logger"; + /** * Class that takes a Matrix Client and flips the m.direct map * so the operation of mapping a room ID to which user it's a DM @@ -196,7 +198,7 @@ export default class DMRoomMap { // to avoid multiple devices fighting to correct // the account data, only try to send the corrected // version once. - console.warn(`Invalid m.direct account data detected ` + + logger.warn(`Invalid m.direct account data detected ` + `(self-chats that shouldn't be), patching it up.`); if (neededPatching && !this.hasSentOutPatchDirectAccountDataPatch) { this.hasSentOutPatchDirectAccountDataPatch = true; diff --git a/src/utils/FontManager.ts b/src/utils/FontManager.ts index 24e5c69e245..197e4eda00e 100644 --- a/src/utils/FontManager.ts +++ b/src/utils/FontManager.ts @@ -41,7 +41,7 @@ function safariVersionCheck(ua: string): boolean { } catch (err) { logger.error("Error in Safari COLR version check", err); } - console.warn("Couldn't determine Safari version to check COLR font support, assuming no."); + logger.warn("Couldn't determine Safari version to check COLR font support, assuming no."); return false; } diff --git a/src/utils/MediaEventHelper.ts b/src/utils/MediaEventHelper.ts index f68da309bcc..1494edddc19 100644 --- a/src/utils/MediaEventHelper.ts +++ b/src/utils/MediaEventHelper.ts @@ -22,6 +22,8 @@ import { IMediaEventContent } from "../customisations/models/IMediaEventContent" import { IDestroyable } from "./IDestroyable"; import { EventType, MsgType } from "matrix-js-sdk/src/@types/event"; +import { logger } from "matrix-js-sdk/src/logger"; + // TODO: We should consider caching the blobs. https://github.com/vector-im/element-web/issues/17192 export class MediaEventHelper implements IDestroyable { @@ -91,7 +93,7 @@ export class MediaEventHelper implements IDestroyable { return decryptFile(content.info.thumbnail_file, content.info.thumbnail_info); } else { // "Should never happen" - console.warn("Media claims to have thumbnail and is encrypted, but no thumbnail_file found"); + logger.warn("Media claims to have thumbnail and is encrypted, but no thumbnail_file found"); return Promise.resolve(null); } } diff --git a/src/utils/MessageDiffUtils.tsx b/src/utils/MessageDiffUtils.tsx index 020a7763cfd..6a2244521ea 100644 --- a/src/utils/MessageDiffUtils.tsx +++ b/src/utils/MessageDiffUtils.tsx @@ -22,6 +22,8 @@ import { IContent } from "matrix-js-sdk/src/models/event"; import { bodyToHtml, checkBlockNode, IOptsReturnString } from "../HtmlUtils"; +import { logger } from "matrix-js-sdk/src/logger"; + const decodeEntities = (function() { let textarea = null; return function(str: string): string { @@ -218,7 +220,7 @@ function renderDifferenceInDOM(originalRootNode: Node, diff: IDiff, diffMathPatc } default: // Should not happen (modifyComment, ???) - console.warn("MessageDiffUtils::editBodyDiffToHtml: diff action not supported atm", diff); + logger.warn("MessageDiffUtils::editBodyDiffToHtml: diff action not supported atm", diff); } } diff --git a/src/utils/MultiInviter.ts b/src/utils/MultiInviter.ts index e16bee7b257..f7f36370f90 100644 --- a/src/utils/MultiInviter.ts +++ b/src/utils/MultiInviter.ts @@ -219,7 +219,7 @@ export default class MultiInviter { case "M_PROFILE_NOT_FOUND": if (!ignoreProfile) { // Invite without the profile check - console.warn(`User ${address} does not have a profile - inviting anyways automatically`); + logger.warn(`User ${address} does not have a profile - inviting anyways automatically`); this.doInvite(address, true).then(resolve, reject); return; } diff --git a/src/utils/RoomUpgrade.ts b/src/utils/RoomUpgrade.ts index 45a63acfba3..f2ac4aea4e9 100644 --- a/src/utils/RoomUpgrade.ts +++ b/src/utils/RoomUpgrade.ts @@ -138,7 +138,7 @@ export async function upgradeRoom( } } catch (e) { // These errors are not critical to the room upgrade itself - console.warn("Failed to update parent spaces during room upgrade", e); + logger.warn("Failed to update parent spaces during room upgrade", e); } } diff --git a/src/utils/WidgetUtils.ts b/src/utils/WidgetUtils.ts index 098f18ab09c..106ae4bfda1 100644 --- a/src/utils/WidgetUtils.ts +++ b/src/utils/WidgetUtils.ts @@ -55,30 +55,30 @@ export default class WidgetUtils { */ static canUserModifyWidgets(roomId: string): boolean { if (!roomId) { - console.warn('No room ID specified'); + logger.warn('No room ID specified'); return false; } const client = MatrixClientPeg.get(); if (!client) { - console.warn('User must be be logged in'); + logger.warn('User must be be logged in'); return false; } const room = client.getRoom(roomId); if (!room) { - console.warn(`Room ID ${roomId} is not recognised`); + logger.warn(`Room ID ${roomId} is not recognised`); return false; } const me = client.credentials.userId; if (!me) { - console.warn('Failed to get user ID'); + logger.warn('Failed to get user ID'); return false; } if (room.getMyMembership() !== "join") { - console.warn(`User ${me} is not in room ${roomId}`); + logger.warn(`User ${me} is not in room ${roomId}`); return false; } diff --git a/src/utils/permalinks/Permalinks.ts b/src/utils/permalinks/Permalinks.ts index cff7ebc08b3..4c05f42a0da 100644 --- a/src/utils/permalinks/Permalinks.ts +++ b/src/utils/permalinks/Permalinks.ts @@ -28,6 +28,8 @@ import ElementPermalinkConstructor from "./ElementPermalinkConstructor"; import matrixLinkify from "../../linkify-matrix"; import SdkConfig from "../../SdkConfig"; +import { logger } from "matrix-js-sdk/src/logger"; + // The maximum number of servers to pick when working out which servers // to add to permalinks. The servers are appended as ?via=example.org const MAX_SERVER_CANDIDATES = 3; @@ -109,7 +111,7 @@ export class RoomPermalinkCreator { // currentState, at least potentially at the early stages of joining a room. // To avoid breaking everything, we'll just warn rather than throw as well as // not bother updating the various aspects of the share link. - console.warn("Tried to load a permalink creator with no room state"); + logger.warn("Tried to load a permalink creator with no room state"); return; } this.updateAllowedServers(); From 2c66403b3c7ec64b79c653347d0abf0d9ed9a414 Mon Sep 17 00:00:00 2001 From: Dariusz Niemczyk Date: Fri, 15 Oct 2021 16:32:15 +0200 Subject: [PATCH 113/156] Replace console.info with logger.info Related https://github.com/vector-im/element-web/issues/18425 --- src/CallHandler.tsx | 8 ++++---- src/Presence.ts | 2 +- src/components/structures/MatrixChat.tsx | 4 ++-- src/components/structures/RoomView.tsx | 2 +- src/components/views/auth/CaptchaForm.tsx | 2 +- .../views/context_menus/WidgetContextMenu.tsx | 2 +- src/components/views/elements/AppTile.tsx | 2 +- src/components/views/right_panel/UserInfo.tsx | 4 ++-- src/utils/exportUtils/HtmlExport.tsx | 2 +- src/utils/exportUtils/JSONExport.ts | 10 +++++----- src/utils/exportUtils/PlainTextExport.ts | 4 ++-- 11 files changed, 21 insertions(+), 21 deletions(-) diff --git a/src/CallHandler.tsx b/src/CallHandler.tsx index 30171aca893..69b00927a9c 100644 --- a/src/CallHandler.tsx +++ b/src/CallHandler.tsx @@ -825,7 +825,7 @@ export default class CallHandler extends EventEmitter { }); return; } else if (members.length === 2) { - console.info(`Place ${payload.type} call in ${payload.room_id}`); + logger.info(`Place ${payload.type} call in ${payload.room_id}`); this.placeCall(payload.room_id, payload.type, payload.transferee); } else { // > 2 @@ -838,17 +838,17 @@ export default class CallHandler extends EventEmitter { } break; case 'place_conference_call': - console.info("Place conference call in " + payload.room_id); + logger.info("Place conference call in " + payload.room_id); Analytics.trackEvent('voip', 'placeConferenceCall'); CountlyAnalytics.instance.trackStartCall(payload.room_id, payload.type === PlaceCallType.Video, true); this.startCallApp(payload.room_id, payload.type); break; case 'end_conference': - console.info("Terminating conference call in " + payload.room_id); + logger.info("Terminating conference call in " + payload.room_id); this.terminateCallApp(payload.room_id); break; case 'hangup_conference': - console.info("Leaving conference call in "+ payload.room_id); + logger.info("Leaving conference call in "+ payload.room_id); this.hangupCallApp(payload.room_id); break; case 'incoming_call': diff --git a/src/Presence.ts b/src/Presence.ts index d2dc72222ee..e58ed61901a 100644 --- a/src/Presence.ts +++ b/src/Presence.ts @@ -101,7 +101,7 @@ class Presence { try { await MatrixClientPeg.get().setPresence({ presence: this.state }); - console.info("Presence:", newState); + logger.info("Presence:", newState); } catch (err) { logger.error("Failed to set presence:", err); this.state = oldState; diff --git a/src/components/structures/MatrixChat.tsx b/src/components/structures/MatrixChat.tsx index 61a8c5205cf..a9e7876d904 100644 --- a/src/components/structures/MatrixChat.tsx +++ b/src/components/structures/MatrixChat.tsx @@ -1452,7 +1452,7 @@ export default class MatrixChat extends React.PureComponent { if (state === "SYNCING" && prevState === "SYNCING") { return; } - console.info("MatrixClient sync state => %s", state); + logger.info("MatrixClient sync state => %s", state); if (state !== "PREPARED") { return; } this.firstSyncComplete = true; @@ -1818,7 +1818,7 @@ export default class MatrixChat extends React.PureComponent { group_id: groupId, }); } else { - console.info("Ignoring showScreen for '%s'", screen); + logger.info("Ignoring showScreen for '%s'", screen); } } diff --git a/src/components/structures/RoomView.tsx b/src/components/structures/RoomView.tsx index 51404a17d93..240509e5f3f 100644 --- a/src/components/structures/RoomView.tsx +++ b/src/components/structures/RoomView.tsx @@ -498,7 +498,7 @@ export class RoomView extends React.Component { // making it impossible to indicate a newly joined room. if (!joining && roomId) { if (!room && shouldPeek) { - console.info("Attempting to peek into room %s", roomId); + logger.info("Attempting to peek into room %s", roomId); this.setState({ peekLoading: true, isPeeking: true, // this will change to false if peeking fails diff --git a/src/components/views/auth/CaptchaForm.tsx b/src/components/views/auth/CaptchaForm.tsx index 5820b9335b8..846efcc9ca2 100644 --- a/src/components/views/auth/CaptchaForm.tsx +++ b/src/components/views/auth/CaptchaForm.tsx @@ -97,7 +97,7 @@ export default class CaptchaForm extends React.Component = ({ let revokeButton; if (!userWidget && !isLocalWidget && isAllowedWidget) { const onRevokeClick = () => { - console.info("Revoking permission for widget to load: " + app.eventId); + logger.info("Revoking permission for widget to load: " + app.eventId); const current = SettingsStore.getValue("allowedWidgets", roomId); current[app.eventId] = false; const level = SettingsStore.firstSupportedLevel("allowedWidgets"); diff --git a/src/components/views/elements/AppTile.tsx b/src/components/views/elements/AppTile.tsx index 6d3c75fbb26..5f7c0543c41 100644 --- a/src/components/views/elements/AppTile.tsx +++ b/src/components/views/elements/AppTile.tsx @@ -314,7 +314,7 @@ export default class AppTile extends React.Component { private grantWidgetPermission = (): void => { const roomId = this.props.room.roomId; - console.info("Granting permission for widget to load: " + this.props.app.eventId); + logger.info("Granting permission for widget to load: " + this.props.app.eventId); const current = SettingsStore.getValue("allowedWidgets", roomId); current[this.props.app.eventId] = true; const level = SettingsStore.firstSupportedLevel("allowedWidgets"); diff --git a/src/components/views/right_panel/UserInfo.tsx b/src/components/views/right_panel/UserInfo.tsx index 7d76da71a30..195cf03af45 100644 --- a/src/components/views/right_panel/UserInfo.tsx +++ b/src/components/views/right_panel/UserInfo.tsx @@ -658,7 +658,7 @@ const RedactMessagesButton: React.FC = ({ member }) => { // so first yield to allow to rerender after closing the dialog. await Promise.resolve(); - console.info(`Started redacting recent ${count} messages for ${user} in ${roomId}`); + logger.info(`Started redacting recent ${count} messages for ${user} in ${roomId}`); await Promise.all(eventsToRedact.map(async event => { try { await cli.redactEvent(roomId, event.getId()); @@ -668,7 +668,7 @@ const RedactMessagesButton: React.FC = ({ member }) => { logger.error(err); } })); - console.info(`Finished redacting recent ${count} messages for ${user} in ${roomId}`); + logger.info(`Finished redacting recent ${count} messages for ${user} in ${roomId}`); } }; diff --git a/src/utils/exportUtils/HtmlExport.tsx b/src/utils/exportUtils/HtmlExport.tsx index a7486e06cf7..f7d3bb5e09a 100644 --- a/src/utils/exportUtils/HtmlExport.tsx +++ b/src/utils/exportUtils/HtmlExport.tsx @@ -432,7 +432,7 @@ export default class HTMLExporter extends Exporter { const exportEnd = performance.now(); if (this.cancelled) { - console.info("Export cancelled successfully"); + logger.info("Export cancelled successfully"); } else { this.updateProgress("Export successful!"); this.updateProgress(`Exported ${res.length} events in ${(exportEnd - fetchStart)/1000} seconds`); diff --git a/src/utils/exportUtils/JSONExport.ts b/src/utils/exportUtils/JSONExport.ts index 41d9142a45b..6061f33cf61 100644 --- a/src/utils/exportUtils/JSONExport.ts +++ b/src/utils/exportUtils/JSONExport.ts @@ -89,8 +89,8 @@ export default class JSONExporter extends Exporter { } public async export() { - console.info("Starting export process..."); - console.info("Fetching events..."); + logger.info("Starting export process..."); + logger.info("Fetching events..."); const fetchStart = performance.now(); const res = await this.getRequiredEvents(); @@ -98,7 +98,7 @@ export default class JSONExporter extends Exporter { logger.log(`Fetched ${res.length} events in ${(fetchEnd - fetchStart)/1000}s`); - console.info("Creating output..."); + logger.info("Creating output..."); const text = await this.createOutput(res); if (this.files.length) { @@ -112,9 +112,9 @@ export default class JSONExporter extends Exporter { const exportEnd = performance.now(); if (this.cancelled) { - console.info("Export cancelled successfully"); + logger.info("Export cancelled successfully"); } else { - console.info("Export successful!"); + logger.info("Export successful!"); logger.log(`Exported ${res.length} events in ${(exportEnd - fetchStart)/1000} seconds`); } diff --git a/src/utils/exportUtils/PlainTextExport.ts b/src/utils/exportUtils/PlainTextExport.ts index fc122bca6e0..e3201314f95 100644 --- a/src/utils/exportUtils/PlainTextExport.ts +++ b/src/utils/exportUtils/PlainTextExport.ts @@ -141,9 +141,9 @@ export default class PlainTextExporter extends Exporter { const exportEnd = performance.now(); if (this.cancelled) { - console.info("Export cancelled successfully"); + logger.info("Export cancelled successfully"); } else { - console.info("Export successful!"); + logger.info("Export successful!"); logger.log(`Exported ${res.length} events in ${(exportEnd - fetchStart)/1000} seconds`); } From 1d6c9fa8dac2be158b82e385037a17d988648050 Mon Sep 17 00:00:00 2001 From: Dariusz Niemczyk <3636685+Palid@users.noreply.github.com> Date: Mon, 18 Oct 2021 14:09:01 +0200 Subject: [PATCH 114/156] Add threads ViewInRoom context button (#18955) (#6947) --- .../context_menus/_MessageContextMenu.scss | 4 +++ res/img/element-icons/view-in-room.svg | 1 + .../context_menus/MessageContextMenu.tsx | 26 ++++++++++++++++++- src/i18n/strings/en_EN.json | 1 + 4 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 res/img/element-icons/view-in-room.svg diff --git a/res/css/views/context_menus/_MessageContextMenu.scss b/res/css/views/context_menus/_MessageContextMenu.scss index 5af748e28d1..47646c38209 100644 --- a/res/css/views/context_menus/_MessageContextMenu.scss +++ b/res/css/views/context_menus/_MessageContextMenu.scss @@ -81,4 +81,8 @@ limitations under the License. .mx_MessageContextMenu_iconUnpin::before { mask-image: url('$(res)/img/element-icons/room/pin.svg'); } + + .mx_MessageContextMenu_iconViewInRoom::before { + mask-image: url('$(res)/img/element-icons/view-in-room.svg'); + } } diff --git a/res/img/element-icons/view-in-room.svg b/res/img/element-icons/view-in-room.svg new file mode 100644 index 00000000000..27758b10f61 --- /dev/null +++ b/res/img/element-icons/view-in-room.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/components/views/context_menus/MessageContextMenu.tsx b/src/components/views/context_menus/MessageContextMenu.tsx index 22dd3ac4387..44bc48b21df 100644 --- a/src/components/views/context_menus/MessageContextMenu.tsx +++ b/src/components/views/context_menus/MessageContextMenu.tsx @@ -38,6 +38,7 @@ import { createRedactEventDialog } from '../dialogs/ConfirmRedactDialog'; import ShareDialog from '../dialogs/ShareDialog'; import { RoomPermalinkCreator } from "../../../utils/permalinks/Permalinks"; import { IPosition, ChevronFace } from '../../structures/ContextMenu'; +import RoomContext, { TimelineRenderingType } from '../../../contexts/RoomContext'; export function canCancel(eventStatus: EventStatus): boolean { return eventStatus === EventStatus.QUEUED || eventStatus === EventStatus.NOT_SENT; @@ -74,6 +75,8 @@ interface IState { @replaceableComponent("views.context_menus.MessageContextMenu") export default class MessageContextMenu extends React.Component { + static contextType = RoomContext; + state = { canRedact: false, canPin: false, @@ -226,6 +229,16 @@ export default class MessageContextMenu extends React.Component return this.getReactions(e => e.status === EventStatus.NOT_SENT); } + private viewInRoom = () => { + dis.dispatch({ + action: 'view_room', + event_id: this.props.mxEvent.getId(), + highlighted: true, + room_id: this.props.mxEvent.getRoomId(), + }); + this.closeMenu(); + }; + render() { const cli = MatrixClientPeg.get(); const me = cli.getUserId(); @@ -381,8 +394,20 @@ export default class MessageContextMenu extends React.Component ); } + const { timelineRenderingType } = this.context; + const isThread = ( + timelineRenderingType === TimelineRenderingType.Thread || + timelineRenderingType === TimelineRenderingType.ThreadsList + ); + const isThreadRootEvent = isThread && this.props.mxEvent?.getThread()?.rootEvent === this.props.mxEvent; + const commonItemsList = ( + { isThreadRootEvent && } { quoteButton } { forwardButton } { pinButton } @@ -403,7 +428,6 @@ export default class MessageContextMenu extends React.Component ); } - return ( Date: Mon, 18 Oct 2021 12:23:03 +0000 Subject: [PATCH 115/156] Translated using Weblate (Chinese (Simplified)) Currently translated at 100.0% (3232 of 3232 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/zh_Hans/ --- src/i18n/strings/zh_Hans.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/zh_Hans.json b/src/i18n/strings/zh_Hans.json index 672acdd0d34..427d135f28a 100644 --- a/src/i18n/strings/zh_Hans.json +++ b/src/i18n/strings/zh_Hans.json @@ -3246,5 +3246,6 @@ "Kick them from everything I'm able to": "禁止这些人做任何我有权决定的事", "Downloading": "下载中", "%(count)s reply|one": "%(count)s 条回复", - "%(count)s reply|other": "%(count)s 条回复" + "%(count)s reply|other": "%(count)s 条回复", + "View in room": "在聊天室内查看" } From 695e110794e62d8c9f605fba6c5c0e59e3df4468 Mon Sep 17 00:00:00 2001 From: Ekaterina Gerasimova Date: Mon, 18 Oct 2021 12:29:20 +0100 Subject: [PATCH 116/156] Improve capitalisation in string Remove random mid-sentence capitalisation in Security Phrase dialog. The dialog will change at some point but for now lets make it more human readable. Fixes #19429 --- .../views/dialogs/security/AccessSecretStorageDialog.tsx | 2 +- src/i18n/strings/en_EN.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/views/dialogs/security/AccessSecretStorageDialog.tsx b/src/components/views/dialogs/security/AccessSecretStorageDialog.tsx index 5ab87626b66..5715e504d4e 100644 --- a/src/components/views/dialogs/security/AccessSecretStorageDialog.tsx +++ b/src/components/views/dialogs/security/AccessSecretStorageDialog.tsx @@ -334,7 +334,7 @@ export default class AccessSecretStorageDialog extends React.PureComponent

      { _t( - "Enter your Security Phrase or to continue.", {}, + "Enter your Security Phrase or to continue.", {}, { button: s => Use your Security Key to continue.": "Enter your Security Phrase or to continue.", + "Enter your Security Phrase or to continue.": "Enter your Security Phrase or to continue.", "Security Key": "Security Key", "Use your Security Key to continue.": "Use your Security Key to continue.", "Destroy cross-signing keys?": "Destroy cross-signing keys?", From ab8c8d99d8f0f3aa1329e2ca1b517f9dc24e2663 Mon Sep 17 00:00:00 2001 From: waclaw66 Date: Mon, 18 Oct 2021 12:30:47 +0000 Subject: [PATCH 117/156] Translated using Weblate (Czech) Currently translated at 100.0% (3232 of 3232 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/cs/ --- src/i18n/strings/cs.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/cs.json b/src/i18n/strings/cs.json index bfda5a542f9..0fef1eda444 100644 --- a/src/i18n/strings/cs.json +++ b/src/i18n/strings/cs.json @@ -3249,5 +3249,6 @@ "Polls (under active development)": "Ankety (v aktivním vývoji)", "Downloading": "Stahování", "%(count)s reply|one": "%(count)s odpověď", - "%(count)s reply|other": "%(count)s odpovědí" + "%(count)s reply|other": "%(count)s odpovědí", + "View in room": "Zobrazit v místnosti" } From a2bc09060721f3a56a6f92e61f43a64cd3260352 Mon Sep 17 00:00:00 2001 From: Dariusz Niemczyk <3636685+Palid@users.noreply.github.com> Date: Mon, 18 Oct 2021 16:41:05 +0200 Subject: [PATCH 118/156] Fix threads with bubbles rendering (#6971) Fixes https://github.com/vector-im/element-web/issues/18958 --- res/css/views/rooms/_EventBubbleTile.scss | 24 ++++++++++++++++++++++- res/css/views/rooms/_EventTile.scss | 2 ++ src/components/views/rooms/EventTile.tsx | 2 +- 3 files changed, 26 insertions(+), 2 deletions(-) diff --git a/res/css/views/rooms/_EventBubbleTile.scss b/res/css/views/rooms/_EventBubbleTile.scss index 389a5c97061..057e33eb2b4 100644 --- a/res/css/views/rooms/_EventBubbleTile.scss +++ b/res/css/views/rooms/_EventBubbleTile.scss @@ -28,6 +28,12 @@ limitations under the License. margin-left: 49px; margin-right: 100px; font-size: $font-14px; + flex-direction: column; + display: flex; + + .mx_ThreadInfo { + max-width: 100%; + } &.mx_EventTile_continuation { margin-top: 2px; @@ -85,6 +91,8 @@ limitations under the License. } &[data-self=false] { + align-items: flex-start; + .mx_EventTile_line { border-bottom-right-radius: var(--cornerRadius); } @@ -98,11 +106,18 @@ limitations under the License. } --backgroundColor: $eventbubble-others-bg; + + .mx_ThreadInfo { + align-self: flex-start; + margin-top: 8px; + margin-left: -10px; + margin-bottom: 8px; + } } &[data-self=true] { + align-items: flex-end; .mx_EventTile_line { border-bottom-left-radius: var(--cornerRadius); - float: right; > a { left: auto; right: -68px; @@ -132,6 +147,13 @@ limitations under the License. } --backgroundColor: $eventbubble-self-bg; + + .mx_ThreadInfo { + align-self: flex-end; + margin-right: -14px; + margin-top: 8px; + margin-bottom: 4px; + } } .mx_EventTile_line { diff --git a/res/css/views/rooms/_EventTile.scss b/res/css/views/rooms/_EventTile.scss index 74fc141b480..cde3e767f65 100644 --- a/res/css/views/rooms/_EventTile.scss +++ b/res/css/views/rooms/_EventTile.scss @@ -691,6 +691,8 @@ $hover-select-border: 4px; color: $secondary-content; box-sizing: border-box; justify-content: flex-start; + margin-right: 110px; + margin-left: 64px; &:hover, &-active { cursor: pointer; diff --git a/src/components/views/rooms/EventTile.tsx b/src/components/views/rooms/EventTile.tsx index c6ee4a7529e..a455a31c97f 100644 --- a/src/components/views/rooms/EventTile.tsx +++ b/src/components/views/rooms/EventTile.tsx @@ -1335,9 +1335,9 @@ export default class EventTile extends React.Component { { keyRequestInfo } { actionBar } { this.props.layout === Layout.IRC && (reactionsRow) } - { this.renderThreadInfo() }

      { this.props.layout !== Layout.IRC && (reactionsRow) } + { this.renderThreadInfo() } { msgOption } ) ); From 5983e164b3ee5ac38c9a4ac594fb9aa40cfefe5e Mon Sep 17 00:00:00 2001 From: random Date: Mon, 18 Oct 2021 14:41:06 +0000 Subject: [PATCH 119/156] Translated using Weblate (Italian) Currently translated at 99.6% (3221 of 3232 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/it/ --- src/i18n/strings/it.json | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/it.json b/src/i18n/strings/it.json index 42f291423f2..478ebe3bec0 100644 --- a/src/i18n/strings/it.json +++ b/src/i18n/strings/it.json @@ -3228,5 +3228,17 @@ "Sending invites... (%(progress)s out of %(count)s)|other": "Spedizione inviti... (%(progress)s di %(count)s)", "Loading new room": "Caricamento nuova stanza", "Upgrading room": "Aggiornamento stanza", - "Polls (under active development)": "Sondaggi (in sviluppo)" + "Polls (under active development)": "Sondaggi (in sviluppo)", + "Ban them from everything I'm able to": "Bandiscilo ovunque io possa farlo", + "Unban them from everything I'm able to": "Riammettilo ovunque io possa farlo", + "Ban from %(roomName)s": "Bandisci da %(roomName)s", + "Unban from %(roomName)s": "Riammetti in %(roomName)s", + "They'll still be able to access whatever you're not an admin of.": "Potrà ancora accedere dove non sei amministratore.", + "Kick them from specific things I'm able to": "Buttalo fuori da cose specifiche dove posso farlo", + "Kick them from everything I'm able to": "Buttalo fuori da ovunque io possa farlo", + "Kick from %(roomName)s": "Butta fuori da %(roomName)s", + "Disinvite from %(roomName)s": "Annulla l'invito da %(roomName)s", + "Threads": "Conversazioni", + "%(count)s reply|one": "%(count)s risposta", + "%(count)s reply|other": "%(count)s risposte" } From eeec9b16c0d3a26fccb3d7c761fcf756cf03ba9c Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Mon, 18 Oct 2021 16:31:39 +0100 Subject: [PATCH 120/156] Fix edge case behaviour of the space join spinner for guests --- src/components/structures/SpaceRoomView.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/structures/SpaceRoomView.tsx b/src/components/structures/SpaceRoomView.tsx index 423bcdd3056..2a7bda9e815 100644 --- a/src/components/structures/SpaceRoomView.tsx +++ b/src/components/structures/SpaceRoomView.tsx @@ -275,8 +275,11 @@ const SpacePreview = ({ space, onJoinButtonClicked, onRejectButtonClicked }: ISp { - setBusy(true); onJoinButtonClicked(); + if (!cli.isGuest()) { + // user will be shown a modal that won't fire a room join error + setBusy(true); + } }} disabled={!spacesEnabled || cannotJoin} > From c7d248302f0d7934c047c39439f778f5aaf89dcc Mon Sep 17 00:00:00 2001 From: Viacheslav Raskulin Date: Mon, 18 Oct 2021 15:06:00 +0000 Subject: [PATCH 121/156] Translated using Weblate (Russian) Currently translated at 97.9% (3165 of 3232 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/ru/ --- src/i18n/strings/ru.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/i18n/strings/ru.json b/src/i18n/strings/ru.json index 752f6e23db6..1102fc7c751 100644 --- a/src/i18n/strings/ru.json +++ b/src/i18n/strings/ru.json @@ -2791,7 +2791,7 @@ "Move down": "Опустить", "Move up": "Поднять", "Manage & explore rooms": "Управление и список комнат", - "Add space": "Добавить простанство", + "Add space": "Добавить пространство", "Report": "Сообщить", "Collapse reply thread": "Свернуть ответы ветки", "Show preview": "Предпросмотр", @@ -3247,5 +3247,7 @@ "Disinvite from %(roomName)s": "Отменить приглашение из %(roomName)s", "Threads": "Ветки", "%(count)s reply|one": "%(count)s ответ", - "%(count)s reply|other": "%(count)s ответов" + "%(count)s reply|other": "%(count)s ответов", + "View in room": "Просмотреть в комнате", + "Enter your Security Phrase or to continue.": "Введите свою секретную фразу или для продолжения." } From 649141ca2edaa646c091d99ff428781104e812cd Mon Sep 17 00:00:00 2001 From: random Date: Mon, 18 Oct 2021 14:43:44 +0000 Subject: [PATCH 122/156] Translated using Weblate (Italian) Currently translated at 100.0% (3232 of 3232 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/it/ --- src/i18n/strings/it.json | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/it.json b/src/i18n/strings/it.json index 478ebe3bec0..c82b738aa6d 100644 --- a/src/i18n/strings/it.json +++ b/src/i18n/strings/it.json @@ -3240,5 +3240,16 @@ "Disinvite from %(roomName)s": "Annulla l'invito da %(roomName)s", "Threads": "Conversazioni", "%(count)s reply|one": "%(count)s risposta", - "%(count)s reply|other": "%(count)s risposte" + "%(count)s reply|other": "%(count)s risposte", + "Show:": "Mostra:", + "Shows all threads from current room": "Mostra tutte le conversazioni dalla stanza attuale", + "All threads": "Tutte le conversazioni", + "Shows all threads you’ve participated in": "Mostra tutte le conversazioni a cui hai partecipato", + "My threads": "Le mie conversazioni", + "View in room": "Vedi nella stanza", + "Enter your Security Phrase or to continue.": "Inserisci la tua frase di sicurezza o per continuare.", + "Downloading": "Scaricamento", + "They won't be able to access whatever you're not an admin of.": "Non potrà più accedere anche dove non sei amministratore.", + "Ban them from specific things I'm able to": "Bandiscilo da cose specifiche dove posso farlo", + "Unban them from specific things I'm able to": "Riammettilo in cose specifiche dove posso farlo" } From cbc31e36b4265733e6c5f2aa5a5ae66189665431 Mon Sep 17 00:00:00 2001 From: waclaw66 Date: Mon, 18 Oct 2021 15:41:32 +0000 Subject: [PATCH 123/156] Translated using Weblate (Czech) Currently translated at 100.0% (3232 of 3232 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/cs/ --- src/i18n/strings/cs.json | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/i18n/strings/cs.json b/src/i18n/strings/cs.json index 0fef1eda444..d16f6c9c45b 100644 --- a/src/i18n/strings/cs.json +++ b/src/i18n/strings/cs.json @@ -1429,8 +1429,8 @@ "Upgrade private room": "Upgradovat soukromou místnost", "Upgrade public room": "Upgradovat veřejnou místnost", "Upgrading a room is an advanced action and is usually recommended when a room is unstable due to bugs, missing features or security vulnerabilities.": "Upgradování místnosti je pokročilá operace a je doporučeno jí provést pokud je místnost nestabilní kvůli chybám, chybějícím funkcím nebo zranitelnostem.", - "This usually only affects how the room is processed on the server. If you're having problems with your %(brand)s, please report a bug.": "Toto běžně ovlivňuje pouze zpracovávání místnosti na serveru. Pokud máte problém s %(brand)sem, nahlaste nám ho prosím.", - "You'll upgrade this room from to .": "Upgradujeme tuto místnost z na .", + "This usually only affects how the room is processed on the server. If you're having problems with your %(brand)s, please report a bug.": "Toto obvykle ovlivňuje pouze zpracovávání místnosti na serveru. Pokud máte problém s %(brand)sem, nahlaste nám ho prosím.", + "You'll upgrade this room from to .": "Místnost bude upgradována z verze na verzi .", "Upgrade": "Upgradovat", "Warning: You should only set up key backup from a trusted computer.": "Varování: Nastavujte zálohu jen z důvěryhodných počítačů.", "Notification settings": "Nastavení oznámení", @@ -2951,7 +2951,7 @@ "Not a valid identity server (status code %(code)s)": "Toto není platný server identit (stavový kód %(code)s)", "Identity server URL must be HTTPS": "Adresa serveru identit musí být na HTTPS", "Please note upgrading will make a new version of the room. All current messages will stay in this archived room.": "Upozorňujeme, že aktualizací vznikne nová verze místnosti. Všechny aktuální zprávy zůstanou v této archivované místnosti.", - "Automatically invite members from this room to the new one": "Automaticky pozve členy této místnosti do nové místnosti", + "Automatically invite members from this room to the new one": "Automaticky pozvat členy této místnosti do nové místnosti", "These are likely ones other room admins are a part of.": "Pravděpodobně se jedná o ty, kterých se účastní i ostatní správci místností.", "Other spaces or rooms you might not know": "Další prostory nebo místnosti, které možná neznáte", "Spaces you know that contain this room": "Prostory, které znáte a které obsahují tuto místnost", @@ -3250,5 +3250,6 @@ "Downloading": "Stahování", "%(count)s reply|one": "%(count)s odpověď", "%(count)s reply|other": "%(count)s odpovědí", - "View in room": "Zobrazit v místnosti" + "View in room": "Zobrazit v místnosti", + "Enter your Security Phrase or to continue.": "Zadejte bezpečnostní frázi nebo pro pokračování." } From 2b7ea16c2d2767dcb6fccb975dfe4ee4105cf632 Mon Sep 17 00:00:00 2001 From: David Baker Date: Mon, 18 Oct 2021 19:32:20 +0100 Subject: [PATCH 124/156] Upgrade highlight.js Major version bump for highlight.js. Update usage of deprecated function & some cleanups. --- package.json | 6 +- res/css/views/rooms/_EventTile.scss | 11 ++-- src/components/views/messages/TextualBody.tsx | 59 +++++++++++++------ yarn.lock | 8 +-- 4 files changed, 54 insertions(+), 30 deletions(-) diff --git a/package.json b/package.json index c6010721268..c3cd054db8b 100644 --- a/package.json +++ b/package.json @@ -76,7 +76,7 @@ "focus-visible": "^5.2.0", "gfm.css": "^1.1.2", "glob-to-regexp": "^0.4.1", - "highlight.js": "^10.5.0", + "highlight.js": "^11.3.1", "html-entities": "^1.4.0", "is-ip": "^3.1.0", "jszip": "^3.7.0", @@ -188,7 +188,9 @@ "@types/react": "17.0.14" }, "jest": { - "snapshotSerializers": ["enzyme-to-json/serializer"], + "snapshotSerializers": [ + "enzyme-to-json/serializer" + ], "testEnvironment": "./__test-utils__/environment.js", "testMatch": [ "/test/**/*-test.[jt]s?(x)" diff --git a/res/css/views/rooms/_EventTile.scss b/res/css/views/rooms/_EventTile.scss index cde3e767f65..5559f81e0ad 100644 --- a/res/css/views/rooms/_EventTile.scss +++ b/res/css/views/rooms/_EventTile.scss @@ -500,12 +500,11 @@ $hover-select-border: 4px; float: left; margin: 0 0.5em 0 -1.5em; color: gray; -} - -.mx_EventTile_lineNumber { - text-align: right; - display: block; - padding-left: 1em; + & span { + text-align: right; + display: block; + padding-left: 1em; + } } .mx_EventTile_collapsedCodeBlock { diff --git a/src/components/views/messages/TextualBody.tsx b/src/components/views/messages/TextualBody.tsx index 63ff39721d0..503105b9db1 100644 --- a/src/components/views/messages/TextualBody.tsx +++ b/src/components/views/messages/TextualBody.tsx @@ -45,6 +45,8 @@ import EditMessageComposer from '../rooms/EditMessageComposer'; import LinkPreviewGroup from '../rooms/LinkPreviewGroup'; import { IBodyProps } from "./IBodyProps"; +const MAX_HIGHLIGHT_LENGTH = 4096; + interface IState { // the URLs (if any) to be previewed with a LinkPreviewWidget inside this TextualBody. links: string[]; @@ -117,9 +119,6 @@ export default class TextualBody extends React.Component { setTimeout(() => { if (this.unmounted) return; for (let i = 0; i < codes.length; i++) { - // If the code already has the hljs class we want to skip this. - // This happens after the codeblock was edited. - if (codes[i].className.includes("hljs")) continue; this.highlightCode(codes[i]); } }, 10); @@ -212,30 +211,54 @@ export default class TextualBody extends React.Component { private addLineNumbers(pre: HTMLPreElement): void { // Calculate number of lines in pre const number = pre.innerHTML.replace(/\n(<\/code>)?$/, "").split(/\n/).length; - pre.innerHTML = '' + pre.innerHTML + ''; - const lineNumbers = pre.getElementsByClassName("mx_EventTile_lineNumbers")[0]; + const lineNumbers = document.createElement('span'); + lineNumbers.className = 'mx_EventTile_lineNumbers'; // Iterate through lines starting with 1 (number of the first line is 1) for (let i = 1; i <= number; i++) { - lineNumbers.innerHTML += '' + i + ''; + const s = document.createElement('span'); + s.textContent = i.toString(); + lineNumbers.appendChild(s); } + pre.prepend(lineNumbers); + pre.append(document.createElement('span')); } private highlightCode(code: HTMLElement): void { - // Auto-detect language only if enabled and only for codeblocks - if ( + if (code.textContent.length > MAX_HIGHLIGHT_LENGTH) { + console.log( + "Code block is bigger than highlight limit (" + + code.textContent.length + " > " + MAX_HIGHLIGHT_LENGTH + + "): not highlighting", + ); + return; + } + console.log('highlighting'); + + let advertisedLang; + for (const cl of code.className.split(/\s+/)) { + if (cl.startsWith('language-')) { + const maybeLang = cl.split('-', 2)[1]; + if (highlight.getLanguage(maybeLang)) { + advertisedLang = maybeLang; + break; + } + } + } + + if (advertisedLang) { + // If the code says what language it is, highlight it in that language + // We don't use highlightElement here because we can't force language detection + // off. It should use the one we've found in the CSS class but we'd rather pass + // it in explicitly to make sure. + code.innerHTML = highlight.highlight(advertisedLang, code.textContent).value; + } else if ( SettingsStore.getValue("enableSyntaxHighlightLanguageDetection") && code.parentElement instanceof HTMLPreElement ) { - highlight.highlightBlock(code); - } else { - // Only syntax highlight if there's a class starting with language- - const classes = code.className.split(/\s+/).filter(function(cl) { - return cl.startsWith('language-') && !cl.startsWith('language-_'); - }); - - if (classes.length != 0) { - highlight.highlightBlock(code); - } + // User has language detection enabled and the code is within a pre + // we only auto-highlight if the code block is in a pre), so highlight + // the block with auto-highlighting enabled. + highlight.highlightElement(code); } } diff --git a/yarn.lock b/yarn.lock index 0b325d66d92..0404e9b6b7d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4350,10 +4350,10 @@ has@^1.0.0, has@^1.0.1, has@^1.0.3: dependencies: function-bind "^1.1.1" -highlight.js@^10.5.0: - version "10.7.3" - resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-10.7.3.tgz#697272e3991356e40c3cac566a74eef681756531" - integrity sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A== +highlight.js@^11.3.1: + version "11.3.1" + resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-11.3.1.tgz#813078ef3aa519c61700f84fe9047231c5dc3291" + integrity sha512-PUhCRnPjLtiLHZAQ5A/Dt5F8cWZeMyj9KRsACsWT+OD6OP0x6dp5OmT5jdx0JgEyPxPZZIPQpRN2TciUT7occw== hoist-non-react-statics@^3.3.0, hoist-non-react-statics@^3.3.2: version "3.3.2" From e9f5fa7858e9083ad1791a6a9d2e0654114aeb7e Mon Sep 17 00:00:00 2001 From: David Baker Date: Mon, 18 Oct 2021 19:39:43 +0100 Subject: [PATCH 125/156] Update usage here too --- src/components/views/elements/SyntaxHighlight.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/views/elements/SyntaxHighlight.tsx b/src/components/views/elements/SyntaxHighlight.tsx index cd65cddfba0..a468c44e67e 100644 --- a/src/components/views/elements/SyntaxHighlight.tsx +++ b/src/components/views/elements/SyntaxHighlight.tsx @@ -15,7 +15,7 @@ limitations under the License. */ import React from 'react'; -import { highlightBlock } from 'highlight.js'; +import { highlightElement } from 'highlight.js'; import { replaceableComponent } from "../../../utils/replaceableComponent"; interface IProps { @@ -33,7 +33,7 @@ export default class SyntaxHighlight extends React.Component { // componentDidUpdate used here for reusability public componentDidUpdate(): void { - if (this.el) highlightBlock(this.el); + if (this.el) highlightElement(this.el); } // call componentDidUpdate because _ref is fired on initial render From c2fb7451882ef59ae3743d17f344e0f42f7c837a Mon Sep 17 00:00:00 2001 From: David Baker Date: Mon, 18 Oct 2021 19:44:05 +0100 Subject: [PATCH 126/156] Appease type checker --- src/components/views/elements/SyntaxHighlight.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/views/elements/SyntaxHighlight.tsx b/src/components/views/elements/SyntaxHighlight.tsx index a468c44e67e..36920af27a3 100644 --- a/src/components/views/elements/SyntaxHighlight.tsx +++ b/src/components/views/elements/SyntaxHighlight.tsx @@ -15,7 +15,7 @@ limitations under the License. */ import React from 'react'; -import { highlightElement } from 'highlight.js'; +import highlight from 'highlight.js'; import { replaceableComponent } from "../../../utils/replaceableComponent"; interface IProps { @@ -33,7 +33,7 @@ export default class SyntaxHighlight extends React.Component { // componentDidUpdate used here for reusability public componentDidUpdate(): void { - if (this.el) highlightElement(this.el); + if (this.el) highlight.highlightElement(this.el); } // call componentDidUpdate because _ref is fired on initial render From 0966883ed2f4563bea6e8f0d1ce9e9d8de40178b Mon Sep 17 00:00:00 2001 From: Szimszon Date: Mon, 18 Oct 2021 17:30:42 +0000 Subject: [PATCH 127/156] Translated using Weblate (Hungarian) Currently translated at 100.0% (3232 of 3232 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/hu/ --- src/i18n/strings/hu.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/hu.json b/src/i18n/strings/hu.json index 2cc9735ae05..3608682d84a 100644 --- a/src/i18n/strings/hu.json +++ b/src/i18n/strings/hu.json @@ -3246,5 +3246,7 @@ "Kick them from everything I'm able to": "Kirúgni őket mindenhonnan ahonnan joga van hozzá", "Threads": "Üzenetszálak", "%(count)s reply|one": "%(count)s válasz", - "%(count)s reply|other": "%(count)s válasz" + "%(count)s reply|other": "%(count)s válasz", + "View in room": "Megjelenítés szobában", + "Enter your Security Phrase or to continue.": "Add meg a Biztonsági jelmondatot vagy a folytatáshoz." } From c1bb02e7e6a5659e9af84f404216d9b256fa6f29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Priit=20J=C3=B5er=C3=BC=C3=BCt?= Date: Mon, 18 Oct 2021 17:19:03 +0000 Subject: [PATCH 128/156] Translated using Weblate (Estonian) Currently translated at 100.0% (3232 of 3232 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/et/ --- src/i18n/strings/et.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/et.json b/src/i18n/strings/et.json index 898cb198f31..4145c1a2bf5 100644 --- a/src/i18n/strings/et.json +++ b/src/i18n/strings/et.json @@ -3246,5 +3246,7 @@ "Threads": "Jutulõngad", "Downloading": "Laadin alla", "%(count)s reply|one": "%(count)s vastus", - "%(count)s reply|other": "%(count)s vastust" + "%(count)s reply|other": "%(count)s vastust", + "View in room": "Vaata jututoas", + "Enter your Security Phrase or to continue.": "Jätkamiseks sisesta oma turvafraas või ." } From dad1d3f13148f0a31b36bc33016b88823b472c6b Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Mon, 18 Oct 2021 13:47:42 -0600 Subject: [PATCH 129/156] Fix runtime react errors for various parts of the app These are just the ones that were causing console flooding on reload in development. * Elements in a list need a `key` * `super()` needs to be supplied with the same props as the parent * `
      ` (AccessibleButton) cannot be a descendant of `

      ` - this was a problem in the NewRoomIntro "Add topic" button * `label` is a non-boolean property and cannot receive "false" --- src/components/views/elements/PersistentApp.tsx | 10 +++++++--- src/components/views/rooms/MessageComposer.tsx | 9 ++++++--- src/components/views/rooms/NewRoomIntro.tsx | 6 +++++- src/components/views/rooms/RoomHeader.tsx | 5 +++++ 4 files changed, 23 insertions(+), 7 deletions(-) diff --git a/src/components/views/elements/PersistentApp.tsx b/src/components/views/elements/PersistentApp.tsx index 8d0751cc1d0..d80a00584c3 100644 --- a/src/components/views/elements/PersistentApp.tsx +++ b/src/components/views/elements/PersistentApp.tsx @@ -25,17 +25,21 @@ import { EventSubscription } from 'fbemitter'; import AppTile from "./AppTile"; import { Room } from "matrix-js-sdk/src/models/room"; +interface IProps { + // none +} + interface IState { roomId: string; persistentWidgetId: string; } @replaceableComponent("views.elements.PersistentApp") -export default class PersistentApp extends React.Component<{}, IState> { +export default class PersistentApp extends React.Component { private roomStoreToken: EventSubscription; - constructor() { - super({}); + constructor(props: IProps) { + super(props); this.state = { roomId: RoomViewStore.getRoomId(), diff --git a/src/components/views/rooms/MessageComposer.tsx b/src/components/views/rooms/MessageComposer.tsx index 0d0b7fa441d..f79fb372dc0 100644 --- a/src/components/views/rooms/MessageComposer.tsx +++ b/src/components/views/rooms/MessageComposer.tsx @@ -116,7 +116,7 @@ const EmojiButton: React.FC = ({ addEmoji, menuPosition, narr className={className} onClick={openMenu} title={!narrowMode && _t('Emoji picker')} - label={narrowMode && _t("Add emoji")} + label={(narrowMode && _t("Add emoji")) || null} /> { contextMenu } @@ -485,13 +485,14 @@ export default class MessageComposer extends React.Component { className="mx_MessageComposer_button mx_MessageComposer_stickers" onClick={() => this.showStickers(!this.state.showStickers)} title={title} - label={this.state.narrowMode && _t("Send a sticker")} + label={(this.state.narrowMode && _t("Send a sticker")) || null} />, ); } if (!this.state.haveRecording && !this.state.narrowMode) { buttons.push( this.voiceRecordingButton.current?.onRecordStartEndClick()} title={_t("Send voice message")} @@ -615,7 +616,9 @@ export default class MessageComposer extends React.Component { room={this.props.room} showStickers={this.state.showStickers} setShowStickers={this.showStickers} - menuPosition={menuPosition} />, + menuPosition={menuPosition} + key="stickers" + />, ); const showSendButton = !this.state.isComposerEmpty || this.state.haveRecording; diff --git a/src/components/views/rooms/NewRoomIntro.tsx b/src/components/views/rooms/NewRoomIntro.tsx index fbaccfd6b57..3d92a9cced5 100644 --- a/src/components/views/rooms/NewRoomIntro.tsx +++ b/src/components/views/rooms/NewRoomIntro.tsx @@ -106,7 +106,11 @@ const NewRoomIntro = () => { topicText = _t("Topic: %(topic)s ", { topic }); } else if (canAddTopic) { topicText = _t("Add a topic to help people know what it is about.", {}, { - a: sub => { sub }, + a: sub => { sub }, }); } diff --git a/src/components/views/rooms/RoomHeader.tsx b/src/components/views/rooms/RoomHeader.tsx index e3b4804ae6b..a1cd079ccbe 100644 --- a/src/components/views/rooms/RoomHeader.tsx +++ b/src/components/views/rooms/RoomHeader.tsx @@ -162,12 +162,14 @@ export default class RoomHeader extends React.Component { className="mx_RoomHeader_button mx_RoomHeader_voiceCallButton" onClick={() => this.props.onCallPlaced(PlaceCallType.Voice)} title={_t("Voice call")} + key="voice" />; const videoCallButton = ) => ev.shiftKey ? this.displayInfoDialogAboutScreensharing() : this.props.onCallPlaced(PlaceCallType.Video)} title={_t("Video call")} + key="video" />; buttons.push(voiceCallButton, videoCallButton); } @@ -177,6 +179,7 @@ export default class RoomHeader extends React.Component { className="mx_RoomHeader_button mx_RoomHeader_forgetButton" onClick={this.props.onForgetClick} title={_t("Forget room")} + key="forget" />; buttons.push(forgetButton); } @@ -188,6 +191,7 @@ export default class RoomHeader extends React.Component { })} onClick={this.props.onAppsClick} title={this.props.appsShown ? _t("Hide Widgets") : _t("Show Widgets")} + key="apps" />; buttons.push(appsButton); } @@ -197,6 +201,7 @@ export default class RoomHeader extends React.Component { className="mx_RoomHeader_button mx_RoomHeader_searchButton" onClick={this.props.onSearchClick} title={_t("Search")} + key="search" />; buttons.push(searchButton); } From f8b6f13105a6af49509e6f42ddcc88237823bfec Mon Sep 17 00:00:00 2001 From: Dariusz Niemczyk <3636685+Palid@users.noreply.github.com> Date: Mon, 18 Oct 2021 21:50:06 +0200 Subject: [PATCH 130/156] Fix timeline scrolling when sending threads (#6974) Fix https://github.com/vector-im/element-web/issues/19412 --- src/components/structures/RoomView.tsx | 4 +++- src/components/views/rooms/SendMessageComposer.tsx | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/components/structures/RoomView.tsx b/src/components/structures/RoomView.tsx index 240509e5f3f..db7d7acd905 100644 --- a/src/components/structures/RoomView.tsx +++ b/src/components/structures/RoomView.tsx @@ -841,7 +841,9 @@ export class RoomView extends React.Component { } case "scroll_to_bottom": - this.messagePanel?.jumpToLiveTimeline(); + if (payload.timelineRenderingType === this.context.timelineRenderingType) { + this.messagePanel?.jumpToLiveTimeline(); + } break; } }; diff --git a/src/components/views/rooms/SendMessageComposer.tsx b/src/components/views/rooms/SendMessageComposer.tsx index 80b7096b001..12458d201fa 100644 --- a/src/components/views/rooms/SendMessageComposer.tsx +++ b/src/components/views/rooms/SendMessageComposer.tsx @@ -502,7 +502,10 @@ export class SendMessageComposer extends React.Component Date: Mon, 18 Oct 2021 15:40:06 -0600 Subject: [PATCH 131/156] Ternary --- src/components/views/rooms/MessageComposer.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/views/rooms/MessageComposer.tsx b/src/components/views/rooms/MessageComposer.tsx index f79fb372dc0..fc88eae9e66 100644 --- a/src/components/views/rooms/MessageComposer.tsx +++ b/src/components/views/rooms/MessageComposer.tsx @@ -116,7 +116,7 @@ const EmojiButton: React.FC = ({ addEmoji, menuPosition, narr className={className} onClick={openMenu} title={!narrowMode && _t('Emoji picker')} - label={(narrowMode && _t("Add emoji")) || null} + label={narrowMode ? _t("Add emoji") : null} /> { contextMenu } @@ -485,7 +485,7 @@ export default class MessageComposer extends React.Component { className="mx_MessageComposer_button mx_MessageComposer_stickers" onClick={() => this.showStickers(!this.state.showStickers)} title={title} - label={(this.state.narrowMode && _t("Send a sticker")) || null} + label={this.state.narrowMode ? _t("Send a sticker") : null} />, ); } From cbb0eaf61dc7bef377e374e167b1ea8990e9c372 Mon Sep 17 00:00:00 2001 From: sr093906 Date: Tue, 19 Oct 2021 01:40:15 +0000 Subject: [PATCH 132/156] Translated using Weblate (Chinese (Simplified)) Currently translated at 100.0% (3232 of 3232 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/zh_Hans/ --- src/i18n/strings/zh_Hans.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/zh_Hans.json b/src/i18n/strings/zh_Hans.json index 427d135f28a..072934d4a98 100644 --- a/src/i18n/strings/zh_Hans.json +++ b/src/i18n/strings/zh_Hans.json @@ -3247,5 +3247,6 @@ "Downloading": "下载中", "%(count)s reply|one": "%(count)s 条回复", "%(count)s reply|other": "%(count)s 条回复", - "View in room": "在聊天室内查看" + "View in room": "在聊天室内查看", + "Enter your Security Phrase or to continue.": "输入安全短语或以继续。" } From 6bf015cb3b9db57bb143ddfec375d063088a6b44 Mon Sep 17 00:00:00 2001 From: Jeff Huang Date: Tue, 19 Oct 2021 01:55:35 +0000 Subject: [PATCH 133/156] Translated using Weblate (Chinese (Traditional)) Currently translated at 100.0% (3232 of 3232 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/zh_Hant/ --- src/i18n/strings/zh_Hant.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/zh_Hant.json b/src/i18n/strings/zh_Hant.json index 20abf4a36d8..c2e50cce4c7 100644 --- a/src/i18n/strings/zh_Hant.json +++ b/src/i18n/strings/zh_Hant.json @@ -3249,5 +3249,7 @@ "Upgrading room": "正在升級聊天室", "Downloading": "正在下載", "%(count)s reply|one": "%(count)s 回覆", - "%(count)s reply|other": "%(count)s 回覆" + "%(count)s reply|other": "%(count)s 回覆", + "View in room": "在聊天室中檢視", + "Enter your Security Phrase or to continue.": "輸入您的安全密語或以繼續。" } From 4a71ee3384d427f660c051e3cdc5213bf042b59c Mon Sep 17 00:00:00 2001 From: XoseM Date: Tue, 19 Oct 2021 04:14:54 +0000 Subject: [PATCH 134/156] Translated using Weblate (Galician) Currently translated at 100.0% (3232 of 3232 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/gl/ --- src/i18n/strings/gl.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/gl.json b/src/i18n/strings/gl.json index 1b38af30aba..93a0e5d1bfc 100644 --- a/src/i18n/strings/gl.json +++ b/src/i18n/strings/gl.json @@ -3246,5 +3246,7 @@ "Sending invites... (%(progress)s out of %(count)s)|other": "Enviando convites... (%(progress)s de %(count)s)", "Loading new room": "Cargando nova sala", "Upgrading room": "Actualizando sala", - "Polls (under active development)": "Enquisas (en desenvolvemento activo)" + "Polls (under active development)": "Enquisas (en desenvolvemento activo)", + "View in room": "Ver na sala", + "Enter your Security Phrase or to continue.": "Escribe a túa Frase de Seguridade ou para continuar." } From 9319f072917479d4ad95a1805dcbbc7122c1a40e Mon Sep 17 00:00:00 2001 From: Germain Souquet Date: Tue, 19 Oct 2021 09:16:40 +0100 Subject: [PATCH 135/156] Revert "Fix threads with bubbles rendering (#6971)" This reverts commit a2bc09060721f3a56a6f92e61f43a64cd3260352. --- res/css/views/rooms/_EventBubbleTile.scss | 24 +---------------------- res/css/views/rooms/_EventTile.scss | 2 -- src/components/views/rooms/EventTile.tsx | 2 +- 3 files changed, 2 insertions(+), 26 deletions(-) diff --git a/res/css/views/rooms/_EventBubbleTile.scss b/res/css/views/rooms/_EventBubbleTile.scss index 495c96ec679..72920936aaa 100644 --- a/res/css/views/rooms/_EventBubbleTile.scss +++ b/res/css/views/rooms/_EventBubbleTile.scss @@ -28,12 +28,6 @@ limitations under the License. margin-left: 49px; margin-right: 100px; font-size: $font-14px; - flex-direction: column; - display: flex; - - .mx_ThreadInfo { - max-width: 100%; - } &.mx_EventTile_continuation { margin-top: 2px; @@ -91,8 +85,6 @@ limitations under the License. } &[data-self=false] { - align-items: flex-start; - .mx_EventTile_line { border-bottom-right-radius: var(--cornerRadius); } @@ -106,18 +98,11 @@ limitations under the License. } --backgroundColor: $eventbubble-others-bg; - - .mx_ThreadInfo { - align-self: flex-start; - margin-top: 8px; - margin-left: -10px; - margin-bottom: 8px; - } } &[data-self=true] { - align-items: flex-end; .mx_EventTile_line { border-bottom-left-radius: var(--cornerRadius); + float: right; > a { left: auto; right: -68px; @@ -147,13 +132,6 @@ limitations under the License. } --backgroundColor: $eventbubble-self-bg; - - .mx_ThreadInfo { - align-self: flex-end; - margin-right: -14px; - margin-top: 8px; - margin-bottom: 4px; - } } .mx_EventTile_line { diff --git a/res/css/views/rooms/_EventTile.scss b/res/css/views/rooms/_EventTile.scss index 5559f81e0ad..18af9c25b21 100644 --- a/res/css/views/rooms/_EventTile.scss +++ b/res/css/views/rooms/_EventTile.scss @@ -690,8 +690,6 @@ $hover-select-border: 4px; color: $secondary-content; box-sizing: border-box; justify-content: flex-start; - margin-right: 110px; - margin-left: 64px; &:hover, &-active { cursor: pointer; diff --git a/src/components/views/rooms/EventTile.tsx b/src/components/views/rooms/EventTile.tsx index b433babba74..8e051d97a1c 100644 --- a/src/components/views/rooms/EventTile.tsx +++ b/src/components/views/rooms/EventTile.tsx @@ -1335,9 +1335,9 @@ export default class EventTile extends React.Component { { keyRequestInfo } { actionBar } { this.props.layout === Layout.IRC && (reactionsRow) } + { this.renderThreadInfo() }

      { this.props.layout !== Layout.IRC && (reactionsRow) } - { this.renderThreadInfo() } { msgOption } ) ); From df407ef3a8001b0b1dc8c91fafba1ed9da2acd61 Mon Sep 17 00:00:00 2001 From: Germain Souquet Date: Tue, 19 Oct 2021 09:31:28 +0100 Subject: [PATCH 136/156] Fix EventTileSummary layout for message bubbles --- res/css/views/rooms/_EventBubbleTile.scss | 11 +++++++++++ res/css/views/rooms/_EventTile.scss | 1 + src/components/views/rooms/EventTile.tsx | 2 +- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/res/css/views/rooms/_EventBubbleTile.scss b/res/css/views/rooms/_EventBubbleTile.scss index 72920936aaa..2a419530d86 100644 --- a/res/css/views/rooms/_EventBubbleTile.scss +++ b/res/css/views/rooms/_EventBubbleTile.scss @@ -29,6 +29,11 @@ limitations under the License. margin-right: 100px; font-size: $font-14px; + .mx_ThreadInfo { + clear: both; + width: fit-content; + } + &.mx_EventTile_continuation { margin-top: 2px; } @@ -108,6 +113,12 @@ limitations under the License. right: -68px; } } + + .mx_ThreadInfo { + float: right; + margin-right: calc(-1 * var(--gutterSize)); + } + .mx_SenderProfile { display: none; } diff --git a/res/css/views/rooms/_EventTile.scss b/res/css/views/rooms/_EventTile.scss index 18af9c25b21..540b7d89afe 100644 --- a/res/css/views/rooms/_EventTile.scss +++ b/res/css/views/rooms/_EventTile.scss @@ -690,6 +690,7 @@ $hover-select-border: 4px; color: $secondary-content; box-sizing: border-box; justify-content: flex-start; + clear: both; &:hover, &-active { cursor: pointer; diff --git a/src/components/views/rooms/EventTile.tsx b/src/components/views/rooms/EventTile.tsx index 8e051d97a1c..14ec872bc92 100644 --- a/src/components/views/rooms/EventTile.tsx +++ b/src/components/views/rooms/EventTile.tsx @@ -1335,8 +1335,8 @@ export default class EventTile extends React.Component { { keyRequestInfo } { actionBar } { this.props.layout === Layout.IRC && (reactionsRow) } - { this.renderThreadInfo() }
      + { this.renderThreadInfo() } { this.props.layout !== Layout.IRC && (reactionsRow) } { msgOption } ) From e8b998c19c8659a261151d33d0e73f43093919c1 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Tue, 19 Oct 2021 09:43:34 +0100 Subject: [PATCH 137/156] Use prettier hsName during 3pid registration where possible --- src/components/structures/MatrixChat.tsx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/components/structures/MatrixChat.tsx b/src/components/structures/MatrixChat.tsx index a9e7876d904..f0a7e634b04 100644 --- a/src/components/structures/MatrixChat.tsx +++ b/src/components/structures/MatrixChat.tsx @@ -872,6 +872,15 @@ export default class MatrixChat extends React.PureComponent { params.hs_url, params.is_url, ); + // If the hs url matches then take the hs name we know locally as it is likely prettier + const defaultConfig = SdkConfig.get()["validated_server_config"] as ValidatedServerConfig; + if (defaultConfig && defaultConfig.hsUrl === newState.serverConfig.hsUrl) { + newState.serverConfig.hsName = defaultConfig.hsName; + newState.serverConfig.hsNameIsDifferent = defaultConfig.hsNameIsDifferent; + newState.serverConfig.isDefault = defaultConfig.isDefault; + newState.serverConfig.isNameResolvable = defaultConfig.isNameResolvable; + } + newState.register_client_secret = params.client_secret; newState.register_session_id = params.session_id; newState.register_id_sid = params.sid; From 6ba1fa0eb440d0f94145b9167f587adab20fe74a Mon Sep 17 00:00:00 2001 From: Szimszon Date: Tue, 19 Oct 2021 09:16:45 +0000 Subject: [PATCH 138/156] Translated using Weblate (Hungarian) Currently translated at 100.0% (3232 of 3232 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/hu/ --- src/i18n/strings/hu.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/hu.json b/src/i18n/strings/hu.json index 3608682d84a..9468a86516b 100644 --- a/src/i18n/strings/hu.json +++ b/src/i18n/strings/hu.json @@ -3248,5 +3248,6 @@ "%(count)s reply|one": "%(count)s válasz", "%(count)s reply|other": "%(count)s válasz", "View in room": "Megjelenítés szobában", - "Enter your Security Phrase or to continue.": "Add meg a Biztonsági jelmondatot vagy a folytatáshoz." + "Enter your Security Phrase or to continue.": "Add meg a Biztonsági jelmondatot vagy a folytatáshoz.", + "What projects are your team working on?": "Milyen projekteken dolgozik a csoportja?" } From e9a0c058b2add9236cc74d3c3e310fcf8d621812 Mon Sep 17 00:00:00 2001 From: LinAGKar Date: Tue, 19 Oct 2021 07:39:03 +0000 Subject: [PATCH 139/156] Translated using Weblate (Swedish) Currently translated at 98.9% (3197 of 3232 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/sv/ --- src/i18n/strings/sv.json | 38 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/src/i18n/strings/sv.json b/src/i18n/strings/sv.json index e81fa23f317..cb008cc217a 100644 --- a/src/i18n/strings/sv.json +++ b/src/i18n/strings/sv.json @@ -427,7 +427,7 @@ "File to import": "Fil att importera", "Which officially provided instance you are using, if any": "Vilken officiellt tillhandahållen instans du använder, om någon", "Drop file here to upload": "Släpp en fil här för att ladda upp", - "Options": "Inställningar", + "Options": "Alternativ", "Replying": "Svarar", "Kick this user?": "Kicka användaren?", "This room": "Detta rum", @@ -3180,5 +3180,39 @@ "Plain Text": "Vanlig text", "JSON": "JSON", "HTML": "HTML", - "Are you sure you want to exit during this export?": "Är du säker på att du vill avsluta under den här exporten?" + "Are you sure you want to exit during this export?": "Är du säker på att du vill avsluta under den här exporten?", + "Creating Space...": "Skapar utrymme…", + "Fetching data...": "Hämtar data…", + "In reply to this message": "Som svar på detta meddelande", + "Expand quotes │ ⇧+click": "Expandera citat | ⇧+klick", + "Collapse quotes │ ⇧+click": "Kollapsa citat | ⇧+klick", + "Downloading": "Laddar ner", + "They won't be able to access whatever you're not an admin of.": "De kommer inte kunna komma åt saker du inte är admin för.", + "Ban them from specific things I'm able to": "Banna dem från specifika saker jag kan", + "Unban them from specific things I'm able to": "Avbanna dem från specifika saker jag kan", + "Ban them from everything I'm able to": "Banna dem från allt jag kan", + "Unban them from everything I'm able to": "Avbanna dem från allt jag kan", + "Ban from %(roomName)s": "Banna från %(roomName)s", + "Unban from %(roomName)s": "Avbanna från %(roomName)s", + "They'll still be able to access whatever you're not an admin of.": "De kommer fortfarande kunna komma åt saker du inte är admin för.", + "Kick them from specific things I'm able to": "Kicka dem från specifika saker jag kan", + "Kick them from everything I'm able to": "Kicka dem från allt jag kan", + "Kick from %(roomName)s": "Kicka från %(roomName)s", + "Disinvite from %(roomName)s": "Häv inbjudan från %(roomName)s", + "Export chat": "Exportera chatt", + "Threads": "Trådar", + "To proceed, please accept the verification request on your other login.": "För att fortsätta, var god acceptera verifikationsförfrågan på din andra inloggning.", + "Create poll": "Skapa omröstning", + "%(count)s reply|one": "%(count)s svar", + "%(count)s reply|other": "%(count)s svar", + "Updating spaces... (%(progress)s out of %(count)s)|one": "Uppdaterar utrymme…", + "Updating spaces... (%(progress)s out of %(count)s)|other": "Uppdaterar utrymmen… (%(progress)s av %(count)s)", + "Sending invites... (%(progress)s out of %(count)s)|one": "Skickar inbjudan…", + "Sending invites... (%(progress)s out of %(count)s)|other": "Skickar inbjudningar… (%(progress)s av %(count)s)", + "Loading new room": "Laddar nytt rum", + "Upgrading room": "Uppgraderar rum", + "Waiting for you to verify on your other session…": "Väntar på att du ska verifiera på din andra session…", + "Waiting for you to verify on your other session, %(deviceName)s (%(deviceId)s)…": "Väntar på att du ska verifiera på din andra session, %(deviceName)s (%(deviceId)s)…", + "Polls (under active development)": "Röstning (under aktiv utveckling)", + "File Attached": "Fil bifogad" } From 91a8cf93ebf3b573040d683697bea0febb40ac6f Mon Sep 17 00:00:00 2001 From: sr093906 Date: Tue, 19 Oct 2021 07:40:06 +0000 Subject: [PATCH 140/156] Translated using Weblate (Chinese (Simplified)) Currently translated at 100.0% (3232 of 3232 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/zh_Hans/ --- src/i18n/strings/zh_Hans.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/zh_Hans.json b/src/i18n/strings/zh_Hans.json index 072934d4a98..c89cc953d07 100644 --- a/src/i18n/strings/zh_Hans.json +++ b/src/i18n/strings/zh_Hans.json @@ -3248,5 +3248,6 @@ "%(count)s reply|one": "%(count)s 条回复", "%(count)s reply|other": "%(count)s 条回复", "View in room": "在聊天室内查看", - "Enter your Security Phrase or to continue.": "输入安全短语或以继续。" + "Enter your Security Phrase or to continue.": "输入安全短语或以继续。", + "What projects are your team working on?": "你的团队正在进行什么项目?" } From 0f64dbfac085231cd0a040919d27004245aec56c Mon Sep 17 00:00:00 2001 From: waclaw66 Date: Tue, 19 Oct 2021 07:27:25 +0000 Subject: [PATCH 141/156] Translated using Weblate (Czech) Currently translated at 100.0% (3232 of 3232 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/cs/ --- src/i18n/strings/cs.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/cs.json b/src/i18n/strings/cs.json index d16f6c9c45b..df98fe2349d 100644 --- a/src/i18n/strings/cs.json +++ b/src/i18n/strings/cs.json @@ -3251,5 +3251,6 @@ "%(count)s reply|one": "%(count)s odpověď", "%(count)s reply|other": "%(count)s odpovědí", "View in room": "Zobrazit v místnosti", - "Enter your Security Phrase or to continue.": "Zadejte bezpečnostní frázi nebo pro pokračování." + "Enter your Security Phrase or to continue.": "Zadejte bezpečnostní frázi nebo pro pokračování.", + "What projects are your team working on?": "Na jakých projektech váš tým pracuje?" } From 4ad32b16ea09633cae5699a728e6adb64138f37b Mon Sep 17 00:00:00 2001 From: Andy Balaam Date: Tue, 19 Oct 2021 14:50:09 +0100 Subject: [PATCH 142/156] Break out font size settings to a separate component --- res/css/_components.scss | 1 + res/css/views/settings/_FontScalingPanel.scss | 81 +++++ .../tabs/user/_AppearanceUserSettingsTab.scss | 59 ---- .../views/settings/FontScalingPanel.tsx | 172 ++++++++++ .../tabs/user/AppearanceUserSettingsTab.tsx | 91 +----- .../views/settings/FontScalingPanel-test.tsx | 38 +++ .../FontScalingPanel-test.tsx.snap | 307 ++++++++++++++++++ 7 files changed, 601 insertions(+), 148 deletions(-) create mode 100644 res/css/views/settings/_FontScalingPanel.scss create mode 100644 src/components/views/settings/FontScalingPanel.tsx create mode 100644 test/components/views/settings/FontScalingPanel-test.tsx create mode 100644 test/components/views/settings/__snapshots__/FontScalingPanel-test.tsx.snap diff --git a/res/css/_components.scss b/res/css/_components.scss index ebf95a1c4a3..8ea46c42430 100644 --- a/res/css/_components.scss +++ b/res/css/_components.scss @@ -248,6 +248,7 @@ @import "./views/settings/_DevicesPanel.scss"; @import "./views/settings/_E2eAdvancedPanel.scss"; @import "./views/settings/_EmailAddresses.scss"; +@import "./views/settings/_FontScalingPanel.scss"; @import "./views/settings/_IntegrationManager.scss"; @import "./views/settings/_JoinRuleSettings.scss"; @import "./views/settings/_LayoutSwitcher.scss"; diff --git a/res/css/views/settings/_FontScalingPanel.scss b/res/css/views/settings/_FontScalingPanel.scss new file mode 100644 index 00000000000..bac1f92a4f5 --- /dev/null +++ b/res/css/views/settings/_FontScalingPanel.scss @@ -0,0 +1,81 @@ +/* +Copyright 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. +*/ + +.mx_FontScalingPanel { + color: $primary-content; + > .mx_SettingsTab_SubHeading { + margin-bottom: 32px; + } +} + +.mx_FontScalingPanel .mx_Field { + width: 256px; +} + +.mx_FontScalingPanel_fontSlider, +.mx_FontScalingPanel_fontSlider_preview { + @mixin mx_Settings_fullWidthField; +} + +.mx_FontScalingPanel_fontSlider { + display: flex; + flex-direction: row; + align-items: center; + padding: 15px; + background: rgba($appearance-tab-border-color, 0.2); + border-radius: 10px; + font-size: 10px; + margin-top: 24px; + margin-bottom: 24px; +} + +.mx_FontScalingPanel_fontSlider_preview { + border: 1px solid $appearance-tab-border-color; + border-radius: 10px; + padding: 0 16px 9px 16px; + pointer-events: none; + display: flow-root; + + .mx_EventTile[data-layout=bubble] { + margin-top: 30px; + } + + .mx_EventTile_msgOption { + display: none; + } + + &.mx_IRCLayout { + padding-top: 9px; + } +} + +.mx_FontScalingPanel_fontSlider_smallText { + font-size: 15px; + padding-right: 20px; + padding-left: 5px; + font-weight: 500; +} + +.mx_FontScalingPanel_fontSlider_largeText { + font-size: 18px; + padding-left: 20px; + padding-right: 5px; + font-weight: 500; +} + +.mx_FontScalingPanel_customFontSizeField { + margin-left: calc($font-16px + 10px); +} diff --git a/res/css/views/settings/tabs/user/_AppearanceUserSettingsTab.scss b/res/css/views/settings/tabs/user/_AppearanceUserSettingsTab.scss index 57c6e9b8654..21082786e95 100644 --- a/res/css/views/settings/tabs/user/_AppearanceUserSettingsTab.scss +++ b/res/css/views/settings/tabs/user/_AppearanceUserSettingsTab.scss @@ -14,65 +14,10 @@ See the License for the specific language governing permissions and limitations under the License. */ -.mx_AppearanceUserSettingsTab_fontSlider, -.mx_AppearanceUserSettingsTab_fontSlider_preview { - @mixin mx_Settings_fullWidthField; -} - .mx_AppearanceUserSettingsTab .mx_Field { width: 256px; } -.mx_AppearanceUserSettingsTab_fontScaling { - color: $primary-content; -} - -.mx_AppearanceUserSettingsTab_fontSlider { - display: flex; - flex-direction: row; - align-items: center; - padding: 15px; - background: rgba($appearance-tab-border-color, 0.2); - border-radius: 10px; - font-size: 10px; - margin-top: 24px; - margin-bottom: 24px; -} - -.mx_AppearanceUserSettingsTab_fontSlider_preview { - border: 1px solid $appearance-tab-border-color; - border-radius: 10px; - padding: 0 16px 9px 16px; - pointer-events: none; - display: flow-root; - - .mx_EventTile[data-layout=bubble] { - margin-top: 30px; - } - - .mx_EventTile_msgOption { - display: none; - } - - &.mx_IRCLayout { - padding-top: 9px; - } -} - -.mx_AppearanceUserSettingsTab_fontSlider_smallText { - font-size: 15px; - padding-right: 20px; - padding-left: 5px; - font-weight: 500; -} - -.mx_AppearanceUserSettingsTab_fontSlider_largeText { - font-size: 18px; - padding-left: 20px; - padding-right: 5px; - font-weight: 500; -} - .mx_AppearanceUserSettingsTab { > .mx_SettingsTab_SubHeading { margin-bottom: 32px; @@ -151,10 +96,6 @@ limitations under the License. } } -.mx_SettingsTab_customFontSizeField { - margin-left: calc($font-16px + 10px); -} - .mx_AppearanceUserSettingsTab_Advanced { color: $primary-content; diff --git a/src/components/views/settings/FontScalingPanel.tsx b/src/components/views/settings/FontScalingPanel.tsx new file mode 100644 index 00000000000..dfd239c38cc --- /dev/null +++ b/src/components/views/settings/FontScalingPanel.tsx @@ -0,0 +1,172 @@ +/* +Copyright 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 EventTilePreview from '../elements/EventTilePreview'; +import Field from '../elements/Field'; +import React, { ChangeEvent } from 'react'; +import SettingsFlag from '../elements/SettingsFlag'; +import SettingsStore from "../../../settings/SettingsStore"; +import Slider from "../elements/Slider"; +import { FontWatcher } from "../../../settings/watchers/FontWatcher"; +import { IValidationResult, IFieldState } from '../elements/Validation'; +import { Layout } from "../../../settings/Layout"; +import { MatrixClientPeg } from '../../../MatrixClientPeg'; +import { SettingLevel } from "../../../settings/SettingLevel"; +import { _t } from "../../../languageHandler"; +import { replaceableComponent } from "../../../utils/replaceableComponent"; + +interface IProps { +} + +export interface CustomThemeMessage { + isError: boolean; + text: string; +} + +interface IState { + // String displaying the current selected fontSize. + // Needs to be string for things like '17.' without + // trailing 0s. + fontSize: string; + useCustomFontSize: boolean; + useSystemFont: boolean; + systemFont: string; + layout: Layout; + // User profile data for the message preview + userId?: string; + displayName: string; + avatarUrl: string; +} + +@replaceableComponent("views.settings.tabs.user.FontScalingPanel") +export default class FontScalingPanel extends React.Component { + private readonly MESSAGE_PREVIEW_TEXT = _t("Hey you. You're the best!"); + + private unmounted = false; + + constructor(props: IProps) { + super(props); + + this.state = { + fontSize: (SettingsStore.getValue("baseFontSize", null) + FontWatcher.SIZE_DIFF).toString(), + useCustomFontSize: SettingsStore.getValue("useCustomFontSize"), + useSystemFont: SettingsStore.getValue("useSystemFont"), + systemFont: SettingsStore.getValue("systemFont"), + layout: SettingsStore.getValue("layout"), + userId: null, + displayName: null, + avatarUrl: null, + }; + } + + async componentDidMount() { + // Fetch the current user profile for the message preview + const client = MatrixClientPeg.get(); + const userId = client.getUserId(); + const profileInfo = await client.getProfileInfo(userId); + if (this.unmounted) return; + + this.setState({ + userId, + displayName: profileInfo.displayname, + avatarUrl: profileInfo.avatar_url, + }); + } + + componentWillUnmount() { + this.unmounted = true; + } + + private onFontSizeChanged = (size: number): void => { + this.setState({ fontSize: size.toString() }); + SettingsStore.setValue("baseFontSize", null, SettingLevel.DEVICE, size - FontWatcher.SIZE_DIFF); + }; + + private onValidateFontSize = async ({ value }: Pick): Promise => { + const parsedSize = parseFloat(value); + const min = FontWatcher.MIN_SIZE + FontWatcher.SIZE_DIFF; + const max = FontWatcher.MAX_SIZE + FontWatcher.SIZE_DIFF; + + if (isNaN(parsedSize)) { + return { valid: false, feedback: _t("Size must be a number") }; + } + + if (!(min <= parsedSize && parsedSize <= max)) { + return { + valid: false, + feedback: _t('Custom font size can only be between %(min)s pt and %(max)s pt', { min, max }), + }; + } + + SettingsStore.setValue( + "baseFontSize", + null, + SettingLevel.DEVICE, + parseInt(value, 10) - FontWatcher.SIZE_DIFF, + ); + + return { valid: true, feedback: _t('Use between %(min)s pt and %(max)s pt', { min, max }) }; + }; + + public render() { + return
      + + { _t("Font size") } + +
      +
      Aa
      + ""} + disabled={this.state.useCustomFontSize} + /> +
      Aa
      +
      + + this.setState({ useCustomFontSize: checked })} + useCheckbox={true} + /> + + ) => + this.setState({ fontSize: value.target.value }) + } + disabled={!this.state.useCustomFontSize} + className="mx_FontScalingPanel_customFontSizeField" + /> +
      ; + } +} diff --git a/src/components/views/settings/tabs/user/AppearanceUserSettingsTab.tsx b/src/components/views/settings/tabs/user/AppearanceUserSettingsTab.tsx index f2f4e34d79e..3abb90d2a9b 100644 --- a/src/components/views/settings/tabs/user/AppearanceUserSettingsTab.tsx +++ b/src/components/views/settings/tabs/user/AppearanceUserSettingsTab.tsx @@ -22,17 +22,13 @@ import { MatrixClientPeg } from '../../../../../MatrixClientPeg'; import SettingsStore from "../../../../../settings/SettingsStore"; import { enumerateThemes } from "../../../../../theme"; import ThemeWatcher from "../../../../../settings/watchers/ThemeWatcher"; -import Slider from "../../../elements/Slider"; import AccessibleButton from "../../../elements/AccessibleButton"; import dis from "../../../../../dispatcher/dispatcher"; -import { FontWatcher } from "../../../../../settings/watchers/FontWatcher"; import { RecheckThemePayload } from '../../../../../dispatcher/payloads/RecheckThemePayload'; import { Action } from '../../../../../dispatcher/actions'; -import { IValidationResult, IFieldState } from '../../../elements/Validation'; import StyledCheckbox from '../../../elements/StyledCheckbox'; import SettingsFlag from '../../../elements/SettingsFlag'; import Field from '../../../elements/Field'; -import EventTilePreview from '../../../elements/EventTilePreview'; import StyledRadioGroup from "../../../elements/StyledRadioGroup"; import { SettingLevel } from "../../../../../settings/SettingLevel"; import { UIFeature } from "../../../../../settings/UIFeature"; @@ -42,6 +38,7 @@ import { compare } from "../../../../../utils/strings"; import LayoutSwitcher from "../../LayoutSwitcher"; import { logger } from "matrix-js-sdk/src/logger"; +import FontScalingPanel from '../../FontScalingPanel'; interface IProps { } @@ -57,13 +54,8 @@ export interface CustomThemeMessage { } interface IState extends IThemeState { - // String displaying the current selected fontSize. - // Needs to be string for things like '17.' without - // trailing 0s. - fontSize: string; customThemeUrl: string; customThemeMessage: CustomThemeMessage; - useCustomFontSize: boolean; useSystemFont: boolean; systemFont: string; showAdvanced: boolean; @@ -85,11 +77,9 @@ export default class AppearanceUserSettingsTab extends React.Component({ action: Action.RecheckTheme }); }; - private onFontSizeChanged = (size: number): void => { - this.setState({ fontSize: size.toString() }); - SettingsStore.setValue("baseFontSize", null, SettingLevel.DEVICE, size - FontWatcher.SIZE_DIFF); - }; - - private onValidateFontSize = async ({ value }: Pick): Promise => { - const parsedSize = parseFloat(value); - const min = FontWatcher.MIN_SIZE + FontWatcher.SIZE_DIFF; - const max = FontWatcher.MAX_SIZE + FontWatcher.SIZE_DIFF; - - if (isNaN(parsedSize)) { - return { valid: false, feedback: _t("Size must be a number") }; - } - - if (!(min <= parsedSize && parsedSize <= max)) { - return { - valid: false, - feedback: _t('Custom font size can only be between %(min)s pt and %(max)s pt', { min, max }), - }; - } - - SettingsStore.setValue( - "baseFontSize", - null, - SettingLevel.DEVICE, - parseInt(value, 10) - FontWatcher.SIZE_DIFF, - ); - - return { valid: true, feedback: _t('Use between %(min)s pt and %(max)s pt', { min, max }) }; - }; - private onAddCustomTheme = async (): Promise => { let currentThemes: string[] = SettingsStore.getValue("custom_themes"); if (!currentThemes) currentThemes = []; @@ -337,52 +296,6 @@ export default class AppearanceUserSettingsTab extends React.Component - - { _t("Font size") } - -
      -
      Aa
      - ""} - disabled={this.state.useCustomFontSize} - /> -
      Aa
      -
      - - this.setState({ useCustomFontSize: checked })} - useCheckbox={true} - /> - - this.setState({ fontSize: value.target.value })} - disabled={!this.state.useCustomFontSize} - className="mx_SettingsTab_customFontSizeField" - /> - ; - } - private renderAdvancedSection() { if (!SettingsStore.getValue(UIFeature.AdvancedSettings)) return null; @@ -471,7 +384,7 @@ export default class AppearanceUserSettingsTab extends React.Component { this.renderThemeSection() } { layoutSection } - { this.renderFontSection() } + { this.renderAdvancedSection() } ); diff --git a/test/components/views/settings/FontScalingPanel-test.tsx b/test/components/views/settings/FontScalingPanel-test.tsx new file mode 100644 index 00000000000..76da094b7c5 --- /dev/null +++ b/test/components/views/settings/FontScalingPanel-test.tsx @@ -0,0 +1,38 @@ +/* +Copyright 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 { mount } from "enzyme"; + +import '../../../skinned-sdk'; +import * as TestUtils from "../../../test-utils"; +import _FontScalingPanel from '../../../../src/components/views/settings/FontScalingPanel'; + +const FontScalingPanel = TestUtils.wrapInMatrixClientContext(_FontScalingPanel); + +import * as randomstring from "matrix-js-sdk/src/randomstring"; +// @ts-expect-error: override random function to make results predictable +randomstring.randomString = () => "abdefghi"; + +describe('FontScalingPanel', () => { + it('renders the font scaling UI', () => { + TestUtils.stubClient(); + const wrapper = mount( + , + ); + expect(wrapper).toMatchSnapshot(); + }); +}); diff --git a/test/components/views/settings/__snapshots__/FontScalingPanel-test.tsx.snap b/test/components/views/settings/__snapshots__/FontScalingPanel-test.tsx.snap new file mode 100644 index 00000000000..2174b4f2893 --- /dev/null +++ b/test/components/views/settings/__snapshots__/FontScalingPanel-test.tsx.snap @@ -0,0 +1,307 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`FontScalingPanel renders the font scaling UI 1`] = ` + + +
      + + Font size + + +
      + +
      +
      +
      + +
      + +
      +
      + Aa +
      + +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      + + +
      +
      +
      +
      + + + + +
      +
      +
      +
      + + + + +
      +
      +
      +
      + + + + +
      +
      +
      +
      + + + + +
      +
      +
      +
      + + +
      +
      +
      + +
      + Aa +
      +
      + + + + + + + + + +
      + + +
      +
      +
      + + +`; From 493de82774fd82099e31ccc12cd099ec80d4ce0d Mon Sep 17 00:00:00 2001 From: Germain Souquet Date: Tue, 19 Oct 2021 11:26:31 +0100 Subject: [PATCH 143/156] Upgrade yarn dependencies --- yarn.lock | 150 +++++++++++++++++++++++++++++------------------------- 1 file changed, 80 insertions(+), 70 deletions(-) diff --git a/yarn.lock b/yarn.lock index 0404e9b6b7d..5c739e58c49 100644 --- a/yarn.lock +++ b/yarn.lock @@ -54,7 +54,7 @@ resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.15.0.tgz#2dbaf8b85334796cafbb0f5793a90a2fc010b176" integrity sha512-0NqAC1IJE0S0+lL1SWFMxMkz1pKCNCjI4tr2Zx4LJSXxCLAdr6KyArnY+sno5m3yH9g737ygOyPABDsnXkpxiA== -"@babel/core@>=7.9.0", "@babel/core@^7.1.0", "@babel/core@^7.12.10", "@babel/core@^7.7.5": +"@babel/core@>=7.9.0", "@babel/core@^7.1.0", "@babel/core@^7.12.10", "@babel/core@^7.12.3", "@babel/core@^7.7.5": version "7.15.8" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.15.8.tgz#195b9f2bffe995d2c6c159e72fe525b4114e8c10" integrity sha512-3UG9dsxvYBMYwRv+gS41WKHno4K60/9GPy1CJaH6xy3Elq8CTtvtjT5R5jmNhXfCYLX2mTw+7/aq5ak/gOE0og== @@ -307,7 +307,7 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.12.11", "@babel/parser@^7.13.16", "@babel/parser@^7.15.4", "@babel/parser@^7.15.8": +"@babel/parser@^7.1.0", "@babel/parser@^7.12.11", "@babel/parser@^7.13.16", "@babel/parser@^7.14.7", "@babel/parser@^7.15.4", "@babel/parser@^7.15.8": version "7.15.8" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.15.8.tgz#7bacdcbe71bdc3ff936d510c15dcea7cf0b99016" integrity sha512-BRYa3wcQnjS/nqI8Ac94pYYpJfojHVvVXJ97+IDCImX4Jc8W8Xv1+47enbruk+q1etOpsQNwnfFcNGw+gtPGxA== @@ -1757,14 +1757,14 @@ integrity sha512-jhMOZSS0UGYTS9pqvt6q3wtT3uvOSve5piTEmTMx3zzTuBLvSIMxSIBIc3d5lajVD5h4xc41AMZD2M5orN3PxA== "@types/node@*": - version "16.10.3" - resolved "https://registry.yarnpkg.com/@types/node/-/node-16.10.3.tgz#7a8f2838603ea314d1d22bb3171d899e15c57bd5" - integrity sha512-ho3Ruq+fFnBrZhUYI46n/bV2GjwzSkwuT4dTf0GkuNFmnb8nq4ny2z9JEVemFi6bdEJanHLlYfy9c6FN9B9McQ== + version "16.11.1" + resolved "https://registry.yarnpkg.com/@types/node/-/node-16.11.1.tgz#2e50a649a50fc403433a14f829eface1a3443e97" + integrity sha512-PYGcJHL9mwl1Ek3PLiYgyEKtwTMmkMw4vbiyz/ps3pfdRYLVv+SN7qHVAImrjdAXxgluDEw6Ph4lyv+m9UpRmA== "@types/node@^14.14.22": - version "14.17.21" - resolved "https://registry.yarnpkg.com/@types/node/-/node-14.17.21.tgz#6359d8cf73481e312a43886fa50afc70ce5592c6" - integrity sha512-zv8ukKci1mrILYiQOwGSV4FpkZhyxQtuFWGya2GujWg+zVAeRQ4qbaMmWp9vb9889CFA8JECH7lkwCL6Ygg8kA== + version "14.17.27" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.17.27.tgz#5054610d37bb5f6e21342d0e6d24c494231f3b85" + integrity sha512-94+Ahf9IcaDuJTle/2b+wzvjmutxXAEXU6O81JHblYXUg2BDG+dnBy7VxIPHKAyEEDHzCMQydTJuWvrE+Aanzw== "@types/normalize-package-data@^2.4.0": version "2.4.1" @@ -2083,11 +2083,6 @@ ansi-escapes@^4.2.1: dependencies: type-fest "^0.21.3" -ansi-regex@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" - integrity sha1-w7M6te42DYbg5ijwRorn7yfWVN8= - ansi-regex@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997" @@ -2309,14 +2304,14 @@ babel-plugin-dynamic-import-node@^2.3.3: object.assign "^4.1.0" babel-plugin-istanbul@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-6.0.0.tgz#e159ccdc9af95e0b570c75b4573b7c34d671d765" - integrity sha512-AF55rZXpe7trmEylbaE1Gv54wn6rwU03aptvRoVIGP8YykoSxqdVLV1TfwflBCE/QtHmqtP8SWlTENqbK8GCSQ== + version "6.1.1" + resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz#fa88ec59232fd9b4e36dbbc540a8ec9a9b47da73" + integrity sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@istanbuljs/load-nyc-config" "^1.0.0" "@istanbuljs/schema" "^0.1.2" - istanbul-lib-instrument "^4.0.0" + istanbul-lib-instrument "^5.0.4" test-exclude "^6.0.0" babel-plugin-jest-hoist@^26.6.2: @@ -2503,15 +2498,15 @@ browser-request@^0.3.3: integrity sha1-ns5bWsqJopkyJC4Yv5M975h2zBc= browserslist@^4.12.0, browserslist@^4.16.6, browserslist@^4.17.3: - version "4.17.3" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.17.3.tgz#2844cd6eebe14d12384b0122d217550160d2d624" - integrity sha512-59IqHJV5VGdcJZ+GZ2hU5n4Kv3YiASzW6Xk5g9tf5a/MAzGeFwgGWU39fVzNIOVcgB3+Gp+kiQu0HEfTVU/3VQ== + version "4.17.4" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.17.4.tgz#72e2508af2a403aec0a49847ef31bd823c57ead4" + integrity sha512-Zg7RpbZpIJRW3am9Lyckue7PLytvVxxhJj1CaJVlCWENsGEAOlnlt8X0ZxGRPp7Bt9o8tIRM5SEXy4BCPMJjLQ== dependencies: - caniuse-lite "^1.0.30001264" - electron-to-chromium "^1.3.857" + caniuse-lite "^1.0.30001265" + electron-to-chromium "^1.3.867" escalade "^3.1.1" - node-releases "^1.1.77" - picocolors "^0.2.1" + node-releases "^2.0.0" + picocolors "^1.0.0" bs58@^4.0.1: version "4.0.1" @@ -2605,10 +2600,10 @@ camelcase@^6.0.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.2.0.tgz#924af881c9d525ac9d87f40d964e5cea982a1809" integrity sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg== -caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001264: - version "1.0.30001265" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001265.tgz#0613c9e6c922e422792e6fcefdf9a3afeee4f8c3" - integrity sha512-YzBnspggWV5hep1m9Z6sZVLOt7vrju8xWooFAgN6BA5qvy98qPAPb7vNUzypFaoh2pb3vlfzbDO8tB57UPGbtw== +caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001265: + version "1.0.30001269" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001269.tgz#3a71bee03df627364418f9fd31adfc7aa1cc2d56" + integrity sha512-UOy8okEVs48MyHYgV+RdW1Oiudl1H6KolybD6ZquD0VcrPSgj25omXO1S7rDydjpqaISCwA8Pyx+jUQKZwWO5w== capture-exit@^2.0.0: version "2.0.0" @@ -2732,15 +2727,14 @@ classnames@*, classnames@^2.2.6: integrity sha512-OlQdbZ7gLfGarSqxesMesDa5uz7KFbID8Kpq/SxIoNGDqY8lSYs0D+hhtBXhcdB3rcbXArFr7vlHheLk1voeNA== cli-color@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/cli-color/-/cli-color-2.0.0.tgz#11ecfb58a79278cf6035a60c54e338f9d837897c" - integrity sha512-a0VZ8LeraW0jTuCkuAGMNufareGHhyZU9z8OGsW0gXd1hZGi1SRuNRXdbGkraBBKnhyUhyebFWnRbp+dIn0f0A== + version "2.0.1" + resolved "https://registry.yarnpkg.com/cli-color/-/cli-color-2.0.1.tgz#93e3491308691f1e46beb78b63d0fb2585e42ba6" + integrity sha512-eBbxZF6fqPUNnf7CLAFOersUnyYzv83tHFLSlts+OAHsNendaqv2tHCq+/MO+b3Y+9JeoUlIvobyxG/Z8GNeOg== dependencies: - ansi-regex "^2.1.1" d "^1.0.1" - es5-ext "^0.10.51" + es5-ext "^0.10.53" es6-iterator "^2.0.3" - memoizee "^0.4.14" + memoizee "^0.4.15" timers-ext "^0.1.7" cliui@^5.0.0: @@ -2903,9 +2897,9 @@ copy-descriptor@^0.1.0: integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= core-js-compat@^3.16.0, core-js-compat@^3.16.2: - version "3.18.2" - resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.18.2.tgz#e40c266fbd613948dd8d2d2156345da8ac03c142" - integrity sha512-25VJYCJtGjZwLguj7d66oiHfmnVw3TMOZ0zV8DyMJp/aeQ3OjR519iOOeck08HMyVVRAqXxafc2Hl+5QstJrsQ== + version "3.18.3" + resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.18.3.tgz#e0e7e87abc55efb547e7fa19169e45fa9df27a67" + integrity sha512-4zP6/y0a2RTHN5bRGT7PTq9lVt3WzvffTNjqnTKsXhkAYNDTkdCLOIfAdOLcQ/7TDdyRj3c+NeHe1NmF1eDScw== dependencies: browserslist "^4.17.3" semver "7.0.0" @@ -3165,9 +3159,9 @@ detect-node-es@^1.1.0: integrity sha512-ypdmJU/TbBby2Dxibuv7ZLW3Bs1QEmM7nHjEANfohJLvE0XVujisn1qPJcZxg+qDucsr+bP6fLD1rPS3AhJ7EQ== diff-dom@^4.2.2: - version "4.2.2" - resolved "https://registry.yarnpkg.com/diff-dom/-/diff-dom-4.2.2.tgz#49a121fe1614675b4f28ed50df9547bb0c3c1d52" - integrity sha512-qO0WsnnMF6Wc5MEm0j4LkwvJWs4Mpkj6pyXWMtcjGJPHWDNcnQY8ijYoSrsZuArBmlHLN9Dqr4de/3ZlbjpRVw== + version "4.2.3" + resolved "https://registry.yarnpkg.com/diff-dom/-/diff-dom-4.2.3.tgz#c6234b49c1b49e41601d2f08dbb26cd57842de45" + integrity sha512-8OZPIbTWVhkQVlUlsb+VuMEMpTpKKhO5FTwds2bYVIaBiPNJCG1YW5qXUyLWMux5gC2UGyYXjtX05SPivnGMCw== diff-match-patch@^1.0.5: version "1.0.5" @@ -3291,10 +3285,10 @@ ecc-jsbn@~0.1.1: jsbn "~0.1.0" safer-buffer "^2.1.0" -electron-to-chromium@^1.3.857: - version "1.3.866" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.866.tgz#d446338f5ad6948b27a50739760e7b0b5cc5032f" - integrity sha512-iYze6TpDXWxk+sfcpUUdTs6Pv/3kG45Pnjer2DxEeFw0N08bZeNLuz97s2lMgy8yObon48o0WHY2Bkg3xuAPOA== +electron-to-chromium@^1.3.867: + version "1.3.872" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.872.tgz#2311a82f344d828bab6904818adc4afb57b35369" + integrity sha512-qG96atLFY0agKyEETiBFNhpRLSXGSXOBuhXWpbkYqrLKKASpRyRBUtfkn0ZjIf/yXfA7FA4nScVOMpXSHFlUCQ== emittery@^0.7.1: version "0.7.2" @@ -3468,7 +3462,7 @@ es-to-primitive@^1.2.1: is-date-object "^1.0.1" is-symbol "^1.0.2" -es5-ext@^0.10.35, es5-ext@^0.10.46, es5-ext@^0.10.50, es5-ext@^0.10.51, es5-ext@^0.10.53, es5-ext@~0.10.14, es5-ext@~0.10.2, es5-ext@~0.10.46: +es5-ext@^0.10.35, es5-ext@^0.10.46, es5-ext@^0.10.50, es5-ext@^0.10.53, es5-ext@~0.10.14, es5-ext@~0.10.2, es5-ext@~0.10.46: version "0.10.53" resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.53.tgz#93c5a3acfdbef275220ad72644ad02ee18368de1" integrity sha512-Xs2Stw6NiNHWypzRTY1MtaG/uJlwCk8kH81920ma8mvN8Xq1gsfhZvpkImLQArw8AHnv8MT2I45J3c0R8slE+Q== @@ -4661,9 +4655,9 @@ is-ci@^2.0.0: ci-info "^2.0.0" is-core-module@^2.2.0, is-core-module@^2.5.0: - version "2.7.0" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.7.0.tgz#3c0ef7d31b4acfc574f80c58409d568a836848e3" - integrity sha512-ByY+tjCciCr+9nLryBYcSD50EOGWt95c7tIsKTG1J2ixKKXPvF7Ej3AVd+UfDydAJom3biBGDBALaO79ktwgEQ== + version "2.8.0" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.8.0.tgz#0321336c3d0925e497fd97f5d95cb114a5ccd548" + integrity sha512-vd15qHsaqrRL7dtH6QNuy0ndJmRDrS9HAM1CAiSifNUFv4x1a0CCVsj18hJ1mShxIG6T2i1sO78MkP56r0nYRw== dependencies: has "^1.0.3" @@ -5012,11 +5006,11 @@ isstream@~0.1.2: integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo= istanbul-lib-coverage@^3.0.0: - version "3.0.2" - resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-3.0.2.tgz#36786d4d82aad2ea5911007e255e2da6b5f80d86" - integrity sha512-o5+eTUYzCJ11/+JhW5/FUCdfsdoYVdQ/8I/OveE2XsjehYn5DdeSnNQAbjYaO8gQ6hvGTN6GM6ddQqpTVG5j8g== + version "3.2.0" + resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz#189e7909d0a39fa5a3dfad5b03f71947770191d3" + integrity sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw== -istanbul-lib-instrument@^4.0.0, istanbul-lib-instrument@^4.0.3: +istanbul-lib-instrument@^4.0.3: version "4.0.3" resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.3.tgz#873c6fff897450118222774696a3f28902d77c1d" integrity sha512-BXgQl9kf4WTCPCCpmFGoJkz/+uhvm7h7PFKUYxh7qarQd3ER33vHG//qaE8eN25l07YqZPpHXU9I09l/RD5aGQ== @@ -5026,6 +5020,17 @@ istanbul-lib-instrument@^4.0.0, istanbul-lib-instrument@^4.0.3: istanbul-lib-coverage "^3.0.0" semver "^6.3.0" +istanbul-lib-instrument@^5.0.4: + version "5.0.4" + resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-5.0.4.tgz#e976f2aa66ebc6737f236d3ab05b76e36f885c80" + integrity sha512-W6jJF9rLGEISGoCyXRqa/JCGQGmmxPO10TMu7izaUTynxvBvTjqzAIIGCK9USBmIbQAaSWD6XJPrM9Pv5INknw== + dependencies: + "@babel/core" "^7.12.3" + "@babel/parser" "^7.14.7" + "@istanbuljs/schema" "^0.1.2" + istanbul-lib-coverage "^3.0.0" + semver "^6.3.0" + istanbul-lib-report@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz#7518fe52ea44de372f460a76b5ecda9ffb73d8a6" @@ -5045,9 +5050,9 @@ istanbul-lib-source-maps@^4.0.0: source-map "^0.6.1" istanbul-reports@^3.0.2: - version "3.0.4" - resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-3.0.4.tgz#5c38ce8136edf484c0fcfbf7514aafb0363ed1db" - integrity sha512-bFjUnc95rHjdCR63WMHUS7yfJJh8T9IPSWavvR02hhjVwezWALZ5axF9EqjmwZHpXqkzbgAMP8DmAtiyNxrdrQ== + version "3.0.5" + resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-3.0.5.tgz#a2580107e71279ea6d661ddede929ffc6d693384" + integrity sha512-5+19PlhnGabNWB7kOFnuxT8H3T/iIyQzIbQMxXsURmmvKg86P2sbkrGOT77VnHw0Qr0gc2XzRaRfMZYYbSQCJQ== dependencies: html-escaper "^2.0.0" istanbul-lib-report "^3.0.0" @@ -5866,7 +5871,7 @@ mathml-tag-names@^2.1.3: "matrix-js-sdk@github:matrix-org/matrix-js-sdk#develop": version "14.0.1" - resolved "https://codeload.github.com/matrix-org/matrix-js-sdk/tar.gz/e7b41fadd0d6eda7423a369c99ec7b94afd48d5d" + resolved "https://codeload.github.com/matrix-org/matrix-js-sdk/tar.gz/94ff0ea4cd9dfd37400b079c8da08b8ecd0f7c6f" dependencies: "@babel/runtime" "^7.12.5" another-json "^0.2.0" @@ -5946,7 +5951,7 @@ memoize-one@^5.1.1: resolved "https://registry.yarnpkg.com/memoize-one/-/memoize-one-5.2.1.tgz#8337aa3c4335581839ec01c3d594090cebe8f00e" integrity sha512-zYiwtZUcYyXKo/np96AGZAckk+FWWsUdJ3cHGGmld7+AhvcWmQyGCYUh1hc4Q/pkOhb65dQR/pqCyK0cOaHz4Q== -memoizee@^0.4.14: +memoizee@^0.4.15: version "0.4.15" resolved "https://registry.yarnpkg.com/memoizee/-/memoizee-0.4.15.tgz#e6f3d2da863f318d02225391829a6c5956555b72" integrity sha512-UBWmJpLZd5STPm7PMUlOw/TSy972M+z8gcyQ5veOnSDRREz/0bmpyTfKt3/51DhEBqCZQn1udM/5flcSPYhkdQ== @@ -6097,9 +6102,9 @@ ms@2.1.2: integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== nanoid@^3.1.28: - version "3.1.29" - resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.29.tgz#214fb2d7a33e1a5bef4757b779dfaeb6a4e5aeb4" - integrity sha512-dW2pUSGZ8ZnCFIlBIA31SV8huOGCHb6OwzVCc7A69rb/a+SgPBwfmLvK5TKQ3INPbRkcI8a/Owo0XbiTNH19wg== + version "3.1.30" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.30.tgz#63f93cc548d2a113dc5dfbc63bfa09e2b9b64362" + integrity sha512-zJpuPDwOv8D2zq2WRoMe1HsfZthVewpel9CAvTfc/2mBD1uUT/agc5f7GHGWXlYkFvi1mVxe4IjvP2HNrop7nQ== nanomatch@^1.2.9: version "1.2.13" @@ -6190,10 +6195,10 @@ node-notifier@^8.0.0: uuid "^8.3.0" which "^2.0.2" -node-releases@^1.1.77: - version "1.1.77" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.77.tgz#50b0cfede855dd374e7585bf228ff34e57c1c32e" - integrity sha512-rB1DUFUNAN4Gn9keO2K1efO35IDK7yKHCdCaIMvFO7yUYmmZYeDjnGKle26G4rwj+LKRQpjyUUvMkPglwGCYNQ== +node-releases@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.0.tgz#67dc74903100a7deb044037b8a2e5f453bb05400" + integrity sha512-aA87l0flFYMzCHpTM3DERFSYxc6lv/BltdbRTOMZuxZ0cwZCD3mejE5n9vLhSJCN++/eOqr77G1IO5uXxlQYWA== normalize-package-data@^2.3.2, normalize-package-data@^2.5.0: version "2.5.0" @@ -6413,9 +6418,9 @@ optionator@^0.9.1: word-wrap "^1.2.3" opus-recorder@^8.0.3: - version "8.0.4" - resolved "https://registry.yarnpkg.com/opus-recorder/-/opus-recorder-8.0.4.tgz#c4cdbb8bb94d17aa406934b58dcf9caab6c79b09" - integrity sha512-nWwLH5BySgNDHdpkOMV+igl9iyS99g60ap/0LycIgbSXykZvUpweuWCgAl3mTKSL0773yvKohlO5dOv5RQqG/Q== + version "8.0.5" + resolved "https://registry.yarnpkg.com/opus-recorder/-/opus-recorder-8.0.5.tgz#06d3e32e15da57ebc3f57e41b93033475fcb4e3e" + integrity sha512-tBRXc9Btds7i3bVfA7d5rekAlyOcfsivt5vSIXHxRV1Oa+s6iXFW8omZ0Lm3ABWotVcEyKt96iIIUcgbV07YOw== p-each-series@^2.1.0: version "2.2.0" @@ -6575,6 +6580,11 @@ picocolors@^0.2.1: resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-0.2.1.tgz#570670f793646851d1ba135996962abad587859f" integrity sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA== +picocolors@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" + integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== + picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.3: version "2.3.0" resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.0.tgz#f1f061de8f6a4bf022892e2d128234fb98302972" @@ -7370,9 +7380,9 @@ sane@^4.0.3: walker "~1.0.5" sanitize-html@^2.3.2: - version "2.5.1" - resolved "https://registry.yarnpkg.com/sanitize-html/-/sanitize-html-2.5.1.tgz#f49998dc54c8180153940440d3a7294b09e4258a" - integrity sha512-hUITPitQk+eFNLtr4dEkaaiAJndG2YE87IOpcfBSL1XdklWgwcNDJdr9Ppe8QKL/C3jFt1xH/Mbj20e0GZQOfg== + version "2.5.2" + resolved "https://registry.yarnpkg.com/sanitize-html/-/sanitize-html-2.5.2.tgz#fd7892340e7fc9afd5722200929258808c578784" + integrity sha512-sJ1rO2YixFIqs2kIcEUb6PTrCjvz8DMq1XqWWuy0kjgjrn58GNLK1DKSIRybFZDO1WNgsEgD+WiEzTEYS8xEug== dependencies: deepmerge "^4.2.2" escape-string-regexp "^4.0.0" From 79edceca8943e3fe21526df840c2e72c01a6dac6 Mon Sep 17 00:00:00 2001 From: Andy Balaam Date: Tue, 19 Oct 2021 15:23:12 +0100 Subject: [PATCH 144/156] Remove unused fields --- src/components/views/settings/FontScalingPanel.tsx | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/components/views/settings/FontScalingPanel.tsx b/src/components/views/settings/FontScalingPanel.tsx index dfd239c38cc..aabfc1c9a48 100644 --- a/src/components/views/settings/FontScalingPanel.tsx +++ b/src/components/views/settings/FontScalingPanel.tsx @@ -31,19 +31,12 @@ import { replaceableComponent } from "../../../utils/replaceableComponent"; interface IProps { } -export interface CustomThemeMessage { - isError: boolean; - text: string; -} - interface IState { // String displaying the current selected fontSize. // Needs to be string for things like '17.' without // trailing 0s. fontSize: string; useCustomFontSize: boolean; - useSystemFont: boolean; - systemFont: string; layout: Layout; // User profile data for the message preview userId?: string; @@ -63,8 +56,6 @@ export default class FontScalingPanel extends React.Component { this.state = { fontSize: (SettingsStore.getValue("baseFontSize", null) + FontWatcher.SIZE_DIFF).toString(), useCustomFontSize: SettingsStore.getValue("useCustomFontSize"), - useSystemFont: SettingsStore.getValue("useSystemFont"), - systemFont: SettingsStore.getValue("systemFont"), layout: SettingsStore.getValue("layout"), userId: null, displayName: null, From d70a706c15d86ede41b7d97d7d48331fa718cd30 Mon Sep 17 00:00:00 2001 From: Andy Balaam Date: Tue, 19 Oct 2021 15:25:33 +0100 Subject: [PATCH 145/156] i18n updates --- src/i18n/strings/en_EN.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index 24ac3d162d8..9fab4afd427 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -1158,6 +1158,10 @@ "%(brand)s is missing some components required for securely caching encrypted messages locally. If you'd like to experiment with this feature, build a custom %(brand)s Desktop with search components added.": "%(brand)s is missing some components required for securely caching encrypted messages locally. If you'd like to experiment with this feature, build a custom %(brand)s Desktop with search components added.", "%(brand)s can't securely cache encrypted messages locally while running in a web browser. Use %(brand)s Desktop for encrypted messages to appear in search results.": "%(brand)s can't securely cache encrypted messages locally while running in a web browser. Use %(brand)s Desktop for encrypted messages to appear in search results.", "Message search initialisation failed": "Message search initialisation failed", + "Hey you. You're the best!": "Hey you. You're the best!", + "Size must be a number": "Size must be a number", + "Custom font size can only be between %(min)s pt and %(max)s pt": "Custom font size can only be between %(min)s pt and %(max)s pt", + "Use between %(min)s pt and %(max)s pt": "Use between %(min)s pt and %(max)s pt", "Connecting to integration manager...": "Connecting to integration manager...", "Cannot connect to integration manager": "Cannot connect to integration manager", "The integration manager is offline or it cannot reach your homeserver.": "The integration manager is offline or it cannot reach your homeserver.", @@ -1289,10 +1293,6 @@ "Downloading update...": "Downloading update...", "New version available. Update now.": "New version available. Update now.", "Check for update": "Check for update", - "Hey you. You're the best!": "Hey you. You're the best!", - "Size must be a number": "Size must be a number", - "Custom font size can only be between %(min)s pt and %(max)s pt": "Custom font size can only be between %(min)s pt and %(max)s pt", - "Use between %(min)s pt and %(max)s pt": "Use between %(min)s pt and %(max)s pt", "Invalid theme schema.": "Invalid theme schema.", "Error downloading theme information.": "Error downloading theme information.", "Theme added!": "Theme added!", From 2582f6df238f0f64524027ccad84b0f951778686 Mon Sep 17 00:00:00 2001 From: Andy Balaam Date: Tue, 19 Oct 2021 15:45:11 +0100 Subject: [PATCH 146/156] Replace manual mock with jest.mock --- .../views/settings/FontScalingPanel-test.tsx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/test/components/views/settings/FontScalingPanel-test.tsx b/test/components/views/settings/FontScalingPanel-test.tsx index 76da094b7c5..3c3a68e2746 100644 --- a/test/components/views/settings/FontScalingPanel-test.tsx +++ b/test/components/views/settings/FontScalingPanel-test.tsx @@ -23,9 +23,15 @@ import _FontScalingPanel from '../../../../src/components/views/settings/FontSca const FontScalingPanel = TestUtils.wrapInMatrixClientContext(_FontScalingPanel); -import * as randomstring from "matrix-js-sdk/src/randomstring"; -// @ts-expect-error: override random function to make results predictable -randomstring.randomString = () => "abdefghi"; +// Fake random strings to give a predictable snapshot +jest.mock( + 'matrix-js-sdk/src/randomstring', + () => { + return { + randomString: () => "abdefghi", + }; + }, +); describe('FontScalingPanel', () => { it('renders the font scaling UI', () => { From 694ec946e2ec0f78cc5f3259ed76004f17ae2b69 Mon Sep 17 00:00:00 2001 From: Germain Date: Tue, 19 Oct 2021 16:05:34 +0100 Subject: [PATCH 147/156] Allow quote-reply in thread view element-web (#6959) --- src/components/structures/RoomView.tsx | 5 +- src/components/structures/ThreadPanel.tsx | 17 +----- src/components/structures/ThreadView.tsx | 10 +++- .../views/messages/MessageActionBar.tsx | 10 ++-- src/components/views/rooms/EventTile.tsx | 21 ++++++-- .../views/rooms/MessageComposer.tsx | 13 ++--- src/components/views/rooms/ReplyPreview.tsx | 52 ++++--------------- .../views/rooms/SendMessageComposer.tsx | 8 ++- src/contexts/RoomContext.ts | 10 ++-- src/stores/RoomViewStore.tsx | 24 +++++---- .../views/rooms/SendMessageComposer-test.tsx | 2 + 11 files changed, 84 insertions(+), 88 deletions(-) diff --git a/src/components/structures/RoomView.tsx b/src/components/structures/RoomView.tsx index db7d7acd905..c2e071b8362 100644 --- a/src/components/structures/RoomView.tsx +++ b/src/components/structures/RoomView.tsx @@ -779,7 +779,10 @@ export class RoomView extends React.Component { }); break; case 'reply_to_event': - if (this.state.searchResults && payload.event.getRoomId() === this.state.roomId && !this.unmounted) { + if (this.state.searchResults + && payload.event.getRoomId() === this.state.roomId + && !this.unmounted + && payload.context === TimelineRenderingType.Room) { this.onCancelSearchClick(); } break; diff --git a/src/components/structures/ThreadPanel.tsx b/src/components/structures/ThreadPanel.tsx index 40e94792511..2c3cba683b3 100644 --- a/src/components/structures/ThreadPanel.tsx +++ b/src/components/structures/ThreadPanel.tsx @@ -15,7 +15,6 @@ limitations under the License. */ import React, { useContext, useEffect, useMemo, useRef, useState } from 'react'; -import { MatrixEvent } from 'matrix-js-sdk/src/models/event'; import { Thread, ThreadEvent } from 'matrix-js-sdk/src/models/thread'; import { EventTimelineSet } from 'matrix-js-sdk/src/models/event-timeline-set'; import { Room } from 'matrix-js-sdk/src/models/room'; @@ -24,7 +23,6 @@ import BaseCard from "../views/right_panel/BaseCard"; import { RightPanelPhases } from "../../stores/RightPanelStorePhases"; import ResizeNotifier from '../../utils/ResizeNotifier'; -import EventTile, { TileShape } from '../views/rooms/EventTile'; import MatrixClientContext from '../../contexts/MatrixClientContext'; import { _t } from '../../languageHandler'; import { ContextMenuButton } from '../../accessibility/context_menu/ContextMenuButton'; @@ -34,6 +32,7 @@ import TimelinePanel from './TimelinePanel'; import { Layout } from '../../settings/Layout'; import { useEventEmitter } from '../../hooks/useEventEmitter'; import AccessibleButton from '../views/elements/AccessibleButton'; +import { TileShape } from '../views/rooms/EventTile'; interface IProps { roomId: string; @@ -41,18 +40,6 @@ interface IProps { resizeNotifier: ResizeNotifier; } -export const ThreadPanelItem: React.FC<{ event: MatrixEvent }> = ({ event }) => { - return ; -}; - export enum ThreadFilterType { "My", "All" @@ -230,7 +217,7 @@ const ThreadPanel: React.FC = ({ roomId, onClose }) => { showReactions={true} className="mx_RoomView_messagePanel mx_GroupLayout" membersLoaded={true} - tileShape={TileShape.ThreadPanel} + tileShape={TileShape.Thread} /> diff --git a/src/components/structures/ThreadView.tsx b/src/components/structures/ThreadView.tsx index 7bd6415cd33..b0851665a7a 100644 --- a/src/components/structures/ThreadView.tsx +++ b/src/components/structures/ThreadView.tsx @@ -50,6 +50,7 @@ interface IProps { interface IState { thread?: Thread; editState?: EditorStateTransfer; + replyToEvent?: MatrixEvent; } @replaceableComponent("structures.ThreadView") @@ -114,6 +115,13 @@ export default class ThreadView extends React.Component { }); break; } + case 'reply_to_event': + if (payload.context === TimelineRenderingType.Thread) { + this.setState({ + replyToEvent: payload.event, + }); + } + break; default: break; } @@ -199,7 +207,7 @@ export default class ThreadView extends React.Component { rel_type: RelationType.Thread, event_id: this.state.thread.id, }} - showReplyPreview={false} + replyToEvent={this.state.replyToEvent} permalinkCreator={this.props.permalinkCreator} e2eStatus={this.props.e2eStatus} compact={true} diff --git a/src/components/views/messages/MessageActionBar.tsx b/src/components/views/messages/MessageActionBar.tsx index dffe8be7a61..56ae08453c2 100644 --- a/src/components/views/messages/MessageActionBar.tsx +++ b/src/components/views/messages/MessageActionBar.tsx @@ -63,7 +63,7 @@ const OptionsButton: React.FC = let contextMenu; if (menuDisplayed) { const tile = getTile && getTile(); - const replyThread = getReplyChain && getReplyChain(); + const replyChain = getReplyChain && getReplyChain(); const buttonRect = button.current.getBoundingClientRect(); contextMenu = = mxEvent={mxEvent} permalinkCreator={permalinkCreator} eventTileOps={tile && tile.getEventTileOps ? tile.getEventTileOps() : undefined} - collapseReplyChain={replyThread && replyThread.canCollapse() ? replyThread.collapse : undefined} + collapseReplyChain={replyChain && replyChain.canCollapse() ? replyChain.collapse : undefined} onFinished={closeMenu} />; } @@ -191,6 +191,7 @@ export default class MessageActionBar extends React.PureComponent - { SettingsStore.getValue("feature_thread") && ( + { (SettingsStore.getValue("feature_thread") + && this.context.timelineRenderingType !== TimelineRenderingType.Thread) && ( { private isListeningForReceipts: boolean; // TODO: Types private tile = React.createRef(); - private replyThread = React.createRef(); + private replyChain = React.createRef(); public readonly ref = createRef(); @@ -933,7 +933,7 @@ export default class EventTile extends React.Component { // TODO: Types getTile: () => any | null = () => this.tile.current; - getReplyChain = () => this.replyThread.current; + getReplyChain = () => this.replyChain.current; getReactions = () => { if ( @@ -1214,12 +1214,26 @@ export default class EventTile extends React.Component { ]); } case TileShape.Thread: { + const thread = haveTileForEvent(this.props.mxEvent) && + ReplyChain.hasReply(this.props.mxEvent) ? ( + ) : null; const room = this.context.getRoom(this.props.mxEvent.getRoomId()); return React.createElement(this.props.as || "li", { "className": classes, "aria-live": ariaLive, "aria-atomic": true, "data-scroll-tokens": scrollToken, + "data-has-reply": !!thread, }, [
      @@ -1235,6 +1249,7 @@ export default class EventTile extends React.Component {
      ,
      + { thread } { { private ref: React.RefObject = createRef(); private instanceId: number; + public static contextType = RoomContext; + static defaultProps = { - showReplyPreview: true, compact: false, }; @@ -294,7 +295,7 @@ export default class MessageComposer extends React.Component { }; private onAction = (payload: ActionPayload) => { - if (payload.action === 'reply_to_event') { + if (payload.action === 'reply_to_event' && payload.context === this.context.timelineRenderingType) { // add a timeout for the reply preview to be rendered, so // that the ScrollPanel listening to the resizeNotifier can // correctly measure it's new height and scroll down to keep @@ -633,9 +634,9 @@ export default class MessageComposer extends React.Component {
      { recordingTooltip }
      - { this.props.showReplyPreview && ( - - ) } +
      { controls } { this.renderButtons(menuPosition) } diff --git a/src/components/views/rooms/ReplyPreview.tsx b/src/components/views/rooms/ReplyPreview.tsx index 41b3d2460c8..a1dfddfe19b 100644 --- a/src/components/views/rooms/ReplyPreview.tsx +++ b/src/components/views/rooms/ReplyPreview.tsx @@ -17,63 +17,31 @@ limitations under the License. import React from 'react'; import dis from '../../../dispatcher/dispatcher'; import { _t } from '../../../languageHandler'; -import RoomViewStore from '../../../stores/RoomViewStore'; import { RoomPermalinkCreator } from "../../../utils/permalinks/Permalinks"; import { replaceableComponent } from "../../../utils/replaceableComponent"; import ReplyTile from './ReplyTile'; import { MatrixEvent } from 'matrix-js-sdk/src/models/event'; -import { EventSubscription } from 'fbemitter'; +import RoomContext, { TimelineRenderingType } from '../../../contexts/RoomContext'; -function cancelQuoting() { +function cancelQuoting(context: TimelineRenderingType) { dis.dispatch({ action: 'reply_to_event', event: null, + context, }); } interface IProps { permalinkCreator: RoomPermalinkCreator; -} - -interface IState { - event: MatrixEvent; + replyToEvent: MatrixEvent; } @replaceableComponent("views.rooms.ReplyPreview") -export default class ReplyPreview extends React.Component { - private unmounted = false; - private readonly roomStoreToken: EventSubscription; - - constructor(props) { - super(props); - - this.state = { - event: RoomViewStore.getQuotingEvent(), - }; - - this.roomStoreToken = RoomViewStore.addListener(this.onRoomViewStoreUpdate); - } - - componentWillUnmount() { - this.unmounted = true; - - // Remove RoomStore listener - if (this.roomStoreToken) { - this.roomStoreToken.remove(); - } - } - - private onRoomViewStoreUpdate = (): void => { - if (this.unmounted) return; - - const event = RoomViewStore.getQuotingEvent(); - if (this.state.event !== event) { - this.setState({ event }); - } - }; +export default class ReplyPreview extends React.Component { + public static contextType = RoomContext; - render() { - if (!this.state.event) return null; + public render(): JSX.Element { + if (!this.props.replyToEvent) return null; return
      @@ -86,13 +54,13 @@ export default class ReplyPreview extends React.Component { src={require("../../../../res/img/cancel.svg")} width="18" height="18" - onClick={cancelQuoting} + onClick={() => cancelQuoting(this.context.timelineRenderingType)} />
      diff --git a/src/components/views/rooms/SendMessageComposer.tsx b/src/components/views/rooms/SendMessageComposer.tsx index 12458d201fa..c32a31f2494 100644 --- a/src/components/views/rooms/SendMessageComposer.tsx +++ b/src/components/views/rooms/SendMessageComposer.tsx @@ -238,6 +238,7 @@ export class SendMessageComposer extends React.Component({ diff --git a/src/stores/RoomViewStore.tsx b/src/stores/RoomViewStore.tsx index b949ccabcf1..1a44b4fb326 100644 --- a/src/stores/RoomViewStore.tsx +++ b/src/stores/RoomViewStore.tsx @@ -32,6 +32,7 @@ import { retry } from "../utils/promise"; import CountlyAnalytics from "../CountlyAnalytics"; import { logger } from "matrix-js-sdk/src/logger"; +import { TimelineRenderingType } from "../contexts/RoomContext"; const NUM_JOIN_RETRY = 5; @@ -153,16 +154,19 @@ class RoomViewStore extends Store { case 'reply_to_event': // If currently viewed room does not match the room in which we wish to reply then change rooms // this can happen when performing a search across all rooms - if (payload.event && payload.event.getRoomId() !== this.state.roomId) { - dis.dispatch({ - action: 'view_room', - room_id: payload.event.getRoomId(), - replyingToEvent: payload.event, - }); - } else { - this.setState({ - replyingToEvent: payload.event, - }); + if (payload.context === TimelineRenderingType.Room) { + if (payload.event + && payload.event.getRoomId() !== this.state.roomId) { + dis.dispatch({ + action: 'view_room', + room_id: payload.event.getRoomId(), + replyingToEvent: payload.event, + }); + } else { + this.setState({ + replyingToEvent: payload.event, + }); + } } break; case 'open_room_settings': { diff --git a/test/components/views/rooms/SendMessageComposer-test.tsx b/test/components/views/rooms/SendMessageComposer-test.tsx index e6bac2b96ef..ec4894719e5 100644 --- a/test/components/views/rooms/SendMessageComposer-test.tsx +++ b/test/components/views/rooms/SendMessageComposer-test.tsx @@ -216,6 +216,7 @@ describe('', () => { expect(spyDispatcher).toHaveBeenCalledWith({ action: "reply_to_event", event: mockEvent, + context: TimelineRenderingType.Room, }); // now try with localStorage wiped out @@ -277,6 +278,7 @@ describe('', () => { expect(spyDispatcher).toHaveBeenCalledWith({ action: "reply_to_event", event: null, + context: TimelineRenderingType.Room, }); expect(wrapper.text()).toBe(""); From 974f45930c4f8d3e6576ed5e3b46d3413e84a7de Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Tue, 19 Oct 2021 16:11:53 +0100 Subject: [PATCH 148/156] Simplify Space Panel notification badge layout (#6977) --- res/css/structures/_SpacePanel.scss | 70 +++++++------------ .../views/spaces/SpaceTreeLevel.tsx | 6 +- 2 files changed, 28 insertions(+), 48 deletions(-) diff --git a/res/css/structures/_SpacePanel.scss b/res/css/structures/_SpacePanel.scss index c9e88d43424..d0606961478 100644 --- a/res/css/structures/_SpacePanel.scss +++ b/res/css/structures/_SpacePanel.scss @@ -227,7 +227,7 @@ $activeBorderColor: $secondary-content; height: 20px; margin-top: auto; margin-bottom: auto; - display: none; + visibility: hidden; position: relative; &::before { @@ -246,67 +246,45 @@ $activeBorderColor: $secondary-content; } } + .mx_SpaceButton_avatarWrapper { + position: relative; + } + .mx_SpacePanel_badgeContainer { // Create a flexbox to make aligning dot badges easier display: flex; align-items: center; + position: absolute; + right: -3px; + top: -3px; .mx_NotificationBadge { margin: 0 2px; // centering + background-clip: padding-box; } .mx_NotificationBadge_dot { // make the smaller dot occupy the same width for centering - margin: 0 7px; + margin: 0 -1px 0 0; + border: 3px solid $groupFilterPanel-bg-color; } - } - - &.collapsed { - .mx_SpaceButton { - .mx_SpacePanel_badgeContainer { - position: absolute; - right: 0; - top: 0; - .mx_NotificationBadge { - background-clip: padding-box; - } - - .mx_NotificationBadge_dot { - margin: 0 -1px 0 0; - border: 3px solid $groupFilterPanel-bg-color; - } - - .mx_NotificationBadge_2char, - .mx_NotificationBadge_3char { - margin: -5px -5px 0 0; - border: 2px solid $groupFilterPanel-bg-color; - } - } - - &.mx_SpaceButton_active .mx_SpacePanel_badgeContainer { - // when we draw the selection border we move the relative bounds of our parent - // so update our position within the bounds of the parent to maintain position overall - right: -3px; - top: -3px; - } + .mx_NotificationBadge_2char, + .mx_NotificationBadge_3char { + margin: -5px -5px 0 0; + border: 2px solid $groupFilterPanel-bg-color; } } - &:not(.collapsed) { - .mx_SpaceButton:hover, - .mx_SpaceButton:focus-within, - .mx_SpaceButton_hasMenuOpen { - &:not(.mx_SpaceButton_invite) { - // Hide the badge container on hover because it'll be a menu button - .mx_SpacePanel_badgeContainer { - display: none; - } - - .mx_SpaceButton_menuButton { - display: block; - } - } + .mx_SpaceButton_narrow .mx_SpaceButton_menuButton { + display: none; + } + + .mx_SpaceButton:hover, + .mx_SpaceButton:focus-within, + .mx_SpaceButton_hasMenuOpen { + &:not(.mx_SpaceButton_invite) .mx_SpaceButton_menuButton { + visibility: visible; } } diff --git a/src/components/views/spaces/SpaceTreeLevel.tsx b/src/components/views/spaces/SpaceTreeLevel.tsx index df6c4c81498..ba2af3b8570 100644 --- a/src/components/views/spaces/SpaceTreeLevel.tsx +++ b/src/components/views/spaces/SpaceTreeLevel.tsx @@ -125,9 +125,11 @@ export const SpaceButton: React.FC = ({ > { children }
      - { avatar } +
      + { avatar } + { notifBadge } +
      { !isNarrow && { label } } - { notifBadge } { ContextMenuComponent && Date: Tue, 19 Oct 2021 16:17:09 +0100 Subject: [PATCH 149/156] For space invite previews, use room summary API to get the right member count (#6982) --- res/css/structures/_SpaceRoomView.scss | 5 ++-- src/components/structures/SpaceRoomView.tsx | 30 +++++++++++++++++---- 2 files changed, 28 insertions(+), 7 deletions(-) diff --git a/res/css/structures/_SpaceRoomView.scss b/res/css/structures/_SpaceRoomView.scss index e1168850470..e6394525c59 100644 --- a/res/css/structures/_SpaceRoomView.scss +++ b/res/css/structures/_SpaceRoomView.scss @@ -511,10 +511,11 @@ $SpaceRoomViewInnerWidth: 428px; mask-image: url("$(res)/img/element-icons/lock.svg"); } - .mx_AccessibleButton_kind_link { + .mx_SpaceRoomView_info_memberCount { color: inherit; position: relative; - padding-left: 16px; + padding: 0 0 0 16px; + font-size: $font-15px; &::before { content: "·"; // visual separator diff --git a/src/components/structures/SpaceRoomView.tsx b/src/components/structures/SpaceRoomView.tsx index dd12f76aac1..db8f542b170 100644 --- a/src/components/structures/SpaceRoomView.tsx +++ b/src/components/structures/SpaceRoomView.tsx @@ -127,8 +127,17 @@ const useMyRoomMembership = (room: Room) => { return membership; }; -const SpaceInfo = ({ space }) => { +const SpaceInfo = ({ space }: { space: Room }) => { + const summary = useAsyncMemo(() => { + if (space.getMyMembership() !== "invite") return; + try { + return space.client.getRoomSummary(space.roomId); + } catch (e) { + return null; + } + }, [space]); const joinRule = useRoomState(space, state => state.getJoinRule()); + const membership = useMyRoomMembership(space); let visibilitySection; if (joinRule === "public") { @@ -141,12 +150,18 @@ const SpaceInfo = ({ space }) => { ; } - return
      - { visibilitySection } - { joinRule === "public" && + let memberSection; + if (membership === "invite" && summary) { + // Don't trust local state and instead use the summary API + memberSection = + { _t("%(count)s members", { count: summary.num_joined_members }) } + ; + } else if (summary === null) { + memberSection = { (count) => count > 0 ? ( { defaultDispatcher.dispatch({ action: Action.SetRightPanelPhase, @@ -158,7 +173,12 @@ const SpaceInfo = ({ space }) => { { _t("%(count)s members", { count }) } ) : null } - } + ; + } + + return
      + { visibilitySection } + { memberSection }
      ; }; From 9c786717b8fd6a300e54b77af6b5877f9b54c664 Mon Sep 17 00:00:00 2001 From: Paulo Pinto Date: Tue, 19 Oct 2021 16:22:27 +0100 Subject: [PATCH 150/156] Validate email address in forgot password dialog (#6983) --- .../structures/auth/ForgotPassword.tsx | 37 ++++++++++++++++++- src/i18n/strings/en_EN.json | 1 + 2 files changed, 36 insertions(+), 2 deletions(-) diff --git a/src/components/structures/auth/ForgotPassword.tsx b/src/components/structures/auth/ForgotPassword.tsx index 2cb2a2a1a9c..4c65fac9834 100644 --- a/src/components/structures/auth/ForgotPassword.tsx +++ b/src/components/structures/auth/ForgotPassword.tsx @@ -29,8 +29,8 @@ import ServerPicker from "../../views/elements/ServerPicker"; import PassphraseField from '../../views/auth/PassphraseField'; import { replaceableComponent } from "../../../utils/replaceableComponent"; import { PASSWORD_MIN_SCORE } from '../../views/auth/RegistrationForm'; - -import { IValidationResult } from "../../views/elements/Validation"; +import withValidation, { IValidationResult } from "../../views/elements/Validation"; +import * as Email from "../../../email"; import InlineSpinner from '../../views/elements/InlineSpinner'; import { logger } from "matrix-js-sdk/src/logger"; @@ -68,6 +68,7 @@ interface IState { serverErrorIsFatal: boolean; serverDeadError: string; + emailFieldValid: boolean; passwordFieldValid: boolean; currentHttpRequest?: Promise; } @@ -90,6 +91,7 @@ export default class ForgotPassword extends React.Component { serverIsAlive: true, serverErrorIsFatal: false, serverDeadError: "", + emailFieldValid: false, passwordFieldValid: false, }; @@ -169,10 +171,13 @@ export default class ForgotPassword extends React.Component { // refresh the server errors, just in case the server came back online await this.handleHttpRequest(this.checkServerLiveliness(this.props.serverConfig)); + await this['email_field'].validate({ allowEmpty: false }); await this['password_field'].validate({ allowEmpty: false }); if (!this.state.email) { this.showErrorDialog(_t('The email address linked to your account must be entered.')); + } else if (!this.state.emailFieldValid) { + this.showErrorDialog(_t("The email address doesn't appear to be valid.")); } else if (!this.state.password || !this.state.password2) { this.showErrorDialog(_t('A new password must be entered.')); } else if (!this.state.passwordFieldValid) { @@ -222,6 +227,32 @@ export default class ForgotPassword extends React.Component { }); } + private validateEmailRules = withValidation({ + rules: [ + { + key: "required", + test({ value, allowEmpty }) { + return allowEmpty || !!value; + }, + invalid: () => _t("Enter email address"), + }, { + key: "email", + test: ({ value }) => !value || Email.looksValid(value), + invalid: () => _t("Doesn't look like a valid email address"), + }, + ], + }); + + private onEmailValidate = async (fieldState) => { + const result = await this.validateEmailRules(fieldState); + + this.setState({ + emailFieldValid: result.valid, + }); + + return result; + }; + private onPasswordValidate(result: IValidationResult) { this.setState({ passwordFieldValid: result.valid, @@ -277,7 +308,9 @@ export default class ForgotPassword extends React.Component { label={_t('Email')} value={this.state.email} onChange={this.onInputChanged.bind(this, "email")} + ref={field => this['email_field'] = field} autoFocus + onValidate={this.onEmailValidate} onFocus={() => CountlyAnalytics.instance.track("onboarding_forgot_password_email_focus")} onBlur={() => CountlyAnalytics.instance.track("onboarding_forgot_password_email_blur")} /> diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index 9fab4afd427..594e6c94887 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -3015,6 +3015,7 @@ "Skip verification for now": "Skip verification for now", "Failed to send email": "Failed to send email", "The email address linked to your account must be entered.": "The email address linked to your account must be entered.", + "The email address doesn't appear to be valid.": "The email address doesn't appear to be valid.", "A new password must be entered.": "A new password must be entered.", "Please choose a strong password": "Please choose a strong password", "New passwords must match each other.": "New passwords must match each other.", From a9c27e22b5a3a1050988be21bdc5ef45774628c7 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Tue, 19 Oct 2021 16:31:07 +0100 Subject: [PATCH 151/156] Handle and i18n M_THREEPID_IN_USE during registration (#6986) --- src/components/structures/auth/Registration.tsx | 13 ++++++++----- src/i18n/strings/en_EN.json | 1 + 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/components/structures/auth/Registration.tsx b/src/components/structures/auth/Registration.tsx index 3c66a1ab86d..ab1956dd6a2 100644 --- a/src/components/structures/auth/Registration.tsx +++ b/src/components/structures/auth/Registration.tsx @@ -272,7 +272,7 @@ export default class Registration extends React.Component { private onUIAuthFinished = async (success: boolean, response: any) => { if (!success) { - let msg = response.message || response.toString(); + let errorText = response.message || response.toString(); // can we give a better error message? if (response.errcode === 'M_RESOURCE_LIMIT_EXCEEDED') { const errorTop = messageForResourceLimitError( @@ -291,7 +291,7 @@ export default class Registration extends React.Component { '': _td("Please contact your service administrator to continue using this service."), }, ); - msg =
      + errorText =

      { errorTop }

      { errorDetail }

      ; @@ -301,15 +301,18 @@ export default class Registration extends React.Component { msisdnAvailable = msisdnAvailable || flow.stages.includes('m.login.msisdn'); } if (!msisdnAvailable) { - msg = _t('This server does not support authentication with a phone number.'); + errorText = _t('This server does not support authentication with a phone number.'); } } else if (response.errcode === "M_USER_IN_USE") { - msg = _t("That username already exists, please try another."); + errorText = _t("That username already exists, please try another."); + } else if (response.errcode === "M_THREEPID_IN_USE") { + errorText = _t("That e-mail address is already in use."); } + this.setState({ busy: false, doingUIAuth: false, - errorText: msg, + errorText, }); return; } diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index 594e6c94887..cfe87263254 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -3056,6 +3056,7 @@ "Registration has been disabled on this homeserver.": "Registration has been disabled on this homeserver.", "This server does not support authentication with a phone number.": "This server does not support authentication with a phone number.", "That username already exists, please try another.": "That username already exists, please try another.", + "That e-mail address is already in use.": "That e-mail address is already in use.", "Continue with %(ssoButtons)s": "Continue with %(ssoButtons)s", "%(ssoButtons)s Or %(usernamePassword)s": "%(ssoButtons)s Or %(usernamePassword)s", "Already have an account? Sign in here": "Already have an account? Sign in here", From 427afc83aa85a8bf8c985c867c7d6ad12df3d071 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Tue, 19 Oct 2021 17:10:34 +0100 Subject: [PATCH 152/156] Fix couple of Spaces regressions (#6989) --- res/css/structures/_SpacePanel.scss | 7 ------- src/components/structures/SpaceRoomView.tsx | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/res/css/structures/_SpacePanel.scss b/res/css/structures/_SpacePanel.scss index d0606961478..316bc460b5f 100644 --- a/res/css/structures/_SpacePanel.scss +++ b/res/css/structures/_SpacePanel.scss @@ -146,13 +146,6 @@ $activeBorderColor: $secondary-content; padding: 4px; } - &:not(.mx_SpaceButton_narrow) { - .mx_SpaceButton_selectionWrapper { - width: 100%; - overflow: hidden; - } - } - .mx_SpaceButton_name { flex: 1; margin-left: 8px; diff --git a/src/components/structures/SpaceRoomView.tsx b/src/components/structures/SpaceRoomView.tsx index db8f542b170..4a43f0380df 100644 --- a/src/components/structures/SpaceRoomView.tsx +++ b/src/components/structures/SpaceRoomView.tsx @@ -128,7 +128,7 @@ const useMyRoomMembership = (room: Room) => { }; const SpaceInfo = ({ space }: { space: Room }) => { - const summary = useAsyncMemo(() => { + const summary = useAsyncMemo(async () => { if (space.getMyMembership() !== "invite") return; try { return space.client.getRoomSummary(space.roomId); From 0d29626163be4f78e20ae84713c84fee8143db68 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Tue, 19 Oct 2021 11:22:04 -0600 Subject: [PATCH 153/156] Update allchange (#6990) --- package.json | 2 +- yarn.lock | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index c3cd054db8b..d305b6f8890 100644 --- a/package.json +++ b/package.json @@ -154,7 +154,7 @@ "@typescript-eslint/eslint-plugin": "^4.17.0", "@typescript-eslint/parser": "^4.17.0", "@wojtekmaj/enzyme-adapter-react-17": "^0.6.1", - "allchange": "^1.0.3", + "allchange": "^1.0.4", "babel-jest": "^26.6.3", "chokidar": "^3.5.1", "concurrently": "^5.3.0", diff --git a/yarn.lock b/yarn.lock index 5c739e58c49..7603c3448e4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1308,6 +1308,7 @@ "@matrix-org/olm@https://gitlab.matrix.org/api/v4/projects/27/packages/npm/@matrix-org/olm/-/@matrix-org/olm-3.2.3.tgz": version "3.2.3" + uid cc332fdd25c08ef0e40f4d33fc3f822a0f98b6f4 resolved "https://gitlab.matrix.org/api/v4/projects/27/packages/npm/@matrix-org/olm/-/@matrix-org/olm-3.2.3.tgz#cc332fdd25c08ef0e40f4d33fc3f822a0f98b6f4" "@nicolo-ribaudo/chokidar-2@2.1.8-no-fsevents.3": @@ -2052,10 +2053,10 @@ ajv@^8.0.1: require-from-string "^2.0.2" uri-js "^4.2.2" -allchange@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/allchange/-/allchange-1.0.3.tgz#f8814ddfbcfe39a01bf4570778ee7e6d9ff0ebb3" - integrity sha512-UZkfz5SkNEMFQFLr8vZcXHaph2EbJxmkVNF5Nt6D9RIa5pmAar7oAMfNdda714jg7IQijvaFty5PYazXLgd5WA== +allchange@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/allchange/-/allchange-1.0.4.tgz#c540d9344e7e5bf4187be823ad5d858bed365d82" + integrity sha512-9V2PPRj2UtkqFIx1DFPS5ubadTpu59fMrIteA3JUVpv6UrVCFeFRELWrOwUBHlQmsG4ud82ru34k8yJ3VKeqHg== dependencies: "@actions/core" "^1.4.0" "@actions/github" "^5.0.0" From 01c4d3eede9853da080afe9601dfd82fca715f52 Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 19 Oct 2021 18:43:29 +0100 Subject: [PATCH 154/156] Fix conflicting CSS on syntax highlighted blocks (#6991) Fixes https://github.com/vector-im/element-web/issues/19445 --- res/css/views/rooms/_EventTile.scss | 4 ---- src/components/views/messages/TextualBody.tsx | 7 +++++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/res/css/views/rooms/_EventTile.scss b/res/css/views/rooms/_EventTile.scss index 540b7d89afe..ea53cc4f130 100644 --- a/res/css/views/rooms/_EventTile.scss +++ b/res/css/views/rooms/_EventTile.scss @@ -589,10 +589,6 @@ $hover-select-border: 4px; padding: 0 10px; } -.mx_EventTile_content .markdown-body .hljs { - display: inline !important; -} - /* // actually, removing the Italic TTF provides // better results seemingly diff --git a/src/components/views/messages/TextualBody.tsx b/src/components/views/messages/TextualBody.tsx index 941c269991c..b8e068ed75c 100644 --- a/src/components/views/messages/TextualBody.tsx +++ b/src/components/views/messages/TextualBody.tsx @@ -232,7 +232,6 @@ export default class TextualBody extends React.Component { ); return; } - console.log('highlighting'); let advertisedLang; for (const cl of code.className.split(/\s+/)) { @@ -258,7 +257,11 @@ export default class TextualBody extends React.Component { // User has language detection enabled and the code is within a pre // we only auto-highlight if the code block is in a pre), so highlight // the block with auto-highlighting enabled. - highlight.highlightElement(code); + // We pass highlightjs the text to highlight rather than letting it + // work on the DOM with highlightElement because that also adds CSS + // classes to the pre/code element that we don't want (the CSS + // conflicts with our own). + code.innerHTML = highlight.highlightAuto(code.textContent).value; } } From 23295718e3aabfe2c8d14c9b7918e140f98bf5b3 Mon Sep 17 00:00:00 2001 From: CicadaCinema <52425971+CicadaCinema@users.noreply.github.com> Date: Tue, 19 Oct 2021 22:28:11 +0100 Subject: [PATCH 155/156] Position toggle switch more clearly (#6914) * Position toggle switch more clearly * attempt to revert changes, align switch to title instead * remove unused import, add missing property Co-authored-by: ColonisationCaptain <52425971+ColonisationCaptain@users.noreply.github.com> --- res/css/views/settings/_SetIntegrationManager.scss | 3 +-- .../views/settings/SetIntegrationManager.tsx | 10 ++++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/res/css/views/settings/_SetIntegrationManager.scss b/res/css/views/settings/_SetIntegrationManager.scss index 3e59ac73ac9..521b1ee8ab7 100644 --- a/res/css/views/settings/_SetIntegrationManager.scss +++ b/res/css/views/settings/_SetIntegrationManager.scss @@ -26,12 +26,11 @@ limitations under the License. .mx_SetIntegrationManager > .mx_SettingsTab_heading > .mx_SettingsTab_subheading { display: inline-block; padding-left: 5px; + margin-top: 0px; } .mx_SetIntegrationManager .mx_ToggleSwitch { display: inline-block; float: right; top: 9px; - - @mixin mx_Settings_fullWidthField; } diff --git a/src/components/views/settings/SetIntegrationManager.tsx b/src/components/views/settings/SetIntegrationManager.tsx index 7ecc6d11345..dc33a9e20e4 100644 --- a/src/components/views/settings/SetIntegrationManager.tsx +++ b/src/components/views/settings/SetIntegrationManager.tsx @@ -18,10 +18,10 @@ import React from 'react'; import { _t } from "../../../languageHandler"; import { IntegrationManagers } from "../../../integrations/IntegrationManagers"; import { IntegrationManagerInstance } from "../../../integrations/IntegrationManagerInstance"; -import * as sdk from '../../../index'; import SettingsStore from "../../../settings/SettingsStore"; import { SettingLevel } from "../../../settings/SettingLevel"; import { replaceableComponent } from "../../../utils/replaceableComponent"; +import ToggleSwitch from "../elements/ToggleSwitch"; import { logger } from "matrix-js-sdk/src/logger"; @@ -59,8 +59,6 @@ export default class SetIntegrationManager extends React.Component { _t("Manage integrations") } { managerName } - +
      { bodyText } From 1fa4c40db9e0558d77fe6ff5139ad50473d62259 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Gon=C3=A7alves?= <8217676+RafaelGoncalves8@users.noreply.github.com> Date: Wed, 20 Oct 2021 01:36:08 -0300 Subject: [PATCH 156/156] Remove redundant text in verification dialogs (#6993) * Remove redundant text Signed-off-by: Rafael Goncalves * Run yarn i18n Signed-off-by: Rafael Goncalves --- src/components/views/right_panel/VerificationPanel.tsx | 2 -- src/i18n/strings/en_EN.json | 2 -- 2 files changed, 4 deletions(-) diff --git a/src/components/views/right_panel/VerificationPanel.tsx b/src/components/views/right_panel/VerificationPanel.tsx index eb59fbb15de..881dac33d40 100644 --- a/src/components/views/right_panel/VerificationPanel.tsx +++ b/src/components/views/right_panel/VerificationPanel.tsx @@ -252,7 +252,6 @@ export default class VerificationPanel extends React.PureComponent -

      { _t("Verified") }

      { description }

      { text ?

      { text }

      : null } @@ -325,7 +324,6 @@ export default class VerificationPanel extends React.PureComponent : ; return
      -

      { _t("Compare emoji") }

      { emojis }
      ; } diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index cfe87263254..51fd51316a5 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -1931,7 +1931,6 @@ "You've successfully verified your device!": "You've successfully verified your device!", "You've successfully verified %(deviceName)s (%(deviceId)s)!": "You've successfully verified %(deviceName)s (%(deviceId)s)!", "You've successfully verified %(displayName)s!": "You've successfully verified %(displayName)s!", - "Verified": "Verified", "Got it": "Got it", "Start verification again from the notification.": "Start verification again from the notification.", "Start verification again from their profile.": "Start verification again from their profile.", @@ -1940,7 +1939,6 @@ "%(displayName)s cancelled verification.": "%(displayName)s cancelled verification.", "You cancelled verification.": "You cancelled verification.", "Verification cancelled": "Verification cancelled", - "Compare emoji": "Compare emoji", "Call declined": "Call declined", "Call back": "Call back", "No answer": "No answer",