From bdc451d66beb6944dc4fbbfa19aef14fef457858 Mon Sep 17 00:00:00 2001 From: Justin Sleep Date: Wed, 3 Jun 2020 16:36:48 -0500 Subject: [PATCH 01/64] Remove escape backslashes in non-Markdown messages --- src/Markdown.js | 8 -------- src/editor/serialize.ts | 4 ++++ test/editor/serialize-test.js | 12 ++++++++++++ 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/src/Markdown.js b/src/Markdown.js index fb1f8bf0ea..d312b7c5bd 100644 --- a/src/Markdown.js +++ b/src/Markdown.js @@ -175,14 +175,6 @@ export default class Markdown { const renderer = new commonmark.HtmlRenderer({safe: false}); const real_paragraph = renderer.paragraph; - // The default `out` function only sends the input through an XML - // escaping function, which causes messages to be entity encoded, - // which we don't want in this case. - renderer.out = function(s) { - // The `lit` function adds a string literal to the output buffer. - this.lit(s); - }; - renderer.paragraph = function(node, entering) { // as with toHTML, only append lines to paragraphs if there are // multiple paragraphs diff --git a/src/editor/serialize.ts b/src/editor/serialize.ts index 4d0b8cd03a..85d2bb8e8f 100644 --- a/src/editor/serialize.ts +++ b/src/editor/serialize.ts @@ -42,6 +42,10 @@ export function htmlSerializeIfNeeded(model: EditorModel, {forceHTML = false} = if (!parser.isPlainText() || forceHTML) { return parser.toHTML(); } + // ensure removal of escape backslashes in non-Markdown messages + if (md.indexOf("\\") > -1) { + return parser.toPlaintext(); + } } export function textSerialize(model: EditorModel) { diff --git a/test/editor/serialize-test.js b/test/editor/serialize-test.js index bd26ae91bb..f0d577ea21 100644 --- a/test/editor/serialize-test.js +++ b/test/editor/serialize-test.js @@ -61,4 +61,16 @@ describe('editor/serialize', function() { const html = htmlSerializeIfNeeded(model, {}); expect(html).toBe("Displayname]"); }); + it('escaped markdown should not retain backslashes', function() { + const pc = createPartCreator(); + const model = new EditorModel([pc.plain('\\*hello\\* world')]); + const html = htmlSerializeIfNeeded(model, {}); + expect(html).toBe('*hello* world'); + }); + it('escaped markdown should convert HTML entities', function() { + const pc = createPartCreator(); + const model = new EditorModel([pc.plain('\\*hello\\* world < hey world!')]); + const html = htmlSerializeIfNeeded(model, {}); + expect(html).toBe('*hello* world < hey world!'); + }); }); From 01a71dab8c3d0a1177f687ac6fb8fe05b668263a Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Fri, 12 Jun 2020 22:36:50 +0100 Subject: [PATCH 02/64] Fix m.id.phone spec compliance --- src/Login.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Login.js b/src/Login.js index 1590e5ac28..04805b4af9 100644 --- a/src/Login.js +++ b/src/Login.js @@ -95,6 +95,8 @@ export default class Login { identifier = { type: 'm.id.phone', country: phoneCountry, + phone: phoneNumber, + // XXX: Synapse historically wanted `number` and not `phone` number: phoneNumber, }; } else if (isEmail) { From 1bbf2e053bbc3dc4a9b1f885566b89024a82e109 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Sat, 13 Jun 2020 11:54:40 -0600 Subject: [PATCH 03/64] Initial attempt at sticky headers Docs enclosed in diff. --- res/css/structures/_LeftPanel2.scss | 1 + res/css/views/rooms/_RoomSublist2.scss | 67 ++++++++++++++++++++---- src/components/structures/LeftPanel2.tsx | 66 ++++++++++++++++++++++- src/utils/css.ts | 30 +++++++++++ 4 files changed, 154 insertions(+), 10 deletions(-) create mode 100644 src/utils/css.ts diff --git a/res/css/structures/_LeftPanel2.scss b/res/css/structures/_LeftPanel2.scss index eca50bb639..5cdefa0324 100644 --- a/res/css/structures/_LeftPanel2.scss +++ b/res/css/structures/_LeftPanel2.scss @@ -131,6 +131,7 @@ $tagPanelWidth: 70px; // only applies in this file, used for calculations overflow-y: auto; width: 100%; max-width: 100%; + position: relative; // for sticky headers // Create a flexbox to trick the layout engine display: flex; diff --git a/res/css/views/rooms/_RoomSublist2.scss b/res/css/views/rooms/_RoomSublist2.scss index 3f5f654494..48e6ec7022 100644 --- a/res/css/views/rooms/_RoomSublist2.scss +++ b/res/css/views/rooms/_RoomSublist2.scss @@ -30,9 +30,51 @@ limitations under the License. // Create a flexbox to make ordering easy display: flex; align-items: center; + + // *************************** + // Sticky Headers Start + + // Ideally we'd be able to use `position: sticky; top: 0; bottom: 0;` on the + // headerContainer, however due to our layout concerns we actually have to + // calculate it manually so we can sticky things in the right places. We also + // target the headerText instead of the container to reduce jumps when scrolling, + // and to help hide the badges/other buttons that could appear on hover. This + // all works by ensuring the header text has a fixed height when sticky so the + // fixed height of the container can maintain the scroll position. + + // The combined height must be set in the LeftPanel2 component for sticky headers + // to work correctly. padding-bottom: 8px; height: 24px; + .mx_RoomSublist2_headerText { + z-index: 2; // Prioritize headers in the visible list over sticky ones + + // We use a generic sticky class for 2 reasons: to reduce style duplication and + // to identify when a header is sticky. If we didn't have a consistent sticky class, + // we'd have to do the "is sticky" checks again on click, as clicking the header + // when sticky scrolls instead of collapses the list. + &.mx_RoomSublist2_headerContainer_sticky { + position: fixed; + z-index: 1; // over top of other elements, but still under the ones in the visible list + height: 32px; // to match the header container + // width set by JS + } + + &.mx_RoomSublist2_headerContainer_stickyBottom { + bottom: 0; + } + + // We don't have this style because the top is dependent on the room list header's + // height, and is therefore calculated in JS. + //&.mx_RoomSublist2_headerContainer_stickyTop { + // top: 0; + //} + } + + // Sticky Headers End + // *************************** + .mx_RoomSublist2_badgeContainer { opacity: 0.8; width: 16px; @@ -76,18 +118,25 @@ limitations under the License. } .mx_RoomSublist2_headerText { - text-transform: uppercase; - opacity: 0.5; - line-height: $font-16px; - font-size: $font-12px; - flex: 1; max-width: calc(100% - 16px); // 16px is the badge width - // Ellipsize any text overflow - text-overflow: ellipsis; - overflow: hidden; - white-space: nowrap; + // Set the same background color as the room list for sticky headers + background-color: $roomlist2-bg-color; + + // Target the span inside the container so we don't opacify the + // whole header, which can make the sticky header experience annoying. + > span { + text-transform: uppercase; + opacity: 0.5; + line-height: $font-16px; + font-size: $font-12px; + + // Ellipsize any text overflow + text-overflow: ellipsis; + overflow: hidden; + white-space: nowrap; + } } } diff --git a/src/components/structures/LeftPanel2.tsx b/src/components/structures/LeftPanel2.tsx index a644aa4837..6dbe4bcd4f 100644 --- a/src/components/structures/LeftPanel2.tsx +++ b/src/components/structures/LeftPanel2.tsx @@ -86,6 +86,70 @@ export default class LeftPanel2 extends React.Component { } }; + // TODO: Apply this on resize, init, etc for reliability + private onScroll = (ev: React.MouseEvent) => { + const list = ev.target as HTMLDivElement; + const rlRect = list.getBoundingClientRect(); + const bottom = rlRect.bottom; + const top = rlRect.top; + const sublists = list.querySelectorAll(".mx_RoomSublist2"); + const headerHeight = 32; // Note: must match the CSS! + const headerRightMargin = 24; // calculated from margins and widths to align with non-sticky tiles + + const headerStickyWidth = rlRect.width - headerRightMargin; + + let gotBottom = false; + for (const sublist of sublists) { + const slRect = sublist.getBoundingClientRect(); + + const header = sublist.querySelector(".mx_RoomSublist2_headerText"); + + if (slRect.top + headerHeight > bottom && !gotBottom) { + console.log(`${header.textContent} is off the bottom`); + header.classList.add("mx_RoomSublist2_headerContainer_sticky"); + header.classList.add("mx_RoomSublist2_headerContainer_stickyBottom"); + header.style.width = `${headerStickyWidth}px`; + gotBottom = true; + } else if (slRect.top < top) { + console.log(`${header.textContent} is off the top`); + header.classList.add("mx_RoomSublist2_headerContainer_sticky"); + header.classList.add("mx_RoomSublist2_headerContainer_stickyTop"); + header.style.width = `${headerStickyWidth}px`; + header.style.top = `${rlRect.top}px`; + } else { + header.classList.remove("mx_RoomSublist2_headerContainer_sticky"); + header.classList.remove("mx_RoomSublist2_headerContainer_stickyTop"); + header.classList.remove("mx_RoomSublist2_headerContainer_stickyBottom"); + header.style.width = `unset`; + } + + // const name = header.textContent; + // if (hRect.bottom + headerHeight < top) { + // // Before the content (top of list) + // header.classList.add( + // "mx_RoomSublist2_headerContainer_sticky", + // "mx_RoomSublist2_headerContainer_stickyTop", + // ); + // } else { + // header.classList.remove( + // "mx_RoomSublist2_headerContainer_sticky", + // "mx_RoomSublist2_headerContainer_stickyTop", + // "mx_RoomSublist2_headerContainer_stickyBottom", + // ); + // } + + // if (!hitMiddle && (headerHeight + hRect.top) >= bottom) { + // // if we got here, the header is visible + // hitMiddle = true; + // header.style.backgroundColor = 'red'; + // } else { + // header.style.top = "0px"; + // header.style.bottom = "unset"; + // header.style.backgroundColor = "unset"; + // } + } + }; + private renderHeader(): React.ReactNode { // TODO: Update when profile info changes // TODO: Presence @@ -191,7 +255,7 @@ export default class LeftPanel2 extends React.Component { diff --git a/src/utils/css.ts b/src/utils/css.ts new file mode 100644 index 0000000000..cd629a0e8a --- /dev/null +++ b/src/utils/css.ts @@ -0,0 +1,30 @@ +/* +Copyright 2020 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. +*/ + +export function addClass(classes: string, clazz: string): string { + if (!classes.includes(clazz)) return `${classes} ${clazz}`; + return classes; +} + +export function removeClass(classes: string, clazz: string): string { + const idx = classes.indexOf(clazz); + if (idx >= 0) { + const beforeStr = classes.substring(0, idx); + const afterStr = classes.substring(idx + clazz.length); + return `${beforeStr} ${afterStr}`.trim(); + } + return classes; +} From 7af2de29d669b4dd46187a999a78ce9fc7c2ff69 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Sat, 13 Jun 2020 12:03:50 -0600 Subject: [PATCH 04/64] Remove unused utility --- src/utils/css.ts | 30 ------------------------------ 1 file changed, 30 deletions(-) delete mode 100644 src/utils/css.ts diff --git a/src/utils/css.ts b/src/utils/css.ts deleted file mode 100644 index cd629a0e8a..0000000000 --- a/src/utils/css.ts +++ /dev/null @@ -1,30 +0,0 @@ -/* -Copyright 2020 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. -*/ - -export function addClass(classes: string, clazz: string): string { - if (!classes.includes(clazz)) return `${classes} ${clazz}`; - return classes; -} - -export function removeClass(classes: string, clazz: string): string { - const idx = classes.indexOf(clazz); - if (idx >= 0) { - const beforeStr = classes.substring(0, idx); - const afterStr = classes.substring(idx + clazz.length); - return `${beforeStr} ${afterStr}`.trim(); - } - return classes; -} From 63ad7640bf8474259beba3576b78df4c2984e3dd Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Sun, 14 Jun 2020 01:33:25 +0100 Subject: [PATCH 05/64] User Info default power levels for ban/kick/redact to 50 as per spec --- src/components/views/right_panel/UserInfo.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/components/views/right_panel/UserInfo.js b/src/components/views/right_panel/UserInfo.js index 34136b2177..1fd5221cdb 100644 --- a/src/components/views/right_panel/UserInfo.js +++ b/src/components/views/right_panel/UserInfo.js @@ -748,19 +748,26 @@ const RoomAdminToolsContainer = ({room, children, member, startUpdating, stopUpd powerLevels.state_default ); + // if these do not exist in the event then they should default to 50 as per the spec + const { + ban: banPowerLevel = 50, + kick: kickPowerLevel = 50, + redact: redactPowerLevel = 50, + } = powerLevels; + const me = room.getMember(cli.getUserId()); const isMe = me.userId === member.userId; const canAffectUser = member.powerLevel < me.powerLevel || isMe; - if (canAffectUser && me.powerLevel >= powerLevels.kick) { + if (canAffectUser && me.powerLevel >= kickPowerLevel) { kickButton = ; } - if (me.powerLevel >= powerLevels.redact) { + if (me.powerLevel >= redactPowerLevel) { redactButton = ( ); } - if (canAffectUser && me.powerLevel >= powerLevels.ban) { + if (canAffectUser && me.powerLevel >= banPowerLevel) { banButton = ; } if (canAffectUser && me.powerLevel >= editPowerLevel) { From c26c79bda8718cc1805a521c4fb4e7ba6f79154c Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Sat, 13 Jun 2020 19:02:21 -0600 Subject: [PATCH 06/64] Remove dead code --- src/components/structures/LeftPanel2.tsx | 25 ------------------------ 1 file changed, 25 deletions(-) diff --git a/src/components/structures/LeftPanel2.tsx b/src/components/structures/LeftPanel2.tsx index 6dbe4bcd4f..f6482b06ae 100644 --- a/src/components/structures/LeftPanel2.tsx +++ b/src/components/structures/LeftPanel2.tsx @@ -122,31 +122,6 @@ export default class LeftPanel2 extends React.Component { header.classList.remove("mx_RoomSublist2_headerContainer_stickyBottom"); header.style.width = `unset`; } - - // const name = header.textContent; - // if (hRect.bottom + headerHeight < top) { - // // Before the content (top of list) - // header.classList.add( - // "mx_RoomSublist2_headerContainer_sticky", - // "mx_RoomSublist2_headerContainer_stickyTop", - // ); - // } else { - // header.classList.remove( - // "mx_RoomSublist2_headerContainer_sticky", - // "mx_RoomSublist2_headerContainer_stickyTop", - // "mx_RoomSublist2_headerContainer_stickyBottom", - // ); - // } - - // if (!hitMiddle && (headerHeight + hRect.top) >= bottom) { - // // if we got here, the header is visible - // hitMiddle = true; - // header.style.backgroundColor = 'red'; - // } else { - // header.style.top = "0px"; - // header.style.bottom = "unset"; - // header.style.backgroundColor = "unset"; - // } } }; From eeac80096cc900d2fc0a9a60a406fa5500d111aa Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Sat, 13 Jun 2020 19:07:19 -0600 Subject: [PATCH 07/64] Float the badges with the sticky headers --- res/css/views/rooms/_RoomSublist2.scss | 37 +++++++++++---------- src/components/structures/LeftPanel2.tsx | 2 +- src/components/views/rooms/RoomSublist2.tsx | 28 ++++++++-------- 3 files changed, 35 insertions(+), 32 deletions(-) diff --git a/res/css/views/rooms/_RoomSublist2.scss b/res/css/views/rooms/_RoomSublist2.scss index 48e6ec7022..746f373e64 100644 --- a/res/css/views/rooms/_RoomSublist2.scss +++ b/res/css/views/rooms/_RoomSublist2.scss @@ -27,7 +27,7 @@ limitations under the License. width: 100%; .mx_RoomSublist2_headerContainer { - // Create a flexbox to make ordering easy + // Create a flexbox to make alignment easy display: flex; align-items: center; @@ -47,9 +47,18 @@ limitations under the License. padding-bottom: 8px; height: 24px; - .mx_RoomSublist2_headerText { + .mx_RoomSublist2_stickable { + flex: 1; + max-width: 100%; z-index: 2; // Prioritize headers in the visible list over sticky ones + // Set the same background color as the room list for sticky headers + background-color: $roomlist2-bg-color; + + // Create a flexbox to make ordering easy + display: flex; + align-items: center; + // We use a generic sticky class for 2 reasons: to reduce style duplication and // to identify when a header is sticky. If we didn't have a consistent sticky class, // we'd have to do the "is sticky" checks again on click, as clicking the header @@ -120,23 +129,15 @@ limitations under the License. .mx_RoomSublist2_headerText { flex: 1; max-width: calc(100% - 16px); // 16px is the badge width + text-transform: uppercase; + opacity: 0.5; + line-height: $font-16px; + font-size: $font-12px; - // Set the same background color as the room list for sticky headers - background-color: $roomlist2-bg-color; - - // Target the span inside the container so we don't opacify the - // whole header, which can make the sticky header experience annoying. - > span { - text-transform: uppercase; - opacity: 0.5; - line-height: $font-16px; - font-size: $font-12px; - - // Ellipsize any text overflow - text-overflow: ellipsis; - overflow: hidden; - white-space: nowrap; - } + // Ellipsize any text overflow + text-overflow: ellipsis; + overflow: hidden; + white-space: nowrap; } } diff --git a/src/components/structures/LeftPanel2.tsx b/src/components/structures/LeftPanel2.tsx index f6482b06ae..650828e9b0 100644 --- a/src/components/structures/LeftPanel2.tsx +++ b/src/components/structures/LeftPanel2.tsx @@ -102,7 +102,7 @@ export default class LeftPanel2 extends React.Component { for (const sublist of sublists) { const slRect = sublist.getBoundingClientRect(); - const header = sublist.querySelector(".mx_RoomSublist2_headerText"); + const header = sublist.querySelector(".mx_RoomSublist2_stickable"); if (slRect.top + headerHeight > bottom && !gotBottom) { console.log(`${header.textContent} is off the bottom`); diff --git a/src/components/views/rooms/RoomSublist2.tsx b/src/components/views/rooms/RoomSublist2.tsx index 9f8b8579c3..5c23004a4f 100644 --- a/src/components/views/rooms/RoomSublist2.tsx +++ b/src/components/views/rooms/RoomSublist2.tsx @@ -257,19 +257,21 @@ export default class RoomSublist2 extends React.Component { // TODO: a11y (see old component) return (
- - {this.props.label} - - {this.renderMenu()} - {addRoomButton} -
- {badge} +
+ + {this.props.label} + + {this.renderMenu()} + {addRoomButton} +
+ {badge} +
); From 8d0b9f46d3d7bbc22b5cf1ce8fd6aa3329538c3c Mon Sep 17 00:00:00 2001 From: Michael Albert Date: Mon, 15 Jun 2020 10:59:54 +0000 Subject: [PATCH 08/64] Translated using Weblate (German) Currently translated at 99.7% (2278 of 2285 strings) Translation: Riot Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/riot-web/matrix-react-sdk/de/ --- src/i18n/strings/de_DE.json | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/de_DE.json b/src/i18n/strings/de_DE.json index c559447757..452a0ee969 100644 --- a/src/i18n/strings/de_DE.json +++ b/src/i18n/strings/de_DE.json @@ -2449,5 +2449,18 @@ "Show %(count)s more|other": "Zeige %(count)s weitere", "Show %(count)s more|one": "Zeige %(count)s weitere", "Leave Room": "Verlasse Raum", - "Room options": "Raumoptionen" + "Room options": "Raumoptionen", + "Activity": "Aktivität", + "A-Z": "A-Z", + "Recovery Key": "Wiederherstellungsschlüssel", + "This isn't the recovery key for your account": "Das ist nicht der Wiederherstellungsschlüssel für dein Konto", + "This isn't a valid recovery key": "Das ist kein gültiger Wiederherstellungsschlüssel", + "Looks good!": "Sieht gut aus!", + "Use Recovery Key or Passphrase": "Verwende einen Wiederherstellungsschlüssel oder deine Passphrase", + "Use Recovery Key": "Verwende einen Wiederherstellungsschlüssel", + "Enter your Recovery Key or enter a Recovery Passphrase to continue.": "Gib deinen Wiederherstellungsschlüssel oder eine Wiederherstellungspassphrase ein um fortzufahren.", + "Enter your Recovery Key to continue.": "Gib deinen Wiederherstellungsschlüssel ein um fortzufahren.", + "Create a Recovery Key": "Erzeuge einen Wiederherstellungsschlüssel", + "Upgrade your Recovery Key": "Aktualisiere deinen Wiederherstellungsschlüssel", + "Store your Recovery Key": "Speichere deinen Wiederherstellungsschlüssel" } From fcd3ebe051877fbd4ed79fa6cbe9706fc7252091 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Tue, 16 Jun 2020 00:41:21 +0100 Subject: [PATCH 09/64] Fix case-sensitivity of /me to match rest of slash commands also better error handling for attempted runs of unimplemented commands --- src/SlashCommands.tsx | 2 +- src/editor/serialize.ts | 14 +++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/SlashCommands.tsx b/src/SlashCommands.tsx index 15798ae3b1..7ebdc4ee3b 100644 --- a/src/SlashCommands.tsx +++ b/src/SlashCommands.tsx @@ -118,7 +118,7 @@ export class Command { run(roomId: string, args: string, cmd: string) { // if it has no runFn then its an ignored/nop command (autocomplete only) e.g `/me` - if (!this.runFn) return; + if (!this.runFn) return reject(_t("Command error")); return this.runFn.bind(this)(roomId, args, cmd); } diff --git a/src/editor/serialize.ts b/src/editor/serialize.ts index 4d0b8cd03a..40038114d4 100644 --- a/src/editor/serialize.ts +++ b/src/editor/serialize.ts @@ -62,16 +62,20 @@ export function textSerialize(model: EditorModel) { } export function containsEmote(model: EditorModel) { - return startsWith(model, "/me "); + return startsWith(model, "/me ", true); } -export function startsWith(model: EditorModel, prefix: string) { +export function startsWith(model: EditorModel, prefix: string, caseInsensitive = false) { const firstPart = model.parts[0]; // part type will be "plain" while editing, // and "command" while composing a message. - return firstPart && - (firstPart.type === "plain" || firstPart.type === "command") && - firstPart.text.startsWith(prefix); + let text = firstPart && firstPart.text; + if (caseInsensitive) { + prefix = prefix.toLowerCase(); + text = text.toLowerCase(); + } + + return firstPart && (firstPart.type === "plain" || firstPart.type === "command") && text.startsWith(prefix); } export function stripEmoteCommand(model: EditorModel) { From 7dad8f47d34a71be9f0f070bd92db2e8593988ff Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Tue, 16 Jun 2020 00:51:11 +0100 Subject: [PATCH 10/64] use group layout for search results --- src/components/structures/RoomView.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/structures/RoomView.js b/src/components/structures/RoomView.js index ab3da035c4..4a0cc470d5 100644 --- a/src/components/structures/RoomView.js +++ b/src/components/structures/RoomView.js @@ -1977,8 +1977,9 @@ export default createReactClass({ searchResultsPanel = (
); } else { searchResultsPanel = ( - From 3217becce8a930c9f8369c6dab0d64f021a69d49 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Tue, 16 Jun 2020 00:52:52 +0100 Subject: [PATCH 11/64] i18n --- 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 396c3f9111..100d2938d8 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -148,6 +148,7 @@ "Actions": "Actions", "Advanced": "Advanced", "Other": "Other", + "Command error": "Command error", "Usage": "Usage", "Prepends ¯\\_(ツ)_/¯ to a plain-text message": "Prepends ¯\\_(ツ)_/¯ to a plain-text message", "Sends a message as plain text, without interpreting it as markdown": "Sends a message as plain text, without interpreting it as markdown", @@ -1170,7 +1171,6 @@ "All Rooms": "All Rooms", "Search…": "Search…", "Server error": "Server error", - "Command error": "Command error", "Server unavailable, overloaded, or something else went wrong.": "Server unavailable, overloaded, or something else went wrong.", "Unknown Command": "Unknown Command", "Unrecognised command: %(commandText)s": "Unrecognised command: %(commandText)s", From 4186070489bba1b7289280afbd7daa6ea24c42d0 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Mon, 15 Jun 2020 19:47:25 -0600 Subject: [PATCH 12/64] Support list collapsing and jumping Fixes https://github.com/vector-im/riot-web/issues/14036 --- res/css/views/rooms/_RoomSublist2.scss | 39 ++++++++++++++++++++ res/img/feather-customised/chevron-right.svg | 1 + src/components/structures/LeftPanel2.tsx | 2 - src/components/views/rooms/RoomSublist2.tsx | 28 ++++++++++++++ src/stores/room-list/ListLayout.ts | 13 +++++++ 5 files changed, 81 insertions(+), 2 deletions(-) create mode 100644 res/img/feather-customised/chevron-right.svg diff --git a/res/css/views/rooms/_RoomSublist2.scss b/res/css/views/rooms/_RoomSublist2.scss index 746f373e64..c725b02f84 100644 --- a/res/css/views/rooms/_RoomSublist2.scss +++ b/res/css/views/rooms/_RoomSublist2.scss @@ -138,6 +138,34 @@ limitations under the License. text-overflow: ellipsis; overflow: hidden; white-space: nowrap; + + .mx_RoomSublist2_collapseBtn { + display: inline-block; + position: relative; + + // Default hidden + visibility: hidden; + width: 0; + height: 0; + + &::before { + content: ''; + width: 12px; + height: 12px; + position: absolute; + top: 1px; + left: 1px; + mask-position: center; + mask-size: contain; + mask-repeat: no-repeat; + background: $primary-fg-color; + mask-image: url('$(res)/img/feather-customised/chevron-down.svg'); + } + + &.mx_RoomSublist2_collapseBtn_collapsed::before { + mask-image: url('$(res)/img/feather-customised/chevron-right.svg'); + } + } } } @@ -251,6 +279,17 @@ limitations under the License. background-color: $roomlist2-button-bg-color; } } + + .mx_RoomSublist2_headerContainer { + .mx_RoomSublist2_headerText { + .mx_RoomSublist2_collapseBtn { + visibility: visible; + width: 12px; + height: 12px; + margin-right: 4px; + } + } + } } &.mx_RoomSublist2_minimized { diff --git a/res/img/feather-customised/chevron-right.svg b/res/img/feather-customised/chevron-right.svg new file mode 100644 index 0000000000..258de414a1 --- /dev/null +++ b/res/img/feather-customised/chevron-right.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/components/structures/LeftPanel2.tsx b/src/components/structures/LeftPanel2.tsx index 650828e9b0..ba0ba211b7 100644 --- a/src/components/structures/LeftPanel2.tsx +++ b/src/components/structures/LeftPanel2.tsx @@ -105,13 +105,11 @@ export default class LeftPanel2 extends React.Component { const header = sublist.querySelector(".mx_RoomSublist2_stickable"); if (slRect.top + headerHeight > bottom && !gotBottom) { - console.log(`${header.textContent} is off the bottom`); header.classList.add("mx_RoomSublist2_headerContainer_sticky"); header.classList.add("mx_RoomSublist2_headerContainer_stickyBottom"); header.style.width = `${headerStickyWidth}px`; gotBottom = true; } else if (slRect.top < top) { - console.log(`${header.textContent} is off the top`); header.classList.add("mx_RoomSublist2_headerContainer_sticky"); header.classList.add("mx_RoomSublist2_headerContainer_stickyTop"); header.style.width = `${headerStickyWidth}px`; diff --git a/src/components/views/rooms/RoomSublist2.tsx b/src/components/views/rooms/RoomSublist2.tsx index 5c23004a4f..2b0c549bd5 100644 --- a/src/components/views/rooms/RoomSublist2.tsx +++ b/src/components/views/rooms/RoomSublist2.tsx @@ -134,7 +134,28 @@ export default class RoomSublist2 extends React.Component { this.forceUpdate(); // because the layout doesn't trigger a re-render }; + private onHeaderClick = (ev: React.MouseEvent) => { + let target = ev.target as HTMLDivElement; + if (!target.classList.contains('mx_RoomSublist2_headerText')) { + // If we don't have the headerText class, the user clicked the span in the headerText. + target = target.parentElement as HTMLDivElement; + } + + const possibleSticky = target.parentElement; + const sublist = possibleSticky.parentElement.parentElement; + if (possibleSticky.classList.contains('mx_RoomSublist2_headerContainer_sticky')) { + // is sticky - jump to list + sublist.scrollIntoView({behavior: 'smooth'}); + } else { + // on screen - toggle collapse + this.props.layout.isCollapsed = !this.props.layout.isCollapsed; + this.forceUpdate(); // because the layout doesn't trigger an update + } + }; + private renderTiles(): React.ReactElement[] { + if (this.props.layout && this.props.layout.isCollapsed) return []; // don't waste time on rendering + const tiles: React.ReactElement[] = []; if (this.props.rooms) { @@ -249,6 +270,11 @@ export default class RoomSublist2 extends React.Component { ); } + const collapseClasses = classNames({ + 'mx_RoomSublist2_collapseBtn': true, + 'mx_RoomSublist2_collapseBtn_collapsed': this.props.layout && this.props.layout.isCollapsed, + }); + const classes = classNames({ 'mx_RoomSublist2_headerContainer': true, 'mx_RoomSublist2_headerContainer_withAux': !!addRoomButton, @@ -264,7 +290,9 @@ export default class RoomSublist2 extends React.Component { className={"mx_RoomSublist2_headerText"} role="treeitem" aria-level={1} + onClick={this.onHeaderClick} > + {this.props.label} {this.renderMenu()} diff --git a/src/stores/room-list/ListLayout.ts b/src/stores/room-list/ListLayout.ts index af9d6801a3..f17001f64e 100644 --- a/src/stores/room-list/ListLayout.ts +++ b/src/stores/room-list/ListLayout.ts @@ -21,11 +21,13 @@ const TILE_HEIGHT_PX = 44; interface ISerializedListLayout { numTiles: number; showPreviews: boolean; + collapsed: boolean; } export class ListLayout { private _n = 0; private _previews = false; + private _collapsed = false; constructor(public readonly tagId: TagID) { const serialized = localStorage.getItem(this.key); @@ -34,9 +36,19 @@ export class ListLayout { const parsed = JSON.parse(serialized); this._n = parsed.numTiles; this._previews = parsed.showPreviews; + this._collapsed = parsed.collapsed; } } + public get isCollapsed(): boolean { + return this._collapsed; + } + + public set isCollapsed(v: boolean) { + this._collapsed = v; + this.save(); + } + public get showPreviews(): boolean { return this._previews; } @@ -100,6 +112,7 @@ export class ListLayout { return { numTiles: this.visibleTiles, showPreviews: this.showPreviews, + collapsed: this.isCollapsed, }; } } From 84e60ee4391963f0bfbc4537ea717d4f63fb15ad Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Mon, 15 Jun 2020 20:00:09 -0600 Subject: [PATCH 13/64] Add a 'show less' button to the new room list --- res/css/views/rooms/_RoomSublist2.scss | 17 ++++++--- res/img/feather-customised/chevron-up.svg | 1 + src/components/views/rooms/RoomSublist2.tsx | 38 ++++++++++++++++----- 3 files changed, 43 insertions(+), 13 deletions(-) create mode 100644 res/img/feather-customised/chevron-up.svg diff --git a/res/css/views/rooms/_RoomSublist2.scss b/res/css/views/rooms/_RoomSublist2.scss index 3f5f654494..9e2c651641 100644 --- a/res/css/views/rooms/_RoomSublist2.scss +++ b/res/css/views/rooms/_RoomSublist2.scss @@ -100,7 +100,7 @@ limitations under the License. flex-direction: column; overflow: hidden; - .mx_RoomSublist2_showMoreButton { + .mx_RoomSublist2_showNButton { cursor: pointer; font-size: $font-13px; line-height: $font-18px; @@ -129,18 +129,25 @@ limitations under the License. display: flex; align-items: center; - .mx_RoomSublist2_showMoreButtonChevron { + .mx_RoomSublist2_showNButtonChevron { position: relative; width: 16px; height: 16px; margin-left: 12px; margin-right: 18px; - mask-image: url('$(res)/img/feather-customised/chevron-down.svg'); mask-position: center; mask-size: contain; mask-repeat: no-repeat; background: $roomtile2-preview-color; } + + .mx_RoomSublist2_showMoreButtonChevron { + mask-image: url('$(res)/img/feather-customised/chevron-down.svg'); + } + + .mx_RoomSublist2_showLessButtonChevron { + mask-image: url('$(res)/img/feather-customised/chevron-up.svg'); + } } // Class name comes from the ResizableBox component @@ -239,10 +246,10 @@ limitations under the License. .mx_RoomSublist2_resizeBox { align-items: center; - .mx_RoomSublist2_showMoreButton { + .mx_RoomSublist2_showNButton { flex-direction: column; - .mx_RoomSublist2_showMoreButtonChevron { + .mx_RoomSublist2_showNButtonChevron { margin-right: 12px; // to center } } diff --git a/res/img/feather-customised/chevron-up.svg b/res/img/feather-customised/chevron-up.svg new file mode 100644 index 0000000000..4eb5ecc33e --- /dev/null +++ b/res/img/feather-customised/chevron-up.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/components/views/rooms/RoomSublist2.tsx b/src/components/views/rooms/RoomSublist2.tsx index 9f8b8579c3..0b9452f55d 100644 --- a/src/components/views/rooms/RoomSublist2.tsx +++ b/src/components/views/rooms/RoomSublist2.tsx @@ -109,6 +109,11 @@ export default class RoomSublist2 extends React.Component { this.forceUpdate(); // because the layout doesn't trigger a re-render }; + private onShowLessClick = () => { + this.props.layout.visibleTiles = this.props.layout.minVisibleTiles; + this.forceUpdate(); // because the layout doesn't trigger a re-render + }; + private onOpenMenuClick = (ev: InputEvent) => { ev.preventDefault(); ev.stopPropagation(); @@ -303,25 +308,42 @@ export default class RoomSublist2 extends React.Component { const visibleTiles = tiles.slice(0, nVisible); // If we're hiding rooms, show a 'show more' button to the user. This button - // floats above the resize handle, if we have one present - let showMoreButton = null; + // floats above the resize handle, if we have one present. If the user has all + // tiles visible, it becomes 'show less'. + let showNButton = null; if (tiles.length > nVisible) { // we have a cutoff condition - add the button to show all const numMissing = tiles.length - visibleTiles.length; let showMoreText = ( - + {_t("Show %(count)s more", {count: numMissing})} ); if (this.props.isMinimized) showMoreText = null; - showMoreButton = ( -
- + showNButton = ( +
+ {/* set by CSS masking */} {showMoreText}
); + } else if (tiles.length <= nVisible) { + // we have all tiles visible - add a button to show less + let showLessText = ( + + {_t("Show less")} + + ); + if (this.props.isMinimized) showLessText = null; + showNButton = ( +
+ + {/* set by CSS masking */} + + {showLessText} +
+ ); } // Figure out if we need a handle @@ -345,7 +367,7 @@ export default class RoomSublist2 extends React.Component { // The padding is variable though, so figure out what we need padding for. let padding = 0; - if (showMoreButton) padding += showMoreHeight; + if (showNButton) padding += showMoreHeight; if (handles.length > 0) padding += resizeHandleHeight; const minTilesPx = layout.calculateTilesToPixelsMin(tiles.length, layout.minVisibleTiles, padding); @@ -365,7 +387,7 @@ export default class RoomSublist2 extends React.Component { className="mx_RoomSublist2_resizeBox" > {visibleTiles} - {showMoreButton} + {showNButton} ) } From e9afb4b86e121af0141bbf436c9c562571e6a3a6 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Mon, 15 Jun 2020 20:04:32 -0600 Subject: [PATCH 14/64] Fix ordering of recent rooms in the new room list Fixes https://github.com/vector-im/riot-web/issues/14009 --- src/stores/room-list/algorithms/tag-sorting/RecentAlgorithm.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stores/room-list/algorithms/tag-sorting/RecentAlgorithm.ts b/src/stores/room-list/algorithms/tag-sorting/RecentAlgorithm.ts index df84c051f0..4e4df6c9d6 100644 --- a/src/stores/room-list/algorithms/tag-sorting/RecentAlgorithm.ts +++ b/src/stores/room-list/algorithms/tag-sorting/RecentAlgorithm.ts @@ -75,7 +75,7 @@ export class RecentAlgorithm implements IAlgorithm { }; return rooms.sort((a, b) => { - return getLastTs(a) - getLastTs(b); + return getLastTs(b) - getLastTs(a); }); } } From 776e63c0d898f3f7c9b5a08fcc4ccaf763a72002 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Mon, 15 Jun 2020 20:11:06 -0600 Subject: [PATCH 15/64] Handle/hide old rooms in the room list Fixes https://github.com/vector-im/riot-web/issues/14003 --- src/stores/room-list/RoomListStore2.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/stores/room-list/RoomListStore2.ts b/src/stores/room-list/RoomListStore2.ts index 1c4e66c4b0..9684e338f8 100644 --- a/src/stores/room-list/RoomListStore2.ts +++ b/src/stores/room-list/RoomListStore2.ts @@ -181,6 +181,12 @@ export class RoomListStore2 extends AsyncStore { const room = this.matrixClient.getRoom(roomId); const tryUpdate = async (updatedRoom: Room) => { console.log(`[RoomListDebug] Live timeline event ${eventPayload.event.getId()} in ${updatedRoom.roomId}`); + if (eventPayload.event.getType() === 'm.room.tombstone' && eventPayload.event.getStateKey() === '') { + console.log(`[RoomListDebug] Got tombstone event - regenerating room list`); + // TODO: We could probably be smarter about this + await this.regenerateAllLists(); + return; // don't pass the update down - we will have already handled it in the regen + } await this.handleRoomUpdate(updatedRoom, RoomUpdateCause.Timeline); }; if (!room) { @@ -334,7 +340,7 @@ export class RoomListStore2 extends AsyncStore { } await this.algorithm.populateTags(sorts, orders); - await this.algorithm.setKnownRooms(this.matrixClient.getRooms()); + await this.algorithm.setKnownRooms(this.matrixClient.getVisibleRooms()); this.initialListsGenerated = true; From f8828014f1201418cbf3ee1bf186a0c3f1cb917b Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Mon, 15 Jun 2020 20:19:16 -0600 Subject: [PATCH 16/64] Match new room list's text search to old room list Fixes https://github.com/vector-im/riot-web/issues/14042 --- .../room-list/filters/NameFilterCondition.ts | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/stores/room-list/filters/NameFilterCondition.ts b/src/stores/room-list/filters/NameFilterCondition.ts index f238cdeb09..7b6ed76e79 100644 --- a/src/stores/room-list/filters/NameFilterCondition.ts +++ b/src/stores/room-list/filters/NameFilterCondition.ts @@ -17,6 +17,7 @@ limitations under the License. import { Room } from "matrix-js-sdk/src/models/room"; import { FILTER_CHANGED, FilterPriority, IFilterCondition } from "./IFilterCondition"; import { EventEmitter } from "events"; +import { removeHiddenChars } from "matrix-js-sdk/src/utils"; /** * A filter condition for the room list which reveals rooms of a particular @@ -45,7 +46,16 @@ export class NameFilterCondition extends EventEmitter implements IFilterConditio } public isVisible(room: Room): boolean { - // TODO: Improve this filter to include aliases and such - return room.name.toLowerCase().indexOf(this.search.toLowerCase()) >= 0; + const lcFilter = this.search.toLowerCase(); + if (this.search[0] === '#') { + // Try and find rooms by alias + if (room.getCanonicalAlias() && room.getCanonicalAlias().toLowerCase().startsWith(lcFilter)) { + return true; + } + if (room.getAltAliases().some(a => a.toLowerCase().startsWith(lcFilter))) { + return true; + } + } + return room.name && removeHiddenChars(room.name).toLowerCase().includes(lcFilter); } } From 1dfed687273be4bf31ff44f0381ff0770c2ae3cf Mon Sep 17 00:00:00 2001 From: Jeff Huang Date: Mon, 15 Jun 2020 23:45:53 +0000 Subject: [PATCH 17/64] Translated using Weblate (Chinese (Traditional)) Currently translated at 100.0% (2287 of 2287 strings) Translation: Riot Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/riot-web/matrix-react-sdk/zh_Hant/ --- src/i18n/strings/zh_Hant.json | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/zh_Hant.json b/src/i18n/strings/zh_Hant.json index 65f90f2c13..1c5b6cff83 100644 --- a/src/i18n/strings/zh_Hant.json +++ b/src/i18n/strings/zh_Hant.json @@ -2507,5 +2507,23 @@ "sent an image.": "傳送圖片。", "You: %(message)s": "您:%(message)s", "Activity": "活動", - "A-Z": "A-Z" + "A-Z": "A-Z", + "Light": "淺色", + "Dark": "暗色", + "Customise your appearance": "自訂您的外觀", + "Appearance Settings only affect this Riot session.": "外觀設定僅會影響此 Riot 工作階段。", + "Recovery Key": "復原金鑰", + "This isn't the recovery key for your account": "這不是您帳號的復原金鑰", + "This isn't a valid recovery key": "這不是有效的復原金鑰", + "Looks good!": "看起來不錯!", + "Use Recovery Key or Passphrase": "使用復原金鑰或通關密語", + "Use Recovery Key": "使用復原金鑰", + "Enter your Recovery Key or enter a Recovery Passphrase to continue.": "輸入您的復原金鑰或輸入復原通關密語以繼續。", + "Enter your Recovery Key to continue.": "輸入您的復原金鑰以繼續。", + "Upgrade your Recovery Key to store encryption keys & secrets with your account data. If you lose access to this login you'll need it to unlock your data.": "升級您的復原金鑰以儲存加密金鑰與您的帳號資料。如果您失去對此登入階段的存取權,您必須用它來解鎖您的資料。", + "Store your Recovery Key somewhere safe, it can be used to unlock your encrypted messages & data.": "將復原金鑰存放在安全的地方,它可以用於解鎖您的已加密訊息與資料。", + "Create a Recovery Key to store encryption keys & secrets with your account data. If you lose access to this login you’ll need it to unlock your data.": "建立您的復原金鑰以儲存加密金鑰與您的帳號資料。如果您失去對此登入階段的存取權,您必須用它來解鎖您的資料。", + "Create a Recovery Key": "建立復原金鑰", + "Upgrade your Recovery Key": "升級您的復原金鑰", + "Store your Recovery Key": "儲存您的復原金鑰" } From 1959c7b8a59504c920ae57aa5f87a8a8d93110e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Priit=20J=C3=B5er=C3=BC=C3=BCt?= Date: Mon, 15 Jun 2020 18:10:53 +0000 Subject: [PATCH 18/64] Translated using Weblate (Estonian) Currently translated at 61.3% (1401 of 2287 strings) Translation: Riot Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/riot-web/matrix-react-sdk/et/ --- src/i18n/strings/et.json | 45 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/et.json b/src/i18n/strings/et.json index 66bdeb551f..3fa70ef846 100644 --- a/src/i18n/strings/et.json +++ b/src/i18n/strings/et.json @@ -1432,5 +1432,48 @@ "Debug logs contain application usage data including your username, the IDs or aliases of the rooms or groups you have visited and the usernames of other users. They do not contain messages.": "Vigadega seotud logid sisaldavad rakenduse teavet, sealhulgas sinu kasutajanime, külastatud jututubade kasutajatunnuseid või aliasi ning teiste kasutajate kasutajanimesid. Logides ei ole saadetud sõnumite sisu.", "Before submitting logs, you must create a GitHub issue to describe your problem.": "Enne logide saatmist sa peaksid GitHub'is looma veateate ja kirjeldama seal tekkinud probleemi.", "GitHub issue": "Veateade GitHub'is", - "Notes": "Märkused" + "Notes": "Märkused", + "%(senderDisplayName)s changed the topic to \"%(topic)s\".": "%(senderDisplayName)s muutis uueks teemaks \"%(topic)s\".", + "%(senderDisplayName)s upgraded this room.": "%(senderDisplayName)s uuendas seda jututuba.", + "%(senderDisplayName)s made the room public to whoever knows the link.": "%(senderDisplayName)s muutis selle jututoa avalikuks kõigile, kes teavad tema aadressi.", + "sent an image.": "saatis ühe pildi.", + "Light": "Hele", + "Dark": "Tume", + "You signed in to a new session without verifying it:": "Sa logisid sisse uude sessiooni ilma seda verifitseerimata:", + "Verify your other session using one of the options below.": "Verifitseeri oma teine sessioon kasutades üht alljärgnevatest võimalustest.", + "%(name)s (%(userId)s) signed in to a new session without verifying it:": "%(name)s (%(userId)s) logis sisse uude sessiooni ilma seda verifitseerimata:", + "Not Trusted": "Ei ole usaldusväärne", + "Done": "Valmis", + "%(displayName)s is typing …": "%(displayName)s kirjutab midagi…", + "%(names)s and %(count)s others are typing …|other": "%(names)s ja %(count)s muud kasutajat kirjutavad midagi…", + "%(names)s and %(count)s others are typing …|one": "%(names)s ja üks teine kasutaja kirjutavad midagi…", + "%(names)s and %(lastPerson)s are typing …": "%(names)s ja %(lastPerson)s kirjutavad midagi…", + "Cannot reach homeserver": "Koduserver ei ole hetkel leitav", + "Ensure you have a stable internet connection, or get in touch with the server admin": "Palun kontrolli, kas sul on toimiv internetiühendus ning kui on, siis küsi abi koduserveri haldajalt", + "Your Riot is misconfigured": "Sinu Riot'i seadistused on paigast ära", + "Your homeserver does not support session management.": "Sinu koduserver ei toeta sessioonide haldust.", + "Unable to load session list": "Sessioonide laadimine ei õnnestunud", + "Identity server URL does not appear to be a valid identity server": "Isikutuvastusserveri aadress ei tundu viitama kehtivale isikutuvastusserverile", + "This isn't the recovery key for your account": "See ei ole sinu konto taastevõti", + "This isn't a valid recovery key": "See ei ole nõuetekohane taastevõti", + "Looks good!": "Tundub õige!", + "Use Recovery Key or Passphrase": "Kasuta taastevõtit või paroolifraasi", + "Use Recovery Key": "Kasuta taastevõtit", + "or another cross-signing capable Matrix client": "või mõnda teist Matrix'i klienti, mis oskab risttunnustamist", + "Enter your Recovery Key or enter a Recovery Passphrase to continue.": "Jätkamiseks sisesta oma taastevõti või taastamise paroolifraas.", + "Enter your Recovery Key to continue.": "Jätkamiseks sisesta oma taastevõti.", + "Your new session is now verified. It has access to your encrypted messages, and other users will see it as trusted.": "Sinu uus sessioon on nüüd verifitseeritud. Selles sessioonis saad lugeda oma krüptitud sõnumeid ja teiste kasutajate jaoks on ta usaldusväärne.", + "Your new session is now verified. Other users will see it as trusted.": "Sinu uus sessioon on nüüd verifitseeritud. Teiste kasutajate jaoks on ta usaldusväärne.", + "Without completing security on this session, it won’t have access to encrypted messages.": "Kui sa pole selle sessiooni turvaprotseduure lõpetanud, siis sul puudub ligipääs oma krüptitud sõnumitele.", + "Go Back": "Mine tagasi", + "Failed to re-authenticate due to a homeserver problem": "Uuesti autentimine ei õnnestunud koduserveri vea tõttu", + "Incorrect password": "Vale salasõna", + "Failed to re-authenticate": "Uuesti autentimine ei õnnestunud", + "Regain access to your account and recover encryption keys stored in this session. Without them, you won’t be able to read all of your secure messages in any session.": "Taasta ligipääs oma kontole ning selles sessioonis salvestatud krüptivõtmetele. Ilma nende võtmeteta sa ei saa lugeda krüptitud sõnumeid mitte üheski oma sessioonis.", + "Command Autocomplete": "Käskude automaatne lõpetamine", + "Community Autocomplete": "Kogukondade nimede automaatne lõpetamine", + "Emoji Autocomplete": "Emoji'de automaatne lõpetamine", + "Notification Autocomplete": "Teavituste automaatne lõpetamine", + "Room Autocomplete": "Jututubade nimede automaatne lõpetamine", + "User Autocomplete": "Kasutajanimede automaatne lõpetamine" } From ee06b25e722f4500d317d0897f8703214ea44eeb Mon Sep 17 00:00:00 2001 From: Tim Hellhake Date: Mon, 15 Jun 2020 23:33:43 +0000 Subject: [PATCH 19/64] Translated using Weblate (German) Currently translated at 99.5% (2276 of 2287 strings) Translation: Riot Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/riot-web/matrix-react-sdk/de/ --- src/i18n/strings/de_DE.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/i18n/strings/de_DE.json b/src/i18n/strings/de_DE.json index 452a0ee969..891e6b7656 100644 --- a/src/i18n/strings/de_DE.json +++ b/src/i18n/strings/de_DE.json @@ -1367,7 +1367,7 @@ "Sends the given message coloured as a rainbow": "Sendet die Nachricht in Regenbogenfarben", "Adds a custom widget by URL to the room": "Fügt ein Benutzer-Widget über eine URL zum Raum hinzu", "Please supply a https:// or http:// widget URL": "Bitte gib eine https:// oder http:// Widget-URL an", - "Sends the given emote coloured as a rainbow": "Sended das Emoji in Regenbogenfarben", + "Sends the given emote coloured as a rainbow": "Sendet das Emoji in Regenbogenfarben", "%(senderName)s made no change.": "%(senderName)s hat keine Änderung vorgenommen.", "%(senderName)s revoked the invitation for %(targetDisplayName)s to join the room.": "%(senderName)s hat die Einladung zum Raumbeitritt für %(targetDisplayName)s zurückgezogen.", "Cannot reach homeserver": "Der Heimserver ist nicht erreichbar", From ed14f099f3187793d22ca1386a125acb2a0637a4 Mon Sep 17 00:00:00 2001 From: Szimszon Date: Mon, 15 Jun 2020 18:09:50 +0000 Subject: [PATCH 20/64] Translated using Weblate (Hungarian) Currently translated at 100.0% (2287 of 2287 strings) Translation: Riot Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/riot-web/matrix-react-sdk/hu/ --- src/i18n/strings/hu.json | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/hu.json b/src/i18n/strings/hu.json index 511dac34ac..b88a71a30b 100644 --- a/src/i18n/strings/hu.json +++ b/src/i18n/strings/hu.json @@ -2494,5 +2494,25 @@ "All settings": "Minden beállítás", "Archived rooms": "Archivált szobák", "Feedback": "Visszajelzés", - "Account settings": "Fiók beállítása" + "Account settings": "Fiók beállítása", + "Light": "Világos", + "Dark": "Sötét", + "Customise your appearance": "Szabd személyre a megjelenítést", + "Appearance Settings only affect this Riot session.": "A megjelenítési beállítások csak erre a munkamenetre vonatkoznak.", + "Activity": "Aktivitás", + "A-Z": "A-Z", + "Recovery Key": "Visszaállítási Kulcs", + "This isn't the recovery key for your account": "Ez nem a fiókod visszaállítási kulcsa", + "This isn't a valid recovery key": "Ez nem egy érvényes visszaállítási kulcs", + "Looks good!": "Jól néz ki!", + "Use Recovery Key or Passphrase": "Használd a visszaállítási kulcsot vagy jelmondatot", + "Use Recovery Key": "Használd a Visszaállítási Kulcsot", + "Enter your Recovery Key or enter a Recovery Passphrase to continue.": "A továbblépéshez add meg a Visszaállítási kulcsot vagy a Visszaállítási jelmondatot.", + "Enter your Recovery Key to continue.": "A továbblépéshez add meg a Visszaállítási Kulcsot.", + "Upgrade your Recovery Key to store encryption keys & secrets with your account data. If you lose access to this login you'll need it to unlock your data.": "Fejleszd a Visszaállítási kulcsot, hogy a fiók adatokkal tárolhasd a titkosítási kulcsokat és jelszavakat. Szükséged lesz rá hogy hozzáférj az adataidhoz ha elveszted a hozzáférésed ehhez a bejelentkezéshez.", + "Store your Recovery Key somewhere safe, it can be used to unlock your encrypted messages & data.": "A Visszaállítási kulcsot tárold biztonságos helyen mivel felhasználható a titkosított üzenetekhez és adatokhoz való hozzáféréshez.", + "Create a Recovery Key to store encryption keys & secrets with your account data. If you lose access to this login you’ll need it to unlock your data.": "Készíts Visszaállítási kulcsot, hogy a fiók adatokkal tárolhasd a titkosítási kulcsokat és jelszavakat. Szükséged lesz rá hogy hozzáférj az adataidhoz ha elveszted a hozzáférésed ehhez a bejelentkezéshez.", + "Create a Recovery Key": "Visszaállítási kulcs készítése", + "Upgrade your Recovery Key": "A Visszaállítási kulcs fejlesztése", + "Store your Recovery Key": "Visszaállítási kulcs tárolása" } From 884ead917da2addf49927d7a753287c2981e8c14 Mon Sep 17 00:00:00 2001 From: Laura Date: Mon, 15 Jun 2020 12:03:49 +0000 Subject: [PATCH 21/64] Translated using Weblate (Polish) Currently translated at 66.0% (1509 of 2287 strings) Translation: Riot Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/riot-web/matrix-react-sdk/pl/ --- src/i18n/strings/pl.json | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/src/i18n/strings/pl.json b/src/i18n/strings/pl.json index 30dd5b828d..4b98bdbe2a 100644 --- a/src/i18n/strings/pl.json +++ b/src/i18n/strings/pl.json @@ -157,7 +157,7 @@ "Emoji": "Emoji", "Enable automatic language detection for syntax highlighting": "Włącz automatyczne rozpoznawanie języka dla podświetlania składni", "Enable Notifications": "Włącz powiadomienia", - "%(senderName)s ended the call.": "%(senderName)s zakończył połączenie.", + "%(senderName)s ended the call.": "%(senderName)s zakończył(a) połączenie.", "End-to-end encryption information": "Informacje o szyfrowaniu end-to-end", "Enter passphrase": "Wpisz frazę", "Error decrypting attachment": "Błąd odszyfrowywania załącznika", @@ -230,8 +230,8 @@ "%(senderName)s made future room history visible to all room members, from the point they are invited.": "%(senderName)s uczynił(a) przyszłą historię pokoju widoczną dla wszyscy członkowie pokoju, od momentu ich zaproszenia.", "%(senderName)s made future room history visible to all room members, from the point they joined.": "%(senderName)s uczynił(a) przyszłą historię pokoju widoczną dla wszyscy członkowie pokoju, od momentu ich dołączenia.", "%(senderName)s made future room history visible to all room members.": "%(senderName)s uczynił(a) przyszłą historię pokoju widoczną dla wszyscy członkowie pokoju.", - "%(senderName)s made future room history visible to anyone.": "%(senderName)s uczynił przyszłą historię pokoju widoczną dla kazdego.", - "%(senderName)s made future room history visible to unknown (%(visibility)s).": "%(senderName)s uczynił przyszłą historię pokoju widoczną dla nieznany (%(visibility)s).", + "%(senderName)s made future room history visible to anyone.": "%(senderName)s uczynił(a) przyszłą historię pokoju widoczną dla każdego.", + "%(senderName)s made future room history visible to unknown (%(visibility)s).": "%(senderName)s uczynił(a) przyszłą historię pokoju widoczną dla nieznany (%(visibility)s).", "Manage Integrations": "Zarządzaj integracjami", "Missing room_id in request": "Brakujące room_id w żądaniu", "Missing user_id in request": "Brakujące user_id w żądaniu", @@ -291,7 +291,7 @@ "Send anyway": "Wyślij mimo to", "Send Reset Email": "Wyślij e-mail resetujący hasło", "%(senderDisplayName)s sent an image.": "%(senderDisplayName)s wysłał obraz.", - "%(senderName)s sent an invitation to %(targetDisplayName)s to join the room.": "%(senderName)s wysłał zaproszenie do %(targetDisplayName)s do dołączenia do pokoju.", + "%(senderName)s sent an invitation to %(targetDisplayName)s to join the room.": "%(senderName)s wysłał(a) zaproszenie do %(targetDisplayName)s do dołączenia do pokoju.", "Server error": "Błąd serwera", "Server may be unavailable, overloaded, or search timed out :(": "Serwer może być niedostępny, przeciążony, lub upłynął czas wyszukiwania :(", "Server may be unavailable, overloaded, or you hit a bug.": "Serwer może być niedostępny, przeciążony, lub trafiłeś na błąd.", @@ -363,7 +363,7 @@ "You do not have permission to do that in this room.": "Nie masz pozwolenia na wykonanie tej akcji w tym pokoju.", "You cannot place a call with yourself.": "Nie możesz wykonać połączenia do siebie.", "You cannot place VoIP calls in this browser.": "Nie możesz przeprowadzić rozmowy głosowej VoIP w tej przeglądarce.", - "You do not have permission to post to this room": "Nie jesteś uprawniony do pisania w tym pokoju", + "You do not have permission to post to this room": "Nie masz uprawnień do pisania w tym pokoju", "You have disabled URL previews by default.": "Masz domyślnie wyłączone podglądy linków.", "You have no visible notifications": "Nie masz widocznych powiadomień", "You must register to use this functionality": "Musisz się zarejestrować aby móc używać tej funkcji", @@ -915,7 +915,7 @@ "Common names and surnames are easy to guess": "Popularne imiona i nazwiska są łatwe do odgadnięcia", "You do not have permission to invite people to this room.": "Nie masz uprawnień do zapraszania ludzi do tego pokoju.", "User %(user_id)s does not exist": "Użytkownik %(user_id)s nie istnieje", - "Unknown server error": "Nieznany bład serwera", + "Unknown server error": "Nieznany błąd serwera", "%(oneUser)sleft %(count)s times|one": "%(oneUser)swyszedł(-ła)", "%(oneUser)sjoined and left %(count)s times|other": "%(oneUser)sdołączył(a) i wyszedł(-ła) %(count)s razy", "%(oneUser)sjoined and left %(count)s times|one": "%(oneUser)sdołączył(a) i wyszedł(-ła)", @@ -930,7 +930,7 @@ "%(oneUser)schanged their avatar %(count)s times|other": "%(oneUser)szmienił(a) swój awatar %(count)s razy", "%(oneUser)schanged their avatar %(count)s times|one": "%(oneUser)szmienił(a) swój awatar", "%(items)s and %(count)s others|other": "%(items)s i %(count)s innych", - "%(items)s and %(count)s others|one": "%(items)s i jeden inny", + "%(items)s and %(count)s others|one": "%(items)s i jedna inna osoba", "%(severalUsers)schanged their avatar %(count)s times|one": "%(severalUsers)szmieniło swój awatar", "%(severalUsers)schanged their avatar %(count)s times|other": "%(severalUsers)szmieniło swój awatar %(count)s razy", "%(oneUser)schanged their name %(count)s times|one": "%(oneUser)szmienił(a) swoją nazwę", @@ -1102,7 +1102,7 @@ "Gift": "Prezent", "Hammer": "Młotek", "Group & filter rooms by custom tags (refresh to apply changes)": "Grupuj i filtruj pokoje według niestandardowych znaczników (odśwież, aby zastosować zmiany)", - "Prepends ¯\\_(ツ)_/¯ to a plain-text message": "Poprzedza ¯\\_(ツ)_/¯ do wiadomości tekstowej", + "Prepends ¯\\_(ツ)_/¯ to a plain-text message": "Dodaje ¯\\_(ツ)_/¯ na początku wiadomości tekstowej", "Upgrades a room to a new version": "Aktualizuje pokój do nowej wersji", "Changes your display nickname in the current room only": "Zmienia Twój wyświetlany pseudonim tylko dla bieżącego pokoju", "Sets the room name": "Ustawia nazwę pokoju", @@ -1175,7 +1175,7 @@ "%(senderDisplayName)s enabled flair for %(groups)s in this room.": "%(senderDisplayName)s aktywował Flair dla %(groups)s w tym pokoju.", "%(senderDisplayName)s disabled flair for %(groups)s in this room.": "%(senderDisplayName)s dezaktywował Flair dla %(groups)s w tym pokoju.", "%(senderDisplayName)s enabled flair for %(newGroups)s and disabled flair for %(oldGroups)s in this room.": "%(senderDisplayName)s aktywował Flair dla %(newGroups)s i dezaktywował Flair dla %(oldGroups)s w tym pokoju.", - "%(senderName)s revoked the invitation for %(targetDisplayName)s to join the room.": "%(senderName)s odwołał zaproszednie dla %(targetDisplayName)s aby dołączył do pokoju.", + "%(senderName)s revoked the invitation for %(targetDisplayName)s to join the room.": "%(senderName)s odwołał(a) zaproszenie dla %(targetDisplayName)s aby dołączył do pokoju.", "%(names)s and %(count)s others are typing …|one": "%(names)s i jedna osoba pisze…", "Cannot reach homeserver": "Błąd połączenia z serwerem domowym", "Ensure you have a stable internet connection, or get in touch with the server admin": "Upewnij się, że posiadasz stabilne połączenie internetowe lub skontaktuj się z administratorem serwera", @@ -1605,5 +1605,9 @@ "WARNING: Session already verified, but keys do NOT MATCH!": "OSTRZEŻENIE: Sesja już zweryfikowana, ale klucze do siebie NIE PASUJĄ!", "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!": "OSTRZEŻENIE: WERYFIKACJA KLUCZY NIE POWIODŁA SIĘ! Klucz podpisujący dla %(userId)s oraz sesji %(deviceId)s to \"%(fprint)s\", nie pasuje on do podanego klucza \"%(fingerprint)s\". To może oznaczać że Twoja komunikacja jest przechwytywana!", "Displays information about a user": "Pokazuje informacje na temat użytkownika", - "Send a bug report with logs": "Wyślij raport błędu z logami" + "Send a bug report with logs": "Wyślij raport błędu z logami", + "Use Single Sign On to continue": "Użyj pojedynczego logowania, aby kontynuować", + "Confirm adding this email address by using Single Sign On to prove your identity.": "Potwierdź dodanie tego adresu e-mail przez użycie pojedynczego logowania, aby potwierdzić swoją tożsamość.", + "Single Sign On": "Pojedyncze logowanie", + "Confirm adding this phone number by using Single Sign On to prove your identity.": "Potwierdź dodanie tego numeru telefonu przez użycie pojedynczego logowania, aby potwierdzić swoją tożsamość." } From 1374d2020a2402c0fcff2f61d050b4b379f33495 Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Tue, 16 Jun 2020 11:26:12 +0100 Subject: [PATCH 22/64] Upgrade matrix-js-sdk to 6.2.2 --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index e596a643a6..e31a85e073 100644 --- a/package.json +++ b/package.json @@ -80,7 +80,7 @@ "is-ip": "^2.0.0", "linkifyjs": "^2.1.6", "lodash": "^4.17.14", - "matrix-js-sdk": "6.2.1", + "matrix-js-sdk": "6.2.2", "minimist": "^1.2.0", "pako": "^1.0.5", "parse5": "^5.1.1", diff --git a/yarn.lock b/yarn.lock index 5d9516507f..873d462f6b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5801,10 +5801,10 @@ mathml-tag-names@^2.0.1: resolved "https://registry.yarnpkg.com/mathml-tag-names/-/mathml-tag-names-2.1.3.tgz#4ddadd67308e780cf16a47685878ee27b736a0a3" integrity sha512-APMBEanjybaPzUrfqU0IMU5I0AswKMH7k8OTLs0vvV4KZpExkTkY87nR/zpbuTPj+gARop7aGUbl11pnDfW6xg== -matrix-js-sdk@6.2.1: - version "6.2.1" - resolved "https://registry.yarnpkg.com/matrix-js-sdk/-/matrix-js-sdk-6.2.1.tgz#d5f76491a650c0a36fcdd078cff59f2da96edd7b" - integrity sha512-X12Y2SMg8MOJwE5P3VMsMV/mnQHOmyJkF+FZRida124w4B4tBJouaNxteYyYaH34w+wyaKGxuqEBXecfSpfvbw== +matrix-js-sdk@6.2.2: + version "6.2.2" + resolved "https://registry.yarnpkg.com/matrix-js-sdk/-/matrix-js-sdk-6.2.2.tgz#103d951f61945217b110962f55ae43996756f615" + integrity sha512-uTXmKVzl7GXM3R70cl2E87H+mtwN3ILqPeB80Z/2ITN9Vaf9pMURCCAuHePEBXbhnD7DOZj7Cke42uP+ByR6Hw== dependencies: "@babel/runtime" "^7.8.3" another-json "^0.2.0" From d658c0403dc6c8efba2021d55f3ddfdf7614e5af Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Tue, 16 Jun 2020 11:35:28 +0100 Subject: [PATCH 23/64] Prepare changelog for v2.7.2 --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 63702de38b..089bfa73e0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +Changes in [2.7.2](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v2.7.2) (2020-06-16) +=================================================================================================== +[Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v2.7.1...v2.7.2) + + * Upgrade to JS SDK 6.2.2 + Changes in [2.7.1](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v2.7.1) (2020-06-05) =================================================================================================== [Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v2.7.0...v2.7.1) From 0f6a0bb3ae6777261435588162ca232274cf5979 Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Tue, 16 Jun 2020 11:35:29 +0100 Subject: [PATCH 24/64] v2.7.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e31a85e073..bd6260a93f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "matrix-react-sdk", - "version": "2.7.1", + "version": "2.7.2", "description": "SDK for matrix.org using React", "author": "matrix.org", "repository": { From 6f6793bc858186d9eeaad9969914d016dd2a8f1b Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Tue, 16 Jun 2020 11:45:28 +0100 Subject: [PATCH 25/64] Reset matrix-js-sdk back to develop branch --- package.json | 2 +- yarn.lock | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 2a5404ac4c..5f9b7dde1f 100644 --- a/package.json +++ b/package.json @@ -80,7 +80,7 @@ "is-ip": "^2.0.0", "linkifyjs": "^2.1.6", "lodash": "^4.17.14", - "matrix-js-sdk": "6.2.2", + "matrix-js-sdk": "github:matrix-org/matrix-js-sdk#develop", "minimist": "^1.2.0", "pako": "^1.0.5", "parse5": "^5.1.1", diff --git a/yarn.lock b/yarn.lock index c3f9c65c0e..d2d53692b5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5820,10 +5820,9 @@ mathml-tag-names@^2.0.1: resolved "https://registry.yarnpkg.com/mathml-tag-names/-/mathml-tag-names-2.1.3.tgz#4ddadd67308e780cf16a47685878ee27b736a0a3" integrity sha512-APMBEanjybaPzUrfqU0IMU5I0AswKMH7k8OTLs0vvV4KZpExkTkY87nR/zpbuTPj+gARop7aGUbl11pnDfW6xg== -matrix-js-sdk@6.2.2: +"matrix-js-sdk@github:matrix-org/matrix-js-sdk#develop": version "6.2.2" - resolved "https://registry.yarnpkg.com/matrix-js-sdk/-/matrix-js-sdk-6.2.2.tgz#103d951f61945217b110962f55ae43996756f615" - integrity sha512-uTXmKVzl7GXM3R70cl2E87H+mtwN3ILqPeB80Z/2ITN9Vaf9pMURCCAuHePEBXbhnD7DOZj7Cke42uP+ByR6Hw== + resolved "https://codeload.github.com/matrix-org/matrix-js-sdk/tar.gz/1c194e81637fb07fe6ad67cda33be0d5d4c10115" dependencies: "@babel/runtime" "^7.8.3" another-json "^0.2.0" From de7d7802deb76ede9645986606cecd653a07d960 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Priit=20J=C3=B5er=C3=BC=C3=BCt?= Date: Tue, 16 Jun 2020 06:16:34 +0000 Subject: [PATCH 26/64] Translated using Weblate (Estonian) Currently translated at 61.4% (1405 of 2287 strings) Translation: Riot Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/riot-web/matrix-react-sdk/et/ --- src/i18n/strings/et.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/et.json b/src/i18n/strings/et.json index 3fa70ef846..ef41233254 100644 --- a/src/i18n/strings/et.json +++ b/src/i18n/strings/et.json @@ -1475,5 +1475,9 @@ "Emoji Autocomplete": "Emoji'de automaatne lõpetamine", "Notification Autocomplete": "Teavituste automaatne lõpetamine", "Room Autocomplete": "Jututubade nimede automaatne lõpetamine", - "User Autocomplete": "Kasutajanimede automaatne lõpetamine" + "User Autocomplete": "Kasutajanimede automaatne lõpetamine", + "Enter recovery key": "Sisesta taastevõti", + "Unable to access secret storage. Please verify that you entered the correct recovery key.": "Ei õnnestu lugeda krüptitud salvestusruumi. Palun kontrolli, kas sa sisestasid õige taastevõtme.", + "This looks like a valid recovery key!": "See tundub olema õige taastevõti!", + "Not a valid recovery key": "Ei ole sobilik taastevõti" } From f7baf3a3314440e4eb1e3bc9bc7743e4291f0389 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20C?= Date: Tue, 16 Jun 2020 07:37:43 +0000 Subject: [PATCH 27/64] Translated using Weblate (French) Currently translated at 100.0% (2287 of 2287 strings) Translation: Riot Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/riot-web/matrix-react-sdk/fr/ --- src/i18n/strings/fr.json | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/fr.json b/src/i18n/strings/fr.json index f4445082d8..d2942522f4 100644 --- a/src/i18n/strings/fr.json +++ b/src/i18n/strings/fr.json @@ -2508,5 +2508,23 @@ "Leave Room": "Quitter le salon", "Room options": "Options du salon", "Activity": "Activité", - "A-Z": "A-Z" + "A-Z": "A-Z", + "Light": "Clair", + "Dark": "Sombre", + "Customise your appearance": "Personnalisez l’apparence", + "Appearance Settings only affect this Riot session.": "Les paramètres d’apparence affecteront uniquement cette session de Riot.", + "Recovery Key": "Clé de récupération", + "This isn't the recovery key for your account": "Ce n’est pas la clé de récupération pour votre compte", + "This isn't a valid recovery key": "Ce n’est pas une clé de récupération valide", + "Looks good!": "Ça a l’air correct !", + "Use Recovery Key or Passphrase": "Utiliser la clé ou la phrase secrète de récupération", + "Use Recovery Key": "Utiliser la clé de récupération", + "Enter your Recovery Key or enter a Recovery Passphrase to continue.": "Saisissez votre clé de récupération ou une phrase secrète de récupération pour continuer.", + "Enter your Recovery Key to continue.": "Saisissez votre clé de récupération pour continuer.", + "Upgrade your Recovery Key to store encryption keys & secrets with your account data. If you lose access to this login you'll need it to unlock your data.": "Mettez à niveau votre clé de récupération pour stocker vos clés et secrets de chiffrement avec les données de votre compte. Si vous n’avez plus accès à cette connexion, vous en aurez besoin pour déverrouiller vos données.", + "Store your Recovery Key somewhere safe, it can be used to unlock your encrypted messages & data.": "Stockez votre clé de récupération dans un endroit sûr, elle peut être utilisée pour déverrouiller vos messages et vos données chiffrés.", + "Create a Recovery Key to store encryption keys & secrets with your account data. If you lose access to this login you’ll need it to unlock your data.": "Créez une clé de récupération pour stocker vos clé et secrets de chiffrement avec les données de votre compte. Si vous n’avez plus accès à cette connexion, vous en aurez besoin pour déverrouiller vos données.", + "Create a Recovery Key": "Créer une clé de récupération", + "Upgrade your Recovery Key": "Mettre à jour votre clé de récupération", + "Store your Recovery Key": "Stocker votre clé de récupération" } From ef80a0b0b473a4d2a422e6a811c2149340a1e4ca Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Tue, 16 Jun 2020 14:06:42 +0100 Subject: [PATCH 28/64] avoid negatives --- src/editor/serialize.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/editor/serialize.ts b/src/editor/serialize.ts index 40038114d4..fc35f1e2ea 100644 --- a/src/editor/serialize.ts +++ b/src/editor/serialize.ts @@ -62,15 +62,15 @@ export function textSerialize(model: EditorModel) { } export function containsEmote(model: EditorModel) { - return startsWith(model, "/me ", true); + return startsWith(model, "/me ", false); } -export function startsWith(model: EditorModel, prefix: string, caseInsensitive = false) { +export function startsWith(model: EditorModel, prefix: string, caseSensitive = true) { const firstPart = model.parts[0]; // part type will be "plain" while editing, // and "command" while composing a message. let text = firstPart && firstPart.text; - if (caseInsensitive) { + if (!caseSensitive) { prefix = prefix.toLowerCase(); text = text.toLowerCase(); } From bc0281ebddf21697d4f58cfec74e720a87d24912 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Tue, 16 Jun 2020 08:36:10 -0600 Subject: [PATCH 29/64] Match fuzzy filtering a bit more reliably in the new room list Fixes https://github.com/vector-im/riot-web/issues/14054 --- src/stores/room-list/filters/NameFilterCondition.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/stores/room-list/filters/NameFilterCondition.ts b/src/stores/room-list/filters/NameFilterCondition.ts index 7b6ed76e79..4ac5b68596 100644 --- a/src/stores/room-list/filters/NameFilterCondition.ts +++ b/src/stores/room-list/filters/NameFilterCondition.ts @@ -56,6 +56,14 @@ export class NameFilterCondition extends EventEmitter implements IFilterConditio return true; } } - return room.name && removeHiddenChars(room.name).toLowerCase().includes(lcFilter); + + if (!room.name) return false; // should realisitically not happen: the js-sdk always calculates a name + + // Note: we have to match the filter with the removeHiddenChars() room name because the + // function strips spaces and other characters (M becomes RN for example, in lowercase). + // We also doubly convert to lowercase to work around oddities of the library. + const noSecretsFilter = removeHiddenChars(lcFilter).toLowerCase(); + const noSecretsName = removeHiddenChars(room.name.toLowerCase()).toLowerCase(); + return noSecretsName.includes(noSecretsFilter); } } From 8f45e06844a202078c7d5b8325a77e7693ee965a Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Tue, 16 Jun 2020 08:46:48 -0600 Subject: [PATCH 30/64] Add a home button to the new room list menu when available --- src/components/structures/UserMenuButton.tsx | 26 ++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/src/components/structures/UserMenuButton.tsx b/src/components/structures/UserMenuButton.tsx index 41b2c3ab60..f3626ba270 100644 --- a/src/components/structures/UserMenuButton.tsx +++ b/src/components/structures/UserMenuButton.tsx @@ -32,6 +32,8 @@ import SettingsStore, {SettingLevel} from "../../settings/SettingsStore"; import {getCustomTheme} from "../../theme"; import {getHostingLink} from "../../utils/HostingLink"; import AccessibleButton, {ButtonEvent} from "../views/elements/AccessibleButton"; +import SdkConfig from "../../SdkConfig"; +import {getHomePageUrl} from "../../utils/pages"; interface IProps { } @@ -67,6 +69,10 @@ export default class UserMenuButton extends React.Component { } } + private get hasHomePage(): boolean { + return !!getHomePageUrl(SdkConfig.get()); + } + public componentDidMount() { this.dispatcherRef = defaultDispatcher.register(this.onAction); this.themeWatcherRef = SettingsStore.watchSetting("theme", null, this.onThemeChanged); @@ -147,6 +153,13 @@ export default class UserMenuButton extends React.Component { this.setState({menuDisplayed: false}); // also close the menu }; + private onHomeClick = (ev: ButtonEvent) => { + ev.preventDefault(); + ev.stopPropagation(); + + defaultDispatcher.dispatch({action: 'view_home_page'}); + }; + public render() { let contextMenu; if (this.state.menuDisplayed) { @@ -172,6 +185,18 @@ export default class UserMenuButton extends React.Component { ); } + let homeButton = null; + if (this.hasHomePage) { + homeButton = ( +
  • + + + {_t("Home")} + +
  • + ); + } + const elementRect = this.buttonRef.current.getBoundingClientRect(); contextMenu = ( { {hostingLink}
      + {homeButton}
    • this.onSettingsOpen(e, USER_NOTIFICATIONS_TAB)}> From 37672d43864ecfda74412b19103625b67557d31c Mon Sep 17 00:00:00 2001 From: Tuomas Hietala Date: Tue, 16 Jun 2020 16:00:04 +0000 Subject: [PATCH 31/64] Translated using Weblate (Finnish) Currently translated at 95.4% (2182 of 2287 strings) Translation: Riot Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/riot-web/matrix-react-sdk/fi/ --- src/i18n/strings/fi.json | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/fi.json b/src/i18n/strings/fi.json index a3158f0280..1157daa260 100644 --- a/src/i18n/strings/fi.json +++ b/src/i18n/strings/fi.json @@ -2340,5 +2340,32 @@ "This address is available to use": "Tämä osoite on käytettävissä", "This address is already in use": "Tämä osoite on jo käytössä", "Set a room address to easily share your room with other people.": "Aseta huoneelle osoite, jotta voit jakaa huoneen helposti muille.", - "Address (optional)": "Osoite (valinnainen)" + "Address (optional)": "Osoite (valinnainen)", + "sent an image.": "lähetti kuvan.", + "Light": "Vaalea", + "Dark": "Tumma", + "You: %(message)s": "Sinä: %(message)s", + "Emoji picker": "Emojivalitsin", + "No recently visited rooms": "Ei hiljattain vierailtuja huoneita", + "People": "Ihmiset", + "Sort by": "Lajittelutapa", + "Unread rooms": "Lukemattomat huoneet", + "Always show first": "Näytä aina ensin", + "Show": "Näytä", + "Leave Room": "Poistu huoneesta", + "Switch to light mode": "Vaihda vaaleaan teemaan", + "Switch to dark mode": "Vaihda tummaan teemaan", + "Switch theme": "Vaihda teemaa", + "All settings": "Kaikki asetukset", + "Archived rooms": "Arkistoidut huoneet", + "Feedback": "Palaute", + "Account settings": "Tilin asetukset", + "Recovery Key": "Palautusavain", + "This isn't the recovery key for your account": "Tämä ei ole tilisi palautusavain", + "This isn't a valid recovery key": "Tämä ei ole kelvollinen palautusavain", + "Looks good!": "Hyvältä näyttää!", + "Use Recovery Key or Passphrase": "Käytä palautusavainta tai salalausetta", + "Use Recovery Key": "Käytä palautusavainta", + "Create a Recovery Key": "Luo palautusavain", + "Upgrade your Recovery Key": "Päivitä palautusavaimesi" } From 17f1fdaf6d3192c7c1009f694c66fa5cbec04bd7 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Tue, 16 Jun 2020 10:59:42 -0600 Subject: [PATCH 32/64] Include the sticky room when filtering in the new room list Fixes https://github.com/vector-im/riot-web/issues/14050 --- src/stores/room-list/algorithms/Algorithm.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/stores/room-list/algorithms/Algorithm.ts b/src/stores/room-list/algorithms/Algorithm.ts index e8b167c1ba..a89167095d 100644 --- a/src/stores/room-list/algorithms/Algorithm.ts +++ b/src/stores/room-list/algorithms/Algorithm.ts @@ -230,7 +230,10 @@ export class Algorithm extends EventEmitter { // Cheaply clone the rooms so we can more easily do operations on the list. // We optimize our lookups by trying to reduce sample size as much as possible // to the rooms we know will be deduped by the Set. - const rooms = this.cachedRooms[tagId]; + const rooms = this.cachedRooms[tagId].map(r => r); // cheap clone + if (this._stickyRoom && this._stickyRoom.tag === tagId && this._stickyRoom.room) { + rooms.push(this._stickyRoom.room); + } let remainingRooms = rooms.map(r => r); let allowedRoomsInThisTag = []; let lastFilterPriority = orderedFilters[0].relativePriority; From bcebef7e5631e98e6ad7df5b2f1e5c082dbd3bbb Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Tue, 16 Jun 2020 12:13:12 -0600 Subject: [PATCH 33/64] Add a globe icon to public rooms For https://github.com/vector-im/riot-web/issues/14039 --- res/css/views/rooms/_RoomTile2.scss | 25 +++++++++++++++++++++ res/img/globe.svg | 6 +++++ src/components/views/rooms/RoomSublist2.tsx | 1 + src/components/views/rooms/RoomTile2.tsx | 13 +++++++++++ 4 files changed, 45 insertions(+) create mode 100644 res/img/globe.svg diff --git a/res/css/views/rooms/_RoomTile2.scss b/res/css/views/rooms/_RoomTile2.scss index f74d0ff5a4..2e9fe4a31e 100644 --- a/res/css/views/rooms/_RoomTile2.scss +++ b/res/css/views/rooms/_RoomTile2.scss @@ -32,6 +32,31 @@ limitations under the License. .mx_RoomTile2_avatarContainer { margin-right: 8px; + position: relative; + + .mx_RoomTile2_publicRoom { + width: 12px; + height: 12px; + border-radius: 12px; + background-color: $roomlist2-bg-color; // to match the room list itself + position: absolute; + bottom: 0; + right: 0; + + &::before { + content: ''; + width: 8px; + height: 8px; + top: 2px; + left: 2px; + position: absolute; + mask-position: center; + mask-size: contain; + mask-repeat: no-repeat; + background: $primary-fg-color; + mask-image: url('$(res)/img/globe.svg'); + } + } } .mx_RoomTile2_nameContainer { diff --git a/res/img/globe.svg b/res/img/globe.svg new file mode 100644 index 0000000000..cc22bc6e66 --- /dev/null +++ b/res/img/globe.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/src/components/views/rooms/RoomSublist2.tsx b/src/components/views/rooms/RoomSublist2.tsx index 9f8b8579c3..f03cb3ecbd 100644 --- a/src/components/views/rooms/RoomSublist2.tsx +++ b/src/components/views/rooms/RoomSublist2.tsx @@ -145,6 +145,7 @@ export default class RoomSublist2 extends React.Component { key={`room-${room.roomId}`} showMessagePreview={this.props.layout.showPreviews} isMinimized={this.props.isMinimized} + tag={this.props.layout.tagId} /> ); } diff --git a/src/components/views/rooms/RoomTile2.tsx b/src/components/views/rooms/RoomTile2.tsx index 10845d3840..f0d99eed99 100644 --- a/src/components/views/rooms/RoomTile2.tsx +++ b/src/components/views/rooms/RoomTile2.tsx @@ -44,6 +44,7 @@ interface IProps { room: Room; showMessagePreview: boolean; isMinimized: boolean; + tag: TagID; // TODO: Allow falsifying counts (for invites and stuff) // TODO: Transparency? Was this ever used? @@ -85,6 +86,12 @@ export default class RoomTile2 extends React.Component { ActiveRoomObserver.addListener(this.props.room.roomId, this.onActiveRoomUpdate); } + private get isPublicRoom(): boolean { + const joinRules = this.props.room.currentState.getStateEvents("m.room.join_rules", ""); + const joinRule = joinRules && joinRules.getContent().join_rule; + return joinRule === 'public'; + } + public componentWillUnmount() { if (this.props.room) { ActiveRoomObserver.removeListener(this.props.room.roomId, this.onActiveRoomUpdate); @@ -287,6 +294,11 @@ export default class RoomTile2 extends React.Component { ); if (this.props.isMinimized) nameContainer = null; + let globe = null; + if (this.isPublicRoom && this.props.tag !== DefaultTagID.DM) { + globe = ; // sizing and such set by CSS + } + const avatarSize = 32; return ( @@ -304,6 +316,7 @@ export default class RoomTile2 extends React.Component { >
      + {globe}
      {nameContainer}
      From e4a51a7c01fe3d6f2e0aab8168c8afa7044d57fc Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Tue, 16 Jun 2020 14:43:48 -0600 Subject: [PATCH 34/64] Add presence icons; Convert to generic icon component For https://github.com/vector-im/riot-web/issues/14039 --- res/css/_components.scss | 1 + res/css/views/rooms/_RoomTile2.scss | 20 +-- res/css/views/rooms/_RoomTileIcon.scss | 69 +++++++++ res/themes/light/css/_light.scss | 4 + src/components/views/rooms/RoomTile2.tsx | 28 ++-- src/components/views/rooms/RoomTileIcon.tsx | 148 ++++++++++++++++++++ src/utils/presence.ts | 26 ++++ 7 files changed, 258 insertions(+), 38 deletions(-) create mode 100644 res/css/views/rooms/_RoomTileIcon.scss create mode 100644 src/components/views/rooms/RoomTileIcon.tsx create mode 100644 src/utils/presence.ts diff --git a/res/css/_components.scss b/res/css/_components.scss index 31f319e76f..66eb98ea9d 100644 --- a/res/css/_components.scss +++ b/res/css/_components.scss @@ -189,6 +189,7 @@ @import "./views/rooms/_RoomSublist2.scss"; @import "./views/rooms/_RoomTile.scss"; @import "./views/rooms/_RoomTile2.scss"; +@import "./views/rooms/_RoomTileIcon.scss"; @import "./views/rooms/_RoomUpgradeWarningBar.scss"; @import "./views/rooms/_SearchBar.scss"; @import "./views/rooms/_SendMessageComposer.scss"; diff --git a/res/css/views/rooms/_RoomTile2.scss b/res/css/views/rooms/_RoomTile2.scss index 2e9fe4a31e..001499fea5 100644 --- a/res/css/views/rooms/_RoomTile2.scss +++ b/res/css/views/rooms/_RoomTile2.scss @@ -34,28 +34,10 @@ limitations under the License. margin-right: 8px; position: relative; - .mx_RoomTile2_publicRoom { - width: 12px; - height: 12px; - border-radius: 12px; - background-color: $roomlist2-bg-color; // to match the room list itself + .mx_RoomTileIcon { position: absolute; bottom: 0; right: 0; - - &::before { - content: ''; - width: 8px; - height: 8px; - top: 2px; - left: 2px; - position: absolute; - mask-position: center; - mask-size: contain; - mask-repeat: no-repeat; - background: $primary-fg-color; - mask-image: url('$(res)/img/globe.svg'); - } } } diff --git a/res/css/views/rooms/_RoomTileIcon.scss b/res/css/views/rooms/_RoomTileIcon.scss new file mode 100644 index 0000000000..adc8ea2994 --- /dev/null +++ b/res/css/views/rooms/_RoomTileIcon.scss @@ -0,0 +1,69 @@ +/* +Copyright 2020 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_RoomTileIcon { + width: 12px; + height: 12px; + border-radius: 12px; + background-color: $roomlist2-bg-color; // to match the room list itself +} + +.mx_RoomTileIcon_globe::before { + content: ''; + width: 8px; + height: 8px; + top: 2px; + left: 2px; + position: absolute; + mask-position: center; + mask-size: contain; + mask-repeat: no-repeat; + background: $primary-fg-color; + mask-image: url('$(res)/img/globe.svg'); +} + +.mx_RoomTileIcon_offline::before { + content: ''; + width: 8px; + height: 8px; + top: 2px; + left: 2px; + position: absolute; + border-radius: 8px; + background-color: $presence-offline; +} + +.mx_RoomTileIcon_online::before { + content: ''; + width: 8px; + height: 8px; + top: 2px; + left: 2px; + position: absolute; + border-radius: 8px; + background-color: $presence-online; +} + +.mx_RoomTileIcon_away::before { + content: ''; + width: 8px; + height: 8px; + top: 2px; + left: 2px; + position: absolute; + border-radius: 8px; + background-color: $presence-away; +} diff --git a/res/themes/light/css/_light.scss b/res/themes/light/css/_light.scss index 18a25b2663..355cc1301c 100644 --- a/res/themes/light/css/_light.scss +++ b/res/themes/light/css/_light.scss @@ -186,6 +186,10 @@ $roomtile2-preview-color: #9e9e9e; $roomtile2-default-badge-bg-color: #61708b; $roomtile2-selected-bg-color: #FFF; +$presence-online: $accent-color; +$presence-away: orange; // TODO: Get color +$presence-offline: #E3E8F0; + // ******************** $roomtile-name-color: #61708b; diff --git a/src/components/views/rooms/RoomTile2.tsx b/src/components/views/rooms/RoomTile2.tsx index f0d99eed99..8343851f66 100644 --- a/src/components/views/rooms/RoomTile2.tsx +++ b/src/components/views/rooms/RoomTile2.tsx @@ -21,7 +21,7 @@ import React, { createRef } from "react"; import { Room } from "matrix-js-sdk/src/models/room"; import classNames from "classnames"; import { RovingTabIndexWrapper } from "../../../accessibility/RovingTabIndex"; -import AccessibleButton, {ButtonEvent} from "../../views/elements/AccessibleButton"; +import AccessibleButton, { ButtonEvent } from "../../views/elements/AccessibleButton"; import RoomAvatar from "../../views/avatars/RoomAvatar"; import dis from '../../../dispatcher/dispatcher'; import { Key } from "../../../Keyboard"; @@ -31,6 +31,7 @@ import { _t } from "../../../languageHandler"; import { ContextMenu, ContextMenuButton } from "../../structures/ContextMenu"; import { DefaultTagID, TagID } from "../../../stores/room-list/models"; import { MessagePreviewStore } from "../../../stores/MessagePreviewStore"; +import RoomTileIcon from "./RoomTileIcon"; /******************************************************************* * CAUTION * @@ -86,12 +87,6 @@ export default class RoomTile2 extends React.Component { ActiveRoomObserver.addListener(this.props.room.roomId, this.onActiveRoomUpdate); } - private get isPublicRoom(): boolean { - const joinRules = this.props.room.currentState.getStateEvents("m.room.join_rules", ""); - const joinRule = joinRules && joinRules.getContent().join_rule; - return joinRule === 'public'; - } - public componentWillUnmount() { if (this.props.room) { ActiveRoomObserver.removeListener(this.props.room.roomId, this.onActiveRoomUpdate); @@ -187,25 +182,25 @@ export default class RoomTile2 extends React.Component {
      • this.onTagRoom(e, DefaultTagID.Favourite)}> - + {_t("Favourite")}
      • this.onTagRoom(e, DefaultTagID.LowPriority)}> - + {_t("Low Priority")}
      • this.onTagRoom(e, DefaultTagID.DM)}> - + {_t("Direct Chat")}
      • - + {_t("Settings")}
      • @@ -215,7 +210,7 @@ export default class RoomTile2 extends React.Component {
        • - + {_t("Leave Room")}
        • @@ -253,7 +248,7 @@ export default class RoomTile2 extends React.Component { 'mx_RoomTile2_minimized': this.props.isMinimized, }); - const badge = ; + const badge = ; // TODO: the original RoomTile uses state for the room name. Do we need to? let name = this.props.room.name; @@ -294,11 +289,6 @@ export default class RoomTile2 extends React.Component { ); if (this.props.isMinimized) nameContainer = null; - let globe = null; - if (this.isPublicRoom && this.props.tag !== DefaultTagID.DM) { - globe = ; // sizing and such set by CSS - } - const avatarSize = 32; return ( @@ -316,7 +306,7 @@ export default class RoomTile2 extends React.Component { >
          - {globe} +
          {nameContainer}
          diff --git a/src/components/views/rooms/RoomTileIcon.tsx b/src/components/views/rooms/RoomTileIcon.tsx new file mode 100644 index 0000000000..fb967bb811 --- /dev/null +++ b/src/components/views/rooms/RoomTileIcon.tsx @@ -0,0 +1,148 @@ +/* +Copyright 2015, 2016 OpenMarket Ltd +Copyright 2017 New Vector Ltd +Copyright 2018 Michael Telatynski <7t3chguy@gmail.com> +Copyright 2019, 2020 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 { Room } from "matrix-js-sdk/src/models/room"; +import { RovingTabIndexWrapper } from "../../../accessibility/RovingTabIndex"; +import AccessibleButton from "../../views/elements/AccessibleButton"; +import RoomAvatar from "../../views/avatars/RoomAvatar"; +import ActiveRoomObserver from "../../../ActiveRoomObserver"; +import { DefaultTagID, TagID } from "../../../stores/room-list/models"; +import { User } from "matrix-js-sdk/src/models/user"; +import {MatrixEvent} from "matrix-js-sdk/src/models/event"; +import DMRoomMap from "../../../utils/DMRoomMap"; +import { MatrixClientPeg } from "../../../MatrixClientPeg"; +import SdkConfig from "../../../SdkConfig"; +import { isPresenceEnabled } from "../../../utils/presence"; + +enum Icon { + // Note: the names here are used in CSS class names + None = "NONE", // ... except this one + Globe = "GLOBE", + PresenceOnline = "ONLINE", + PresenceAway = "AWAY", + PresenceOffline = "OFFLINE", +} + +interface IProps { + room: Room; + tag: TagID; +} + +interface IState { + icon: Icon; +} + +export default class RoomTileIcon extends React.Component { + private isUnmounted = false; + private dmUser: User; + private isWatchingTimeline = false; + + constructor(props: IProps) { + super(props); + + this.state = { + icon: this.getIcon(), + }; + } + + private get isPublicRoom(): boolean { + const joinRules = this.props.room.currentState.getStateEvents("m.room.join_rules", ""); + const joinRule = joinRules && joinRules.getContent().join_rule; + return joinRule === 'public'; + } + + public componentWillUnmount() { + this.isUnmounted = true; + if (this.isWatchingTimeline) this.props.room.off('Room.timeline', this.onRoomTimeline); + this.unsubscribePresence(); + } + + private unsubscribePresence() { + if (this.dmUser) { + this.dmUser.off('User.currentlyActive', this.onPresenceUpdate); + this.dmUser.off('User.presence', this.onPresenceUpdate); + } + } + + private onRoomTimeline = (ev: MatrixEvent, room: Room) => { + if (this.isUnmounted) return; + + // apparently these can happen? + if (!room) return; + if (this.props.room.roomId !== room.roomId) return; + + if (ev.getType() === 'm.room.join_rules' || ev.getType() === 'm.room.member') { + this.setState({icon: this.getIcon()}); + } + }; + + private onPresenceUpdate = () => { + if (this.isUnmounted) return; + + let newIcon = this.getPresenceIcon(); + if (newIcon !== this.state.icon) this.setState({icon: newIcon}); + }; + + private getPresenceIcon(): Icon { + let newIcon = Icon.None; + + const isOnline = this.dmUser.currentlyActive || this.dmUser.presence === 'online'; + if (isOnline) { + newIcon = Icon.PresenceOnline; + } else if (this.dmUser.presence === 'offline') { + newIcon = Icon.PresenceOffline; + } else if (this.dmUser.presence === 'unavailable') { + newIcon = Icon.PresenceAway; + } + + return newIcon; + } + + private getIcon(): Icon { + let defaultIcon = Icon.None; + this.unsubscribePresence(); + if (this.props.tag === DefaultTagID.DM && this.props.room.getJoinedMemberCount() === 2) { + // Track presence, if available + if (isPresenceEnabled()) { + const otherUserId = DMRoomMap.shared().getUserIdForRoomId(this.props.room.roomId); + if (otherUserId) { + this.dmUser = MatrixClientPeg.get().getUser(otherUserId); + if (this.dmUser) { + this.dmUser.on('User.currentlyActive', this.onPresenceUpdate); + this.dmUser.on('User.presence', this.onPresenceUpdate); + defaultIcon = this.getPresenceIcon(); + } + } + } + } else { + // Track publicity + defaultIcon = this.isPublicRoom ? Icon.Globe : Icon.None; + this.props.room.on('Room.timeline', this.onRoomTimeline); + this.isWatchingTimeline = true; + } + return defaultIcon; + } + + public render(): React.ReactElement { + if (this.state.icon === Icon.None) return null; + + return ; + } +} diff --git a/src/utils/presence.ts b/src/utils/presence.ts new file mode 100644 index 0000000000..f2c208265e --- /dev/null +++ b/src/utils/presence.ts @@ -0,0 +1,26 @@ +/* +Copyright 2020 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 { MatrixClientPeg } from "../MatrixClientPeg"; +import SdkConfig from "../SdkConfig"; + +export function isPresenceEnabled() { + const hsUrl = MatrixClientPeg.get().baseUrl; + const urls = SdkConfig.get()['enable_presence_by_hs_url']; + if (!urls) return true; + if (urls[hsUrl] || urls[hsUrl] === undefined) return true; + return false; +} From 049e3fc08c6bf55789151658b54d70ecf42f9d94 Mon Sep 17 00:00:00 2001 From: Dale Harvey Date: Thu, 30 Jan 2020 11:18:14 +0100 Subject: [PATCH 35/64] Add some media queries to improve UI on mobile --- res/css/views/auth/_AuthBody.scss | 8 +++++++- res/css/views/auth/_AuthHeader.scss | 6 ++++++ res/css/views/auth/_AuthHeaderLogo.scss | 6 ++++++ res/css/views/auth/_AuthPage.scss | 6 ++++++ res/css/views/rooms/_EventTile.scss | 11 +++++++++++ res/css/views/rooms/_RoomHeader.scss | 9 +++++++++ 6 files changed, 45 insertions(+), 1 deletion(-) diff --git a/res/css/views/auth/_AuthBody.scss b/res/css/views/auth/_AuthBody.scss index 120da4c4f1..a19dddf43f 100644 --- a/res/css/views/auth/_AuthBody.scss +++ b/res/css/views/auth/_AuthBody.scss @@ -16,7 +16,7 @@ limitations under the License. */ .mx_AuthBody { - width: 500px; + max-width: 500px; font-size: $font-12px; color: $authpage-secondary-color; background-color: $authpage-body-bg-color; @@ -146,3 +146,9 @@ limitations under the License. .mx_AuthBody_spinner { margin: 1em 0; } + +@media only screen and (max-width : 480px) { + .mx_AuthBody { + padding: 10px; + } +} diff --git a/res/css/views/auth/_AuthHeader.scss b/res/css/views/auth/_AuthHeader.scss index b3d07b1925..0527f65beb 100644 --- a/res/css/views/auth/_AuthHeader.scss +++ b/res/css/views/auth/_AuthHeader.scss @@ -21,3 +21,9 @@ limitations under the License. padding: 25px 40px; box-sizing: border-box; } + +@media only screen and (max-width : 480px) { + .mx_AuthHeader { + display: none; + } +} diff --git a/res/css/views/auth/_AuthHeaderLogo.scss b/res/css/views/auth/_AuthHeaderLogo.scss index 091fb0197b..4ef7f95fff 100644 --- a/res/css/views/auth/_AuthHeaderLogo.scss +++ b/res/css/views/auth/_AuthHeaderLogo.scss @@ -23,3 +23,9 @@ limitations under the License. .mx_AuthHeaderLogo img { width: 100%; } + +@media only screen and (max-width : 480px) { + .mx_AuthHeaderLogo { + display: none; + } +} diff --git a/res/css/views/auth/_AuthPage.scss b/res/css/views/auth/_AuthPage.scss index 8ef48b6265..e58095c70c 100644 --- a/res/css/views/auth/_AuthPage.scss +++ b/res/css/views/auth/_AuthPage.scss @@ -29,3 +29,9 @@ limitations under the License. box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.33); background-color: $authpage-modal-bg-color; } + +@media only screen and (max-width : 480px) { + .mx_AuthPage_modal { + margin-top: 0; + } +} diff --git a/res/css/views/rooms/_EventTile.scss b/res/css/views/rooms/_EventTile.scss index 40a80f17bb..0e0552e3c8 100644 --- a/res/css/views/rooms/_EventTile.scss +++ b/res/css/views/rooms/_EventTile.scss @@ -572,3 +572,14 @@ limitations under the License. margin-left: 1em; } } + +@media only screen and (max-width : 480px) { + .mx_EventTile_line, .mx_EventTile_reply { + padding-left: 0; + margin-right: 0; + } + .mx_EventTile_content { + margin-top: 10px; + margin-right: 0; + } +} diff --git a/res/css/views/rooms/_RoomHeader.scss b/res/css/views/rooms/_RoomHeader.scss index 80f6c40f39..265e39624e 100644 --- a/res/css/views/rooms/_RoomHeader.scss +++ b/res/css/views/rooms/_RoomHeader.scss @@ -267,3 +267,12 @@ limitations under the License. .mx_RoomHeader_pinsIndicatorUnread { background-color: $pinned-unread-color; } + +@media only screen and (max-width : 480px) { + .mx_RoomHeader_wrapper { + padding: 0; + } + .mx_RoomHeader { + overflow: hidden; + } +} From af1c2f9b2902780f5b300a0cebe15ce85842f6b8 Mon Sep 17 00:00:00 2001 From: Jovan Gerodetti Date: Wed, 27 May 2020 19:33:55 +0200 Subject: [PATCH 36/64] fix requested changes from #3991 Signed-off-by: Jovan Gerodetti --- res/css/views/auth/_AuthBody.scss | 13 ++++++++----- res/css/views/auth/_AuthHeader.scss | 8 ++++---- res/css/views/auth/_AuthHeaderLogo.scss | 8 ++++---- res/css/views/auth/_AuthPage.scss | 8 ++++---- res/css/views/rooms/_EventTile.scss | 18 +++++++++--------- res/css/views/rooms/_RoomHeader.scss | 14 +++++++------- 6 files changed, 36 insertions(+), 33 deletions(-) diff --git a/res/css/views/auth/_AuthBody.scss b/res/css/views/auth/_AuthBody.scss index a19dddf43f..b8bb1b04c2 100644 --- a/res/css/views/auth/_AuthBody.scss +++ b/res/css/views/auth/_AuthBody.scss @@ -16,7 +16,7 @@ limitations under the License. */ .mx_AuthBody { - max-width: 500px; + width: 500px; font-size: $font-12px; color: $authpage-secondary-color; background-color: $authpage-body-bg-color; @@ -147,8 +147,11 @@ limitations under the License. margin: 1em 0; } -@media only screen and (max-width : 480px) { - .mx_AuthBody { - padding: 10px; - } +@media only screen and (max-width: 480px) { + .mx_AuthBody { + border-radius: 4px; + width: auto; + max-width: 500px; + padding: 10px; + } } diff --git a/res/css/views/auth/_AuthHeader.scss b/res/css/views/auth/_AuthHeader.scss index 0527f65beb..b1372affee 100644 --- a/res/css/views/auth/_AuthHeader.scss +++ b/res/css/views/auth/_AuthHeader.scss @@ -22,8 +22,8 @@ limitations under the License. box-sizing: border-box; } -@media only screen and (max-width : 480px) { - .mx_AuthHeader { - display: none; - } +@media only screen and (max-width: 480px) { + .mx_AuthHeader { + display: none; + } } diff --git a/res/css/views/auth/_AuthHeaderLogo.scss b/res/css/views/auth/_AuthHeaderLogo.scss index 4ef7f95fff..917dcabf67 100644 --- a/res/css/views/auth/_AuthHeaderLogo.scss +++ b/res/css/views/auth/_AuthHeaderLogo.scss @@ -24,8 +24,8 @@ limitations under the License. width: 100%; } -@media only screen and (max-width : 480px) { - .mx_AuthHeaderLogo { - display: none; - } +@media only screen and (max-width: 480px) { + .mx_AuthHeaderLogo { + display: none; + } } diff --git a/res/css/views/auth/_AuthPage.scss b/res/css/views/auth/_AuthPage.scss index e58095c70c..e3409792f0 100644 --- a/res/css/views/auth/_AuthPage.scss +++ b/res/css/views/auth/_AuthPage.scss @@ -30,8 +30,8 @@ limitations under the License. background-color: $authpage-modal-bg-color; } -@media only screen and (max-width : 480px) { - .mx_AuthPage_modal { - margin-top: 0; - } +@media only screen and (max-width: 480px) { + .mx_AuthPage_modal { + margin-top: 0; + } } diff --git a/res/css/views/rooms/_EventTile.scss b/res/css/views/rooms/_EventTile.scss index 0e0552e3c8..2b204955d8 100644 --- a/res/css/views/rooms/_EventTile.scss +++ b/res/css/views/rooms/_EventTile.scss @@ -573,13 +573,13 @@ limitations under the License. } } -@media only screen and (max-width : 480px) { - .mx_EventTile_line, .mx_EventTile_reply { - padding-left: 0; - margin-right: 0; - } - .mx_EventTile_content { - margin-top: 10px; - margin-right: 0; - } +@media only screen and (max-width: 480px) { + .mx_EventTile_line, .mx_EventTile_reply { + padding-left: 0; + margin-right: 0; + } + .mx_EventTile_content { + margin-top: 10px; + margin-right: 0; + } } diff --git a/res/css/views/rooms/_RoomHeader.scss b/res/css/views/rooms/_RoomHeader.scss index 265e39624e..a047a6f9b4 100644 --- a/res/css/views/rooms/_RoomHeader.scss +++ b/res/css/views/rooms/_RoomHeader.scss @@ -268,11 +268,11 @@ limitations under the License. background-color: $pinned-unread-color; } -@media only screen and (max-width : 480px) { - .mx_RoomHeader_wrapper { - padding: 0; - } - .mx_RoomHeader { - overflow: hidden; - } +@media only screen and (max-width: 480px) { + .mx_RoomHeader_wrapper { + padding: 0; + } + .mx_RoomHeader { + overflow: hidden; + } } From b69a5a525d3b4339d63be3ee5fdbe50e7b612897 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Tue, 16 Jun 2020 17:29:36 -0600 Subject: [PATCH 37/64] Fix spaces --- src/components/views/rooms/RoomTile2.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/components/views/rooms/RoomTile2.tsx b/src/components/views/rooms/RoomTile2.tsx index 8343851f66..0d13f856e9 100644 --- a/src/components/views/rooms/RoomTile2.tsx +++ b/src/components/views/rooms/RoomTile2.tsx @@ -182,25 +182,25 @@ export default class RoomTile2 extends React.Component {
          • this.onTagRoom(e, DefaultTagID.Favourite)}> - + {_t("Favourite")}
          • this.onTagRoom(e, DefaultTagID.LowPriority)}> - + {_t("Low Priority")}
          • this.onTagRoom(e, DefaultTagID.DM)}> - + {_t("Direct Chat")}
          • - + {_t("Settings")}
          • @@ -210,7 +210,7 @@ export default class RoomTile2 extends React.Component {
            • - + {_t("Leave Room")}
            • @@ -248,7 +248,7 @@ export default class RoomTile2 extends React.Component { 'mx_RoomTile2_minimized': this.props.isMinimized, }); - const badge = ; + const badge = ; // TODO: the original RoomTile uses state for the room name. Do we need to? let name = this.props.room.name; From daa552e25021c8d4a67912f42fa741579012b494 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Tue, 16 Jun 2020 17:35:56 -0600 Subject: [PATCH 38/64] Refactor listener usage --- src/components/views/rooms/RoomTileIcon.tsx | 78 +++++++++++---------- 1 file changed, 40 insertions(+), 38 deletions(-) diff --git a/src/components/views/rooms/RoomTileIcon.tsx b/src/components/views/rooms/RoomTileIcon.tsx index fb967bb811..b0cf10e313 100644 --- a/src/components/views/rooms/RoomTileIcon.tsx +++ b/src/components/views/rooms/RoomTileIcon.tsx @@ -1,8 +1,5 @@ /* -Copyright 2015, 2016 OpenMarket Ltd -Copyright 2017 New Vector Ltd -Copyright 2018 Michael Telatynski <7t3chguy@gmail.com> -Copyright 2019, 2020 The Matrix.org Foundation C.I.C. +Copyright 2020 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. @@ -19,16 +16,11 @@ limitations under the License. import React from "react"; import { Room } from "matrix-js-sdk/src/models/room"; -import { RovingTabIndexWrapper } from "../../../accessibility/RovingTabIndex"; -import AccessibleButton from "../../views/elements/AccessibleButton"; -import RoomAvatar from "../../views/avatars/RoomAvatar"; -import ActiveRoomObserver from "../../../ActiveRoomObserver"; import { DefaultTagID, TagID } from "../../../stores/room-list/models"; import { User } from "matrix-js-sdk/src/models/user"; -import {MatrixEvent} from "matrix-js-sdk/src/models/event"; +import { MatrixEvent } from "matrix-js-sdk/src/models/event"; import DMRoomMap from "../../../utils/DMRoomMap"; import { MatrixClientPeg } from "../../../MatrixClientPeg"; -import SdkConfig from "../../../SdkConfig"; import { isPresenceEnabled } from "../../../utils/presence"; enum Icon { @@ -50,15 +42,15 @@ interface IState { } export default class RoomTileIcon extends React.Component { + private _dmUser: User; private isUnmounted = false; - private dmUser: User; private isWatchingTimeline = false; constructor(props: IProps) { super(props); this.state = { - icon: this.getIcon(), + icon: this.calculateIcon(), }; } @@ -68,17 +60,27 @@ export default class RoomTileIcon extends React.Component { return joinRule === 'public'; } + private get dmUser(): User { + return this._dmUser; + } + + private set dmUser(val: User) { + const oldUser = this._dmUser; + this._dmUser = val; + if (oldUser && oldUser !== this._dmUser) { + oldUser.off('User.currentlyActive', this.onPresenceUpdate); + oldUser.off('User.presence', this.onPresenceUpdate); + } + if (this._dmUser && oldUser !== this._dmUser) { + this._dmUser.on('User.currentlyActive', this.onPresenceUpdate); + this._dmUser.on('User.presence', this.onPresenceUpdate); + } + } + public componentWillUnmount() { this.isUnmounted = true; if (this.isWatchingTimeline) this.props.room.off('Room.timeline', this.onRoomTimeline); - this.unsubscribePresence(); - } - - private unsubscribePresence() { - if (this.dmUser) { - this.dmUser.off('User.currentlyActive', this.onPresenceUpdate); - this.dmUser.off('User.presence', this.onPresenceUpdate); - } + this.dmUser = null; // clear listeners, if any } private onRoomTimeline = (ev: MatrixEvent, room: Room) => { @@ -89,7 +91,7 @@ export default class RoomTileIcon extends React.Component { if (this.props.room.roomId !== room.roomId) return; if (ev.getType() === 'm.room.join_rules' || ev.getType() === 'm.room.member') { - this.setState({icon: this.getIcon()}); + this.setState({icon: this.calculateIcon()}); } }; @@ -101,43 +103,43 @@ export default class RoomTileIcon extends React.Component { }; private getPresenceIcon(): Icon { - let newIcon = Icon.None; + if (!this.dmUser) return Icon.None; + + let icon = Icon.None; const isOnline = this.dmUser.currentlyActive || this.dmUser.presence === 'online'; if (isOnline) { - newIcon = Icon.PresenceOnline; + icon = Icon.PresenceOnline; } else if (this.dmUser.presence === 'offline') { - newIcon = Icon.PresenceOffline; + icon = Icon.PresenceOffline; } else if (this.dmUser.presence === 'unavailable') { - newIcon = Icon.PresenceAway; + icon = Icon.PresenceAway; } - return newIcon; + return icon; } - private getIcon(): Icon { - let defaultIcon = Icon.None; - this.unsubscribePresence(); + private calculateIcon(): Icon { + let icon = Icon.None; + if (this.props.tag === DefaultTagID.DM && this.props.room.getJoinedMemberCount() === 2) { // Track presence, if available if (isPresenceEnabled()) { const otherUserId = DMRoomMap.shared().getUserIdForRoomId(this.props.room.roomId); if (otherUserId) { this.dmUser = MatrixClientPeg.get().getUser(otherUserId); - if (this.dmUser) { - this.dmUser.on('User.currentlyActive', this.onPresenceUpdate); - this.dmUser.on('User.presence', this.onPresenceUpdate); - defaultIcon = this.getPresenceIcon(); - } + icon = this.getPresenceIcon(); } } } else { // Track publicity - defaultIcon = this.isPublicRoom ? Icon.Globe : Icon.None; - this.props.room.on('Room.timeline', this.onRoomTimeline); - this.isWatchingTimeline = true; + icon = this.isPublicRoom ? Icon.Globe : Icon.None; + if (!this.isWatchingTimeline) { + this.props.room.on('Room.timeline', this.onRoomTimeline); + this.isWatchingTimeline = true; + } } - return defaultIcon; + return icon; } public render(): React.ReactElement { From 7a71ef9b6bba38b62c388f0cd5abf389b5856b6b Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Tue, 16 Jun 2020 17:40:25 -0600 Subject: [PATCH 39/64] Fix another space --- src/components/views/rooms/RoomTile2.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/views/rooms/RoomTile2.tsx b/src/components/views/rooms/RoomTile2.tsx index 0d13f856e9..edd92836df 100644 --- a/src/components/views/rooms/RoomTile2.tsx +++ b/src/components/views/rooms/RoomTile2.tsx @@ -306,7 +306,7 @@ export default class RoomTile2 extends React.Component { >
              - +
              {nameContainer}
              From 9878c1dc345c14338a978f3c2ebe54b6c3fb6a21 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Tue, 16 Jun 2020 17:42:26 -0600 Subject: [PATCH 40/64] and another --- src/components/views/rooms/RoomTile2.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/views/rooms/RoomTile2.tsx b/src/components/views/rooms/RoomTile2.tsx index edd92836df..671b981ac5 100644 --- a/src/components/views/rooms/RoomTile2.tsx +++ b/src/components/views/rooms/RoomTile2.tsx @@ -305,7 +305,7 @@ export default class RoomTile2 extends React.Component { role="treeitem" >
              - +
              {nameContainer} From b225324c49a505bb14b428ff236a1dda91b6ff5c Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Mon, 15 Jun 2020 10:53:53 +0100 Subject: [PATCH 41/64] improve Field typescript definition Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/components/views/elements/Field.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/views/elements/Field.tsx b/src/components/views/elements/Field.tsx index 771d2182ea..0a3aa8ed71 100644 --- a/src/components/views/elements/Field.tsx +++ b/src/components/views/elements/Field.tsx @@ -18,7 +18,7 @@ import React from 'react'; import classNames from 'classnames'; import * as sdk from '../../../index'; import { debounce } from 'lodash'; -import {IFieldState, IValidationResult} from "../elements/Validation"; +import {IFieldState, IValidationResult} from "./Validation"; // Invoke validation from user input (when typing, etc.) at most once every N ms. const VALIDATION_THROTTLE_MS = 200; @@ -29,7 +29,7 @@ function getId() { return `${BASE_ID}_${count++}`; } -interface IProps extends React.InputHTMLAttributes { +interface IProps extends React.InputHTMLAttributes { // The field's ID, which binds the input and label together. Immutable. id?: string, // The element to create. Defaults to "input". From 1628fc668c6b693cf7b75b2de123c0be759541ce Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Tue, 16 Jun 2020 19:38:54 +0100 Subject: [PATCH 42/64] Fix LocalEchoWrapper cache on falsey room ids Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/settings/handlers/LocalEchoWrapper.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/settings/handlers/LocalEchoWrapper.js b/src/settings/handlers/LocalEchoWrapper.js index 4cbe4891be..fd0510296a 100644 --- a/src/settings/handlers/LocalEchoWrapper.js +++ b/src/settings/handlers/LocalEchoWrapper.js @@ -39,7 +39,7 @@ export default class LocalEchoWrapper extends SettingsHandler { const cacheRoomId = roomId ? roomId : "UNDEFINED"; // avoid weird keys const bySetting = this._cache[settingName]; if (bySetting && bySetting.hasOwnProperty(cacheRoomId)) { - return bySetting[roomId]; + return bySetting[cacheRoomId]; } return this._handler.getValue(settingName, roomId); From a07918fef94334b1b06b8fba7e0d919b9a33328e Mon Sep 17 00:00:00 2001 From: "J. A. Durieux" Date: Tue, 16 Jun 2020 21:46:54 +0000 Subject: [PATCH 43/64] Translated using Weblate (Dutch) Currently translated at 88.9% (2034 of 2287 strings) Translation: Riot Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/riot-web/matrix-react-sdk/nl/ --- src/i18n/strings/nl.json | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/i18n/strings/nl.json b/src/i18n/strings/nl.json index 69909e942e..e0565ec3dd 100644 --- a/src/i18n/strings/nl.json +++ b/src/i18n/strings/nl.json @@ -2211,12 +2211,18 @@ "Are you sure you want to deactivate your account? This is irreversible.": "Weet u zeker dat u uw account wil sluiten? Dit is onomkeerbaar.", "Confirm account deactivation": "Bevestig accountsluiting", "Room name or address": "Gespreksnaam of -adres", - "Joins room with given address": "Treedt tot het gesprek met het opgegeven adres toe", + "Joins room with given address": "Neem aan het gesprek met dat adres deel", "Unrecognised room address:": "Gespreksadres niet herkend:", "Help us improve Riot": "Help ons Riot nog beter te maken", "Send anonymous usage data which helps us improve Riot. This will use a cookie.": "Stuur anonieme gebruiksinformatie waarmee we Riot kunnen verbeteren. Dit plaatst een cookie.", "I want to help": "Ik wil helpen", "Your homeserver has exceeded its user limit.": "Uw thuisserver heeft het maximaal aantal gebruikers overschreden.", "Your homeserver has exceeded one of its resource limits.": "Uw thuisserver heeft een van zijn limieten overschreden.", - "Ok": "Oké" + "Ok": "Oké", + "sent an image.": "heeft een plaatje gestuurd.", + "Light": "Helder", + "Dark": "Donker", + "Set password": "Stel wachtwoord in", + "To return to your account in future you need to set a password": "Zonder wachtwoord kunt u later niet tot uw account terugkeren", + "Restart": "Herstarten" } From 3472fcdec5f5bd70c66acf26fff949a38ea55408 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Tue, 16 Jun 2020 19:39:18 +0100 Subject: [PATCH 44/64] Fix NotificationsEnabledController inverse understanding of master push rule Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/settings/controllers/NotificationControllers.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/settings/controllers/NotificationControllers.js b/src/settings/controllers/NotificationControllers.js index 395da765a1..f74dc22e84 100644 --- a/src/settings/controllers/NotificationControllers.js +++ b/src/settings/controllers/NotificationControllers.js @@ -45,7 +45,7 @@ export class NotificationsEnabledController extends SettingController { if (!getNotifier().isPossible()) return false; if (calculatedValue === null || calculatedAtLevel === "default") { - return isMasterRuleEnabled(); + return !isMasterRuleEnabled(); } return calculatedValue; @@ -63,7 +63,7 @@ export class NotificationBodyEnabledController extends SettingController { if (!getNotifier().isPossible()) return false; if (calculatedValue === null) { - return isMasterRuleEnabled(); + return !isMasterRuleEnabled(); } return calculatedValue; From aab7e0cc144952cbbc7628a26deb726858842075 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Tue, 16 Jun 2020 18:56:56 -0600 Subject: [PATCH 45/64] Fix alignment of checkboxes in new room list's context menu At somepoint the checkbox lost its padding, so we don't need to counteract it. --- res/css/views/rooms/_RoomSublist2.scss | 4 ---- 1 file changed, 4 deletions(-) diff --git a/res/css/views/rooms/_RoomSublist2.scss b/res/css/views/rooms/_RoomSublist2.scss index 3f5f654494..ad827ba3b1 100644 --- a/res/css/views/rooms/_RoomSublist2.scss +++ b/res/css/views/rooms/_RoomSublist2.scss @@ -320,8 +320,4 @@ limitations under the License. .mx_RadioButton, .mx_Checkbox { margin-top: 8px; } - - .mx_Checkbox { - margin-left: -8px; // to counteract the indent from the component - } } From 3dcf52538213928d57074373b9871d89e93335b0 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Wed, 17 Jun 2020 02:14:20 +0100 Subject: [PATCH 46/64] Improve Field ts definitions some more Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/components/views/elements/Field.tsx | 58 ++++++++++++++++--------- 1 file changed, 37 insertions(+), 21 deletions(-) diff --git a/src/components/views/elements/Field.tsx b/src/components/views/elements/Field.tsx index 0a3aa8ed71..63bdce3e3b 100644 --- a/src/components/views/elements/Field.tsx +++ b/src/components/views/elements/Field.tsx @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; +import React, {InputHTMLAttributes, SelectHTMLAttributes, TextareaHTMLAttributes} from 'react'; import classNames from 'classnames'; import * as sdk from '../../../index'; import { debounce } from 'lodash'; @@ -29,45 +29,61 @@ function getId() { return `${BASE_ID}_${count++}`; } -interface IProps extends React.InputHTMLAttributes { +interface IProps { // The field's ID, which binds the input and label together. Immutable. - id?: string, - // The element to create. Defaults to "input". - // To define options for a select, use - element?: "input" | "select" | "textarea", + id?: string; // The field's type (when used as an ). Defaults to "text". - type?: string, + type?: string; // id of a element for suggestions - list?: string, + list?: string; // The field's label string. - label?: string, + label?: string; // The field's placeholder string. Defaults to the label. - placeholder?: string, - // The field's value. - // This is a controlled component, so the value is required. - value: string, + placeholder?: string; // Optional component to include inside the field before the input. - prefixComponent?: React.ReactNode, + prefixComponent?: React.ReactNode; // Optional component to include inside the field after the input. - postfixComponent?: React.ReactNode, + postfixComponent?: React.ReactNode; // The callback called whenever the contents of the field // changes. Returns an object with `valid` boolean field // and a `feedback` react component field to provide feedback // to the user. - onValidate?: (input: IFieldState) => Promise, + onValidate?: (input: IFieldState) => Promise; // If specified, overrides the value returned by onValidate. - flagInvalid?: boolean, + flagInvalid?: boolean; // If specified, contents will appear as a tooltip on the element and // validation feedback tooltips will be suppressed. - tooltipContent?: React.ReactNode, + tooltipContent?: React.ReactNode; // If specified alongside tooltipContent, the class name to apply to the // tooltip itself. - tooltipClassName?: string, + tooltipClassName?: string; // If specified, an additional class name to apply to the field container - className?: string, + className?: string; // All other props pass through to the . } +interface IInputProps extends IProps, InputHTMLAttributes { + // The element to create. Defaults to "input". + element?: "input"; + // The input's value. This is a controlled component, so the value is required. + value: string; +} + +interface ISelectProps extends IProps, SelectHTMLAttributes { + // To define options for a select, use + element: "select"; + // The select's value. This is a controlled component, so the value is required. + value: string; +} + +interface ITextareaProps extends IProps, TextareaHTMLAttributes { + element: "textarea"; + // The textarea's value. This is a controlled component, so the value is required. + value: string; +} + +type PropShapes = IInputProps | ISelectProps | ITextareaProps; + interface IState { valid: boolean, feedback: React.ReactNode, @@ -75,7 +91,7 @@ interface IState { focused: boolean, } -export default class Field extends React.PureComponent { +export default class Field extends React.PureComponent { private id: string; private input: HTMLInputElement; From 493a2c3861aee25dbd35838136a8241e6beb3ea0 Mon Sep 17 00:00:00 2001 From: random Date: Wed, 17 Jun 2020 10:49:17 +0000 Subject: [PATCH 47/64] Translated using Weblate (Italian) Currently translated at 99.6% (2278 of 2287 strings) Translation: Riot Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/riot-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 8272dc126b..2ffe6dfef2 100644 --- a/src/i18n/strings/it.json +++ b/src/i18n/strings/it.json @@ -2502,5 +2502,15 @@ "Leave Room": "Lascia stanza", "Room options": "Opzioni stanza", "Activity": "Attività", - "A-Z": "A-Z" + "A-Z": "A-Z", + "Light": "Chiaro", + "Dark": "Scuro", + "Customise your appearance": "Personalizza l'aspetto", + "Appearance Settings only affect this Riot session.": "Le impostazioni dell'aspetto hanno effetto solo in questa sessione di Riot.", + "Recovery Key": "Chiave di recupero", + "This isn't the recovery key for your account": "Questa non è la chiave di recupero del tuo account", + "This isn't a valid recovery key": "Questa non è una chiave di ripristino valida", + "Looks good!": "Sembra giusta!", + "Use Recovery Key or Passphrase": "Usa la chiave o password di recupero", + "Use Recovery Key": "Usa chiave di recupero" } From 6df57eccebeb4cc88d67242edef30bab56063647 Mon Sep 17 00:00:00 2001 From: Alexey Murz Korepov Date: Wed, 17 Jun 2020 10:15:14 +0000 Subject: [PATCH 48/64] Translated using Weblate (Russian) Currently translated at 86.8% (1985 of 2287 strings) Translation: Riot Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/riot-web/matrix-react-sdk/ru/ --- src/i18n/strings/ru.json | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/i18n/strings/ru.json b/src/i18n/strings/ru.json index be9c6bfdd4..eaf38d6fe4 100644 --- a/src/i18n/strings/ru.json +++ b/src/i18n/strings/ru.json @@ -97,13 +97,13 @@ "Who can read history?": "Кто может читать историю?", "You do not have permission to post to this room": "Вы не можете писать в эту комнату", "You have no visible notifications": "Нет видимых уведомлений", - "%(targetName)s accepted an invitation.": "%(targetName)s принимает приглашение.", - "%(targetName)s accepted the invitation for %(displayName)s.": "%(targetName)s принимает приглашение от %(displayName)s.", + "%(targetName)s accepted an invitation.": "%(targetName)s принял приглашение.", + "%(targetName)s accepted the invitation for %(displayName)s.": "%(targetName)s принял приглашение от %(displayName)s.", "Active call": "Активный вызов", "%(senderName)s answered the call.": "%(senderName)s ответил(а) на звонок.", "%(senderName)s banned %(targetName)s.": "%(senderName)s забанил(а) %(targetName)s.", "Call Timeout": "Нет ответа", - "%(senderName)s changed their profile picture.": "%(senderName)s изменяет свой аватар.", + "%(senderName)s changed their profile picture.": "%(senderName)s изменил свой аватар.", "%(senderName)s changed the power level of %(powerLevelDiffText)s.": "%(senderName)s изменил(а) уровни прав %(powerLevelDiffText)s.", "%(senderDisplayName)s changed the room name to %(roomName)s.": "%(senderDisplayName)s изменил(а) название комнаты на %(roomName)s.", "%(senderDisplayName)s changed the topic to \"%(topic)s\".": "%(senderDisplayName)s изменил(а) тему комнаты на \"%(topic)s\".", @@ -115,8 +115,8 @@ "Failure to create room": "Не удалось создать комнату", "%(userId)s from %(fromPowerLevel)s to %(toPowerLevel)s": "для %(userId)s с %(fromPowerLevel)s на %(toPowerLevel)s", "click to reveal": "нажмите для открытия", - "%(senderName)s invited %(targetName)s.": "%(senderName)s приглашает %(targetName)s.", - "%(targetName)s joined the room.": "%(targetName)s входит в комнату.", + "%(senderName)s invited %(targetName)s.": "%(senderName)s пригласил %(targetName)s.", + "%(targetName)s joined the room.": "%(targetName)s вошёл в комнату.", "%(senderName)s kicked %(targetName)s.": "%(senderName)s выгнал(а) %(targetName)s.", "%(targetName)s left the room.": "%(targetName)s покидает комнату.", "%(senderName)s made future room history visible to all room members, from the point they are invited.": "%(senderName)s сделал(а) историю разговора видимой для всех собеседников с момента их приглашения.", @@ -223,9 +223,9 @@ "Reason": "Причина", "%(targetName)s rejected the invitation.": "%(targetName)s отклонил(а) приглашение.", "Reject invitation": "Отклонить приглашение", - "%(senderName)s removed their display name (%(oldDisplayName)s).": "%(senderName)s удаляет своё отображаемое имя (%(oldDisplayName)s).", - "%(senderName)s removed their profile picture.": "%(senderName)s удаляет свой аватар.", - "%(senderName)s requested a VoIP conference.": "%(senderName)s хочет начать конференц-звонок.", + "%(senderName)s removed their display name (%(oldDisplayName)s).": "%(senderName)s удалил своё отображаемое имя (%(oldDisplayName)s).", + "%(senderName)s removed their profile picture.": "%(senderName)s удалил свой аватар.", + "%(senderName)s requested a VoIP conference.": "%(senderName)s запросил конференц-звонок.", "Riot does not have permission to send you notifications - please check your browser settings": "У Riot нет разрешения на отправку уведомлений — проверьте настройки браузера", "Riot was not given permission to send notifications - please try again": "Riot не получил разрешение на отправку уведомлений, пожалуйста, попробуйте снова", "riot-web version:": "версия riot-web:", @@ -302,8 +302,8 @@ "Server may be unavailable, overloaded, or you hit a bug.": "Возможно, сервер недоступен, перегружен или случилась ошибка.", "Server unavailable, overloaded, or something else went wrong.": "Возможно, сервер недоступен, перегружен или что-то еще пошло не так.", "Session ID": "ID сессии", - "%(senderName)s set a profile picture.": "%(senderName)s устанавливает себе аватар.", - "%(senderName)s set their display name to %(displayName)s.": "%(senderName)s меняет отображаемое имя на %(displayName)s.", + "%(senderName)s set a profile picture.": "%(senderName)s установил себе аватар.", + "%(senderName)s set their display name to %(displayName)s.": "%(senderName)s изменил отображаемое имя на %(displayName)s.", "Signed Out": "Выполнен выход", "This room is not accessible by remote Matrix servers": "Это комната недоступна из других серверов Matrix", "Tried to load a specific point in this room's timeline, but you do not have permission to view the message in question.": "Попытка загрузить выбранный интервал истории чата этой комнаты не удалась, так как у вас нет разрешений на просмотр.", @@ -696,7 +696,7 @@ "This room is not public. You will not be able to rejoin without an invite.": "Эта комната не является публичной. Вы не сможете войти без приглашения.", "Community IDs cannot be empty.": "ID сообществ не могут быть пустыми.", "In reply to ": "В ответ на ", - "%(oldDisplayName)s changed their display name to %(displayName)s.": "%(oldDisplayName)s меняет отображаемое имя на %(displayName)s.", + "%(oldDisplayName)s changed their display name to %(displayName)s.": "%(oldDisplayName)s изменил отображаемое имя на %(displayName)s.", "Failed to set direct chat tag": "Не удалось установить тег прямого чата", "Failed to remove tag %(tagName)s from room": "Не удалось удалить тег %(tagName)s из комнаты", "Failed to add tag %(tagName)s to room": "Не удалось добавить тег %(tagName)s в комнату", From 26e763d13513e0df51201e4ef8f72cdfc1dd7f63 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Wed, 17 Jun 2020 14:24:11 +0100 Subject: [PATCH 49/64] Fix Styled Checkbox and Radio Button disabled state Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- res/css/views/elements/_StyledCheckbox.scss | 10 ++++++ .../views/elements/_StyledRadioButton.scss | 33 ++++++++++++------- 2 files changed, 31 insertions(+), 12 deletions(-) diff --git a/res/css/views/elements/_StyledCheckbox.scss b/res/css/views/elements/_StyledCheckbox.scss index 5f5447e861..aab448605c 100644 --- a/res/css/views/elements/_StyledCheckbox.scss +++ b/res/css/views/elements/_StyledCheckbox.scss @@ -70,5 +70,15 @@ limitations under the License. & + label > *:not(.mx_Checkbox_background) { margin-left: 10px; } + + &:disabled + label { + opacity: 0.5; + cursor: not-allowed; + } + + &:checked:disabled + label > .mx_Checkbox_background { + background-color: $muted-fg-color; + border-color: rgba($muted-fg-color, 0.5); + } } } diff --git a/res/css/views/elements/_StyledRadioButton.scss b/res/css/views/elements/_StyledRadioButton.scss index a3ae823079..c2edb359dc 100644 --- a/res/css/views/elements/_StyledRadioButton.scss +++ b/res/css/views/elements/_StyledRadioButton.scss @@ -20,7 +20,6 @@ limitations under the License. */ .mx_RadioButton { - $radio-circle-color: $muted-fg-color; $active-radio-circle-color: $accent-color; position: relative; @@ -76,22 +75,32 @@ limitations under the License. border-radius: $font-8px; } } - } - > input[type=radio]:checked { - + div { - border-color: $active-radio-circle-color; + &:checked { + & + div { + border-color: $active-radio-circle-color; - > div { - background: $active-radio-circle-color; + & > div { + background: $active-radio-circle-color; + } } } - } - > input[type=radio]:disabled { - + div { - > div { - display: none; + &:disabled { + & + div, + & + div + span { + opacity: 0.5; + cursor: not-allowed; + } + + & + div { + border-color: $radio-circle-color; + } + } + + &:checked:disabled { + & + div > div { + background-color: $radio-circle-color; } } } From 19d19033d18b7e75ff7f4e04605b9db84cf6357d Mon Sep 17 00:00:00 2001 From: GardeniaFair Date: Wed, 17 Jun 2020 13:33:46 +0000 Subject: [PATCH 50/64] Translated using Weblate (Spanish) Currently translated at 89.7% (2051 of 2287 strings) Translation: Riot Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/riot-web/matrix-react-sdk/es/ --- src/i18n/strings/es.json | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/i18n/strings/es.json b/src/i18n/strings/es.json index 6b6058d837..7951a7844e 100644 --- a/src/i18n/strings/es.json +++ b/src/i18n/strings/es.json @@ -1557,7 +1557,7 @@ "Use your account or create a new one to continue.": "Usa tu cuenta existente o crea una nueva para continuar.", "Create Account": "Crear cuenta", "Sign In": "Registrarse", - "Sends a message as html, without interpreting it as markdown": "Envía un mensaje como html, sin interpretarlo como un markdown", + "Sends a message as html, without interpreting it as markdown": "Envía un mensaje como html, sin interpretarlo en markdown", "Failed to set topic": "No se ha podido establecer el tema", "Command failed": "El comando falló", "Could not find user in room": "No pude encontrar el usuario en la sala", @@ -1747,7 +1747,7 @@ "Can't find this server or its room list": "No puedo encontrar este servidor o su lista de salas", "All rooms": "Todas las salas", "Your server": "Tu", - "Are you sure you want to remove %(serverName)s": "¿Está seguro de querer eliminar %(serverName)s?", + "Are you sure you want to remove %(serverName)s": "¿ Está seguro de querer eliminar %(serverName)s?", "Remove server": "Quitar servidor", "Matrix": "Matrix", "Add a new server": "Añadir un nuevo servidor", @@ -2065,12 +2065,12 @@ "Unable to restore backup": "No se pudo restaurar la copia de seguridad", "No backup found!": "¡No se encontró una copia de seguridad!", "Keys restored": "Se restauraron las claves", - "Failed to decrypt %(failedCount)s sessions!": "¡Error en desencriptar %(failedCount) sesiones!", + "Failed to decrypt %(failedCount)s sessions!": "¡Error en descifrar %(failedCount) sesiones!", "Successfully restored %(sessionCount)s keys": "%(sessionCount)s claves restauradas con éxito", - "Warning: you should only set up key backup from a trusted computer.": "Advertencia: sólo debes configurar la copia de seguridad de claves desde un ordenador de su confianza.", + "Warning: you should only set up key backup from a trusted computer.": "Advertencia: deberías configurar la copia de seguridad de claves solamente usando un ordenador de confianza.", "Access your secure message history and set up secure messaging by entering your recovery passphrase.": "Acceda a su historial de mensajes seguros y configure la mensajería segura introduciendo su contraseña de recuperación.", "If you've forgotten your recovery passphrase you can use your recovery key or set up new recovery options": "Si has olvidado tu contraseña de recuperación puedes usar tu clave de recuperación o configurar nuevas opciones de recuperación ", - "Warning: You should only set up key backup from a trusted computer.": "Advertencia: Sólo debes configurar la copia de seguridad de claves desde un ordenador de su confianza.", + "Warning: You should only set up key backup from a trusted computer.": "Advertencia: Configurar la copia de seguridad de claves solamente usando un ordenador de confianza.", "Access your secure message history and set up secure messaging by entering your recovery key.": "Accede a tu historial de mensajes seguros y configura la mensajería segura introduciendo tu clave de recuperación.", "If you've forgotten your recovery key you can ": "Si has olvidado tu clave de recuperación puedes ", "Resend edit": "Reenviar la edición", @@ -2189,5 +2189,7 @@ "Identity server URL does not appear to be a valid identity server": "La URL del servidor de identidad no parece ser un servidor de identidad válido", "General failure": "Error no especificado", "This homeserver does not support login using email address.": "Este servidor doméstico no admite iniciar sesión con una dirección de correo electrónico.", - "This account has been deactivated.": "Esta cuenta ha sido desactivada." + "This account has been deactivated.": "Esta cuenta ha sido desactivada.", + "Room name or address": "Nombre o dirección de la sala", + "Address (optional)": "Dirección (opcional)" } From fdeba1353bdecc408851cf753a3d44882a622cc3 Mon Sep 17 00:00:00 2001 From: Arnaud Castellanos Galea Date: Wed, 17 Jun 2020 13:49:46 +0000 Subject: [PATCH 51/64] Translated using Weblate (Spanish) Currently translated at 89.7% (2051 of 2287 strings) Translation: Riot Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/riot-web/matrix-react-sdk/es/ --- src/i18n/strings/es.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/i18n/strings/es.json b/src/i18n/strings/es.json index 7951a7844e..a2fde8ef52 100644 --- a/src/i18n/strings/es.json +++ b/src/i18n/strings/es.json @@ -1179,7 +1179,7 @@ "Use a longer keyboard pattern with more turns": "Usa un patrón de tecleo más largo y con más vueltas", "Enable Community Filter Panel": "Habilitar el Panel de Filtro de Comunidad", "Verify this user by confirming the following emoji appear on their screen.": "Verifica este usuario confirmando que los siguientes emojis aparecen en su pantalla.", - "Your Riot is misconfigured": "Riot tiene un error de configuración", + "Your Riot is misconfigured": "Tu Riot está mal configurado", "Whether or not you're logged in (we don't record your username)": "Hayas o no iniciado sesión (no guardamos tu nombre de usuario)", "Whether or not you're using the 'breadcrumbs' feature (avatars above the room list)": "Uses o no los 'breadcrumbs' (iconos sobre la lista de salas)", "A conference call could not be started because the integrations server is not available": "No se pudo iniciar la conferencia porque el servidor de integraciones no está disponible", From 43831b62af1c9095efb2c96d1d535de6b669c314 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jorge=20V=C3=A1squez?= Date: Wed, 17 Jun 2020 13:49:55 +0000 Subject: [PATCH 52/64] Translated using Weblate (Spanish) Currently translated at 89.7% (2051 of 2287 strings) Translation: Riot Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/riot-web/matrix-react-sdk/es/ --- src/i18n/strings/es.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/i18n/strings/es.json b/src/i18n/strings/es.json index a2fde8ef52..e66b81cd07 100644 --- a/src/i18n/strings/es.json +++ b/src/i18n/strings/es.json @@ -977,10 +977,10 @@ "User %(user_id)s does not exist": "El usuario %(user_id)s no existe", "User %(user_id)s may or may not exist": "El usuario %(user_id)s podría o no existir", "Unknown server error": "Error desconocido del servidor", - "Use a few words, avoid common phrases": "Usa unas pocas palabras, evita frases comunes", + "Use a few words, avoid common phrases": "Usa algunas palabras, evita frases comunes", "No need for symbols, digits, or uppercase letters": "No hacen falta símbolos, números o letrás en mayúscula", "Avoid repeated words and characters": "Evita repetir palabras y letras", - "Avoid sequences": "Evita frases", + "Avoid sequences": "Evita secuencias", "Avoid recent years": "Evita años recientes", "Avoid years that are associated with you": "Evita años que estén asociados contigo", "Avoid dates and years that are associated with you": "Evita fechas y años que están asociados contigo", From 9b2bd8c9cd5f366ca26dd3543e51b2218ec8d8b7 Mon Sep 17 00:00:00 2001 From: pebles Date: Wed, 17 Jun 2020 13:50:07 +0000 Subject: [PATCH 53/64] Translated using Weblate (Spanish) Currently translated at 89.7% (2051 of 2287 strings) Translation: Riot Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/riot-web/matrix-react-sdk/es/ --- src/i18n/strings/es.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/i18n/strings/es.json b/src/i18n/strings/es.json index e66b81cd07..8004e5cd88 100644 --- a/src/i18n/strings/es.json +++ b/src/i18n/strings/es.json @@ -1176,7 +1176,7 @@ "Incoming Verification Request": "Petición de verificación entrante", "%(senderDisplayName)s changed the join rule to %(rule)s": "%(senderDisplayName)s cambió la regla para unirse a %(rule)s", "%(senderDisplayName)s changed guest access to %(rule)s": "%(senderDisplayName)s cambió el acceso para invitados a %(rule)s", - "Use a longer keyboard pattern with more turns": "Usa un patrón de tecleo más largo y con más vueltas", + "Use a longer keyboard pattern with more turns": "Usa un patrón de tecleo largo con más vueltas", "Enable Community Filter Panel": "Habilitar el Panel de Filtro de Comunidad", "Verify this user by confirming the following emoji appear on their screen.": "Verifica este usuario confirmando que los siguientes emojis aparecen en su pantalla.", "Your Riot is misconfigured": "Tu Riot está mal configurado", From 5f2d92c607b0557b26ee19c232cd9f633865749e Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Wed, 17 Jun 2020 08:21:08 -0600 Subject: [PATCH 54/64] Make the room list labs setting reload on change Should fix confusing signals sent by having the room list visible but non-functional. --- src/i18n/strings/en_EN.json | 2 +- src/settings/Settings.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index 396c3f9111..4a2c882c54 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -432,7 +432,7 @@ "Render simple counters in room header": "Render simple counters in room header", "Multiple integration managers": "Multiple integration managers", "Try out new ways to ignore people (experimental)": "Try out new ways to ignore people (experimental)", - "Use the improved room list (in development - refresh to apply changes)": "Use the improved room list (in development - refresh to apply changes)", + "Use the improved room list (in development - will refresh to apply changes)": "Use the improved room list (in development - will refresh to apply changes)", "Support adding custom themes": "Support adding custom themes", "Use IRC layout": "Use IRC layout", "Show info about bridges in room settings": "Show info about bridges in room settings", diff --git a/src/settings/Settings.js b/src/settings/Settings.js index fad932fa4b..225af15ec8 100644 --- a/src/settings/Settings.js +++ b/src/settings/Settings.js @@ -140,9 +140,10 @@ export const SETTINGS = { }, "feature_new_room_list": { isFeature: true, - displayName: _td("Use the improved room list (in development - refresh to apply changes)"), + displayName: _td("Use the improved room list (in development - will refresh to apply changes)"), supportedLevels: LEVELS_FEATURE, default: false, + controller: new ReloadOnChangeController(), }, "feature_custom_themes": { isFeature: true, From 0ffb36ac804581ec93bdb47ac8e15203595e10e1 Mon Sep 17 00:00:00 2001 From: XoseM Date: Wed, 17 Jun 2020 13:54:38 +0000 Subject: [PATCH 55/64] Translated using Weblate (Galician) Currently translated at 71.7% (1640 of 2287 strings) Translation: Riot Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/riot-web/matrix-react-sdk/gl/ --- src/i18n/strings/gl.json | 56 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 54 insertions(+), 2 deletions(-) diff --git a/src/i18n/strings/gl.json b/src/i18n/strings/gl.json index 51b1f7fa25..80440a5b43 100644 --- a/src/i18n/strings/gl.json +++ b/src/i18n/strings/gl.json @@ -789,7 +789,7 @@ "Failed to set Direct Message status of room": "Fallo ao establecer o estado Mensaxe Directa da sala", "Monday": "Luns", "Remove from Directory": "Eliminar do directorio", - "Enable them now": "Activalos agora", + "Enable them now": "Activalas agora", "Toolbox": "Ferramentas", "Collecting logs": "Obtendo rexistros", "You must specify an event type!": "Debe indicar un tipo de evento!", @@ -1660,5 +1660,57 @@ "Everyone in this room is verified": "Todas nesta sala están verificadas", "Edit message": "Editar mensaxe", "Mod": "Mod", - "Your key share request has been sent - please check your other sessions for key share requests.": "Enviouse a solicitude de compartir chave - comproba as túas outras sesións para solicitudes de compartir chave." + "Your key share request has been sent - please check your other sessions for key share requests.": "Enviouse a solicitude de compartir chave - comproba as túas outras sesións para solicitudes de compartir chave.", + "Light": "Claro", + "Dark": "Escuro", + "Customise your appearance": "Personaliza o aspecto", + "Appearance Settings only affect this Riot session.": "Os axustes da aparencia só lle afectan a esta sesión Riot.", + "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.": "As solicitudes de compartir Chave envíanse ás outras túas sesións abertas. Se rexeitaches ou obviaches a solicitude nas outras sesións, preme aquí para voltar a facer a solicitude.", + "If your other sessions do not have the key for this message you will not be able to decrypt them.": "Se as túas outras sesións non teñen a chave para esta mensaxe non poderás descifrala.", + "Re-request encryption keys from your other sessions.": "Volta a solicitar chaves de cifrado desde as outras sesións.", + "This message cannot be decrypted": "Esta mensaxe non pode descifrarse", + "Encrypted by an unverified session": "Cifrada por unha sesión non verificada", + "Unencrypted": "Non cifrada", + "Encrypted by a deleted session": "Cifrada por unha sesión eliminada", + "Invite only": "Só por convite", + "Scroll to most recent messages": "Ir ás mensaxes máis recentes", + "Close preview": "Pechar vista previa", + "Emoji picker": "Selector Emoticona", + "Send a reply…": "Responder…", + "Send a message…": "Enviar mensaxe…", + "The conversation continues here.": "A conversa continúa aquí.", + "This room has been replaced and is no longer active.": "Esta sala foi substituída e xa non está activa.", + "Bold": "Resaltado", + "Italics": "Cursiva", + "Code block": "Bloque de código", + "No recently visited rooms": "Sen salas recentes visitadas", + "People": "Persoas", + "Joining room …": "Uníndote a sala…", + "Loading …": "Cargando…", + "Rejecting invite …": "Rexeitando convite…", + "Loading room preview": "Cargando vista previa", + "You were kicked from %(roomName)s by %(memberName)s": "Foches expulsada de %(roomName)s por %(memberName)s", + "Reason: %(reason)s": "Razón: %(reason)s", + "Forget this room": "Esquecer sala", + "You were banned from %(roomName)s by %(memberName)s": "Foches bloqueada en %(roomName)s por %(memberName)s", + "Something went wrong with your invite to %(roomName)s": "Algo fallou co teu convite para %(roomName)s", + "An error (%(errcode)s) was returned while trying to validate your invite. You could try to pass this information on to a room admin.": "Un erro (%(errcode)s) foi devolto ao intentar validar o convite. Podes intentar enviarlle esta información a administración da sala.", + "This invite to %(roomName)s was sent to %(email)s which is not associated with your account": "Este convite para %(roomName)s foi enviado a %(email)s que non está asociado coa túa conta", + "Link this email with your account in Settings to receive invites directly in Riot.": "Liga este email coa túa conta nos Axustes para recibir convites directamente en Riot.", + "This invite to %(roomName)s was sent to %(email)s": "Este convite para %(roomName)s foi enviado a %(email)s", + "Use an identity server in Settings to receive invites directly in Riot.": "Usa un servidor de identidade nos Axustes para recibir convites directamente en Riot.", + "Share this email in Settings to receive invites directly in Riot.": "Comparte este email en Axustes para recibir convites directamente en Riot.", + "Do you want to chat with %(user)s?": "Desexas conversar con %(user)s?", + " wants to chat": " quere conversar", + "Start chatting": "Comeza a conversa", + " invited you": " convidoute", + "Reject & Ignore user": "Rexeitar e Ignorar usuaria", + "This room doesn't exist. Are you sure you're at the right place?": "Esta sala non existe. ¿Tes a certeza de estar no lugar correcto?", + "Try again later, or ask a room admin to check if you have access.": "Inténtao máis tarde, ou pídelle á administración da instancia que comprobe se tes acceso.", + "%(errcode)s was returned while trying to access the room. If you think you're seeing this message in error, please submit a bug report.": "%(errcode)s foi devolto ao intentar acceder a sala. Se cres que esta mensaxe non é correcta, por favor envía un informe de fallo.", + "Never lose encrypted messages": "Non perdas nunca acceso ás mensaxes cifradas", + "Messages in this room are secured with end-to-end encryption. Only you and the recipient(s) have the keys to read these messages.": "As mensaxes nesta sala están aseguradas con cifrado extremo-a-extremo. Só ti e o correspondente(s) tedes as chaves para ler as mensaxes.", + "Securely back up your keys to avoid losing them. Learn more.": "Fai unha copia das chaves para evitar perdelas. Saber máis.", + "Not now": "Agora non", + "Don't ask me again": "Non preguntarme outra vez" } From 00a6277cad80d1a33f8d408f3f79404e7baa3d0d Mon Sep 17 00:00:00 2001 From: XoseM Date: Wed, 17 Jun 2020 14:24:48 +0000 Subject: [PATCH 56/64] Translated using Weblate (Galician) Currently translated at 71.8% (1643 of 2287 strings) Translation: Riot Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/riot-web/matrix-react-sdk/gl/ --- src/i18n/strings/gl.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/gl.json b/src/i18n/strings/gl.json index 80440a5b43..1b7048e169 100644 --- a/src/i18n/strings/gl.json +++ b/src/i18n/strings/gl.json @@ -1712,5 +1712,8 @@ "Messages in this room are secured with end-to-end encryption. Only you and the recipient(s) have the keys to read these messages.": "As mensaxes nesta sala están aseguradas con cifrado extremo-a-extremo. Só ti e o correspondente(s) tedes as chaves para ler as mensaxes.", "Securely back up your keys to avoid losing them. Learn more.": "Fai unha copia das chaves para evitar perdelas. Saber máis.", "Not now": "Agora non", - "Don't ask me again": "Non preguntarme outra vez" + "Don't ask me again": "Non preguntarme outra vez", + "Sort by": "Orde por", + "Activity": "Actividade", + "A-Z": "A-Z" } From 63447413ca36e9bb98e71da2df9319b3cb5eae35 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Wed, 17 Jun 2020 08:28:22 -0600 Subject: [PATCH 57/64] Replace class block with reference to class --- res/css/views/rooms/_RoomSublist2.scss | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/res/css/views/rooms/_RoomSublist2.scss b/res/css/views/rooms/_RoomSublist2.scss index c725b02f84..330a0729a7 100644 --- a/res/css/views/rooms/_RoomSublist2.scss +++ b/res/css/views/rooms/_RoomSublist2.scss @@ -74,11 +74,9 @@ limitations under the License. bottom: 0; } - // We don't have this style because the top is dependent on the room list header's + // We don't have a top style because the top is dependent on the room list header's // height, and is therefore calculated in JS. - //&.mx_RoomSublist2_headerContainer_stickyTop { - // top: 0; - //} + // The class, mx_RoomSublist2_headerContainer_stickyTop, is applied though. } // Sticky Headers End From 5c3aaf46c1c844d786d19b4b96c6b9da7a57c4ab Mon Sep 17 00:00:00 2001 From: XoseM Date: Wed, 17 Jun 2020 14:25:15 +0000 Subject: [PATCH 58/64] Translated using Weblate (Galician) Currently translated at 72.3% (1654 of 2287 strings) Translation: Riot Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/riot-web/matrix-react-sdk/gl/ --- src/i18n/strings/gl.json | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/gl.json b/src/i18n/strings/gl.json index 1b7048e169..f1beaa48d0 100644 --- a/src/i18n/strings/gl.json +++ b/src/i18n/strings/gl.json @@ -1715,5 +1715,18 @@ "Don't ask me again": "Non preguntarme outra vez", "Sort by": "Orde por", "Activity": "Actividade", - "A-Z": "A-Z" + "A-Z": "A-Z", + "Unread rooms": "", + "Always show first": "Mostrar sempre primeiro", + "Show": "Mostrar", + "Message preview": "Vista previa da mensaxe", + "List options": "Opcións da listaxe", + "Add room": "Engadir sala", + "Show %(count)s more|other": "Mostrar %(count)s máis", + "Show %(count)s more|one": "Mostrar %(count)s máis", + "%(count)s unread messages including mentions.|other": "%(count)s mensaxes non lidas incluíndo mencións.", + "%(count)s unread messages including mentions.|one": "1 mención non lida.", + "%(count)s unread messages.|other": "%(count)s mensaxe non lidas.", + "%(count)s unread messages.|one": "1 mensaxe non lida.", + "Unread mentions.": "Mencións non lidas." } From c00d0af986ccc5bda31b58db2199d87a653fd20e Mon Sep 17 00:00:00 2001 From: Besnik Bleta Date: Wed, 17 Jun 2020 14:35:38 +0000 Subject: [PATCH 59/64] Translated using Weblate (Albanian) Currently translated at 99.9% (2284 of 2287 strings) Translation: Riot Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/riot-web/matrix-react-sdk/sq/ --- src/i18n/strings/sq.json | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/sq.json b/src/i18n/strings/sq.json index ed66bbb362..1f8f2ba48c 100644 --- a/src/i18n/strings/sq.json +++ b/src/i18n/strings/sq.json @@ -2496,5 +2496,26 @@ "Show %(count)s more|other": "Shfaq %(count)s të tjera", "Show %(count)s more|one": "Shfaq %(count)s tjetër", "Leave Room": "Dil Nga Dhoma", - "Room options": "Mundësi dhome" + "Room options": "Mundësi dhome", + "Light": "E çelët", + "Dark": "E errët", + "Use the improved room list (in development - will refresh to apply changes)": "Përdorni listën e përmirësuar të dhomave (në zhvillim - që të aplikohen ndryshimet, duhet rifreskuar)", + "Customise your appearance": "Përshtatni dukjen tuaj", + "Appearance Settings only affect this Riot session.": "Rregullimet e Dukjes prekin vetëm këtë sesion Riot.", + "Activity": "Veprimtari", + "A-Z": "A-Z", + "Recovery Key": "Kyç Rimarrjesh", + "This isn't the recovery key for your account": "Ky s’është kyçi i rimarrjeve për llogarinë tuaj", + "This isn't a valid recovery key": "Ky s’është kyç rimarrjesh i vlefshëm", + "Looks good!": "Mirë duket!", + "Use Recovery Key or Passphrase": "Përdorni Kyç ose Frazëkalim Rimarrjesh", + "Use Recovery Key": "Përdorni Kyç Rimarrjesh", + "Enter your Recovery Key or enter a Recovery Passphrase to continue.": "Që të vazhdohet, jepni Kyçin tuaj të Rimarrjeve ose jepni një Frazëkalim Rimarrjesh.", + "Enter your Recovery Key to continue.": "Që të vazhdohet, jepni Kyçin tuaj të Rimarrjeve.", + "Upgrade your Recovery Key to store encryption keys & secrets with your account data. If you lose access to this login you'll need it to unlock your data.": "Që të depozitoni kyçe & të fshehta fshehtëzimi me të dhënat e llogarisë tuaj, përmirësoni Kyçin tuaj të Rimarrjeve. Nëse humbni këto kredenciale hyrjesh, do t’ju duhet të shkyçni të dhënat tuaja.", + "Store your Recovery Key somewhere safe, it can be used to unlock your encrypted messages & data.": "Ruajeni diku të parrezik Kyçin tuaj të Rimarrjeve, mund të përdoret për të shkyçur mesazhet & të dhënat tuaja të fshehtëzuara.", + "Create a Recovery Key to store encryption keys & secrets with your account data. If you lose access to this login you’ll need it to unlock your data.": "Krijoni një Kyç Rimarrjesh që të depozitoni kyçe & të fshehta fshehtëzimi me të dhënat e llogarisë tuaj. Nëse humbni këto kredenciale, do t’ju duhet të shkyçni të dhënat tuaja.", + "Create a Recovery Key": "Krijoni një Kyç Rimarrjesh", + "Upgrade your Recovery Key": "Përmirësoni Kyçin tuaj të Rimarrjeve", + "Store your Recovery Key": "Depozitoni Kyçin tuaj të Rimarrjeve" } From 52ae812ef95cc7305358d5f90be253f7e9c98410 Mon Sep 17 00:00:00 2001 From: XoseM Date: Wed, 17 Jun 2020 14:28:53 +0000 Subject: [PATCH 60/64] Translated using Weblate (Galician) Currently translated at 74.6% (1706 of 2287 strings) Translation: Riot Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/riot-web/matrix-react-sdk/gl/ --- src/i18n/strings/gl.json | 54 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 53 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/gl.json b/src/i18n/strings/gl.json index f1beaa48d0..7cbc115085 100644 --- a/src/i18n/strings/gl.json +++ b/src/i18n/strings/gl.json @@ -1728,5 +1728,57 @@ "%(count)s unread messages including mentions.|one": "1 mención non lida.", "%(count)s unread messages.|other": "%(count)s mensaxe non lidas.", "%(count)s unread messages.|one": "1 mensaxe non lida.", - "Unread mentions.": "Mencións non lidas." + "Unread mentions.": "Mencións non lidas.", + "Unread messages.": "Mensaxes non lidas.", + "Leave Room": "Deixar a Sala", + "Room options": "Opcións da Sala", + "Upgrading this room will shut down the current instance of the room and create an upgraded room with the same name.": "Ao actualizar a sala pecharás a instancia actual da sala e crearás unha versión mellorada co mesmo nome.", + "This room has already been upgraded.": "Esta sala xa foi actualizada.", + "This room is running room version , which this homeserver has marked as unstable.": "A sala está usando a versión , que este servidor considera como non estable.", + "Only room administrators will see this warning": "Só a administración da sala pode ver este aviso", + "Unknown Command": "Comando descoñecido", + "Unrecognised command: %(commandText)s": "Comando non recoñecido: %(commandText)s", + "Hint: Begin your message with // to start it with a slash.": "Truco: Comeza a mensaxe con // para comezar cun trazo.", + "Send as message": "Enviar como mensaxe", + "Failed to connect to integration manager": "Fallou a conexión co xestor de integracións", + "Add some now": "Engade algún agora", + "Failed to revoke invite": "Fallo ao revogar o convite", + "Could not revoke the invite. The server may be experiencing a temporary problem or you do not have sufficient permissions to revoke the invite.": "Non se revogou o convite. O servidor podería estar experimentando un problema temporal ou non tes permisos suficientes para revogar o convite.", + "Revoke invite": "Revogar convite", + "Invited by %(sender)s": "Convidada por %(sender)s", + "Mark all as read": "Marcar todo como lido", + "Error updating main address": "Fallo ao actualizar o enderezo principal", + "There was an error updating the room's main address. It may not be allowed by the server or a temporary failure occurred.": "Algo fallou ao actualizar o enderezo principal da sala. Podería non estar autorizado polo servidor ou ser un fallo temporal.", + "Error creating address": "Fallo ao crear o enderezo", + "There was an error creating that address. It may not be allowed by the server or a temporary failure occurred.": "Algo fallou ao crear ese enderezo. Podería non estar autorizado polo servidor ou ser un fallo temporal.", + "You don't have permission to delete the address.": "Non tes permiso para eliminar o enderezo.", + "There was an error removing that address. It may no longer exist or a temporary error occurred.": "Houbo un erro ao eliminar o enderezo. Podería non existir ou ser un fallo temporal.", + "Error removing address": "Erro ao eliminar o enderezo", + "Main address": "Enderezo principal", + "Local address": "Enderezo local", + "Published Addresses": "Enderezos publicados", + "Other published addresses:": "Outros enderezos publicados:", + "No other published addresses yet, add one below": "Aínda non hai outros enderezos publicados, engade un embaixo", + "New published address (e.g. #alias:server)": "Novo enderezo publicado (ex. #alias:servidor)", + "Local Addresses": "Enderezos locais", + "Room Name": "Nome da sala", + "Room Topic": "Asunto da sala", + "Room avatar": "Avatar da sala", + "Waiting for you to accept on your other session…": "Agardando a que aceptes na túa outra sesión…", + "Waiting for %(displayName)s to accept…": "Agardando a que %(displayName)s acepte…", + "Accepting…": "Aceptando…", + "Start Verification": "Comezar a Verificación", + "Your messages are secured and only you and the recipient have the unique keys to unlock them.": "As túas mensaxes están seguras e só ti e o correspondente tedes as únicas chaves que as desbloquean.", + "In encrypted rooms, your messages are secured and only you and the recipient have the unique keys to unlock them.": "Nas salas cifradas, as túas mensaxes están seguras e só ti e o correspondente tedes as únicas chaves que as desbloquean.", + "Verify User": "Verificar Usuaria", + "For extra security, verify this user by checking a one-time code on both of your devices.": "Para maior seguridade, verifica esta usuaria comprobando o código temporal en dous dos teus dispositivos.", + "Your messages are not secure": "As túas mensaxes non están aseguradas", + "One of the following may be compromised:": "Un dos seguintes podería estar comprometido:", + "Your homeserver": "O teu servidor", + "The homeserver the user you’re verifying is connected to": "O servidor ao que a usuaria que estás a verificar está conectada", + "Yours, or the other users’ internet connection": "A túa, ou a conexión a internet da outra usuaria", + "Yours, or the other users’ session": "A túa, ou a sesión da outra usuaria", + "Trusted": "Confiable", + "Not trusted": "Non confiable", + "%(count)s verified sessions|other": "%(count)s sesións verificadas" } From ff98242d144158f3bf14d8c44e4dfc8c10245061 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Wed, 17 Jun 2020 16:31:42 +0100 Subject: [PATCH 61/64] clean up and fix the isMasterRuleEnabled logic --- .../controllers/NotificationControllers.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/settings/controllers/NotificationControllers.js b/src/settings/controllers/NotificationControllers.js index f74dc22e84..e38a5bded1 100644 --- a/src/settings/controllers/NotificationControllers.js +++ b/src/settings/controllers/NotificationControllers.js @@ -20,18 +20,20 @@ import {MatrixClientPeg} from '../../MatrixClientPeg'; // XXX: This feels wrong. import {PushProcessor} from "matrix-js-sdk/src/pushprocessor"; -function isMasterRuleEnabled() { +// .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 +function isPushNotifyDisabled() { // Return the value of the master push rule as a default const processor = new PushProcessor(MatrixClientPeg.get()); const masterRule = processor.getPushRuleById(".m.rule.master"); if (!masterRule) { console.warn("No master push rule! Notifications are disabled for this user."); - return false; + return true; } - // Why enabled == false means "enabled" is beyond me. - return !masterRule.enabled; + // If the rule is enabled then check it does not notify on everything + return masterRule.enabled && !masterRule.actions.includes("notify"); } function getNotifier() { @@ -45,7 +47,7 @@ export class NotificationsEnabledController extends SettingController { if (!getNotifier().isPossible()) return false; if (calculatedValue === null || calculatedAtLevel === "default") { - return !isMasterRuleEnabled(); + return !isPushNotifyDisabled(); } return calculatedValue; @@ -63,7 +65,7 @@ export class NotificationBodyEnabledController extends SettingController { if (!getNotifier().isPossible()) return false; if (calculatedValue === null) { - return !isMasterRuleEnabled(); + return !isPushNotifyDisabled(); } return calculatedValue; From 54e235b0b9f47fd721d3ab556f6f35c29f9afca3 Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 18 Jun 2020 10:42:33 +0100 Subject: [PATCH 62/64] Remove labs option to cache 'passphrase' (which actually meant SSSS secrets) Fixes https://github.com/vector-im/riot-web/issues/1392 --- src/CrossSigningManager.js | 5 +---- .../views/settings/tabs/user/LabsUserSettingsTab.js | 1 - src/settings/Settings.js | 5 ----- 3 files changed, 1 insertion(+), 10 deletions(-) diff --git a/src/CrossSigningManager.js b/src/CrossSigningManager.js index d40f820ac0..b8a17c0f0d 100644 --- a/src/CrossSigningManager.js +++ b/src/CrossSigningManager.js @@ -34,10 +34,7 @@ let secretStorageBeingAccessed = false; let passphraseOnlyOption = null; function isCachingAllowed() { - return ( - secretStorageBeingAccessed || - SettingsStore.getValue("keepSecretStoragePassphraseForSession") - ); + return secretStorageBeingAccessed; } export class AccessCancelledError extends Error { diff --git a/src/components/views/settings/tabs/user/LabsUserSettingsTab.js b/src/components/views/settings/tabs/user/LabsUserSettingsTab.js index 3e69107159..9724b9934f 100644 --- a/src/components/views/settings/tabs/user/LabsUserSettingsTab.js +++ b/src/components/views/settings/tabs/user/LabsUserSettingsTab.js @@ -66,7 +66,6 @@ export default class LabsUserSettingsTab extends React.Component { -
          ); diff --git a/src/settings/Settings.js b/src/settings/Settings.js index 225af15ec8..5e439a1d71 100644 --- a/src/settings/Settings.js +++ b/src/settings/Settings.js @@ -521,11 +521,6 @@ export const SETTINGS = { displayName: _td("Enable message search in encrypted rooms"), default: true, }, - "keepSecretStoragePassphraseForSession": { - supportedLevels: ['device', 'config'], - displayName: _td("Keep recovery passphrase in memory for this session"), - default: false, - }, "crawlerSleepTime": { supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS, displayName: _td("How fast should messages be downloaded."), From 793c6c549ea7f0971ac841c9a3f77a2c003a3887 Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 18 Jun 2020 10:45:15 +0100 Subject: [PATCH 63/64] Unused import --- src/CrossSigningManager.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/CrossSigningManager.js b/src/CrossSigningManager.js index b8a17c0f0d..cf5df3c29e 100644 --- a/src/CrossSigningManager.js +++ b/src/CrossSigningManager.js @@ -20,7 +20,6 @@ import {MatrixClientPeg} from './MatrixClientPeg'; import { deriveKey } from 'matrix-js-sdk/src/crypto/key_passphrase'; import { decodeRecoveryKey } from 'matrix-js-sdk/src/crypto/recoverykey'; import { _t } from './languageHandler'; -import SettingsStore from './settings/SettingsStore'; import {encodeBase64} from "matrix-js-sdk/src/crypto/olmlib"; // This stores the secret storage private keys in memory for the JS SDK. This is From 3c268a31c8f0461203031bb2417945ad081df993 Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 18 Jun 2020 10:48:18 +0100 Subject: [PATCH 64/64] i18n --- src/i18n/strings/en_EN.json | 1 - 1 file changed, 1 deletion(-) diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index 5de33ada55..c125ca6b6f 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -480,7 +480,6 @@ "Send read receipts for messages (requires compatible homeserver to disable)": "Send read receipts for messages (requires compatible homeserver to disable)", "Show previews/thumbnails for images": "Show previews/thumbnails for images", "Enable message search in encrypted rooms": "Enable message search in encrypted rooms", - "Keep recovery passphrase in memory for this session": "Keep recovery passphrase in memory for this session", "How fast should messages be downloaded.": "How fast should messages be downloaded.", "Manually verify all remote sessions": "Manually verify all remote sessions", "IRC display name width": "IRC display name width",