From 4394a20f87922e768852dd693b7d3eb8ef3f90f4 Mon Sep 17 00:00:00 2001 From: nurjinn jafar Date: Tue, 18 Aug 2020 09:56:38 +0200 Subject: [PATCH 001/319] setting added to User Settings -> Preferences -> Timeline as an opt out for users with german translation --- .../views/settings/tabs/user/PreferencesUserSettingsTab.js | 1 + src/i18n/strings/de_DE.json | 3 ++- src/i18n/strings/en_EN.json | 1 + src/settings/Settings.ts | 5 +++++ 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/components/views/settings/tabs/user/PreferencesUserSettingsTab.js b/src/components/views/settings/tabs/user/PreferencesUserSettingsTab.js index a77815a68c..6ed2fc2e39 100644 --- a/src/components/views/settings/tabs/user/PreferencesUserSettingsTab.js +++ b/src/components/views/settings/tabs/user/PreferencesUserSettingsTab.js @@ -49,6 +49,7 @@ export default class PreferencesUserSettingsTab extends React.Component { 'showAvatarChanges', 'showDisplaynameChanges', 'showImages', + 'dontShowChatEffects', ]; static ADVANCED_SETTINGS = [ diff --git a/src/i18n/strings/de_DE.json b/src/i18n/strings/de_DE.json index 09dbcb2e18..edfe21d9d6 100644 --- a/src/i18n/strings/de_DE.json +++ b/src/i18n/strings/de_DE.json @@ -2361,5 +2361,6 @@ "%(brand)s encountered an error during upload of:": "%(brand)s hat einen Fehler festgestellt beim hochladen von:", "Use your account to sign in to the latest version of the app at ": "Verwende dein Konto um dich an der neusten Version der App anzumelden", "We’re excited to announce Riot is now Element!": "Wir freuen uns bekanntzugeben: Riot ist jetzt Element!", - "Learn more at element.io/previously-riot": "Erfahre mehr unter element.io/previously-riot" + "Learn more at element.io/previously-riot": "Erfahre mehr unter element.io/previously-riot", + "Don't show chat effects": "Chat Effekte nicht zeigen" } diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index 974a96406f..98aee655fe 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -503,6 +503,7 @@ "Manually verify all remote sessions": "Manually verify all remote sessions", "IRC display name width": "IRC display name width", "Enable experimental, compact IRC style layout": "Enable experimental, compact IRC style layout", + "Don't show chat effects": "Don't show chat effects", "Collecting app version information": "Collecting app version information", "Collecting logs": "Collecting logs", "Uploading report": "Uploading report", diff --git a/src/settings/Settings.ts b/src/settings/Settings.ts index 714d80f983..59a3a4799b 100644 --- a/src/settings/Settings.ts +++ b/src/settings/Settings.ts @@ -586,4 +586,9 @@ export const SETTINGS: {[setting: string]: ISetting} = { displayName: _td("Enable experimental, compact IRC style layout"), default: false, }, + "dontShowChatEffects": { + supportedLevels: LEVELS_ACCOUNT_SETTINGS, + displayName: _td("Don't show chat effects"), + default: false, + }, }; From ecd4d6e19ef58f6c0b99a94890a5cd82a53e7c2a Mon Sep 17 00:00:00 2001 From: nurjinn jafar Date: Tue, 18 Aug 2020 17:57:51 +0200 Subject: [PATCH 002/319] test commit for confetti changes --- src/SlashCommands.tsx | 13 ++ src/components/structures/RoomView.js | 7 +- src/components/views/elements/Confetti.js | 209 ++++++++++++++++++++++ src/i18n/strings/de_DE.json | 3 +- src/i18n/strings/en_EN.json | 1 + 5 files changed, 230 insertions(+), 3 deletions(-) create mode 100644 src/components/views/elements/Confetti.js diff --git a/src/SlashCommands.tsx b/src/SlashCommands.tsx index 2063ad3149..2d4d484899 100644 --- a/src/SlashCommands.tsx +++ b/src/SlashCommands.tsx @@ -44,6 +44,7 @@ import { ensureDMExists } from "./createRoom"; import { ViewUserPayload } from "./dispatcher/payloads/ViewUserPayload"; import { Action } from "./dispatcher/actions"; import { EffectiveMembership, getEffectiveMembership } from "./utils/membership"; +import {func} from "prop-types"; // XXX: workaround for https://github.com/microsoft/TypeScript/issues/31816 interface HTMLInputEvent extends Event { @@ -1026,6 +1027,18 @@ export const Commands = [ }, category: CommandCategories.actions, }), + new Command({ + command: "confetti", + description: _td("Throws confetti animation in the chat room"), + args: '/confetti + ', + runFn: function(roomId, args, command) { + return success((async () => { + const cli = MatrixClientPeg.get(); + await cli.sendHtmlMessage(roomId, args); + })()); + }, + category: CommandCategories.messages, + }), // Command definitions for autocompletion ONLY: // /me is special because its not handled by SlashCommands.js and is instead done inside the Composer classes diff --git a/src/components/structures/RoomView.js b/src/components/structures/RoomView.js index 9a61523941..85cb1df848 100644 --- a/src/components/structures/RoomView.js +++ b/src/components/structures/RoomView.js @@ -57,6 +57,7 @@ import MatrixClientContext from "../../contexts/MatrixClientContext"; import { shieldStatusForRoom } from '../../utils/ShieldUtils'; import {Action} from "../../dispatcher/actions"; import {SettingLevel} from "../../settings/SettingLevel"; +import Confetti from "../views/elements/Confetti"; const DEBUG = false; let debuglog = function() {}; @@ -67,7 +68,7 @@ if (DEBUG) { // using bind means that we get to keep useful line numbers in the console debuglog = console.log.bind(console); } - +let confetti; export default createReactClass({ displayName: 'RoomView', propTypes: { @@ -624,12 +625,14 @@ export default createReactClass({ ev.preventDefault(); } }, - onAction: function(payload) { switch (payload.action) { case 'message_send_failed': case 'message_sent': this._checkIfAlone(this.state.room); + confetti = new Confetti('100', '100'); + console.log('confetti sent'); + confetti.animateConfetti('test', 'message'); break; case 'post_sticker_message': this.injectSticker( diff --git a/src/components/views/elements/Confetti.js b/src/components/views/elements/Confetti.js new file mode 100644 index 0000000000..e9dc2c34c0 --- /dev/null +++ b/src/components/views/elements/Confetti.js @@ -0,0 +1,209 @@ +import React from "react"; +import SettingsStore from "../../../../lib/settings/SettingsStore"; +import PropTypes from "prop-types"; + +export default class Confetti extends React.Component { + displayName: 'confetti'; + constructor(props) { + super(props); + this.animateConfetti = this.animateConfetti.bind(this); + this.confetti.start = this.startConfetti; + this.startConfetti = this.startConfetti.bind(this); + this.confetti.stop = this.stopConfetti; + this.confetti.remove = this.removeConfetti; + this.confetti.isRunning = this.isConfettiRunning; + } + static propTypes = { + width: PropTypes.string.isRequired, + height: PropTypes.string.isRequired, + } + confetti = { + //set max confetti count + maxCount: 150, + //set the particle animation speed + speed: 3, + //the confetti animation frame interval in milliseconds + frameInterval: 15, + //the alpha opacity of the confetti (between 0 and 1, where 1 is opaque and 0 is invisible) + alpha: 1.0, + start: null, + }; + colors = ["rgba(30,144,255,", "rgba(107,142,35,", "rgba(255,215,0,", + "rgba(255,192,203,", "rgba(106,90,205,", "rgba(173,216,230,", + "rgba(238,130,238,", "rgba(152,251,152,", "rgba(70,130,180,", + "rgba(244,164,96,", "rgba(210,105,30,", "rgba(220,20,60,"]; + streamingConfetti = false; + animationTimer = null; + lastFrameTime = Date.now(); + particles = []; + waveAngle = 0; + context = null; + supportsAnimationFrame = window.requestAnimationFrame || + window.webkitRequestAnimationFrame || + window.mozRequestAnimationFrame || + window.oRequestAnimationFrame || + window.msRequestAnimationFrame; + + resetParticle(particle, width, height) { + particle.color = this.colors[(Math.random() * this.colors.length) | 0] + (this.confetti.alpha + ")"); + particle.color2 = this.colors[(Math.random() * this.colors.length) | 0] + (this.confetti.alpha + ")"); + particle.x = Math.random() * width; + particle.y = Math.random() * height - height; + particle.diameter = Math.random() * 10 + 5; + particle.tilt = Math.random() * 10 - 10; + particle.tiltAngleIncrement = Math.random() * 0.07 + 0.05; + particle.tiltAngle = Math.random() * Math.PI; + return particle; + } + + startConfetti(timeout) { + const width = window.innerWidth; + const height = window.innerHeight; + window.requestAnimationFrame = () => { + return window.requestAnimationFrame || + window.webkitRequestAnimationFrame || + window.mozRequestAnimationFrame || + window.oRequestAnimationFrame || + window.msRequestAnimationFrame || + function(callback) { + return window.setTimeout(callback, this.confetti.frameInterval); + }; + }; + let canvas = document.getElementById("confetti-canvas"); + if (canvas === null) { + canvas = document.createElement("canvas"); + canvas.setAttribute("id", "confetti-canvas"); + canvas.setAttribute("style", "display:block;z-index:999999;pointer-events:none;position:fixed;top:0"); + document.body.prepend(canvas); + canvas.width = width; + canvas.height = height; + window.addEventListener("resize", function () { + canvas.width = window.innerWidth; + canvas.height = window.innerHeight; + }, true); + this.context = canvas.getContext("2d"); + } else if (this.context === null) { + this.context = canvas.getContext("2d"); + } + const count = this.confetti.maxCount; + while (this.particles.length < count) { + this.particles.push(this.resetParticle({}, width, height)); + } + this.streamingConfetti = true; + this.runAnimation(); + if (timeout) { + window.setTimeout(this.stopConfetti, timeout); + } + } + + stopConfetti() { + this.streamingConfetti = false; + } + + runAnimation() { + if (this.particles.length === 0) { + this.context.clearRect(0, 0, window.innerWidth, window.innerHeight); + this.animationTimer = null; + } else { + const now = Date.now(); + const delta = now - this.lastFrameTime; + if (!this.supportsAnimationFrame || delta > this.confetti.frameInterval) { + this.context.clearRect(0, 0, window.innerWidth, window.innerHeight); + this.updateParticles(); + this.drawParticles(this.context); + this.lastFrameTime = now - (delta % this.confetti.frameInterval); + } + this.animationTimer = requestAnimationFrame(this.runAnimation); + } + } + + removeConfetti() { + stop(); + this.particles = []; + } + + isConfettiRunning() { + return this.streamingConfetti; + } + + drawParticles(context) { + let particle; + let x; + let x2; + let y2; + for (let i = 0; i < this.particles.length; i++) { + particle = this.particles[i]; + context.beginPath(); + context.lineWidth = particle.diameter; + x2 = particle.x + particle.tilt; + x = x2 + particle.diameter / 2; + y2 = particle.y + particle.tilt + particle.diameter / 2; + context.strokeStyle = particle.color; + context.moveTo(x, particle.y); + context.lineTo(x2, y2); + context.stroke(); + } + } + + updateParticles() { + const width = window.innerWidth; + const height = window.innerHeight; + let particle; + this.waveAngle += 0.01; + for (let i = 0; i < this.particles.length; i++) { + particle = this.particles[i]; + if (!this.streamingConfetti && particle.y < -15) { + particle.y = height + 100; + } else { + particle.tiltAngle += particle.tiltAngleIncrement; + particle.x += Math.sin(this.waveAngle) - 0.5; + particle.y += (Math.cos(this.waveAngle) + particle.diameter + this.confetti.speed) * 0.5; + particle.tilt = Math.sin(particle.tiltAngle) * 15; + } + if (particle.x > width + 20 || particle.x < -20 || particle.y > height) { + if (this.streamingConfetti && this.particles.length <= this.confetti.maxCount) { + this.resetParticle(particle, width, height); + } else { + this.particles.splice(i, 1); + i--; + } + } + } + } + + convertToHex(content) { + const contentBodyToHexArray = []; + let hex; + for (let i = 0; i < content.body.length; i++) { + hex = content.body.codePointAt(i).toString(16); + contentBodyToHexArray.push(hex); + } + return contentBodyToHexArray; + } + + isChatEffectsDisabled() { + console.log('return value', SettingsStore.getValue('dontShowChatEffects')); + return SettingsStore.getValue('dontShowChatEffects'); + } + + isConfettiEmoji(content) { + const hexArray = this.convertToHex(content); + return !!(hexArray.includes('1f389') || hexArray.includes('1f38a')); + } + + animateConfetti(userId, message) { + // const shortendUserId = userId.slice(1).split(":").slice(0, 1); + console.log('in animate confetti method'); + if (!this.isChatEffectsDisabled()) { + this.confetti.start(3000); + } + if (!message) { + return ('*' + userId + ' throws confetti '); + } + } + + render() { + return ( ); + } +} diff --git a/src/i18n/strings/de_DE.json b/src/i18n/strings/de_DE.json index edfe21d9d6..e4311c2111 100644 --- a/src/i18n/strings/de_DE.json +++ b/src/i18n/strings/de_DE.json @@ -2362,5 +2362,6 @@ "Use your account to sign in to the latest version of the app at ": "Verwende dein Konto um dich an der neusten Version der App anzumelden", "We’re excited to announce Riot is now Element!": "Wir freuen uns bekanntzugeben: Riot ist jetzt Element!", "Learn more at element.io/previously-riot": "Erfahre mehr unter element.io/previously-riot", - "Don't show chat effects": "Chat Effekte nicht zeigen" + "Don't show chat effects": "Chat Effekte nicht zeigen", + "Throws confetti animation in the chat room": "Throws confetti animation in the chat room" } diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index 98aee655fe..f09ec685ee 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -213,6 +213,7 @@ "Thank you!": "Thank you!", "Opens chat with the given user": "Opens chat with the given user", "Sends a message to the given user": "Sends a message to the given user", + "Throws confetti animation in the chat room": "Throws confetti animation in the chat room", "Displays action": "Displays action", "Reason": "Reason", "%(targetName)s accepted the invitation for %(displayName)s.": "%(targetName)s accepted the invitation for %(displayName)s.", From 69227dd456bb9d7d78e16157dcabda2603345ae3 Mon Sep 17 00:00:00 2001 From: nurjinn jafar Date: Mon, 24 Aug 2020 10:26:20 +0200 Subject: [PATCH 003/319] translations added --- src/i18n/strings/de_DE.json | 3 ++- src/i18n/strings/en_EN.json | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/i18n/strings/de_DE.json b/src/i18n/strings/de_DE.json index e4311c2111..5e5639942b 100644 --- a/src/i18n/strings/de_DE.json +++ b/src/i18n/strings/de_DE.json @@ -2363,5 +2363,6 @@ "We’re excited to announce Riot is now Element!": "Wir freuen uns bekanntzugeben: Riot ist jetzt Element!", "Learn more at element.io/previously-riot": "Erfahre mehr unter element.io/previously-riot", "Don't show chat effects": "Chat Effekte nicht zeigen", - "Throws confetti animation in the chat room": "Throws confetti animation in the chat room" + "Sends the given message with confetti": "Sendet die Nachricht mit Konfetti", + " sends confetti": " sendet Konfetti" } diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index f09ec685ee..efd68d06a6 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -213,7 +213,8 @@ "Thank you!": "Thank you!", "Opens chat with the given user": "Opens chat with the given user", "Sends a message to the given user": "Sends a message to the given user", - "Throws confetti animation in the chat room": "Throws confetti animation in the chat room", + "Sends the given message with confetti": "Sends the given message with confetti", + " sends confetti": " sends confetti", "Displays action": "Displays action", "Reason": "Reason", "%(targetName)s accepted the invitation for %(displayName)s.": "%(targetName)s accepted the invitation for %(displayName)s.", From 34cee20140d4da373fc0be630da4e11709409ed9 Mon Sep 17 00:00:00 2001 From: nurjinn jafar Date: Mon, 24 Aug 2020 10:43:41 +0200 Subject: [PATCH 004/319] added confetti on command /confetti --- src/SlashCommands.tsx | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/src/SlashCommands.tsx b/src/SlashCommands.tsx index 2d4d484899..8322512b73 100644 --- a/src/SlashCommands.tsx +++ b/src/SlashCommands.tsx @@ -45,6 +45,7 @@ import { ViewUserPayload } from "./dispatcher/payloads/ViewUserPayload"; import { Action } from "./dispatcher/actions"; import { EffectiveMembership, getEffectiveMembership } from "./utils/membership"; import {func} from "prop-types"; +import SettingsStore from "./settings/SettingsStore"; // XXX: workaround for https://github.com/microsoft/TypeScript/issues/31816 interface HTMLInputEvent extends Event { @@ -1029,15 +1030,24 @@ export const Commands = [ }), new Command({ command: "confetti", - description: _td("Throws confetti animation in the chat room"), - args: '/confetti + ', - runFn: function(roomId, args, command) { + description: _td("Sends the given message with confetti"), + args: '', + runFn: function(roomId, args) { return success((async () => { - const cli = MatrixClientPeg.get(); - await cli.sendHtmlMessage(roomId, args); + const cli = MatrixClientPeg.get(); + const userId = cli.getUserId(); + const userName = userId.slice(1).split(":").slice(0, 1); + const isChatEffectsDisabled = SettingsStore.getValue('dontShowChatEffects'); + if (!args || isChatEffectsDisabled) { + args = '*' + userName + _td(' sends confetti'); + } + if (!isChatEffectsDisabled) { + dis.dispatch({action: 'confetti'}); + } + cli.sendHtmlMessage(roomId, args); })()); }, - category: CommandCategories.messages, + category: CommandCategories.actions, }), // Command definitions for autocompletion ONLY: From a7567b2e31bb403a05490a299e7ca17fd595760c Mon Sep 17 00:00:00 2001 From: nurjinn jafar Date: Mon, 24 Aug 2020 10:44:32 +0200 Subject: [PATCH 005/319] confetti animationsd handeled on roomViewTimeline --- src/components/structures/RoomView.js | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/src/components/structures/RoomView.js b/src/components/structures/RoomView.js index 85cb1df848..e48063530d 100644 --- a/src/components/structures/RoomView.js +++ b/src/components/structures/RoomView.js @@ -57,7 +57,7 @@ import MatrixClientContext from "../../contexts/MatrixClientContext"; import { shieldStatusForRoom } from '../../utils/ShieldUtils'; import {Action} from "../../dispatcher/actions"; import {SettingLevel} from "../../settings/SettingLevel"; -import Confetti from "../views/elements/Confetti"; +import {animateConfetti, forceStopConfetti} from "../views/elements/Confetti"; const DEBUG = false; let debuglog = function() {}; @@ -68,7 +68,6 @@ if (DEBUG) { // using bind means that we get to keep useful line numbers in the console debuglog = console.log.bind(console); } -let confetti; export default createReactClass({ displayName: 'RoomView', propTypes: { @@ -511,6 +510,7 @@ export default createReactClass({ this.context.removeListener("deviceVerificationChanged", this.onDeviceVerificationChanged); this.context.removeListener("userTrustStatusChanged", this.onUserVerificationChanged); this.context.removeListener("crossSigning.keysChanged", this.onCrossSigningKeysChanged); + this.context.removeListener("Event.decrypted", this.onEventDecrypted); } window.removeEventListener('beforeunload', this.onPageUnload); @@ -630,9 +630,9 @@ export default createReactClass({ case 'message_send_failed': case 'message_sent': this._checkIfAlone(this.state.room); - confetti = new Confetti('100', '100'); - console.log('confetti sent'); - confetti.animateConfetti('test', 'message'); + break; + case 'confetti': + animateConfetti(this._roomView.current.offsetWidth); break; case 'post_sticker_message': this.injectSticker( @@ -750,6 +750,18 @@ export default createReactClass({ }); } } + if (!SettingsStore.getValue('dontShowChatEffects')) { + this.context.on('Event.decrypted', this.onEventDecrypted); + } + }, + onEventDecrypted(ev) { + if (ev.isBeingDecrypted() || ev.isDecryptionFailure()) return; + this.handleConfetti(); + }, + handleConfetti() { + if (this.context.isInitialSyncComplete()) { + dis.dispatch({action: 'confetti'}); + } }, onRoomName: function(room) { @@ -786,6 +798,7 @@ export default createReactClass({ this._calculateRecommendedVersion(room); this._updateE2EStatus(room); this._updatePermissions(room); + forceStopConfetti(); }, _calculateRecommendedVersion: async function(room) { From 77de63bf4b06c5235e00c74673f2c0082a064195 Mon Sep 17 00:00:00 2001 From: nurjinn jafar Date: Mon, 24 Aug 2020 10:44:49 +0200 Subject: [PATCH 006/319] confetti file added --- src/components/views/elements/Confetti.js | 252 +++++++++++----------- 1 file changed, 121 insertions(+), 131 deletions(-) diff --git a/src/components/views/elements/Confetti.js b/src/components/views/elements/Confetti.js index e9dc2c34c0..df2b004ce0 100644 --- a/src/components/views/elements/Confetti.js +++ b/src/components/views/elements/Confetti.js @@ -1,52 +1,48 @@ -import React from "react"; -import SettingsStore from "../../../../lib/settings/SettingsStore"; -import PropTypes from "prop-types"; +const confetti = { + //set max confetti count + maxCount: 150, + //syarn addet the particle animation speed + speed: 3, + //the confetti animation frame interval in milliseconds + frameInterval: 15, + //the alpha opacity of the confetti (between 0 and 1, where 1 is opaque and 0 is invisible) + alpha: 1.0, + //call to start confetti animation (with optional timeout in milliseconds) + start: null, + //call to stop adding confetti + stop: null, + //call to stop the confetti animation and remove all confetti immediately + remove: null, + isRunning: null, + //call and returns true or false depending on whether the animation is running + animate: null, +}; -export default class Confetti extends React.Component { - displayName: 'confetti'; - constructor(props) { - super(props); - this.animateConfetti = this.animateConfetti.bind(this); - this.confetti.start = this.startConfetti; - this.startConfetti = this.startConfetti.bind(this); - this.confetti.stop = this.stopConfetti; - this.confetti.remove = this.removeConfetti; - this.confetti.isRunning = this.isConfettiRunning; - } - static propTypes = { - width: PropTypes.string.isRequired, - height: PropTypes.string.isRequired, - } - confetti = { - //set max confetti count - maxCount: 150, - //set the particle animation speed - speed: 3, - //the confetti animation frame interval in milliseconds - frameInterval: 15, - //the alpha opacity of the confetti (between 0 and 1, where 1 is opaque and 0 is invisible) - alpha: 1.0, - start: null, - }; - colors = ["rgba(30,144,255,", "rgba(107,142,35,", "rgba(255,215,0,", - "rgba(255,192,203,", "rgba(106,90,205,", "rgba(173,216,230,", - "rgba(238,130,238,", "rgba(152,251,152,", "rgba(70,130,180,", - "rgba(244,164,96,", "rgba(210,105,30,", "rgba(220,20,60,"]; - streamingConfetti = false; - animationTimer = null; - lastFrameTime = Date.now(); - particles = []; - waveAngle = 0; - context = null; - supportsAnimationFrame = window.requestAnimationFrame || +(function() { + confetti.start = startConfetti; + confetti.stop = stopConfetti; + confetti.remove = removeConfetti; + confetti.isRunning = isConfettiRunning; + confetti.animate = animateConfetti; + const supportsAnimationFrame = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame; + const colors = ["rgba(30,144,255,", "rgba(107,142,35,", "rgba(255,215,0,", + "rgba(255,192,203,", "rgba(106,90,205,", "rgba(173,216,230,", + "rgba(238,130,238,", "rgba(152,251,152,", "rgba(70,130,180,", + "rgba(244,164,96,", "rgba(210,105,30,", "rgba(220,20,60,"]; + let streamingConfetti = false; + let animationTimer = null; + let lastFrameTime = Date.now(); + let particles = []; + let waveAngle = 0; + let context = null; - resetParticle(particle, width, height) { - particle.color = this.colors[(Math.random() * this.colors.length) | 0] + (this.confetti.alpha + ")"); - particle.color2 = this.colors[(Math.random() * this.colors.length) | 0] + (this.confetti.alpha + ")"); + function resetParticle(particle, width, height) { + particle.color = colors[(Math.random() * colors.length) | 0] + (confetti.alpha + ")"); + particle.color2 = colors[(Math.random() * colors.length) | 0] + (confetti.alpha + ")"); particle.x = Math.random() * width; particle.y = Math.random() * height - height; particle.diameter = Math.random() * 10 + 5; @@ -56,154 +52,148 @@ export default class Confetti extends React.Component { return particle; } - startConfetti(timeout) { - const width = window.innerWidth; + function runAnimation() { + if (particles.length === 0) { + context.clearRect(0, 0, window.innerWidth, window.innerHeight); + animationTimer = null; + } else { + const now = Date.now(); + const delta = now - lastFrameTime; + if (!supportsAnimationFrame || delta > confetti.frameInterval) { + context.clearRect(0, 0, window.innerWidth, window.innerHeight); + updateParticles(); + drawParticles(context); + lastFrameTime = now - (delta % confetti.frameInterval); + } + animationTimer = requestAnimationFrame(runAnimation); + } + } + + function startConfetti(roomWidth, timeout) { + const width = roomWidth; const height = window.innerHeight; - window.requestAnimationFrame = () => { + window.requestAnimationFrame = (function () { return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || - function(callback) { - return window.setTimeout(callback, this.confetti.frameInterval); + function (callback) { + return window.setTimeout(callback, confetti.frameInterval); }; - }; + })(); let canvas = document.getElementById("confetti-canvas"); if (canvas === null) { canvas = document.createElement("canvas"); canvas.setAttribute("id", "confetti-canvas"); - canvas.setAttribute("style", "display:block;z-index:999999;pointer-events:none;position:fixed;top:0"); + canvas.setAttribute("style", "display:block;z-index:999999;pointer-events:none;position:fixed;top:0; right:0"); document.body.prepend(canvas); canvas.width = width; canvas.height = height; - window.addEventListener("resize", function () { - canvas.width = window.innerWidth; + window.addEventListener("resize", function() { + canvas.width = roomWidth; canvas.height = window.innerHeight; }, true); - this.context = canvas.getContext("2d"); - } else if (this.context === null) { - this.context = canvas.getContext("2d"); + context = canvas.getContext("2d"); + } else if (context === null) { + context = canvas.getContext("2d"); } - const count = this.confetti.maxCount; - while (this.particles.length < count) { - this.particles.push(this.resetParticle({}, width, height)); + const count = confetti.maxCount; + while (particles.length < count) { + particles.push(resetParticle({}, width, height)); } - this.streamingConfetti = true; - this.runAnimation(); + streamingConfetti = true; + runAnimation(); if (timeout) { - window.setTimeout(this.stopConfetti, timeout); + window.setTimeout(stopConfetti, timeout); } } - stopConfetti() { - this.streamingConfetti = false; + function stopConfetti() { + streamingConfetti = false; } - runAnimation() { - if (this.particles.length === 0) { - this.context.clearRect(0, 0, window.innerWidth, window.innerHeight); - this.animationTimer = null; - } else { - const now = Date.now(); - const delta = now - this.lastFrameTime; - if (!this.supportsAnimationFrame || delta > this.confetti.frameInterval) { - this.context.clearRect(0, 0, window.innerWidth, window.innerHeight); - this.updateParticles(); - this.drawParticles(this.context); - this.lastFrameTime = now - (delta % this.confetti.frameInterval); - } - this.animationTimer = requestAnimationFrame(this.runAnimation); - } - } - - removeConfetti() { + function removeConfetti() { stop(); - this.particles = []; + particles = []; } - isConfettiRunning() { - return this.streamingConfetti; + function isConfettiRunning() { + return streamingConfetti; } - drawParticles(context) { + function drawParticles(context) { let particle; - let x; - let x2; - let y2; - for (let i = 0; i < this.particles.length; i++) { - particle = this.particles[i]; + let x; let x2; let y2; + for (let i = 0; i < particles.length; i++) { + particle = particles[i]; context.beginPath(); context.lineWidth = particle.diameter; x2 = particle.x + particle.tilt; x = x2 + particle.diameter / 2; y2 = particle.y + particle.tilt + particle.diameter / 2; - context.strokeStyle = particle.color; + if (confetti.gradient) { + const gradient = context.createLinearGradient(x, particle.y, x2, y2); + gradient.addColorStop("0", particle.color); + gradient.addColorStop("1.0", particle.color2); + context.strokeStyle = gradient; + } else { + context.strokeStyle = particle.color; + } context.moveTo(x, particle.y); context.lineTo(x2, y2); context.stroke(); } } - updateParticles() { + function updateParticles() { const width = window.innerWidth; const height = window.innerHeight; let particle; - this.waveAngle += 0.01; - for (let i = 0; i < this.particles.length; i++) { - particle = this.particles[i]; - if (!this.streamingConfetti && particle.y < -15) { + waveAngle += 0.01; + for (let i = 0; i < particles.length; i++) { + particle = particles[i]; + if (!streamingConfetti && particle.y < -15) { particle.y = height + 100; } else { particle.tiltAngle += particle.tiltAngleIncrement; - particle.x += Math.sin(this.waveAngle) - 0.5; - particle.y += (Math.cos(this.waveAngle) + particle.diameter + this.confetti.speed) * 0.5; + particle.x += Math.sin(waveAngle) - 0.5; + particle.y += (Math.cos(waveAngle) + particle.diameter + confetti.speed) * 0.5; particle.tilt = Math.sin(particle.tiltAngle) * 15; } if (particle.x > width + 20 || particle.x < -20 || particle.y > height) { - if (this.streamingConfetti && this.particles.length <= this.confetti.maxCount) { - this.resetParticle(particle, width, height); + if (streamingConfetti && particles.length <= confetti.maxCount) { + resetParticle(particle, width, height); } else { - this.particles.splice(i, 1); + particles.splice(i, 1); i--; } } } } +})(); - convertToHex(content) { - const contentBodyToHexArray = []; - let hex; +export function convertToHex(content) { + const contentBodyToHexArray = []; + let hex; + if (content.body) { for (let i = 0; i < content.body.length; i++) { hex = content.body.codePointAt(i).toString(16); contentBodyToHexArray.push(hex); } - return contentBodyToHexArray; - } - - isChatEffectsDisabled() { - console.log('return value', SettingsStore.getValue('dontShowChatEffects')); - return SettingsStore.getValue('dontShowChatEffects'); - } - - isConfettiEmoji(content) { - const hexArray = this.convertToHex(content); - return !!(hexArray.includes('1f389') || hexArray.includes('1f38a')); - } - - animateConfetti(userId, message) { - // const shortendUserId = userId.slice(1).split(":").slice(0, 1); - console.log('in animate confetti method'); - if (!this.isChatEffectsDisabled()) { - this.confetti.start(3000); - } - if (!message) { - return ('*' + userId + ' throws confetti '); - } - } - - render() { - return ( ); } + return contentBodyToHexArray; +} + +export function isConfettiEmoji(content) { + const hexArray = convertToHex(content); + return !!(hexArray.includes('1f389') || hexArray.includes('1f38a')); +} + +export function animateConfetti(roomWidth) { + confetti.start(roomWidth, 3000); +} +export function forceStopConfetti() { + console.log('confetti should stop'); + confetti.remove(); } From 03b2a529ef681e0e0777af57418f74ebba458954 Mon Sep 17 00:00:00 2001 From: nurjinn jafar Date: Mon, 24 Aug 2020 11:29:46 +0200 Subject: [PATCH 007/319] remove unused var --- src/components/views/elements/Confetti.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/views/elements/Confetti.js b/src/components/views/elements/Confetti.js index df2b004ce0..371c26a4b5 100644 --- a/src/components/views/elements/Confetti.js +++ b/src/components/views/elements/Confetti.js @@ -34,7 +34,7 @@ const confetti = { "rgba(238,130,238,", "rgba(152,251,152,", "rgba(70,130,180,", "rgba(244,164,96,", "rgba(210,105,30,", "rgba(220,20,60,"]; let streamingConfetti = false; - let animationTimer = null; + // let animationTimer = null; let lastFrameTime = Date.now(); let particles = []; let waveAngle = 0; @@ -55,7 +55,7 @@ const confetti = { function runAnimation() { if (particles.length === 0) { context.clearRect(0, 0, window.innerWidth, window.innerHeight); - animationTimer = null; + //animationTimer = null; } else { const now = Date.now(); const delta = now - lastFrameTime; @@ -65,7 +65,7 @@ const confetti = { drawParticles(context); lastFrameTime = now - (delta % confetti.frameInterval); } - animationTimer = requestAnimationFrame(runAnimation); + requestAnimationFrame(runAnimation); } } From 2a8b1e0ccd58628214a496b0b25f18ad96755997 Mon Sep 17 00:00:00 2001 From: nurjinn jafar Date: Mon, 24 Aug 2020 11:55:23 +0200 Subject: [PATCH 008/319] remove space before function parentheses and maximum allowed line --- src/components/views/elements/Confetti.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/views/elements/Confetti.js b/src/components/views/elements/Confetti.js index 371c26a4b5..7d4faa3a17 100644 --- a/src/components/views/elements/Confetti.js +++ b/src/components/views/elements/Confetti.js @@ -72,13 +72,13 @@ const confetti = { function startConfetti(roomWidth, timeout) { const width = roomWidth; const height = window.innerHeight; - window.requestAnimationFrame = (function () { + window.requestAnimationFrame = (function() { return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || - function (callback) { + function(callback) { return window.setTimeout(callback, confetti.frameInterval); }; })(); @@ -86,7 +86,8 @@ const confetti = { if (canvas === null) { canvas = document.createElement("canvas"); canvas.setAttribute("id", "confetti-canvas"); - canvas.setAttribute("style", "display:block;z-index:999999;pointer-events:none;position:fixed;top:0; right:0"); + canvas.setAttribute("style", + "display:block;z-index:999999;pointer-events:none;position:fixed;top:0; right:0"); document.body.prepend(canvas); canvas.width = width; canvas.height = height; From b79cf1e7ad00cd06ae0b38c8b37612877ec59481 Mon Sep 17 00:00:00 2001 From: nurjinn jafar Date: Mon, 24 Aug 2020 13:59:11 +0200 Subject: [PATCH 009/319] updated translated string --- src/SlashCommands.tsx | 2 +- src/i18n/strings/de_DE.json | 1 - src/i18n/strings/en_EN.json | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/SlashCommands.tsx b/src/SlashCommands.tsx index 8322512b73..ba0aea73f0 100644 --- a/src/SlashCommands.tsx +++ b/src/SlashCommands.tsx @@ -1039,7 +1039,7 @@ export const Commands = [ const userName = userId.slice(1).split(":").slice(0, 1); const isChatEffectsDisabled = SettingsStore.getValue('dontShowChatEffects'); if (!args || isChatEffectsDisabled) { - args = '*' + userName + _td(' sends confetti'); + args = _t("* %(userName)s sends confetti", {userName}); } if (!isChatEffectsDisabled) { dis.dispatch({action: 'confetti'}); diff --git a/src/i18n/strings/de_DE.json b/src/i18n/strings/de_DE.json index 5e5639942b..46ce139e6e 100644 --- a/src/i18n/strings/de_DE.json +++ b/src/i18n/strings/de_DE.json @@ -2364,5 +2364,4 @@ "Learn more at element.io/previously-riot": "Erfahre mehr unter element.io/previously-riot", "Don't show chat effects": "Chat Effekte nicht zeigen", "Sends the given message with confetti": "Sendet die Nachricht mit Konfetti", - " sends confetti": " sendet Konfetti" } diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index efd68d06a6..78a2d51c56 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -214,7 +214,7 @@ "Opens chat with the given user": "Opens chat with the given user", "Sends a message to the given user": "Sends a message to the given user", "Sends the given message with confetti": "Sends the given message with confetti", - " sends confetti": " sends confetti", + "* %(userName)s sends confetti": "* %(userName)s sends confetti", "Displays action": "Displays action", "Reason": "Reason", "%(targetName)s accepted the invitation for %(displayName)s.": "%(targetName)s accepted the invitation for %(displayName)s.", From 5b7ccb5a7837e134d28795b7cb8ddc68716ca7c2 Mon Sep 17 00:00:00 2001 From: nurjinn jafar Date: Mon, 24 Aug 2020 14:04:20 +0200 Subject: [PATCH 010/319] fix indentation spaces and readability line spaces --- src/components/structures/RoomView.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/components/structures/RoomView.js b/src/components/structures/RoomView.js index e48063530d..240d300751 100644 --- a/src/components/structures/RoomView.js +++ b/src/components/structures/RoomView.js @@ -68,6 +68,7 @@ if (DEBUG) { // using bind means that we get to keep useful line numbers in the console debuglog = console.log.bind(console); } + export default createReactClass({ displayName: 'RoomView', propTypes: { @@ -624,6 +625,7 @@ export default createReactClass({ ev.stopPropagation(); ev.preventDefault(); } + }, onAction: function(payload) { switch (payload.action) { @@ -632,7 +634,7 @@ export default createReactClass({ this._checkIfAlone(this.state.room); break; case 'confetti': - animateConfetti(this._roomView.current.offsetWidth); + animateConfetti(this._roomView.current.offsetWidth); break; case 'post_sticker_message': this.injectSticker( @@ -756,12 +758,12 @@ export default createReactClass({ }, onEventDecrypted(ev) { if (ev.isBeingDecrypted() || ev.isDecryptionFailure()) return; - this.handleConfetti(); + this.handleConfetti(); }, handleConfetti() { if (this.context.isInitialSyncComplete()) { - dis.dispatch({action: 'confetti'}); - } + dis.dispatch({action: 'confetti'}); + } }, onRoomName: function(room) { From f1c7139711f87dd818f9143fc6ec032e9ce41509 Mon Sep 17 00:00:00 2001 From: nurjinn jafar Date: Mon, 24 Aug 2020 14:25:06 +0200 Subject: [PATCH 011/319] remove not needed comma --- 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 46ce139e6e..b5a69d7e72 100644 --- a/src/i18n/strings/de_DE.json +++ b/src/i18n/strings/de_DE.json @@ -2363,5 +2363,5 @@ "We’re excited to announce Riot is now Element!": "Wir freuen uns bekanntzugeben: Riot ist jetzt Element!", "Learn more at element.io/previously-riot": "Erfahre mehr unter element.io/previously-riot", "Don't show chat effects": "Chat Effekte nicht zeigen", - "Sends the given message with confetti": "Sendet die Nachricht mit Konfetti", + "Sends the given message with confetti": "Sendet die Nachricht mit Konfetti" } From eef654e0e3189a8fcba03c8463d62ecbe2a3e745 Mon Sep 17 00:00:00 2001 From: nurjinn jafar Date: Tue, 25 Aug 2020 11:09:10 +0200 Subject: [PATCH 012/319] fix indentation and remove console.log --- src/components/views/elements/Confetti.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/views/elements/Confetti.js b/src/components/views/elements/Confetti.js index 7d4faa3a17..b0f88dedb7 100644 --- a/src/components/views/elements/Confetti.js +++ b/src/components/views/elements/Confetti.js @@ -192,9 +192,8 @@ export function isConfettiEmoji(content) { } export function animateConfetti(roomWidth) { - confetti.start(roomWidth, 3000); + confetti.start(roomWidth, 3000); } export function forceStopConfetti() { - console.log('confetti should stop'); confetti.remove(); } From d41ffb1b4be9eeff5330c9e3ca5891cf22bb7f46 Mon Sep 17 00:00:00 2001 From: nurjinn jafar Date: Tue, 25 Aug 2020 11:09:57 +0200 Subject: [PATCH 013/319] pass ev to handleConfetti in order to check content before dispatch --- src/components/structures/RoomView.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/components/structures/RoomView.js b/src/components/structures/RoomView.js index 240d300751..b24d6efa2a 100644 --- a/src/components/structures/RoomView.js +++ b/src/components/structures/RoomView.js @@ -57,7 +57,7 @@ import MatrixClientContext from "../../contexts/MatrixClientContext"; import { shieldStatusForRoom } from '../../utils/ShieldUtils'; import {Action} from "../../dispatcher/actions"; import {SettingLevel} from "../../settings/SettingLevel"; -import {animateConfetti, forceStopConfetti} from "../views/elements/Confetti"; +import {animateConfetti, forceStopConfetti, isConfettiEmoji} from "../views/elements/Confetti"; const DEBUG = false; let debuglog = function() {}; @@ -758,11 +758,13 @@ export default createReactClass({ }, onEventDecrypted(ev) { if (ev.isBeingDecrypted() || ev.isDecryptionFailure()) return; - this.handleConfetti(); + this.handleConfetti(ev); }, - handleConfetti() { + handleConfetti(ev) { if (this.context.isInitialSyncComplete()) { - dis.dispatch({action: 'confetti'}); + if (isConfettiEmoji(ev.getContent())) { + dis.dispatch({action: 'confetti'}); + } } }, From 43f266bfe333c2b6c5ece0be86ea5089e5e11c80 Mon Sep 17 00:00:00 2001 From: nurjinn jafar Date: Tue, 25 Aug 2020 11:11:20 +0200 Subject: [PATCH 014/319] remove unused import fix if condition trying (pass the dispatcher to sendHtmlMessage) --- src/SlashCommands.tsx | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/SlashCommands.tsx b/src/SlashCommands.tsx index ba0aea73f0..6b321ce092 100644 --- a/src/SlashCommands.tsx +++ b/src/SlashCommands.tsx @@ -44,7 +44,6 @@ import { ensureDMExists } from "./createRoom"; import { ViewUserPayload } from "./dispatcher/payloads/ViewUserPayload"; import { Action } from "./dispatcher/actions"; import { EffectiveMembership, getEffectiveMembership } from "./utils/membership"; -import {func} from "prop-types"; import SettingsStore from "./settings/SettingsStore"; // XXX: workaround for https://github.com/microsoft/TypeScript/issues/31816 @@ -1038,13 +1037,11 @@ export const Commands = [ const userId = cli.getUserId(); const userName = userId.slice(1).split(":").slice(0, 1); const isChatEffectsDisabled = SettingsStore.getValue('dontShowChatEffects'); - if (!args || isChatEffectsDisabled) { + if ((!args) || (!args && isChatEffectsDisabled)) { args = _t("* %(userName)s sends confetti", {userName}); } - if (!isChatEffectsDisabled) { - dis.dispatch({action: 'confetti'}); - } - cli.sendHtmlMessage(roomId, args); + cli.sendHtmlMessage(roomId, args, + dis.dispatch({action: 'confetti'})); })()); }, category: CommandCategories.actions, From cc71531493df1e5e095b7f173909cbb4606a4f16 Mon Sep 17 00:00:00 2001 From: nurjinn jafar Date: Tue, 25 Aug 2020 13:36:04 +0200 Subject: [PATCH 015/319] reverted German language translations --- src/i18n/strings/de_DE.json | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/i18n/strings/de_DE.json b/src/i18n/strings/de_DE.json index 2cea1519df..3d5ba3722e 100644 --- a/src/i18n/strings/de_DE.json +++ b/src/i18n/strings/de_DE.json @@ -2409,6 +2409,4 @@ "If you cancel now, you may lose encrypted messages & data if you lose access to your logins.": "Wenn du jetzt abbrichst, kannst du verschlüsselte Nachrichten und Daten verlieren, wenn du den Zugriff auf deine Logins verlierst.", "You can also set up Secure Backup & manage your keys in Settings.": "Du kannst auch in den Einstellungen eine Sicherung erstellen & deine Schlüssel verwalten.", "Set up Secure backup": "Sicheres Backup einrichten" - "Don't show chat effects": "Chat Effekte nicht zeigen", - "Sends the given message with confetti": "Sendet die Nachricht mit Konfetti" } From 4527755f7e2df6f3b6622f1cd740469df608d587 Mon Sep 17 00:00:00 2001 From: nurjinn jafar Date: Tue, 25 Aug 2020 16:18:01 +0200 Subject: [PATCH 016/319] updated translation --- 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 029551eb34..223e063762 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -210,7 +210,7 @@ "Opens chat with the given user": "Opens chat with the given user", "Sends a message to the given user": "Sends a message to the given user", "Sends the given message with confetti": "Sends the given message with confetti", - "* %(userName)s sends confetti": "* %(userName)s sends confetti", + "sends confetti": "sends confetti", "Displays action": "Displays action", "Reason": "Reason", "%(targetName)s accepted the invitation for %(displayName)s.": "%(targetName)s accepted the invitation for %(displayName)s.", From 5753c964317ab20b1682874416d00cdf9e6c5820 Mon Sep 17 00:00:00 2001 From: nurjinn jafar Date: Tue, 25 Aug 2020 16:39:57 +0200 Subject: [PATCH 017/319] a workaround to make ocnfetti work on recipient side. changed the implementation of on.Event.decrypted function --- src/SlashCommands.tsx | 13 +++++++------ src/components/structures/RoomView.js | 13 ++++++------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/SlashCommands.tsx b/src/SlashCommands.tsx index abd4f5449b..03aec46e46 100644 --- a/src/SlashCommands.tsx +++ b/src/SlashCommands.tsx @@ -1029,15 +1029,16 @@ export const Commands = [ args: '', runFn: function(roomId, args) { return success((async () => { - const cli = MatrixClientPeg.get(); - const userId = cli.getUserId(); - const userName = userId.slice(1).split(":").slice(0, 1); const isChatEffectsDisabled = SettingsStore.getValue('dontShowChatEffects'); if ((!args) || (!args && isChatEffectsDisabled)) { - args = _t("* %(userName)s sends confetti", {userName}); + args = _t("sends confetti"); + MatrixClientPeg.get().sendEmoteMessage(roomId, args); + } else { + MatrixClientPeg.get().sendHtmlMessage(roomId, args); + } + if (!isChatEffectsDisabled) { + dis.dispatch({action: 'confetti'}); } - cli.sendHtmlMessage(roomId, args, - dis.dispatch({action: 'confetti'})); })()); }, category: CommandCategories.actions, diff --git a/src/components/structures/RoomView.js b/src/components/structures/RoomView.js index dfc92526c7..d5ccbf1c8c 100644 --- a/src/components/structures/RoomView.js +++ b/src/components/structures/RoomView.js @@ -511,7 +511,6 @@ export default createReactClass({ this.context.removeListener("deviceVerificationChanged", this.onDeviceVerificationChanged); this.context.removeListener("userTrustStatusChanged", this.onUserVerificationChanged); this.context.removeListener("crossSigning.keysChanged", this.onCrossSigningKeysChanged); - this.context.removeListener("Event.decrypted", this.onEventDecrypted); } window.removeEventListener('beforeunload', this.onPageUnload); @@ -753,16 +752,16 @@ export default createReactClass({ } } if (!SettingsStore.getValue('dontShowChatEffects')) { - this.context.on('Event.decrypted', this.onEventDecrypted); + this.context.on("Event.decrypted", (ev) => { + if (ev.isBeingDecrypted() || ev.isDecryptionFailure()) return; + this.handleConfetti(ev); + }); } }, - onEventDecrypted(ev) { - if (ev.isBeingDecrypted() || ev.isDecryptionFailure()) return; - this.handleConfetti(ev); - }, handleConfetti(ev) { if (this.context.isInitialSyncComplete()) { - if (isConfettiEmoji(ev.getContent())) { + const messageBody = _t('sends confetti'); + if (isConfettiEmoji(ev.getContent()) || ev.getContent().body === messageBody) { dis.dispatch({action: 'confetti'}); } } From 95051a42b1f2755f52a980ef4521edc88ab728b0 Mon Sep 17 00:00:00 2001 From: nurjinn jafar Date: Wed, 26 Aug 2020 18:56:23 +0200 Subject: [PATCH 018/319] checking for unreadMessages before sending confetti throwing the confetti on the sender's side change sendHtmlMessage to sendTextMessage in slashCommands --- src/SlashCommands.tsx | 2 +- src/components/structures/RoomView.js | 17 ++++++++++------- .../views/rooms/SendMessageComposer.js | 7 +++++++ 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/src/SlashCommands.tsx b/src/SlashCommands.tsx index 03aec46e46..28eaa8123b 100644 --- a/src/SlashCommands.tsx +++ b/src/SlashCommands.tsx @@ -1034,7 +1034,7 @@ export const Commands = [ args = _t("sends confetti"); MatrixClientPeg.get().sendEmoteMessage(roomId, args); } else { - MatrixClientPeg.get().sendHtmlMessage(roomId, args); + MatrixClientPeg.get().sendTextMessage(roomId, args); } if (!isChatEffectsDisabled) { dis.dispatch({action: 'confetti'}); diff --git a/src/components/structures/RoomView.js b/src/components/structures/RoomView.js index d5ccbf1c8c..92f43c75ca 100644 --- a/src/components/structures/RoomView.js +++ b/src/components/structures/RoomView.js @@ -189,6 +189,7 @@ export default createReactClass({ this.context.on("deviceVerificationChanged", this.onDeviceVerificationChanged); this.context.on("userTrustStatusChanged", this.onUserVerificationChanged); this.context.on("crossSigning.keysChanged", this.onCrossSigningKeysChanged); + this.context.on("Event.decrypted", this.onEventDecrypted); // Start listening for RoomViewStore updates this._roomStoreToken = RoomViewStore.addListener(this._onRoomViewStoreUpdate); this._rightPanelStoreToken = RightPanelStore.getSharedInstance().addListener(this._onRightPanelStoreUpdate); @@ -511,6 +512,7 @@ export default createReactClass({ this.context.removeListener("deviceVerificationChanged", this.onDeviceVerificationChanged); this.context.removeListener("userTrustStatusChanged", this.onUserVerificationChanged); this.context.removeListener("crossSigning.keysChanged", this.onCrossSigningKeysChanged); + this.context.removeListener("Event.decrypted", this.onEventDecrypted); } window.removeEventListener('beforeunload', this.onPageUnload); @@ -751,15 +753,16 @@ export default createReactClass({ }); } } - if (!SettingsStore.getValue('dontShowChatEffects')) { - this.context.on("Event.decrypted", (ev) => { - if (ev.isBeingDecrypted() || ev.isDecryptionFailure()) return; - this.handleConfetti(ev); - }); - } + }, + onEventDecrypted(ev) { + if (!SettingsStore.getValue('dontShowChatEffects')) { + if (ev.isBeingDecrypted() || ev.isDecryptionFailure() || + this.state.room.getUnreadNotificationCount() === 0) return; + this.handleConfetti(ev); + } }, handleConfetti(ev) { - if (this.context.isInitialSyncComplete()) { + if (this.state.matrixClientIsReady) { const messageBody = _t('sends confetti'); if (isConfettiEmoji(ev.getContent()) || ev.getContent().body === messageBody) { dis.dispatch({action: 'confetti'}); diff --git a/src/components/views/rooms/SendMessageComposer.js b/src/components/views/rooms/SendMessageComposer.js index 6a7b2fc753..0b873a9bab 100644 --- a/src/components/views/rooms/SendMessageComposer.js +++ b/src/components/views/rooms/SendMessageComposer.js @@ -44,6 +44,8 @@ import MatrixClientContext from "../../../contexts/MatrixClientContext"; import {MatrixClientPeg} from "../../../MatrixClientPeg"; import RateLimitedFunc from '../../../ratelimitedfunc'; import {Action} from "../../../dispatcher/actions"; +import {isConfettiEmoji} from "../elements/Confetti"; +import SettingsStore from "../../../settings/SettingsStore"; function addReplyToMessageContent(content, repliedToEvent, permalinkCreator) { const replyContent = ReplyThread.makeReplyMixIn(repliedToEvent); @@ -313,6 +315,11 @@ export default class SendMessageComposer extends React.Component { }); } dis.dispatch({action: "message_sent"}); + if (!SettingsStore.getValue('dontShowChatEffects')) { + if (isConfettiEmoji(content)) { + dis.dispatch({action: 'confetti'}); + } + } } this.sendHistoryManager.save(this.model); From 43ff97c1789be080b8ec69e3045d7a262e3dfd31 Mon Sep 17 00:00:00 2001 From: Daniel Maslowski Date: Wed, 9 Sep 2020 20:35:26 +0200 Subject: [PATCH 019/319] Add support for giving reason when redacting Signed-off-by: Daniel Maslowski --- src/components/views/context_menus/MessageContextMenu.js | 4 +++- src/components/views/dialogs/ConfirmRedactDialog.js | 8 +++++--- src/i18n/strings/en_EN.json | 1 + 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/components/views/context_menus/MessageContextMenu.js b/src/components/views/context_menus/MessageContextMenu.js index d760c8defa..b6d27e45f9 100644 --- a/src/components/views/context_menus/MessageContextMenu.js +++ b/src/components/views/context_menus/MessageContextMenu.js @@ -145,7 +145,7 @@ export default class MessageContextMenu extends React.Component { onRedactClick = () => { const ConfirmRedactDialog = sdk.getComponent("dialogs.ConfirmRedactDialog"); Modal.createTrackedDialog('Confirm Redact Dialog', '', ConfirmRedactDialog, { - onFinished: async (proceed) => { + onFinished: async (proceed, reason) => { if (!proceed) return; const cli = MatrixClientPeg.get(); @@ -153,6 +153,8 @@ export default class MessageContextMenu extends React.Component { await cli.redactEvent( this.props.mxEvent.getRoomId(), this.props.mxEvent.getId(), + undefined, + reason ? { reason } : {}, ); } catch (e) { const code = e.errcode || e.statusCode; diff --git a/src/components/views/dialogs/ConfirmRedactDialog.js b/src/components/views/dialogs/ConfirmRedactDialog.js index 3106df1d5b..2216f9a93a 100644 --- a/src/components/views/dialogs/ConfirmRedactDialog.js +++ b/src/components/views/dialogs/ConfirmRedactDialog.js @@ -23,15 +23,17 @@ import { _t } from '../../../languageHandler'; */ export default class ConfirmRedactDialog extends React.Component { render() { - const QuestionDialog = sdk.getComponent('views.dialogs.QuestionDialog'); + const TextInputDialog = sdk.getComponent('views.dialogs.TextInputDialog'); return ( - - + ); } } diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index 65374ea3ec..ecc4bd2f4c 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -1624,6 +1624,7 @@ "Removing…": "Removing…", "Confirm Removal": "Confirm Removal", "Are you sure you wish to remove (delete) this event? Note that if you delete a room name or topic change, it could undo the change.": "Are you sure you wish to remove (delete) this event? Note that if you delete a room name or topic change, it could undo the change.", + "Reason (optional)": "Reason (optional)", "Clear all data in this session?": "Clear all data in this session?", "Clearing all data from this session is permanent. Encrypted messages will be lost unless their keys have been backed up.": "Clearing all data from this session is permanent. Encrypted messages will be lost unless their keys have been backed up.", "Clear all data": "Clear all data", From 6e97baf09f80364d157233a8567c2c1bc106f302 Mon Sep 17 00:00:00 2001 From: Steffen Kolmer Date: Mon, 19 Oct 2020 12:53:17 +0200 Subject: [PATCH 020/319] Added license --- src/components/views/elements/Confetti.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/components/views/elements/Confetti.js b/src/components/views/elements/Confetti.js index b0f88dedb7..bef67cddcc 100644 --- a/src/components/views/elements/Confetti.js +++ b/src/components/views/elements/Confetti.js @@ -1,3 +1,23 @@ +/* +MIT License +Copyright (c) 2018 MathuSum Mut +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +*/ + const confetti = { //set max confetti count maxCount: 150, From 3358ed27921d137a2880f00dc0a1c603126b9bca Mon Sep 17 00:00:00 2001 From: Steffen Kolmer Date: Mon, 19 Oct 2020 12:57:57 +0200 Subject: [PATCH 021/319] Use arrow functions --- src/components/structures/RoomView.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/components/structures/RoomView.js b/src/components/structures/RoomView.js index 92f43c75ca..53a964fbb8 100644 --- a/src/components/structures/RoomView.js +++ b/src/components/structures/RoomView.js @@ -754,14 +754,14 @@ export default createReactClass({ } } }, - onEventDecrypted(ev) { - if (!SettingsStore.getValue('dontShowChatEffects')) { - if (ev.isBeingDecrypted() || ev.isDecryptionFailure() || - this.state.room.getUnreadNotificationCount() === 0) return; - this.handleConfetti(ev); - } + onEventDecrypted: (ev) => { + if (!SettingsStore.getValue('dontShowChatEffects')) { + if (ev.isBeingDecrypted() || ev.isDecryptionFailure() || + this.state.room.getUnreadNotificationCount() === 0) return; + this.handleConfetti(ev); + } }, - handleConfetti(ev) { + handleConfetti: (ev) => { if (this.state.matrixClientIsReady) { const messageBody = _t('sends confetti'); if (isConfettiEmoji(ev.getContent()) || ev.getContent().body === messageBody) { From 4106f70218ef41e6101752e388b54b481cbe0576 Mon Sep 17 00:00:00 2001 From: Steffen Kolmer Date: Mon, 19 Oct 2020 13:24:22 +0200 Subject: [PATCH 022/319] Fixed merge error --- src/settings/Settings.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/settings/Settings.ts b/src/settings/Settings.ts index 99be728acc..b9ad834c83 100644 --- a/src/settings/Settings.ts +++ b/src/settings/Settings.ts @@ -626,6 +626,7 @@ export const SETTINGS: {[setting: string]: ISetting} = { supportedLevels: LEVELS_ACCOUNT_SETTINGS, displayName: _td("Don't show chat effects"), default: false, + }, "Widgets.pinned": { supportedLevels: LEVELS_ROOM_OR_ACCOUNT, default: {}, From 929cc48cef28431cc059055240396ec7a2d173bb Mon Sep 17 00:00:00 2001 From: Steffen Kolmer Date: Mon, 19 Oct 2020 13:30:52 +0200 Subject: [PATCH 023/319] Fixed eslint error --- src/components/structures/RoomView.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/structures/RoomView.tsx b/src/components/structures/RoomView.tsx index 709864bff6..7094a8de1b 100644 --- a/src/components/structures/RoomView.tsx +++ b/src/components/structures/RoomView.tsx @@ -247,7 +247,7 @@ export default class RoomView extends React.Component { this.context.on("deviceVerificationChanged", this.onDeviceVerificationChanged); this.context.on("userTrustStatusChanged", this.onUserVerificationChanged); this.context.on("crossSigning.keysChanged", this.onCrossSigningKeysChanged); - this.context.on("Event.decrypted", this.onEventDecrypted); + this.context.on("Event.decrypted", this.onEventDecrypted); this.context.on("event", this.onEvent); // Start listening for RoomViewStore updates this.roomStoreToken = RoomViewStore.addListener(this.onRoomViewStoreUpdate); From 3e8e817a3d51b11c6bffefcff2edbef0dd053e6f Mon Sep 17 00:00:00 2001 From: Steffen Kolmer Date: Mon, 19 Oct 2020 13:35:18 +0200 Subject: [PATCH 024/319] Fixed merge error --- src/components/structures/RoomView.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/structures/RoomView.tsx b/src/components/structures/RoomView.tsx index 7094a8de1b..f3ec8b8104 100644 --- a/src/components/structures/RoomView.tsx +++ b/src/components/structures/RoomView.tsx @@ -693,7 +693,7 @@ export default class RoomView extends React.Component { this.checkIfAlone(this.state.room); break; case 'confetti': - animateConfetti(this._roomView.current.offsetWidth); + animateConfetti(this.roomView.current.offsetWidth); break; case 'post_sticker_message': this.injectSticker( From 41160ff08e827e63851a3823be442d9395771ca6 Mon Sep 17 00:00:00 2001 From: Steffen Kolmer Date: Mon, 19 Oct 2020 13:54:09 +0200 Subject: [PATCH 025/319] Render confetti the react way --- src/components/structures/RoomView.tsx | 8 +++- src/components/views/elements/Confetti.js | 30 ++++---------- .../views/elements/ConfettiOverlay.tsx | 41 +++++++++++++++++++ 3 files changed, 56 insertions(+), 23 deletions(-) create mode 100644 src/components/views/elements/ConfettiOverlay.tsx diff --git a/src/components/structures/RoomView.tsx b/src/components/structures/RoomView.tsx index f3ec8b8104..0905005cf7 100644 --- a/src/components/structures/RoomView.tsx +++ b/src/components/structures/RoomView.tsx @@ -73,6 +73,7 @@ import TintableSvg from "../views/elements/TintableSvg"; import {XOR} from "../../@types/common"; import { IThreepidInvite } from "../../stores/ThreepidInviteStore"; import { CallState, CallType, MatrixCall } from "matrix-js-sdk/lib/webrtc/call"; +import ConfettiOverlay from "../views/elements/ConfettiOverlay"; const DEBUG = false; let debuglog = function(msg: string) {}; @@ -693,7 +694,7 @@ export default class RoomView extends React.Component { this.checkIfAlone(this.state.room); break; case 'confetti': - animateConfetti(this.roomView.current.offsetWidth); + //TODO: animateConfetti(this.roomView.current.offsetWidth); break; case 'post_sticker_message': this.injectSticker( @@ -853,7 +854,7 @@ export default class RoomView extends React.Component { this.calculateRecommendedVersion(room); this.updateE2EStatus(room); this.updatePermissions(room); - forceStopConfetti(); + //TODO: forceStopConfetti(); }; private async calculateRecommendedVersion(room: Room) { @@ -2072,6 +2073,9 @@ export default class RoomView extends React.Component { return (
+ {this.roomView.current && + + } { + const resize = () => { + const canvas = canvasRef.current; + canvas.height = window.innerHeight; + }; + const canvas = canvasRef.current; + canvas.width = roomWidth; + canvas.height = window.innerHeight; + window.addEventListener("resize", resize, true); + animateConfetti(canvas, roomWidth); + return () => { + window.removeEventListener("resize", resize); + forceStopConfetti(); + }; + }, []); + // on roomWidth change + + useEffect(() => { + const canvas = canvasRef.current; + canvas.width = roomWidth; + }, [roomWidth]); + return ( + + ) +} \ No newline at end of file From 607e33febaa4a6142776fe0126f850d782cca143 Mon Sep 17 00:00:00 2001 From: Steffen Kolmer Date: Mon, 19 Oct 2020 21:25:01 +0200 Subject: [PATCH 026/319] Extensibility, TypeScript and lazy loading --- src/SlashCommands.tsx | 10 +- src/components/structures/RoomView.tsx | 38 +--- src/components/views/elements/Confetti.js | 207 ------------------ .../views/elements/ConfettiOverlay.tsx | 41 ---- .../views/elements/effects/EffectsOverlay.tsx | 77 +++++++ .../views/elements/effects/ICanvasEffect.ts | 5 + .../views/elements/effects/confetti/index.ts | 197 +++++++++++++++++ .../views/rooms/SendMessageComposer.js | 8 +- .../tabs/user/PreferencesUserSettingsTab.js | 2 +- src/i18n/strings/en_EN.json | 2 +- src/settings/Settings.ts | 6 +- 11 files changed, 296 insertions(+), 297 deletions(-) delete mode 100644 src/components/views/elements/Confetti.js delete mode 100644 src/components/views/elements/ConfettiOverlay.tsx create mode 100644 src/components/views/elements/effects/EffectsOverlay.tsx create mode 100644 src/components/views/elements/effects/ICanvasEffect.ts create mode 100644 src/components/views/elements/effects/confetti/index.ts diff --git a/src/SlashCommands.tsx b/src/SlashCommands.tsx index 87dc1ccdfd..316249d74d 100644 --- a/src/SlashCommands.tsx +++ b/src/SlashCommands.tsx @@ -77,6 +77,7 @@ export const CommandCategories = { "actions": _td("Actions"), "admin": _td("Admin"), "advanced": _td("Advanced"), + "effects": _td("Effects"), "other": _td("Other"), }; @@ -1045,19 +1046,16 @@ export const Commands = [ args: '', runFn: function(roomId, args) { return success((async () => { - const isChatEffectsDisabled = SettingsStore.getValue('dontShowChatEffects'); - if ((!args) || (!args && isChatEffectsDisabled)) { + if (!args) { args = _t("sends confetti"); MatrixClientPeg.get().sendEmoteMessage(roomId, args); } else { MatrixClientPeg.get().sendTextMessage(roomId, args); } - if (!isChatEffectsDisabled) { - dis.dispatch({action: 'confetti'}); - } + dis.dispatch({action: 'effects.confetti'}); })()); }, - category: CommandCategories.actions, + category: CommandCategories.effects, }), // Command definitions for autocompletion ONLY: diff --git a/src/components/structures/RoomView.tsx b/src/components/structures/RoomView.tsx index 0905005cf7..1b47386789 100644 --- a/src/components/structures/RoomView.tsx +++ b/src/components/structures/RoomView.tsx @@ -56,7 +56,6 @@ import MatrixClientContext from "../../contexts/MatrixClientContext"; import {E2EStatus, shieldStatusForRoom} from '../../utils/ShieldUtils'; import {Action} from "../../dispatcher/actions"; import {SettingLevel} from "../../settings/SettingLevel"; -import {animateConfetti, forceStopConfetti, isConfettiEmoji} from "../views/elements/Confetti"; import {RightPanelPhases} from "../../stores/RightPanelStorePhases"; import {IMatrixClientCreds} from "../../MatrixClientPeg"; import ScrollPanel from "./ScrollPanel"; @@ -73,7 +72,7 @@ import TintableSvg from "../views/elements/TintableSvg"; import {XOR} from "../../@types/common"; import { IThreepidInvite } from "../../stores/ThreepidInviteStore"; import { CallState, CallType, MatrixCall } from "matrix-js-sdk/lib/webrtc/call"; -import ConfettiOverlay from "../views/elements/ConfettiOverlay"; +import EffectsOverlay from "../views/elements/effects/EffectsOverlay"; const DEBUG = false; let debuglog = function(msg: string) {}; @@ -248,8 +247,6 @@ export default class RoomView extends React.Component { this.context.on("deviceVerificationChanged", this.onDeviceVerificationChanged); this.context.on("userTrustStatusChanged", this.onUserVerificationChanged); this.context.on("crossSigning.keysChanged", this.onCrossSigningKeysChanged); - this.context.on("Event.decrypted", this.onEventDecrypted); - this.context.on("event", this.onEvent); // Start listening for RoomViewStore updates this.roomStoreToken = RoomViewStore.addListener(this.onRoomViewStoreUpdate); this.rightPanelStoreToken = RightPanelStore.getSharedInstance().addListener(this.onRightPanelStoreUpdate); @@ -570,8 +567,6 @@ export default class RoomView extends React.Component { this.context.removeListener("deviceVerificationChanged", this.onDeviceVerificationChanged); this.context.removeListener("userTrustStatusChanged", this.onUserVerificationChanged); this.context.removeListener("crossSigning.keysChanged", this.onCrossSigningKeysChanged); - this.context.removeListener("Event.decrypted", this.onEventDecrypted); - this.context.removeListener("event", this.onEvent); } window.removeEventListener('beforeunload', this.onPageUnload); @@ -693,9 +688,6 @@ export default class RoomView extends React.Component { case 'message_sent': this.checkIfAlone(this.state.room); break; - case 'confetti': - //TODO: animateConfetti(this.roomView.current.offsetWidth); - break; case 'post_sticker_message': this.injectSticker( payload.data.content.url, @@ -804,28 +796,6 @@ export default class RoomView extends React.Component { } }; - private onEventDecrypted = (ev) => { - if (!SettingsStore.getValue('dontShowChatEffects')) { - if (ev.isBeingDecrypted() || ev.isDecryptionFailure() || - this.state.room.getUnreadNotificationCount() === 0) return; - this.handleConfetti(ev); - } - }; - - private onEvent = (ev) => { - if (ev.isBeingDecrypted() || ev.isDecryptionFailure()) return; - this.handleConfetti(ev); - }; - - private handleConfetti = (ev) => { - if (this.state.matrixClientIsReady) { - const messageBody = _t('sends confetti'); - if (isConfettiEmoji(ev.getContent()) || ev.getContent().body === messageBody) { - dis.dispatch({action: 'confetti'}); - } - } - }; - private onRoomName = (room: Room) => { if (this.state.room && room.roomId == this.state.room.roomId) { this.forceUpdate(); @@ -2070,11 +2040,13 @@ export default class RoomView extends React.Component { mx_RoomView_inCall: Boolean(activeCall), }); + const showChatEffects = SettingsStore.getValue('showChatEffects'); + return (
- {this.roomView.current && - + {showChatEffects && this.roomView.current && + } confetti.frameInterval) { - context.clearRect(0, 0, window.innerWidth, window.innerHeight); - updateParticles(); - drawParticles(context); - lastFrameTime = now - (delta % confetti.frameInterval); - } - requestAnimationFrame(runAnimation); - } - } - - function startConfetti(canvas, roomWidth, timeout) { - window.requestAnimationFrame = (function() { - return window.requestAnimationFrame || - window.webkitRequestAnimationFrame || - window.mozRequestAnimationFrame || - window.oRequestAnimationFrame || - window.msRequestAnimationFrame || - function(callback) { - return window.setTimeout(callback, confetti.frameInterval); - }; - })(); - if (context === null) { - context = canvas.getContext("2d"); - } - const count = confetti.maxCount; - while (particles.length < count) { - particles.push(resetParticle({}, canvas.width, canvas.height)); - } - streamingConfetti = true; - runAnimation(); - if (timeout) { - window.setTimeout(stopConfetti, timeout); - } - } - - function stopConfetti() { - streamingConfetti = false; - } - - function removeConfetti() { - stop(); - particles = []; - } - - function isConfettiRunning() { - return streamingConfetti; - } - - function drawParticles(context) { - let particle; - let x; let x2; let y2; - for (let i = 0; i < particles.length; i++) { - particle = particles[i]; - context.beginPath(); - context.lineWidth = particle.diameter; - x2 = particle.x + particle.tilt; - x = x2 + particle.diameter / 2; - y2 = particle.y + particle.tilt + particle.diameter / 2; - if (confetti.gradient) { - const gradient = context.createLinearGradient(x, particle.y, x2, y2); - gradient.addColorStop("0", particle.color); - gradient.addColorStop("1.0", particle.color2); - context.strokeStyle = gradient; - } else { - context.strokeStyle = particle.color; - } - context.moveTo(x, particle.y); - context.lineTo(x2, y2); - context.stroke(); - } - } - - function updateParticles() { - const width = window.innerWidth; - const height = window.innerHeight; - let particle; - waveAngle += 0.01; - for (let i = 0; i < particles.length; i++) { - particle = particles[i]; - if (!streamingConfetti && particle.y < -15) { - particle.y = height + 100; - } else { - particle.tiltAngle += particle.tiltAngleIncrement; - particle.x += Math.sin(waveAngle) - 0.5; - particle.y += (Math.cos(waveAngle) + particle.diameter + confetti.speed) * 0.5; - particle.tilt = Math.sin(particle.tiltAngle) * 15; - } - if (particle.x > width + 20 || particle.x < -20 || particle.y > height) { - if (streamingConfetti && particles.length <= confetti.maxCount) { - resetParticle(particle, width, height); - } else { - particles.splice(i, 1); - i--; - } - } - } - } -})(); - -export function convertToHex(content) { - const contentBodyToHexArray = []; - let hex; - if (content.body) { - for (let i = 0; i < content.body.length; i++) { - hex = content.body.codePointAt(i).toString(16); - contentBodyToHexArray.push(hex); - } - } - return contentBodyToHexArray; -} - -export function isConfettiEmoji(content) { - const hexArray = convertToHex(content); - return !!(hexArray.includes('1f389') || hexArray.includes('1f38a')); -} - -export function animateConfetti(canvas, roomWidth) { - confetti.start(canvas, roomWidth, 3000); -} -export function forceStopConfetti() { - confetti.remove(); -} diff --git a/src/components/views/elements/ConfettiOverlay.tsx b/src/components/views/elements/ConfettiOverlay.tsx deleted file mode 100644 index 63d38d834c..0000000000 --- a/src/components/views/elements/ConfettiOverlay.tsx +++ /dev/null @@ -1,41 +0,0 @@ -import React, {useEffect, useRef} from 'react'; -import {animateConfetti, forceStopConfetti} from './Confetti.js'; - -export default function ConfettiOverlay({roomWidth}) { - const canvasRef = useRef(null); - // on mount - useEffect(() => { - const resize = () => { - const canvas = canvasRef.current; - canvas.height = window.innerHeight; - }; - const canvas = canvasRef.current; - canvas.width = roomWidth; - canvas.height = window.innerHeight; - window.addEventListener("resize", resize, true); - animateConfetti(canvas, roomWidth); - return () => { - window.removeEventListener("resize", resize); - forceStopConfetti(); - }; - }, []); - // on roomWidth change - - useEffect(() => { - const canvas = canvasRef.current; - canvas.width = roomWidth; - }, [roomWidth]); - return ( - - ) -} \ No newline at end of file diff --git a/src/components/views/elements/effects/EffectsOverlay.tsx b/src/components/views/elements/effects/EffectsOverlay.tsx new file mode 100644 index 0000000000..1f8e7a97ad --- /dev/null +++ b/src/components/views/elements/effects/EffectsOverlay.tsx @@ -0,0 +1,77 @@ +import React, {FunctionComponent, useEffect, useRef} from 'react'; +import dis from '../../../../dispatcher/dispatcher'; +import ICanvasEffect from './ICanvasEffect.js'; + +type EffectsOverlayProps = { + roomWidth: number; +} + +const EffectsOverlay: FunctionComponent = ({roomWidth}) => { + const canvasRef = useRef(null); + const effectsRef = useRef>(new Map()); + + const resize = () => { + canvasRef.current.height = window.innerHeight; + }; + + const lazyLoadEffectModule = async (name: string): Promise => { + if(!name) return null; + let effect = effectsRef.current[name] ?? null; + if(effect === null) { + try { + var { default: Effect } = await import(`./${name}`); + effect = new Effect(); + effectsRef.current[name] = effect; + } catch (err) { + console.warn('Unable to load effect module at \'./${name}\'.', err) + } + } + return effect; + } + + const onAction = (payload: { action: string }) => { + const actionPrefix = 'effects.'; + if(payload.action.indexOf(actionPrefix) === 0) { + const effect = payload.action.substr(actionPrefix.length); + lazyLoadEffectModule(effect).then((module) => module?.start(canvasRef.current)); + } + }; + + // on mount + useEffect(() => { + const dispatcherRef = dis.register(onAction); + const canvas = canvasRef.current; + canvas.width = roomWidth; + canvas.height = window.innerHeight; + window.addEventListener('resize', resize, true); + + return () => { + dis.unregister(dispatcherRef); + window.removeEventListener('resize', resize); + for(const effect in effectsRef.current) { + effectsRef.current[effect]?.stop(); + } + }; + }, []); + + // on roomWidth change + useEffect(() => { + canvasRef.current.width = roomWidth; + }, [roomWidth]); + + return ( + + ) +} + +export default EffectsOverlay; \ No newline at end of file diff --git a/src/components/views/elements/effects/ICanvasEffect.ts b/src/components/views/elements/effects/ICanvasEffect.ts new file mode 100644 index 0000000000..c463235880 --- /dev/null +++ b/src/components/views/elements/effects/ICanvasEffect.ts @@ -0,0 +1,5 @@ +export default interface ICanvasEffect { + start: (canvas: HTMLCanvasElement, timeout?: number) => Promise, + stop: () => Promise, + isRunning: boolean +} \ No newline at end of file diff --git a/src/components/views/elements/effects/confetti/index.ts b/src/components/views/elements/effects/confetti/index.ts new file mode 100644 index 0000000000..dd4e869078 --- /dev/null +++ b/src/components/views/elements/effects/confetti/index.ts @@ -0,0 +1,197 @@ +import ICanvasEffect from '../ICanvasEffect' + +declare global { + interface Window { + mozRequestAnimationFrame: any; + oRequestAnimationFrame: any; + msRequestAnimationFrame: any; + } +} + +export type ConfettiOptions = { + maxCount: number, + speed: number, + frameInterval: number, + alpha: number, + gradient: boolean, +} + +type ConfettiParticle = { + color: string, + color2: string, + x: number, + y: number, + diameter: number, + tilt: number, + tiltAngleIncrement: number, + tiltAngle: number, +} + +const DefaultOptions: ConfettiOptions = { + //set max confetti count + maxCount: 150, + //syarn addet the particle animation speed + speed: 3, + //the confetti animation frame interval in milliseconds + frameInterval: 15, + //the alpha opacity of the confetti (between 0 and 1, where 1 is opaque and 0 is invisible) + alpha: 1.0, + //use gradient instead of solid particle color + gradient: false, +}; + +export default class Confetti implements ICanvasEffect { + private readonly options: ConfettiOptions; + + constructor(options: ConfettiOptions = DefaultOptions) { + this.options = options; + } + + private context: CanvasRenderingContext2D | null; + private supportsAnimationFrame = window.requestAnimationFrame || + window.webkitRequestAnimationFrame || + window.mozRequestAnimationFrame || + window.oRequestAnimationFrame || + window.msRequestAnimationFrame; + private colors = ['rgba(30,144,255,', 'rgba(107,142,35,', 'rgba(255,215,0,', + 'rgba(255,192,203,', 'rgba(106,90,205,', 'rgba(173,216,230,', + 'rgba(238,130,238,', 'rgba(152,251,152,', 'rgba(70,130,180,', + 'rgba(244,164,96,', 'rgba(210,105,30,', 'rgba(220,20,60,']; + + private lastFrameTime = Date.now(); + private particles: Array = []; + private waveAngle = 0; + + public isRunning: boolean; + + public start = async (canvas: HTMLCanvasElement, timeout?: number) => { + if(!canvas) { + return; + } + window.requestAnimationFrame = (function () { + return window.requestAnimationFrame || + window.webkitRequestAnimationFrame || + window.mozRequestAnimationFrame || + window.oRequestAnimationFrame || + window.msRequestAnimationFrame || + function (callback) { + return window.setTimeout(callback, this.options.frameInterval); + }; + })(); + if (this.context === null) { + this.context = canvas.getContext('2d'); + } + const count = this.options.maxCount; + while (this.particles.length < count) { + this.particles.push(this.resetParticle({} as ConfettiParticle, canvas.width, canvas.height)); + } + this.isRunning = true; + this.runAnimation(); + if (timeout) { + window.setTimeout(this.stop, timeout || 3000); + } + } + + public stop = async () => { + this.isRunning = false; + this.particles = []; + } + + private resetParticle = (particle: ConfettiParticle, width: number, height: number): ConfettiParticle => { + particle.color = this.colors[(Math.random() * this.colors.length) | 0] + (this.options.alpha + ')'); + particle.color2 = this.colors[(Math.random() * this.colors.length) | 0] + (this.options.alpha + ')'); + particle.x = Math.random() * width; + particle.y = Math.random() * height - height; + particle.diameter = Math.random() * 10 + 5; + particle.tilt = Math.random() * 10 - 10; + particle.tiltAngleIncrement = Math.random() * 0.07 + 0.05; + particle.tiltAngle = Math.random() * Math.PI; + return particle; + } + + private runAnimation = (): void => { + if (this.particles.length === 0) { + this.context.clearRect(0, 0, this.context.canvas.width, this.context.canvas.height); + //animationTimer = null; + } else { + const now = Date.now(); + const delta = now - this.lastFrameTime; + if (!this.supportsAnimationFrame || delta > this.options.frameInterval) { + this.context.clearRect(0, 0, this.context.canvas.width, this.context.canvas.height); + this.updateParticles(); + this.drawParticles(this.context); + this.lastFrameTime = now - (delta % this.options.frameInterval); + } + requestAnimationFrame(this.runAnimation); + } + } + + + private drawParticles = (context: CanvasRenderingContext2D): void => { + let particle; + let x; let x2; let y2; + for (let i = 0; i < this.particles.length; i++) { + particle = this.particles[i]; + this.context.beginPath(); + context.lineWidth = particle.diameter; + x2 = particle.x + particle.tilt; + x = x2 + particle.diameter / 2; + y2 = particle.y + particle.tilt + particle.diameter / 2; + if (this.options.gradient) { + const gradient = context.createLinearGradient(x, particle.y, x2, y2); + gradient.addColorStop(0, particle.color); + gradient.addColorStop(1.0, particle.color2); + context.strokeStyle = gradient; + } else { + context.strokeStyle = particle.color; + } + context.moveTo(x, particle.y); + context.lineTo(x2, y2); + context.stroke(); + } + } + + private updateParticles = () => { + const width = this.context.canvas.width; + const height = this.context.canvas.height; + let particle: ConfettiParticle; + this.waveAngle += 0.01; + for (let i = 0; i < this.particles.length; i++) { + particle = this.particles[i]; + if (!this.isRunning && particle.y < -15) { + particle.y = height + 100; + } else { + particle.tiltAngle += particle.tiltAngleIncrement; + particle.x += Math.sin(this.waveAngle) - 0.5; + particle.y += (Math.cos(this.waveAngle) + particle.diameter + this.options.speed) * 0.5; + particle.tilt = Math.sin(particle.tiltAngle) * 15; + } + if (particle.x > width + 20 || particle.x < -20 || particle.y > height) { + if (this.isRunning && this.particles.length <= this.options.maxCount) { + this.resetParticle(particle, width, height); + } else { + this.particles.splice(i, 1); + i--; + } + } + } + } +} + +const convertToHex = (data: string): Array => { + const contentBodyToHexArray = []; + if (!data) return contentBodyToHexArray; + let hex; + if (data) { + for (let i = 0; i < data.length; i++) { + hex = data.codePointAt(i).toString(16); + contentBodyToHexArray.push(hex); + } + } + return contentBodyToHexArray; +} + +export const isConfettiEmoji = (content: { msgtype: string, body: string }): boolean => { + const hexArray = convertToHex(content.body); + return !!(hexArray.includes('1f389') || hexArray.includes('1f38a')); +} diff --git a/src/components/views/rooms/SendMessageComposer.js b/src/components/views/rooms/SendMessageComposer.js index d148d38b23..4fbea9d043 100644 --- a/src/components/views/rooms/SendMessageComposer.js +++ b/src/components/views/rooms/SendMessageComposer.js @@ -42,7 +42,7 @@ import {Key} from "../../../Keyboard"; import MatrixClientContext from "../../../contexts/MatrixClientContext"; import RateLimitedFunc from '../../../ratelimitedfunc'; import {Action} from "../../../dispatcher/actions"; -import {isConfettiEmoji} from "../elements/Confetti"; +import {isConfettiEmoji} from "../elements/effects/confetti"; import SettingsStore from "../../../settings/SettingsStore"; function addReplyToMessageContent(content, repliedToEvent, permalinkCreator) { @@ -318,10 +318,8 @@ export default class SendMessageComposer extends React.Component { }); } dis.dispatch({action: "message_sent"}); - if (!SettingsStore.getValue('dontShowChatEffects')) { - if (isConfettiEmoji(content)) { - dis.dispatch({action: 'confetti'}); - } + if (isConfettiEmoji(content)) { + dis.dispatch({action: 'effects.confetti'}); } } diff --git a/src/components/views/settings/tabs/user/PreferencesUserSettingsTab.js b/src/components/views/settings/tabs/user/PreferencesUserSettingsTab.js index 95d0f4be46..078d4dd2c7 100644 --- a/src/components/views/settings/tabs/user/PreferencesUserSettingsTab.js +++ b/src/components/views/settings/tabs/user/PreferencesUserSettingsTab.js @@ -49,7 +49,7 @@ export default class PreferencesUserSettingsTab extends React.Component { 'showAvatarChanges', 'showDisplaynameChanges', 'showImages', - 'dontShowChatEffects', + 'showChatEffects', 'Pill.shouldShowPillAvatar', ]; diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index 4fc7a3ad25..c3943eb764 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -510,7 +510,7 @@ "Manually verify all remote sessions": "Manually verify all remote sessions", "IRC display name width": "IRC display name width", "Enable experimental, compact IRC style layout": "Enable experimental, compact IRC style layout", - "Don't show chat effects": "Don't show chat effects", + "Show chat effects": "Show chat effects", "Collecting app version information": "Collecting app version information", "Collecting logs": "Collecting logs", "Uploading logs": "Uploading logs", diff --git a/src/settings/Settings.ts b/src/settings/Settings.ts index b9ad834c83..ab4665c401 100644 --- a/src/settings/Settings.ts +++ b/src/settings/Settings.ts @@ -622,10 +622,10 @@ export const SETTINGS: {[setting: string]: ISetting} = { displayName: _td("Enable experimental, compact IRC style layout"), default: false, }, - "dontShowChatEffects": { + "showChatEffects": { supportedLevels: LEVELS_ACCOUNT_SETTINGS, - displayName: _td("Don't show chat effects"), - default: false, + displayName: _td("Show chat effects"), + default: true, }, "Widgets.pinned": { supportedLevels: LEVELS_ROOM_OR_ACCOUNT, From 6d98335368b82ed6c7d5539bacfbd2f424fd8be7 Mon Sep 17 00:00:00 2001 From: Steffen Kolmer Date: Mon, 19 Oct 2020 21:28:22 +0200 Subject: [PATCH 027/319] Removed old todo --- src/components/structures/RoomView.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/structures/RoomView.tsx b/src/components/structures/RoomView.tsx index 1b47386789..2c3aa4793a 100644 --- a/src/components/structures/RoomView.tsx +++ b/src/components/structures/RoomView.tsx @@ -824,7 +824,6 @@ export default class RoomView extends React.Component { this.calculateRecommendedVersion(room); this.updateE2EStatus(room); this.updatePermissions(room); - //TODO: forceStopConfetti(); }; private async calculateRecommendedVersion(room: Room) { From 48633f76ab92c5238a4f2e4c99f73d2598129f64 Mon Sep 17 00:00:00 2001 From: Steffen Kolmer Date: Mon, 19 Oct 2020 23:10:43 +0200 Subject: [PATCH 028/319] added event handling back --- src/SlashCommands.tsx | 2 +- src/components/structures/RoomView.tsx | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/src/SlashCommands.tsx b/src/SlashCommands.tsx index 316249d74d..68be5de0a0 100644 --- a/src/SlashCommands.tsx +++ b/src/SlashCommands.tsx @@ -1047,7 +1047,7 @@ export const Commands = [ runFn: function(roomId, args) { return success((async () => { if (!args) { - args = _t("sends confetti"); + args = "sends confetti"; MatrixClientPeg.get().sendEmoteMessage(roomId, args); } else { MatrixClientPeg.get().sendTextMessage(roomId, args); diff --git a/src/components/structures/RoomView.tsx b/src/components/structures/RoomView.tsx index 2c3aa4793a..f975a7cc6e 100644 --- a/src/components/structures/RoomView.tsx +++ b/src/components/structures/RoomView.tsx @@ -73,6 +73,7 @@ import {XOR} from "../../@types/common"; import { IThreepidInvite } from "../../stores/ThreepidInviteStore"; import { CallState, CallType, MatrixCall } from "matrix-js-sdk/lib/webrtc/call"; import EffectsOverlay from "../views/elements/effects/EffectsOverlay"; +import { isConfettiEmoji } from '../views/elements/effects/confetti'; const DEBUG = false; let debuglog = function(msg: string) {}; @@ -247,6 +248,8 @@ export default class RoomView extends React.Component { this.context.on("deviceVerificationChanged", this.onDeviceVerificationChanged); this.context.on("userTrustStatusChanged", this.onUserVerificationChanged); this.context.on("crossSigning.keysChanged", this.onCrossSigningKeysChanged); + this.context.on("Event.decrypted", this.onEventDecrypted); + this.context.on("event", this.onEvent); // Start listening for RoomViewStore updates this.roomStoreToken = RoomViewStore.addListener(this.onRoomViewStoreUpdate); this.rightPanelStoreToken = RightPanelStore.getSharedInstance().addListener(this.onRightPanelStoreUpdate); @@ -567,6 +570,8 @@ export default class RoomView extends React.Component { this.context.removeListener("deviceVerificationChanged", this.onDeviceVerificationChanged); this.context.removeListener("userTrustStatusChanged", this.onUserVerificationChanged); this.context.removeListener("crossSigning.keysChanged", this.onCrossSigningKeysChanged); + this.context.removeListener("Event.decrypted", this.onEventDecrypted); + this.context.removeListener("event", this.onEvent); } window.removeEventListener('beforeunload', this.onPageUnload); @@ -795,6 +800,26 @@ export default class RoomView extends React.Component { } } }; + + private onEventDecrypted = (ev) => { + if (ev.isBeingDecrypted() || ev.isDecryptionFailure() || + this.state.room.getUnreadNotificationCount() === 0) return; + this.handleConfetti(ev); + }; + + private onEvent = (ev) => { + if (ev.isBeingDecrypted() || ev.isDecryptionFailure()) return; + this.handleConfetti(ev); + }; + + private handleConfetti = (ev) => { + if (this.state.matrixClientIsReady) { + const messageBody = 'sends confetti'; + if (isConfettiEmoji(ev.getContent()) || ev.getContent().body === messageBody) { + dis.dispatch({action: 'effects.confetti'}); + } + } + }; private onRoomName = (room: Room) => { if (this.state.room && room.roomId == this.state.room.roomId) { From 1c6d28b861c8b6bee20c29056733ef08cc3dfa76 Mon Sep 17 00:00:00 2001 From: nurjinn jafar Date: Wed, 21 Oct 2020 13:37:36 +0200 Subject: [PATCH 029/319] refactoring roomView / slashCommands / SendMessageComposer with the new effects configurations and fix confetti animation timeout --- src/SlashCommands.tsx | 39 +++++++++++-------- src/components/structures/RoomView.tsx | 18 +++++---- .../views/elements/effects/ICanvasEffect.ts | 4 +- .../views/elements/effects/confetti/index.ts | 26 ++----------- .../views/elements/effects/effectUtilities.ts | 3 ++ .../views/elements/effects/index.ts | 11 ++++++ .../views/rooms/SendMessageComposer.js | 10 +++-- 7 files changed, 59 insertions(+), 52 deletions(-) create mode 100644 src/components/views/elements/effects/effectUtilities.ts create mode 100644 src/components/views/elements/effects/index.ts diff --git a/src/SlashCommands.tsx b/src/SlashCommands.tsx index 68be5de0a0..3f51614028 100644 --- a/src/SlashCommands.tsx +++ b/src/SlashCommands.tsx @@ -46,6 +46,7 @@ import { EffectiveMembership, getEffectiveMembership, leaveRoomBehaviour } from import SdkConfig from "./SdkConfig"; import SettingsStore from "./settings/SettingsStore"; import {UIFeature} from "./settings/UIFeature"; +import effects from "./components/views/elements/effects" // XXX: workaround for https://github.com/microsoft/TypeScript/issues/31816 interface HTMLInputEvent extends Event { @@ -1040,22 +1041,28 @@ export const Commands = [ }, category: CommandCategories.actions, }), - new Command({ - command: "confetti", - description: _td("Sends the given message with confetti"), - args: '', - runFn: function(roomId, args) { - return success((async () => { - if (!args) { - args = "sends confetti"; - MatrixClientPeg.get().sendEmoteMessage(roomId, args); - } else { - MatrixClientPeg.get().sendTextMessage(roomId, args); - } - dis.dispatch({action: 'effects.confetti'}); - })()); - }, - category: CommandCategories.effects, + ...effects.map((effect) => { + return new Command({ + command: effect.command, + description: effect.description(), + args: '', + runFn: function(roomId, args) { + return success((async () => { + if (!args) { + args = effect.fallbackMessage(); + MatrixClientPeg.get().sendEmoteMessage(roomId, args); + } else { + const content = { + msgtype: effect.msgType, + body: args, + }; + MatrixClientPeg.get().sendMessage(roomId, content); + } + dis.dispatch({action: `effects.${effect.command}`}); + })()); + }, + category: CommandCategories.effects, + }) }), // Command definitions for autocompletion ONLY: diff --git a/src/components/structures/RoomView.tsx b/src/components/structures/RoomView.tsx index f975a7cc6e..0b7aa08288 100644 --- a/src/components/structures/RoomView.tsx +++ b/src/components/structures/RoomView.tsx @@ -73,7 +73,8 @@ import {XOR} from "../../@types/common"; import { IThreepidInvite } from "../../stores/ThreepidInviteStore"; import { CallState, CallType, MatrixCall } from "matrix-js-sdk/lib/webrtc/call"; import EffectsOverlay from "../views/elements/effects/EffectsOverlay"; -import { isConfettiEmoji } from '../views/elements/effects/confetti'; +import {containsEmoji} from '../views/elements/effects/effectUtilities'; +import effects from '../views/elements/effects' const DEBUG = false; let debuglog = function(msg: string) {}; @@ -800,10 +801,9 @@ export default class RoomView extends React.Component { } } }; - + private onEventDecrypted = (ev) => { - if (ev.isBeingDecrypted() || ev.isDecryptionFailure() || - this.state.room.getUnreadNotificationCount() === 0) return; + if (ev.isDecryptionFailure()) return; this.handleConfetti(ev); }; @@ -813,11 +813,13 @@ export default class RoomView extends React.Component { }; private handleConfetti = (ev) => { + if (this.state.room.getUnreadNotificationCount() === 0) return; if (this.state.matrixClientIsReady) { - const messageBody = 'sends confetti'; - if (isConfettiEmoji(ev.getContent()) || ev.getContent().body === messageBody) { - dis.dispatch({action: 'effects.confetti'}); - } + effects.map(effect => { + if (containsEmoji(ev.getContent(), effect.emojis) || ev.getContent().msgtype === effect.msgType) { + dis.dispatch({action: `effects.${effect.command}`}); + } + }) } }; diff --git a/src/components/views/elements/effects/ICanvasEffect.ts b/src/components/views/elements/effects/ICanvasEffect.ts index c463235880..a8b9a83514 100644 --- a/src/components/views/elements/effects/ICanvasEffect.ts +++ b/src/components/views/elements/effects/ICanvasEffect.ts @@ -1,5 +1,5 @@ export default interface ICanvasEffect { - start: (canvas: HTMLCanvasElement, timeout?: number) => Promise, + start: (canvas: HTMLCanvasElement, timeout: number) => Promise, stop: () => Promise, isRunning: boolean -} \ No newline at end of file +} diff --git a/src/components/views/elements/effects/confetti/index.ts b/src/components/views/elements/effects/confetti/index.ts index dd4e869078..c5874311c5 100644 --- a/src/components/views/elements/effects/confetti/index.ts +++ b/src/components/views/elements/effects/confetti/index.ts @@ -47,7 +47,7 @@ export default class Confetti implements ICanvasEffect { this.options = options; } - private context: CanvasRenderingContext2D | null; + private context: CanvasRenderingContext2D | null = null; private supportsAnimationFrame = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || @@ -64,7 +64,7 @@ export default class Confetti implements ICanvasEffect { public isRunning: boolean; - public start = async (canvas: HTMLCanvasElement, timeout?: number) => { + public start = async (canvas: HTMLCanvasElement, timeout = 3000) => { if(!canvas) { return; } @@ -88,13 +88,13 @@ export default class Confetti implements ICanvasEffect { this.isRunning = true; this.runAnimation(); if (timeout) { - window.setTimeout(this.stop, timeout || 3000); + window.setTimeout(this.stop, timeout); } } public stop = async () => { this.isRunning = false; - this.particles = []; + // this.particles = []; } private resetParticle = (particle: ConfettiParticle, width: number, height: number): ConfettiParticle => { @@ -177,21 +177,3 @@ export default class Confetti implements ICanvasEffect { } } } - -const convertToHex = (data: string): Array => { - const contentBodyToHexArray = []; - if (!data) return contentBodyToHexArray; - let hex; - if (data) { - for (let i = 0; i < data.length; i++) { - hex = data.codePointAt(i).toString(16); - contentBodyToHexArray.push(hex); - } - } - return contentBodyToHexArray; -} - -export const isConfettiEmoji = (content: { msgtype: string, body: string }): boolean => { - const hexArray = convertToHex(content.body); - return !!(hexArray.includes('1f389') || hexArray.includes('1f38a')); -} diff --git a/src/components/views/elements/effects/effectUtilities.ts b/src/components/views/elements/effects/effectUtilities.ts new file mode 100644 index 0000000000..927b445a61 --- /dev/null +++ b/src/components/views/elements/effects/effectUtilities.ts @@ -0,0 +1,3 @@ +export const containsEmoji = (content: { msgtype: string, body: string }, emojis: Array): boolean => { + return emojis.some((emoji) => content.body.includes(emoji)); +} diff --git a/src/components/views/elements/effects/index.ts b/src/components/views/elements/effects/index.ts new file mode 100644 index 0000000000..d4c12fa7ce --- /dev/null +++ b/src/components/views/elements/effects/index.ts @@ -0,0 +1,11 @@ +import {_t, _td} from "../../../../languageHandler"; + +export default [ + { + emojis: ['🎊', '🎉'], + msgType: 'nic.custom.confetti', + command: 'confetti', + description: () => _td("Sends the given message with confetti"), + fallbackMessage: () => _t("sends confetti") + " 🎉", + }, +] diff --git a/src/components/views/rooms/SendMessageComposer.js b/src/components/views/rooms/SendMessageComposer.js index 4fbea9d043..94ad934067 100644 --- a/src/components/views/rooms/SendMessageComposer.js +++ b/src/components/views/rooms/SendMessageComposer.js @@ -42,8 +42,8 @@ import {Key} from "../../../Keyboard"; import MatrixClientContext from "../../../contexts/MatrixClientContext"; import RateLimitedFunc from '../../../ratelimitedfunc'; import {Action} from "../../../dispatcher/actions"; -import {isConfettiEmoji} from "../elements/effects/confetti"; -import SettingsStore from "../../../settings/SettingsStore"; +import {containsEmoji} from "../elements/effects/effectUtilities"; +import effects from '../elements/effects'; function addReplyToMessageContent(content, repliedToEvent, permalinkCreator) { const replyContent = ReplyThread.makeReplyMixIn(repliedToEvent); @@ -318,9 +318,11 @@ export default class SendMessageComposer extends React.Component { }); } dis.dispatch({action: "message_sent"}); - if (isConfettiEmoji(content)) { - dis.dispatch({action: 'effects.confetti'}); + effects.map( (effect) => { + if (containsEmoji(content, effect.emojis)) { + dis.dispatch({action: `effects.${effect.command}`}); } + }); } this.sendHistoryManager.save(this.model, replyToEvent); From d4ec1dd7750f5a901eaf079a7b5fd8153701aed3 Mon Sep 17 00:00:00 2001 From: Steffen Kolmer Date: Wed, 21 Oct 2020 13:56:58 +0200 Subject: [PATCH 030/319] Refactoring --- src/components/structures/RoomView.tsx | 2 +- .../views/elements/effects/confetti/index.ts | 1 - src/components/views/elements/effects/index.ts | 16 ++++++++++++++-- .../views/rooms/SendMessageComposer.js | 6 +++--- 4 files changed, 18 insertions(+), 7 deletions(-) diff --git a/src/components/structures/RoomView.tsx b/src/components/structures/RoomView.tsx index 0b7aa08288..c84a3bf783 100644 --- a/src/components/structures/RoomView.tsx +++ b/src/components/structures/RoomView.tsx @@ -815,7 +815,7 @@ export default class RoomView extends React.Component { private handleConfetti = (ev) => { if (this.state.room.getUnreadNotificationCount() === 0) return; if (this.state.matrixClientIsReady) { - effects.map(effect => { + effects.forEach(effect => { if (containsEmoji(ev.getContent(), effect.emojis) || ev.getContent().msgtype === effect.msgType) { dis.dispatch({action: `effects.${effect.command}`}); } diff --git a/src/components/views/elements/effects/confetti/index.ts b/src/components/views/elements/effects/confetti/index.ts index c5874311c5..e8a139387b 100644 --- a/src/components/views/elements/effects/confetti/index.ts +++ b/src/components/views/elements/effects/confetti/index.ts @@ -94,7 +94,6 @@ export default class Confetti implements ICanvasEffect { public stop = async () => { this.isRunning = false; - // this.particles = []; } private resetParticle = (particle: ConfettiParticle, width: number, height: number): ConfettiParticle => { diff --git a/src/components/views/elements/effects/index.ts b/src/components/views/elements/effects/index.ts index d4c12fa7ce..6311135c1e 100644 --- a/src/components/views/elements/effects/index.ts +++ b/src/components/views/elements/effects/index.ts @@ -1,6 +1,14 @@ import {_t, _td} from "../../../../languageHandler"; -export default [ +type Effect = { + emojis: Array; + msgType: string; + command: string; + description: () => string; + fallbackMessage: () => string; +} + +const effects: Array = [ { emojis: ['🎊', '🎉'], msgType: 'nic.custom.confetti', @@ -8,4 +16,8 @@ export default [ description: () => _td("Sends the given message with confetti"), fallbackMessage: () => _t("sends confetti") + " 🎉", }, -] +]; + +export default effects; + + diff --git a/src/components/views/rooms/SendMessageComposer.js b/src/components/views/rooms/SendMessageComposer.js index 94ad934067..a413a9917c 100644 --- a/src/components/views/rooms/SendMessageComposer.js +++ b/src/components/views/rooms/SendMessageComposer.js @@ -318,10 +318,10 @@ export default class SendMessageComposer extends React.Component { }); } dis.dispatch({action: "message_sent"}); - effects.map( (effect) => { + effects.forEach((effect) => { if (containsEmoji(content, effect.emojis)) { - dis.dispatch({action: `effects.${effect.command}`}); - } + dis.dispatch({action: `effects.${effect.command}`}); + } }); } From 047c29731b319bdf48027ae1e2966100763530f4 Mon Sep 17 00:00:00 2001 From: Steffen Kolmer Date: Wed, 21 Oct 2020 14:15:27 +0200 Subject: [PATCH 031/319] Added missing translation --- src/components/views/elements/effects/ICanvasEffect.ts | 2 +- src/i18n/strings/en_EN.json | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/views/elements/effects/ICanvasEffect.ts b/src/components/views/elements/effects/ICanvasEffect.ts index a8b9a83514..71210d7ec3 100644 --- a/src/components/views/elements/effects/ICanvasEffect.ts +++ b/src/components/views/elements/effects/ICanvasEffect.ts @@ -1,5 +1,5 @@ export default interface ICanvasEffect { - start: (canvas: HTMLCanvasElement, timeout: number) => Promise, + start: (canvas: HTMLCanvasElement, timeout?: number) => Promise, stop: () => Promise, isRunning: boolean } diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index c3943eb764..974658aa3d 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -148,6 +148,7 @@ "Messages": "Messages", "Actions": "Actions", "Advanced": "Advanced", + "Effects": "Effects", "Other": "Other", "Command error": "Command error", "Usage": "Usage", @@ -211,8 +212,6 @@ "Send a bug report with logs": "Send a bug report with logs", "Opens chat with the given user": "Opens chat with the given user", "Sends a message to the given user": "Sends a message to the given user", - "Sends the given message with confetti": "Sends the given message with confetti", - "sends confetti": "sends confetti", "Displays action": "Displays action", "Reason": "Reason", "%(targetName)s accepted the invitation for %(displayName)s.": "%(targetName)s accepted the invitation for %(displayName)s.", @@ -1580,6 +1579,8 @@ "Sign in with single sign-on": "Sign in with single sign-on", "And %(count)s more...|other": "And %(count)s more...", "Home": "Home", + "Sends the given message with confetti": "Sends the given message with confetti", + "sends confetti": "sends confetti", "Enter a server name": "Enter a server name", "Looks good": "Looks good", "Can't find this server or its room list": "Can't find this server or its room list", From c7d535d2d3d07ae6490365cb242d1f1e1f1d25a3 Mon Sep 17 00:00:00 2001 From: Steffen Kolmer Date: Wed, 21 Oct 2020 14:29:25 +0200 Subject: [PATCH 032/319] Fixed some formatting issues --- .../views/elements/effects/EffectsOverlay.tsx | 18 +++++++++--------- .../views/elements/effects/confetti/index.ts | 6 +++--- src/components/views/elements/effects/index.ts | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/components/views/elements/effects/EffectsOverlay.tsx b/src/components/views/elements/effects/EffectsOverlay.tsx index 1f8e7a97ad..437d1f127f 100644 --- a/src/components/views/elements/effects/EffectsOverlay.tsx +++ b/src/components/views/elements/effects/EffectsOverlay.tsx @@ -1,4 +1,4 @@ -import React, {FunctionComponent, useEffect, useRef} from 'react'; +import React, { FunctionComponent, useEffect, useRef } from 'react'; import dis from '../../../../dispatcher/dispatcher'; import ICanvasEffect from './ICanvasEffect.js'; @@ -6,7 +6,7 @@ type EffectsOverlayProps = { roomWidth: number; } -const EffectsOverlay: FunctionComponent = ({roomWidth}) => { +const EffectsOverlay: FunctionComponent = ({ roomWidth }) => { const canvasRef = useRef(null); const effectsRef = useRef>(new Map()); @@ -15,9 +15,9 @@ const EffectsOverlay: FunctionComponent = ({roomWidth}) => }; const lazyLoadEffectModule = async (name: string): Promise => { - if(!name) return null; + if (!name) return null; let effect = effectsRef.current[name] ?? null; - if(effect === null) { + if (effect === null) { try { var { default: Effect } = await import(`./${name}`); effect = new Effect(); @@ -31,7 +31,7 @@ const EffectsOverlay: FunctionComponent = ({roomWidth}) => const onAction = (payload: { action: string }) => { const actionPrefix = 'effects.'; - if(payload.action.indexOf(actionPrefix) === 0) { + if (payload.action.indexOf(actionPrefix) === 0) { const effect = payload.action.substr(actionPrefix.length); lazyLoadEffectModule(effect).then((module) => module?.start(canvasRef.current)); } @@ -44,11 +44,11 @@ const EffectsOverlay: FunctionComponent = ({roomWidth}) => canvas.width = roomWidth; canvas.height = window.innerHeight; window.addEventListener('resize', resize, true); - - return () => { + + return () => { dis.unregister(dispatcherRef); window.removeEventListener('resize', resize); - for(const effect in effectsRef.current) { + for (const effect in effectsRef.current) { effectsRef.current[effect]?.stop(); } }; @@ -58,7 +58,7 @@ const EffectsOverlay: FunctionComponent = ({roomWidth}) => useEffect(() => { canvasRef.current.width = roomWidth; }, [roomWidth]); - + return ( { - if(!canvas) { + if (!canvas) { return; } - window.requestAnimationFrame = (function () { + window.requestAnimationFrame = (function() { return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || - function (callback) { + function(callback) { return window.setTimeout(callback, this.options.frameInterval); }; })(); diff --git a/src/components/views/elements/effects/index.ts b/src/components/views/elements/effects/index.ts index 6311135c1e..8a95b1c9d0 100644 --- a/src/components/views/elements/effects/index.ts +++ b/src/components/views/elements/effects/index.ts @@ -1,4 +1,4 @@ -import {_t, _td} from "../../../../languageHandler"; +import { _t, _td } from "../../../../languageHandler"; type Effect = { emojis: Array; From 8728e12242d0a751407e9a2c08c95ecaa5844dfd Mon Sep 17 00:00:00 2001 From: Steffen Kolmer Date: Wed, 21 Oct 2020 14:43:09 +0200 Subject: [PATCH 033/319] Some code optimizations --- .../views/elements/effects/EffectsOverlay.tsx | 42 +++++++++---------- 1 file changed, 19 insertions(+), 23 deletions(-) diff --git a/src/components/views/elements/effects/EffectsOverlay.tsx b/src/components/views/elements/effects/EffectsOverlay.tsx index 437d1f127f..4b40f7cbb1 100644 --- a/src/components/views/elements/effects/EffectsOverlay.tsx +++ b/src/components/views/elements/effects/EffectsOverlay.tsx @@ -10,16 +10,12 @@ const EffectsOverlay: FunctionComponent = ({ roomWidth }) = const canvasRef = useRef(null); const effectsRef = useRef>(new Map()); - const resize = () => { - canvasRef.current.height = window.innerHeight; - }; - const lazyLoadEffectModule = async (name: string): Promise => { if (!name) return null; let effect = effectsRef.current[name] ?? null; if (effect === null) { try { - var { default: Effect } = await import(`./${name}`); + const { default: Effect } = await import(`./${name}`); effect = new Effect(); effectsRef.current[name] = effect; } catch (err) { @@ -27,41 +23,41 @@ const EffectsOverlay: FunctionComponent = ({ roomWidth }) = } } return effect; - } - - const onAction = (payload: { action: string }) => { - const actionPrefix = 'effects.'; - if (payload.action.indexOf(actionPrefix) === 0) { - const effect = payload.action.substr(actionPrefix.length); - lazyLoadEffectModule(effect).then((module) => module?.start(canvasRef.current)); - } }; - // on mount useEffect(() => { + const resize = () => { + canvasRef.current.height = window.innerHeight; + }; + const onAction = (payload: { action: string }) => { + const actionPrefix = 'effects.'; + if (payload.action.indexOf(actionPrefix) === 0) { + const effect = payload.action.substr(actionPrefix.length); + lazyLoadEffectModule(effect).then((module) => module?.start(canvasRef.current)); + } + } const dispatcherRef = dis.register(onAction); const canvas = canvasRef.current; - canvas.width = roomWidth; canvas.height = window.innerHeight; window.addEventListener('resize', resize, true); return () => { dis.unregister(dispatcherRef); window.removeEventListener('resize', resize); - for (const effect in effectsRef.current) { - effectsRef.current[effect]?.stop(); + const currentEffects = effectsRef.current; + for (const effect in currentEffects) { + const effectModule: ICanvasEffect = currentEffects[effect]; + if(effectModule && effectModule.isRunning) { + effectModule.stop(); + } } }; }, []); - // on roomWidth change - useEffect(() => { - canvasRef.current.width = roomWidth; - }, [roomWidth]); - return ( = ({ roomWidth }) = ) } -export default EffectsOverlay; \ No newline at end of file +export default EffectsOverlay; From 88475617955c72a538269259a448f54f8e5e27fd Mon Sep 17 00:00:00 2001 From: Steffen Kolmer Date: Wed, 21 Oct 2020 14:48:11 +0200 Subject: [PATCH 034/319] Added additional module exports --- src/components/views/elements/effects/EffectsOverlay.tsx | 2 +- src/components/views/elements/effects/confetti/index.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/views/elements/effects/EffectsOverlay.tsx b/src/components/views/elements/effects/EffectsOverlay.tsx index 4b40f7cbb1..0ff2b228ad 100644 --- a/src/components/views/elements/effects/EffectsOverlay.tsx +++ b/src/components/views/elements/effects/EffectsOverlay.tsx @@ -2,7 +2,7 @@ import React, { FunctionComponent, useEffect, useRef } from 'react'; import dis from '../../../../dispatcher/dispatcher'; import ICanvasEffect from './ICanvasEffect.js'; -type EffectsOverlayProps = { +export type EffectsOverlayProps = { roomWidth: number; } diff --git a/src/components/views/elements/effects/confetti/index.ts b/src/components/views/elements/effects/confetti/index.ts index 3cb7db5ec4..e45961006b 100644 --- a/src/components/views/elements/effects/confetti/index.ts +++ b/src/components/views/elements/effects/confetti/index.ts @@ -27,7 +27,7 @@ type ConfettiParticle = { tiltAngle: number, } -const DefaultOptions: ConfettiOptions = { +export const DefaultOptions: ConfettiOptions = { //set max confetti count maxCount: 150, //syarn addet the particle animation speed From 6f4c5d1b080f8ddcbd6053f6778f52d6f15f2125 Mon Sep 17 00:00:00 2001 From: Steffen Kolmer Date: Wed, 21 Oct 2020 14:56:04 +0200 Subject: [PATCH 035/319] fixed build error --- src/components/views/elements/effects/EffectsOverlay.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/views/elements/effects/EffectsOverlay.tsx b/src/components/views/elements/effects/EffectsOverlay.tsx index 0ff2b228ad..803fd18042 100644 --- a/src/components/views/elements/effects/EffectsOverlay.tsx +++ b/src/components/views/elements/effects/EffectsOverlay.tsx @@ -43,11 +43,12 @@ const EffectsOverlay: FunctionComponent = ({ roomWidth }) = return () => { dis.unregister(dispatcherRef); - window.removeEventListener('resize', resize); - const currentEffects = effectsRef.current; + window.removeEventListener('resize', resize); + // eslint-disable-next-line react-hooks/exhaustive-deps + const currentEffects = effectsRef.current; // this is not a react node ref, warning can be safely ignored for (const effect in currentEffects) { const effectModule: ICanvasEffect = currentEffects[effect]; - if(effectModule && effectModule.isRunning) { + if (effectModule && effectModule.isRunning) { effectModule.stop(); } } From 906686b640ff22812f3cb628bd3f8267af6c8144 Mon Sep 17 00:00:00 2001 From: Steffen Kolmer Date: Wed, 21 Oct 2020 15:06:05 +0200 Subject: [PATCH 036/319] Fixed more linter warnings --- src/components/views/elements/effects/confetti/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/views/elements/effects/confetti/index.ts b/src/components/views/elements/effects/confetti/index.ts index e45961006b..4537683030 100644 --- a/src/components/views/elements/effects/confetti/index.ts +++ b/src/components/views/elements/effects/confetti/index.ts @@ -68,13 +68,13 @@ export default class Confetti implements ICanvasEffect { if (!canvas) { return; } - window.requestAnimationFrame = (function() { + window.requestAnimationFrame = (function () { return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || - function(callback) { + function (callback) { return window.setTimeout(callback, this.options.frameInterval); }; })(); From 2f83771eab27a2e6441a34224c9acbd120c6c5b8 Mon Sep 17 00:00:00 2001 From: Steffen Kolmer Date: Wed, 21 Oct 2020 15:15:26 +0200 Subject: [PATCH 037/319] Fixed more eslint errors --- src/components/views/elements/effects/EffectsOverlay.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/views/elements/effects/EffectsOverlay.tsx b/src/components/views/elements/effects/EffectsOverlay.tsx index 803fd18042..5ec3566f18 100644 --- a/src/components/views/elements/effects/EffectsOverlay.tsx +++ b/src/components/views/elements/effects/EffectsOverlay.tsx @@ -43,7 +43,7 @@ const EffectsOverlay: FunctionComponent = ({ roomWidth }) = return () => { dis.unregister(dispatcherRef); - window.removeEventListener('resize', resize); + window.removeEventListener('resize', resize); // eslint-disable-next-line react-hooks/exhaustive-deps const currentEffects = effectsRef.current; // this is not a react node ref, warning can be safely ignored for (const effect in currentEffects) { From 335774b6ff3bd558f11eea9ca58e2f1d7f73c262 Mon Sep 17 00:00:00 2001 From: Steffen Kolmer Date: Wed, 21 Oct 2020 16:03:22 +0200 Subject: [PATCH 038/319] Fixed more linter errors --- src/components/views/elements/effects/confetti/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/views/elements/effects/confetti/index.ts b/src/components/views/elements/effects/confetti/index.ts index 4537683030..7428651490 100644 --- a/src/components/views/elements/effects/confetti/index.ts +++ b/src/components/views/elements/effects/confetti/index.ts @@ -1,4 +1,4 @@ -import ICanvasEffect from '../ICanvasEffect' +import ICanvasEffect from '../ICanvasEffect'; declare global { interface Window { @@ -68,13 +68,13 @@ export default class Confetti implements ICanvasEffect { if (!canvas) { return; } - window.requestAnimationFrame = (function () { + window.requestAnimationFrame = (function() { return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || - function (callback) { + function(callback) { return window.setTimeout(callback, this.options.frameInterval); }; })(); From fbe2d7e0f86ceae6511b6dc553a70d428b773290 Mon Sep 17 00:00:00 2001 From: Steffen Kolmer Date: Wed, 21 Oct 2020 16:15:15 +0200 Subject: [PATCH 039/319] Optimized naming --- src/components/structures/RoomView.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/structures/RoomView.tsx b/src/components/structures/RoomView.tsx index 817b2d2cea..1a18ece008 100644 --- a/src/components/structures/RoomView.tsx +++ b/src/components/structures/RoomView.tsx @@ -822,15 +822,15 @@ export default class RoomView extends React.Component { private onEventDecrypted = (ev) => { if (ev.isDecryptionFailure()) return; - this.handleConfetti(ev); + this.handleEffects(ev); }; private onEvent = (ev) => { if (ev.isBeingDecrypted() || ev.isDecryptionFailure()) return; - this.handleConfetti(ev); + this.handleEffects(ev); }; - private handleConfetti = (ev) => { + private handleEffects = (ev) => { if (this.state.room.getUnreadNotificationCount() === 0) return; if (this.state.matrixClientIsReady) { effects.forEach(effect => { From cb79e38377165b4cb233caa804fadc9272e5e2a8 Mon Sep 17 00:00:00 2001 From: Steffen Kolmer Date: Wed, 21 Oct 2020 17:04:01 +0200 Subject: [PATCH 040/319] Better initialization and check if canvas gets unmounted --- .../views/elements/effects/confetti/index.ts | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/components/views/elements/effects/confetti/index.ts b/src/components/views/elements/effects/confetti/index.ts index 7428651490..b613c32043 100644 --- a/src/components/views/elements/effects/confetti/index.ts +++ b/src/components/views/elements/effects/confetti/index.ts @@ -78,9 +78,8 @@ export default class Confetti implements ICanvasEffect { return window.setTimeout(callback, this.options.frameInterval); }; })(); - if (this.context === null) { - this.context = canvas.getContext('2d'); - } + this.context = canvas.getContext('2d'); + this.particles = []; const count = this.options.maxCount; while (this.particles.length < count) { this.particles.push(this.resetParticle({} as ConfettiParticle, canvas.width, canvas.height)); @@ -109,9 +108,11 @@ export default class Confetti implements ICanvasEffect { } private runAnimation = (): void => { + if (!this.context || !this.context.canvas) { + return; + } if (this.particles.length === 0) { this.context.clearRect(0, 0, this.context.canvas.width, this.context.canvas.height); - //animationTimer = null; } else { const now = Date.now(); const delta = now - this.lastFrameTime; @@ -127,6 +128,9 @@ export default class Confetti implements ICanvasEffect { private drawParticles = (context: CanvasRenderingContext2D): void => { + if (!this.context || !this.context.canvas) { + return; + } let particle; let x; let x2; let y2; for (let i = 0; i < this.particles.length; i++) { @@ -151,6 +155,9 @@ export default class Confetti implements ICanvasEffect { } private updateParticles = () => { + if (!this.context || !this.context.canvas) { + return; + } const width = this.context.canvas.width; const height = this.context.canvas.height; let particle: ConfettiParticle; From 3ea4560019f111c5ce73382644d6d6aae9fb753a Mon Sep 17 00:00:00 2001 From: Steffen Kolmer Date: Wed, 21 Oct 2020 17:58:54 +0200 Subject: [PATCH 041/319] Moved effect options to configuration --- .../views/elements/effects/EffectsOverlay.tsx | 12 +++++---- .../views/elements/effects/ICanvasEffect.ts | 4 +++ .../views/elements/effects/confetti/index.ts | 4 +-- .../views/elements/effects/index.ts | 25 ++++++++++++++++++- 4 files changed, 37 insertions(+), 8 deletions(-) diff --git a/src/components/views/elements/effects/EffectsOverlay.tsx b/src/components/views/elements/effects/EffectsOverlay.tsx index 5ec3566f18..b2ecec8753 100644 --- a/src/components/views/elements/effects/EffectsOverlay.tsx +++ b/src/components/views/elements/effects/EffectsOverlay.tsx @@ -1,6 +1,7 @@ import React, { FunctionComponent, useEffect, useRef } from 'react'; import dis from '../../../../dispatcher/dispatcher'; -import ICanvasEffect from './ICanvasEffect.js'; +import ICanvasEffect, { ICanvasEffectConstructable } from './ICanvasEffect.js'; +import effects from './index' export type EffectsOverlayProps = { roomWidth: number; @@ -8,15 +9,16 @@ export type EffectsOverlayProps = { const EffectsOverlay: FunctionComponent = ({ roomWidth }) => { const canvasRef = useRef(null); - const effectsRef = useRef>(new Map()); + const effectsRef = useRef>(new Map()); const lazyLoadEffectModule = async (name: string): Promise => { if (!name) return null; - let effect = effectsRef.current[name] ?? null; + let effect: ICanvasEffect | null = effectsRef.current[name] || null; if (effect === null) { + const options = effects.find((e) => e.command === name)?.options try { - const { default: Effect } = await import(`./${name}`); - effect = new Effect(); + const { default: Effect }: { default: ICanvasEffectConstructable } = await import(`./${name}`); + effect = new Effect(options); effectsRef.current[name] = effect; } catch (err) { console.warn('Unable to load effect module at \'./${name}\'.', err) diff --git a/src/components/views/elements/effects/ICanvasEffect.ts b/src/components/views/elements/effects/ICanvasEffect.ts index 71210d7ec3..c2a3046c8f 100644 --- a/src/components/views/elements/effects/ICanvasEffect.ts +++ b/src/components/views/elements/effects/ICanvasEffect.ts @@ -1,3 +1,7 @@ +export interface ICanvasEffectConstructable { + new(options?: { [key: string]: any }): ICanvasEffect +} + export default interface ICanvasEffect { start: (canvas: HTMLCanvasElement, timeout?: number) => Promise, stop: () => Promise, diff --git a/src/components/views/elements/effects/confetti/index.ts b/src/components/views/elements/effects/confetti/index.ts index b613c32043..07b6f1632a 100644 --- a/src/components/views/elements/effects/confetti/index.ts +++ b/src/components/views/elements/effects/confetti/index.ts @@ -43,8 +43,8 @@ export const DefaultOptions: ConfettiOptions = { export default class Confetti implements ICanvasEffect { private readonly options: ConfettiOptions; - constructor(options: ConfettiOptions = DefaultOptions) { - this.options = options; + constructor(options: { [key: string]: any }) { + this.options = {...DefaultOptions, ...options}; } private context: CanvasRenderingContext2D | null = null; diff --git a/src/components/views/elements/effects/index.ts b/src/components/views/elements/effects/index.ts index 8a95b1c9d0..3986d6e841 100644 --- a/src/components/views/elements/effects/index.ts +++ b/src/components/views/elements/effects/index.ts @@ -1,11 +1,22 @@ import { _t, _td } from "../../../../languageHandler"; -type Effect = { +export type Effect = { emojis: Array; msgType: string; command: string; description: () => string; fallbackMessage: () => string; + options: { + [key: string]: any + } +} + +type ConfettiOptions = { + maxCount: number, + speed: number, + frameInterval: number, + alpha: number, + gradient: boolean, } const effects: Array = [ @@ -15,6 +26,18 @@ const effects: Array = [ command: 'confetti', description: () => _td("Sends the given message with confetti"), fallbackMessage: () => _t("sends confetti") + " 🎉", + options: { + //set max confetti count + maxCount: 150, + //syarn addet the particle animation speed + speed: 3, + //the confetti animation frame interval in milliseconds + frameInterval: 15, + //the alpha opacity of the confetti (between 0 and 1, where 1 is opaque and 0 is invisible) + alpha: 1.0, + //use gradient instead of solid particle color + gradient: false, + } as ConfettiOptions, }, ]; From 1c556c97d3a23d95389ef3f1ce7be642a1885195 Mon Sep 17 00:00:00 2001 From: Steffen Kolmer Date: Wed, 21 Oct 2020 19:06:10 +0200 Subject: [PATCH 042/319] Added some code documentation --- .../views/elements/effects/ICanvasEffect.ts | 20 +++++++ .../views/elements/effects/confetti/index.ts | 20 +++++-- .../views/elements/effects/effectUtilities.ts | 5 ++ .../views/elements/effects/index.ts | 53 ++++++++++++++----- 4 files changed, 81 insertions(+), 17 deletions(-) diff --git a/src/components/views/elements/effects/ICanvasEffect.ts b/src/components/views/elements/effects/ICanvasEffect.ts index c2a3046c8f..400f42af73 100644 --- a/src/components/views/elements/effects/ICanvasEffect.ts +++ b/src/components/views/elements/effects/ICanvasEffect.ts @@ -1,9 +1,29 @@ +/** + * Defines the constructor of a canvas based room effect + */ export interface ICanvasEffectConstructable { + /** + * @param {{[key:string]:any}} options? Optional animation options + * @returns ICanvasEffect Returns a new instance of the canvas effect + */ new(options?: { [key: string]: any }): ICanvasEffect } +/** + * Defines the interface of a canvas based room effect + */ export default interface ICanvasEffect { + /** + * @param {HTMLCanvasElement} canvas The canvas instance as the render target of the animation + * @param {number} timeout? A timeout that defines the runtime of the animation (defaults to false) + */ start: (canvas: HTMLCanvasElement, timeout?: number) => Promise, + /** + * Stops the current animation + */ stop: () => Promise, + /** + * Returns a value that defines if the animation is currently running + */ isRunning: boolean } diff --git a/src/components/views/elements/effects/confetti/index.ts b/src/components/views/elements/effects/confetti/index.ts index 07b6f1632a..29f70d1a57 100644 --- a/src/components/views/elements/effects/confetti/index.ts +++ b/src/components/views/elements/effects/confetti/index.ts @@ -9,10 +9,25 @@ declare global { } export type ConfettiOptions = { + /** + * max confetti count + */ maxCount: number, + /** + * particle animation speed + */ speed: number, + /** + * the confetti animation frame interval in milliseconds + */ frameInterval: number, + /** + * the alpha opacity of the confetti (between 0 and 1, where 1 is opaque and 0 is invisible) + */ alpha: number, + /** + * use gradient instead of solid particle color + */ gradient: boolean, } @@ -28,15 +43,10 @@ type ConfettiParticle = { } export const DefaultOptions: ConfettiOptions = { - //set max confetti count maxCount: 150, - //syarn addet the particle animation speed speed: 3, - //the confetti animation frame interval in milliseconds frameInterval: 15, - //the alpha opacity of the confetti (between 0 and 1, where 1 is opaque and 0 is invisible) alpha: 1.0, - //use gradient instead of solid particle color gradient: false, }; diff --git a/src/components/views/elements/effects/effectUtilities.ts b/src/components/views/elements/effects/effectUtilities.ts index 927b445a61..212c477b39 100644 --- a/src/components/views/elements/effects/effectUtilities.ts +++ b/src/components/views/elements/effects/effectUtilities.ts @@ -1,3 +1,8 @@ +/** + * Checks a message if it contains one of the provided emojis + * @param {Object} content The message + * @param {Array} emojis The list of emojis to check for + */ export const containsEmoji = (content: { msgtype: string, body: string }, emojis: Array): boolean => { return emojis.some((emoji) => content.body.includes(emoji)); } diff --git a/src/components/views/elements/effects/index.ts b/src/components/views/elements/effects/index.ts index 3986d6e841..0f01f2624e 100644 --- a/src/components/views/elements/effects/index.ts +++ b/src/components/views/elements/effects/index.ts @@ -1,25 +1,59 @@ import { _t, _td } from "../../../../languageHandler"; -export type Effect = { +export type Effect = { + /** + * one or more emojis that will trigger this effect + */ emojis: Array; + /** + * the matrix message type that will trigger this effect + */ msgType: string; + /** + * the room command to trigger this effect + */ command: string; + /** + * a function that returns the translated description of the effect + */ description: () => string; + /** + * a function that returns the translated fallback message. this message will be shown if the user did not provide a custom message + */ fallbackMessage: () => string; - options: { - [key: string]: any - } + /** + * animation options + */ + options: TOptions; } type ConfettiOptions = { + /** + * max confetti count + */ maxCount: number, + /** + * particle animation speed + */ speed: number, + /** + * the confetti animation frame interval in milliseconds + */ frameInterval: number, + /** + * the alpha opacity of the confetti (between 0 and 1, where 1 is opaque and 0 is invisible) + */ alpha: number, + /** + * use gradient instead of solid particle color + */ gradient: boolean, } -const effects: Array = [ +/** + * This configuration defines room effects that can be triggered by custom message types and emojis + */ +const effects: Array> = [ { emojis: ['🎊', '🎉'], msgType: 'nic.custom.confetti', @@ -27,18 +61,13 @@ const effects: Array = [ description: () => _td("Sends the given message with confetti"), fallbackMessage: () => _t("sends confetti") + " 🎉", options: { - //set max confetti count maxCount: 150, - //syarn addet the particle animation speed speed: 3, - //the confetti animation frame interval in milliseconds frameInterval: 15, - //the alpha opacity of the confetti (between 0 and 1, where 1 is opaque and 0 is invisible) alpha: 1.0, - //use gradient instead of solid particle color gradient: false, - } as ConfettiOptions, - }, + }, + } as Effect, ]; export default effects; From 46eb5cdb1b036f2e696cd97fa9540c8ff18285be Mon Sep 17 00:00:00 2001 From: MaHa-Nordeck Date: Thu, 22 Oct 2020 14:01:16 +0200 Subject: [PATCH 043/319] Minor improvements * Made color generation dependant on gradient usage. * Changed a loop to use for of --- .../views/elements/effects/confetti/index.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/components/views/elements/effects/confetti/index.ts b/src/components/views/elements/effects/confetti/index.ts index 29f70d1a57..309fc9dd9c 100644 --- a/src/components/views/elements/effects/confetti/index.ts +++ b/src/components/views/elements/effects/confetti/index.ts @@ -107,11 +107,15 @@ export default class Confetti implements ICanvasEffect { private resetParticle = (particle: ConfettiParticle, width: number, height: number): ConfettiParticle => { particle.color = this.colors[(Math.random() * this.colors.length) | 0] + (this.options.alpha + ')'); - particle.color2 = this.colors[(Math.random() * this.colors.length) | 0] + (this.options.alpha + ')'); + if(this.options.gradient) { + particle.color2 = this.colors[(Math.random() * this.colors.length) | 0] + (this.options.alpha + ')'); + } else { + particle.color2 = particle.color; + } particle.x = Math.random() * width; - particle.y = Math.random() * height - height; + particle.y = Math.random() * -height; particle.diameter = Math.random() * 10 + 5; - particle.tilt = Math.random() * 10 - 10; + particle.tilt = Math.random() * -10; particle.tiltAngleIncrement = Math.random() * 0.07 + 0.05; particle.tiltAngle = Math.random() * Math.PI; return particle; @@ -141,10 +145,8 @@ export default class Confetti implements ICanvasEffect { if (!this.context || !this.context.canvas) { return; } - let particle; let x; let x2; let y2; - for (let i = 0; i < this.particles.length; i++) { - particle = this.particles[i]; + for (const particle of this.particles) { this.context.beginPath(); context.lineWidth = particle.diameter; x2 = particle.x + particle.tilt; From 674060ed9373b1a2ca210449e4a4110415ce21ba Mon Sep 17 00:00:00 2001 From: MaHa-Nordeck Date: Thu, 22 Oct 2020 15:28:30 +0200 Subject: [PATCH 044/319] fixed spacing --- src/components/views/elements/effects/confetti/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/views/elements/effects/confetti/index.ts b/src/components/views/elements/effects/confetti/index.ts index 309fc9dd9c..aee8f54a3a 100644 --- a/src/components/views/elements/effects/confetti/index.ts +++ b/src/components/views/elements/effects/confetti/index.ts @@ -107,7 +107,7 @@ export default class Confetti implements ICanvasEffect { private resetParticle = (particle: ConfettiParticle, width: number, height: number): ConfettiParticle => { particle.color = this.colors[(Math.random() * this.colors.length) | 0] + (this.options.alpha + ')'); - if(this.options.gradient) { + if (this.options.gradient) { particle.color2 = this.colors[(Math.random() * this.colors.length) | 0] + (this.options.alpha + ')'); } else { particle.color2 = particle.color; From 19395f3c3cf6076b097553da7873a045721d0ff9 Mon Sep 17 00:00:00 2001 From: nurjinn jafar Date: Mon, 26 Oct 2020 16:37:45 +0100 Subject: [PATCH 045/319] null checks added --- src/components/structures/RoomView.tsx | 16 ++++++++-------- .../views/elements/effects/effectUtilities.ts | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/components/structures/RoomView.tsx b/src/components/structures/RoomView.tsx index 1a18ece008..57c9afb17b 100644 --- a/src/components/structures/RoomView.tsx +++ b/src/components/structures/RoomView.tsx @@ -831,14 +831,14 @@ export default class RoomView extends React.Component { }; private handleEffects = (ev) => { - if (this.state.room.getUnreadNotificationCount() === 0) return; - if (this.state.matrixClientIsReady) { - effects.forEach(effect => { - if (containsEmoji(ev.getContent(), effect.emojis) || ev.getContent().msgtype === effect.msgType) { - dis.dispatch({action: `effects.${effect.command}`}); - } - }) - } + if (!this.state.room || + !this.state.matrixClientIsReady || + this.state.room.getUnreadNotificationCount() === 0) return; + effects.forEach(effect => { + if (containsEmoji(ev.getContent(), effect.emojis) || ev.getContent().msgtype === effect.msgType) { + dis.dispatch({action: `effects.${effect.command}`}); + } + }) }; private onRoomName = (room: Room) => { diff --git a/src/components/views/elements/effects/effectUtilities.ts b/src/components/views/elements/effects/effectUtilities.ts index 212c477b39..e94287c745 100644 --- a/src/components/views/elements/effects/effectUtilities.ts +++ b/src/components/views/elements/effects/effectUtilities.ts @@ -4,5 +4,5 @@ * @param {Array} emojis The list of emojis to check for */ export const containsEmoji = (content: { msgtype: string, body: string }, emojis: Array): boolean => { - return emojis.some((emoji) => content.body.includes(emoji)); + return emojis.some((emoji) => content.body && content.body.includes(emoji)); } From 20f3ab029320adb87d9384b4bf8504be59ad1b2f Mon Sep 17 00:00:00 2001 From: su-ex Date: Tue, 3 Nov 2020 20:41:59 +0100 Subject: [PATCH 046/319] Fix inverted settings default value Currently it doesn't matter what's set in the default property once the invertedSettingName property exists --- src/settings/SettingsStore.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/settings/SettingsStore.ts b/src/settings/SettingsStore.ts index 7c05e4b500..82f169f498 100644 --- a/src/settings/SettingsStore.ts +++ b/src/settings/SettingsStore.ts @@ -42,7 +42,7 @@ for (const key of Object.keys(SETTINGS)) { if (SETTINGS[key].invertedSettingName) { // Invert now so that the rest of the system will invert it back // to what was intended. - invertedDefaultSettings[key] = !SETTINGS[key].default; + invertedDefaultSettings[SETTINGS[key].invertedSettingName] = !SETTINGS[key].default; } } From eccd74cfc9da41e7a28d7dd1558321e4613e7441 Mon Sep 17 00:00:00 2001 From: Aaron Raimist Date: Mon, 9 Nov 2020 20:12:23 -0600 Subject: [PATCH 047/319] Allow SearchBox to expand to fill width Signed-off-by: Aaron Raimist --- res/css/structures/_SearchBox.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/res/css/structures/_SearchBox.scss b/res/css/structures/_SearchBox.scss index 23ee06f7b3..6b9b2ee3aa 100644 --- a/res/css/structures/_SearchBox.scss +++ b/res/css/structures/_SearchBox.scss @@ -15,7 +15,7 @@ limitations under the License. */ .mx_SearchBox { - flex: 1 1 0; + flex: 1 1 0 !important; min-width: 0; &.mx_SearchBox_blurred:not(:hover) { From ba8d02a808ec039fc6f9cc29bcd53479564f53c1 Mon Sep 17 00:00:00 2001 From: macekj Date: Tue, 17 Nov 2020 17:36:58 -0500 Subject: [PATCH 048/319] add quick shortcut emoji feature and tests Signed-off-by: macekj --- src/autocomplete/EmojiProvider.tsx | 2 +- .../views/rooms/BasicMessageComposer.tsx | 4 +- .../views/rooms/SendMessageComposer.js | 61 +++++++++++++++++++ src/editor/parts.ts | 4 +- .../views/rooms/SendMessageComposer-test.js | 42 ++++++++++++- 5 files changed, 107 insertions(+), 6 deletions(-) diff --git a/src/autocomplete/EmojiProvider.tsx b/src/autocomplete/EmojiProvider.tsx index 705474f8d0..d4791d69f1 100644 --- a/src/autocomplete/EmojiProvider.tsx +++ b/src/autocomplete/EmojiProvider.tsx @@ -34,7 +34,7 @@ const LIMIT = 20; // Match for ascii-style ";-)" emoticons or ":wink:" shortcodes provided by emojibase // anchored to only match from the start of parts otherwise it'll show emoji suggestions whilst typing matrix IDs -const EMOJI_REGEX = new RegExp('(' + EMOTICON_REGEX.source + '|(?:^|\\s):[+-\\w]*:?)$', 'g'); +const EMOJI_REGEX = new RegExp('(' + EMOTICON_REGEX.source + '|(?:^|\\s|(?<=^\\+)):[+-\\w]*:?)$', 'g'); interface IEmojiShort { emoji: IEmoji; diff --git a/src/components/views/rooms/BasicMessageComposer.tsx b/src/components/views/rooms/BasicMessageComposer.tsx index 311a4734fd..43316e90f2 100644 --- a/src/components/views/rooms/BasicMessageComposer.tsx +++ b/src/components/views/rooms/BasicMessageComposer.tsx @@ -47,7 +47,7 @@ import AutocompleteWrapperModel from "../../../editor/autocomplete"; import DocumentPosition from "../../../editor/position"; import {ICompletion} from "../../../autocomplete/Autocompleter"; -const REGEX_EMOTICON_WHITESPACE = new RegExp('(?:^|\\s)(' + EMOTICON_REGEX.source + ')\\s$'); +const REGEX_EMOTICON_WHITESPACE = new RegExp('(?:^|\\s|(?<=^\\+))(' + EMOTICON_REGEX.source + ')\\s$'); const IS_MAC = navigator.platform.indexOf("Mac") !== -1; @@ -524,7 +524,7 @@ export default class BasicMessageEditor extends React.Component const position = model.positionForOffset(caret.offset, caret.atNodeEnd); const range = model.startRange(position); range.expandBackwardsWhile((index, offset, part) => { - return part.text[offset] !== " " && ( + return part.text[offset] !== " " && part.text[offset] !== "+" && ( part.type === "plain" || part.type === "pill-candidate" || part.type === "command" diff --git a/src/components/views/rooms/SendMessageComposer.js b/src/components/views/rooms/SendMessageComposer.js index 78b1dd85db..4f5243a765 100644 --- a/src/components/views/rooms/SendMessageComposer.js +++ b/src/components/views/rooms/SendMessageComposer.js @@ -43,6 +43,8 @@ import MatrixClientContext from "../../../contexts/MatrixClientContext"; import RateLimitedFunc from '../../../ratelimitedfunc'; import {Action} from "../../../dispatcher/actions"; import CountlyAnalytics from "../../../CountlyAnalytics"; +import {MatrixClientPeg} from "../../../MatrixClientPeg"; +import EMOJI_REGEX from 'emojibase-regex'; function addReplyToMessageContent(content, repliedToEvent, permalinkCreator) { const replyContent = ReplyThread.makeReplyMixIn(repliedToEvent); @@ -88,6 +90,25 @@ export function createMessageContent(model, permalinkCreator, replyToEvent) { return content; } +// exported for tests +export function isQuickReaction(model) { + const parts = model.parts; + if (parts.length == 0) return false; + let text = parts[0].text; + text += parts[1] ? parts[1].text : ""; + // shortcut takes the form "+:emoji:" or "+ :emoji:"" + // can be in 1 or 2 parts + if (parts.length <= 2) { + const hasShortcut = text.startsWith("+") || text.startsWith("+ "); + const emojiMatch = text.match(EMOJI_REGEX); + if (hasShortcut && emojiMatch && emojiMatch.length == 1) { + return emojiMatch[0] === text.substring(1) || + emojiMatch[0] === text.substring(2); + } + } + return false; +} + export default class SendMessageComposer extends React.Component { static propTypes = { room: PropTypes.object.isRequired, @@ -216,6 +237,41 @@ export default class SendMessageComposer extends React.Component { return false; } + _sendQuickReaction() { + const timeline = this.props.room.getLiveTimeline(); + const events = timeline.getEvents(); + const reaction = this.model.parts[1].text; + for (let i = events.length - 1; i >= 0; i--) { + if (events[i].getType() === "m.room.message") { + let shouldReact = true; + const lastMessage = events[i]; + const userId = MatrixClientPeg.get().getUserId(); + const messageReactions = this.props.room.getUnfilteredTimelineSet() + .getRelationsForEvent(lastMessage.getId(), "m.annotation", "m.reaction"); + + // if we have already sent this reaction, don't redact but don't re-send + if (messageReactions) { + const myReactionEvents = messageReactions.getAnnotationsBySender()[userId] || []; + const myReactionKeys = [...myReactionEvents] + .filter(event => !event.isRedacted()) + .map(event => event.getRelation().key); + shouldReact = !myReactionKeys.includes(reaction); + } + if (shouldReact) { + MatrixClientPeg.get().sendEvent(lastMessage.getRoomId(), "m.reaction", { + "m.relates_to": { + "rel_type": "m.annotation", + "event_id": lastMessage.getId(), + "key": reaction, + }, + }); + dis.dispatch({action: "message_sent"}); + } + break; + } + } + } + _getSlashCommand() { const commandText = this.model.parts.reduce((text, part) => { // use mxid to textify user pills in a command @@ -303,6 +359,11 @@ export default class SendMessageComposer extends React.Component { } } + if (isQuickReaction(this.model)) { + shouldSend = false; + this._sendQuickReaction(); + } + const replyToEvent = this.props.replyToEvent; if (shouldSend) { const startTime = CountlyAnalytics.getTimestamp(); diff --git a/src/editor/parts.ts b/src/editor/parts.ts index 5ed0c0529f..8a7ccfcb7b 100644 --- a/src/editor/parts.ts +++ b/src/editor/parts.ts @@ -190,7 +190,9 @@ abstract class PlainBasePart extends BasePart { return true; } // only split if the previous character is a space - return this._text[offset - 1] !== " "; + // or if it is a + and this is a : + return this._text[offset - 1] !== " " && + (this._text[offset - 1] !== "+" || chr !== ":"); } return true; } diff --git a/test/components/views/rooms/SendMessageComposer-test.js b/test/components/views/rooms/SendMessageComposer-test.js index 83a9388609..6eeac7ceea 100644 --- a/test/components/views/rooms/SendMessageComposer-test.js +++ b/test/components/views/rooms/SendMessageComposer-test.js @@ -18,8 +18,10 @@ import Adapter from "enzyme-adapter-react-16"; import { configure, mount } from "enzyme"; import React from "react"; import {act} from "react-dom/test-utils"; - -import SendMessageComposer, {createMessageContent} from "../../../../src/components/views/rooms/SendMessageComposer"; +import SendMessageComposer, { + createMessageContent, + isQuickReaction, +} from "../../../../src/components/views/rooms/SendMessageComposer"; import MatrixClientContext from "../../../../src/contexts/MatrixClientContext"; import EditorModel from "../../../../src/editor/model"; import {createPartCreator, createRenderer} from "../../../editor/mock"; @@ -227,6 +229,42 @@ describe('', () => { }); }); }); + + describe("isQuickReaction", () => { + it("correctly detects quick reaction", () => { + const model = new EditorModel([], createPartCreator(), createRenderer()); + model.update("+😊", "insertText", {offset: 3, atNodeEnd: true}); + + const isReaction = isQuickReaction(model); + + expect(isReaction).toBeTruthy(); + }); + + it("correctly detects quick reaction with space", () => { + const model = new EditorModel([], createPartCreator(), createRenderer()); + model.update("+ 😊", "insertText", {offset: 4, atNodeEnd: true}); + + const isReaction = isQuickReaction(model); + + expect(isReaction).toBeTruthy(); + }); + + it("correctly rejects quick reaction with extra text", () => { + const model = new EditorModel([], createPartCreator(), createRenderer()); + const model2 = new EditorModel([], createPartCreator(), createRenderer()); + const model3 = new EditorModel([], createPartCreator(), createRenderer()); + const model4 = new EditorModel([], createPartCreator(), createRenderer()); + model.update("+😊hello", "insertText", {offset: 8, atNodeEnd: true}); + model2.update(" +😊", "insertText", {offset: 4, atNodeEnd: true}); + model3.update("+ 😊😊", "insertText", {offset: 6, atNodeEnd: true}); + model4.update("+smiley", "insertText", {offset: 7, atNodeEnd: true}); + + expect(isQuickReaction(model)).toBeFalsy(); + expect(isQuickReaction(model2)).toBeFalsy(); + expect(isQuickReaction(model3)).toBeFalsy(); + expect(isQuickReaction(model4)).toBeFalsy(); + }); + }); }); From afdba16dac7e3a148062bc93795ff04b74ef5ee4 Mon Sep 17 00:00:00 2001 From: Besnik Bleta Date: Wed, 18 Nov 2020 15:31:51 +0000 Subject: [PATCH 049/319] Translated using Weblate (Albanian) Currently translated at 99.8% (2637 of 2642 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/sq/ --- src/i18n/strings/sq.json | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/sq.json b/src/i18n/strings/sq.json index 82644d85a3..29cc6292de 100644 --- a/src/i18n/strings/sq.json +++ b/src/i18n/strings/sq.json @@ -2834,5 +2834,12 @@ "Mauritania": "Mauritani", "Bangladesh": "Bangladesh", "Falkland Islands": "Ishujt Falkland", - "Sweden": "Suedi" + "Sweden": "Suedi", + "Filter rooms and people": "Filtroni dhoma dhe njerëz", + "Open the link in the email to continue registration.": "Që të vazhdohet regjistrimi, hapni lidhjen te email-i.", + "A confirmation email has been sent to %(emailAddress)s": "Te %(emailAddress)s u dërgua një email ripohimi", + "Role": "Rol", + "Start a new chat": "Nisni një fjalosje të re", + "Securely cache encrypted messages locally for them to appear in search results, using %(size)s to store messages from %(rooms)s rooms.|one": "Ruajini lokalisht në fshehtinë në mënyrë të sigurt mesazhet e fshehtëzuar, që të shfaqen në përfundime kërkimi, duke përdorur %(size)s që të depozitoni mesazhe nga %(rooms)s dhomë.", + "Securely cache encrypted messages locally for them to appear in search results, using %(size)s to store messages from %(rooms)s rooms.|other": "Ruajini lokalisht në fshehtinë në mënyrë të sigurt mesazhet e fshehtëzuar, që të shfaqen në përfundime kërkimi, duke përdorur %(size)s që të depozitoni mesazhe nga %(rooms)s dhoma." } From 89ab6b0ab2d6c1886735555e8b0974de6ddd7510 Mon Sep 17 00:00:00 2001 From: Marcelo Filho Date: Wed, 18 Nov 2020 19:24:09 +0000 Subject: [PATCH 050/319] Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (2639 of 2639 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/pt_BR/ --- src/i18n/strings/pt_BR.json | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/i18n/strings/pt_BR.json b/src/i18n/strings/pt_BR.json index aa4bfc41ca..370d0a34e7 100644 --- a/src/i18n/strings/pt_BR.json +++ b/src/i18n/strings/pt_BR.json @@ -501,7 +501,7 @@ "Visibility in Room List": "Visibilidade na lista de salas", "Visible to everyone": "Visível para todos", "Only visible to community members": "Apenas visível para participantes da comunidade", - "Filter community rooms": "Filtrar salas da comunidade", + "Filter community rooms": "Pesquisar salas da comunidade", "Something went wrong when trying to get your communities.": "Não foi possível carregar suas comunidades.", "Display your community flair in rooms configured to show it.": "Mostrar o ícone da sua comunidade nas salas que o permitem.", "You're not currently a member of any communities.": "No momento, você não é participante de nenhuma comunidade.", @@ -2772,5 +2772,12 @@ "Uzbekistan": "Uzbequistão", "Role": "Função", "Securely cache encrypted messages locally for them to appear in search results, using %(size)s to store messages from %(count)s rooms.|one": "Armazene localmente com segurança as mensagens criptografadas para que apareçam nos resultados da pesquisa, usando %(size)s para armazenar mensagens de %(count)s sala.", - "Securely cache encrypted messages locally for them to appear in search results, using %(size)s to store messages from %(count)s rooms.|other": "Armazene localmente com segurança as mensagens criptografadas para que apareçam nos resultados da pesquisa, usando %(size)s para armazenar mensagens de %(count)s salas." + "Securely cache encrypted messages locally for them to appear in search results, using %(size)s to store messages from %(count)s rooms.|other": "Armazene localmente com segurança as mensagens criptografadas para que apareçam nos resultados da pesquisa, usando %(size)s para armazenar mensagens de %(count)s salas.", + "Filter": "Pesquisar", + "Start a new chat": "Iniciar uma nova conversa", + "Securely cache encrypted messages locally for them to appear in search results, using %(size)s to store messages from %(rooms)s rooms.|one": "Armazene mensagens criptografadas de forma segura localmente para que apareçam nos resultados das buscas. %(size)s é necessário para armazenar mensagens de %(rooms)s sala.", + "Securely cache encrypted messages locally for them to appear in search results, using %(size)s to store messages from %(rooms)s rooms.|other": "Armazene mensagens criptografadas de forma segura localmente para que apareçam nos resultados das buscas. %(size)s é necessário para armazenar mensagens de %(rooms)s salas.", + "Filter rooms and people": "Pesquisar salas e pessoas", + "Open the link in the email to continue registration.": "Abra o link no e-mail para continuar o registro.", + "A confirmation email has been sent to %(emailAddress)s": "Um e-mail de confirmação foi enviado para %(emailAddress)s" } From 69b81fa4206ea72d0b593f5daa27e2adcc6a179a Mon Sep 17 00:00:00 2001 From: XoseM Date: Wed, 18 Nov 2020 16:57:02 +0000 Subject: [PATCH 051/319] Translated using Weblate (Galician) Currently translated at 100.0% (2639 of 2639 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/gl/ --- src/i18n/strings/gl.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/gl.json b/src/i18n/strings/gl.json index 4f9a6f34b4..a974107a33 100644 --- a/src/i18n/strings/gl.json +++ b/src/i18n/strings/gl.json @@ -2845,5 +2845,7 @@ "Filter rooms and people": "Fitrar salas e persoas", "Open the link in the email to continue registration.": "Abre a ligazón que hai no email para continuar co rexistro.", "A confirmation email has been sent to %(emailAddress)s": "Enviouse un email de confirmación a %(emailAddress)s", - "Start a new chat": "Comezar nova conversa" + "Start a new chat": "Comezar nova conversa", + "Securely cache encrypted messages locally for them to appear in search results, using %(size)s to store messages from %(rooms)s rooms.|one": "Conservar na memoria local as mensaxes cifradas de xeito seguro para que aparezan nas buscas, usando %(size)s para gardar mensaxes de %(rooms)s salas.", + "Securely cache encrypted messages locally for them to appear in search results, using %(size)s to store messages from %(rooms)s rooms.|other": "Conservar na memoria local as mensaxes cifradas de xeito seguro para que aparezan nas buscas, usando %(size)s para gardar mensaxes de %(rooms)s salas." } From 8aacef9d35702130c28133eb68ddfe60dca66ec7 Mon Sep 17 00:00:00 2001 From: Marcelo Filho Date: Wed, 18 Nov 2020 22:37:32 +0000 Subject: [PATCH 052/319] Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (2640 of 2640 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/pt_BR/ --- src/i18n/strings/pt_BR.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/pt_BR.json b/src/i18n/strings/pt_BR.json index 370d0a34e7..71c277aef1 100644 --- a/src/i18n/strings/pt_BR.json +++ b/src/i18n/strings/pt_BR.json @@ -2779,5 +2779,6 @@ "Securely cache encrypted messages locally for them to appear in search results, using %(size)s to store messages from %(rooms)s rooms.|other": "Armazene mensagens criptografadas de forma segura localmente para que apareçam nos resultados das buscas. %(size)s é necessário para armazenar mensagens de %(rooms)s salas.", "Filter rooms and people": "Pesquisar salas e pessoas", "Open the link in the email to continue registration.": "Abra o link no e-mail para continuar o registro.", - "A confirmation email has been sent to %(emailAddress)s": "Um e-mail de confirmação foi enviado para %(emailAddress)s" + "A confirmation email has been sent to %(emailAddress)s": "Um e-mail de confirmação foi enviado para %(emailAddress)s", + "Go to Home View": "Ir para a tela inicial" } From 668569f64827918605158f2d638a787e2c7338d1 Mon Sep 17 00:00:00 2001 From: Jeff Huang Date: Thu, 19 Nov 2020 02:42:20 +0000 Subject: [PATCH 053/319] Translated using Weblate (Chinese (Traditional)) Currently translated at 100.0% (2640 of 2640 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/zh_Hant/ --- src/i18n/strings/zh_Hant.json | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/zh_Hant.json b/src/i18n/strings/zh_Hant.json index d02ac268bd..2ea4ca7f47 100644 --- a/src/i18n/strings/zh_Hant.json +++ b/src/i18n/strings/zh_Hant.json @@ -2844,5 +2844,12 @@ "Places the call in the current room on hold": "在目前的聊天室撥打通話並等候接聽", "Role": "角色", "Securely cache encrypted messages locally for them to appear in search results, using %(size)s to store messages from %(count)s rooms.|one": "使用 %(size)s 儲存來自 %(count)s 個聊天室的訊息,在本機安全地快取已加密的訊息以讓它們可以在搜尋結果中出現。", - "Securely cache encrypted messages locally for them to appear in search results, using %(size)s to store messages from %(count)s rooms.|other": "使用 %(size)s 儲存來自 %(count)s 個聊天室的訊息,在本機安全地快取已加密的訊息以讓它們可以在搜尋結果中出現。" + "Securely cache encrypted messages locally for them to appear in search results, using %(size)s to store messages from %(count)s rooms.|other": "使用 %(size)s 儲存來自 %(count)s 個聊天室的訊息,在本機安全地快取已加密的訊息以讓它們可以在搜尋結果中出現。", + "Go to Home View": "轉到主視窗", + "Filter rooms and people": "過濾聊天室與人們", + "Open the link in the email to continue registration.": "開啟電子郵件中的連結以繼續註冊。", + "A confirmation email has been sent to %(emailAddress)s": "確認電子郵件已寄送至 %(emailAddress)s", + "Start a new chat": "開始新聊天", + "Securely cache encrypted messages locally for them to appear in search results, using %(size)s to store messages from %(rooms)s rooms.|one": "使用 %(size)s 來儲存來自 %(rooms)s 個聊天室的訊息,在本機安全地快取已加密的訊息以使其出現在搜尋結果中。", + "Securely cache encrypted messages locally for them to appear in search results, using %(size)s to store messages from %(rooms)s rooms.|other": "使用 %(size)s 來儲存來自 %(rooms)s 個聊天室的訊息,在本機安全地快取已加密的訊息以使其出現在搜尋結果中。" } From 9a7242973d34525f8d27ec5a2a7da4503c65cdc6 Mon Sep 17 00:00:00 2001 From: XoseM Date: Thu, 19 Nov 2020 08:43:58 +0000 Subject: [PATCH 054/319] Translated using Weblate (Galician) Currently translated at 100.0% (2640 of 2640 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/gl/ --- src/i18n/strings/gl.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/gl.json b/src/i18n/strings/gl.json index a974107a33..b6fc283477 100644 --- a/src/i18n/strings/gl.json +++ b/src/i18n/strings/gl.json @@ -2847,5 +2847,7 @@ "A confirmation email has been sent to %(emailAddress)s": "Enviouse un email de confirmación a %(emailAddress)s", "Start a new chat": "Comezar nova conversa", "Securely cache encrypted messages locally for them to appear in search results, using %(size)s to store messages from %(rooms)s rooms.|one": "Conservar na memoria local as mensaxes cifradas de xeito seguro para que aparezan nas buscas, usando %(size)s para gardar mensaxes de %(rooms)s salas.", - "Securely cache encrypted messages locally for them to appear in search results, using %(size)s to store messages from %(rooms)s rooms.|other": "Conservar na memoria local as mensaxes cifradas de xeito seguro para que aparezan nas buscas, usando %(size)s para gardar mensaxes de %(rooms)s salas." + "Securely cache encrypted messages locally for them to appear in search results, using %(size)s to store messages from %(rooms)s rooms.|other": "Conservar na memoria local as mensaxes cifradas de xeito seguro para que aparezan nas buscas, usando %(size)s para gardar mensaxes de %(rooms)s salas.", + "Go to Home View": "Ir á Páxina de Inicio", + "

HTML for your community's page

\n

\n Use the long description to introduce new members to the community, or distribute\n some important links\n

\n

\n You can even add images with Matrix URLs \n

\n": "

HTML para a páxina da túa comunidade

\n

\n Usa a descrición longa para presentar a comunidade ás novas particpantes, ou publicar \nalgunha ligazón importante\n \n

\n

\n Tamén podes engadir imaxes con URLs de Matrix \n

\n" } From 5a443bd42a33f51605bb4f881b7631cd7b9b7485 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Priit=20J=C3=B5er=C3=BC=C3=BCt?= Date: Thu, 19 Nov 2020 08:48:53 +0000 Subject: [PATCH 055/319] Translated using Weblate (Estonian) Currently translated at 100.0% (2640 of 2640 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/et/ --- src/i18n/strings/et.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/et.json b/src/i18n/strings/et.json index ff95a95ffe..a06458a2a1 100644 --- a/src/i18n/strings/et.json +++ b/src/i18n/strings/et.json @@ -2846,5 +2846,9 @@ "Filter rooms and people": "Otsi jututubasid ja inimesi", "Open the link in the email to continue registration.": "Registreerimisega jätkamiseks vajuta e-kirjas olevat linki.", "A confirmation email has been sent to %(emailAddress)s": "Saatsime kinnituskirja %(emailAddress)s aadressile", - "Start a new chat": "Alusta uut vestlust" + "Start a new chat": "Alusta uut vestlust", + "

HTML for your community's page

\n

\n Use the long description to introduce new members to the community, or distribute\n some important links\n

\n

\n You can even add images with Matrix URLs \n

\n": "

Sinu kogukonna lehe HTML'i näidis - see on pealkiri

\n

\n Tutvustamaks uutele liikmetele kogukonda, kasuta seda pikka kirjeldust\n või jaga olulist teavet viidetena\n

\n

\n Pildite lisaminseks võid sa isegi kasutada img-märgendit Matrix'i url'idega \n

\n", + "Go to Home View": "Avalehele", + "Securely cache encrypted messages locally for them to appear in search results, using %(size)s to store messages from %(rooms)s rooms.|one": "Selleks, et sisu saaks otsingus kasutada, puhverda krüptitud sõnumid kohalikus seadmes turvaliselt. %(rooms)s jututoa andmete salvestamiseks kulub hetkel %(size)s.", + "Securely cache encrypted messages locally for them to appear in search results, using %(size)s to store messages from %(rooms)s rooms.|other": "Selleks, et sisu saaks otsingus kasutada, puhverda krüptitud sõnumid kohalikus seadmes turvaliselt. %(rooms)s jututoa andmete salvestamiseks kulub hetkel %(size)s." } From c39a5946ef91648e05b916ee154c22cf5707b645 Mon Sep 17 00:00:00 2001 From: Simon Hartmann Date: Thu, 19 Nov 2020 15:13:41 +0000 Subject: [PATCH 056/319] Translated using Weblate (German) Currently translated at 88.9% (2349 of 2640 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/de/ --- src/i18n/strings/de_DE.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/de_DE.json b/src/i18n/strings/de_DE.json index b2e65e3f32..34e46c6173 100644 --- a/src/i18n/strings/de_DE.json +++ b/src/i18n/strings/de_DE.json @@ -2552,5 +2552,7 @@ "Report a bug": "Einen Fehler melden", "Add comment": "Kommentar hinzufügen", "Rate %(brand)s": "%(brand)s bewerten", - "Feedback sent": "Feedback gesendet" + "Feedback sent": "Feedback gesendet", + "Takes the call in the current room off hold": "Beendet das Halten des Anrufs", + "Places the call in the current room on hold": "Den aktuellen Anruf halten" } From 669fcdd548b4a06aa183cd838ff3bfc7f9393c7c Mon Sep 17 00:00:00 2001 From: random Date: Fri, 20 Nov 2020 13:46:02 +0000 Subject: [PATCH 057/319] Translated using Weblate (Italian) Currently translated at 100.0% (2640 of 2640 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/it/ --- src/i18n/strings/it.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/it.json b/src/i18n/strings/it.json index 4b5b85d415..4ad806f55e 100644 --- a/src/i18n/strings/it.json +++ b/src/i18n/strings/it.json @@ -2848,5 +2848,9 @@ "Filter rooms and people": "Filtra stanze e persone", "Open the link in the email to continue registration.": "Apri il link nell'email per continuare la registrazione.", "A confirmation email has been sent to %(emailAddress)s": "È stata inviata un'email di conferma a %(emailAddress)s", - "Start a new chat": "Inizia una nuova chat" + "Start a new chat": "Inizia una nuova chat", + "Go to Home View": "Vai alla vista home", + "

HTML for your community's page

\n

\n Use the long description to introduce new members to the community, or distribute\n some important links\n

\n

\n You can even add images with Matrix URLs \n

\n": "

HTML per la pagina della tua comunità

\n

\n Usa la descrizione estesa per introdurre i nuovi membri alla comunità, o distribuisci\n alcuni link importanti\n

\n

\n Puoi anche aggiungere immagini con gli URL Matrix \n

\n", + "Securely cache encrypted messages locally for them to appear in search results, using %(size)s to store messages from %(rooms)s rooms.|one": "Salva in cache i messaggi cifrati localmente in modo che appaiano nei risultati di ricerca, usando %(size)s per salvarli da %(rooms)s stanza.", + "Securely cache encrypted messages locally for them to appear in search results, using %(size)s to store messages from %(rooms)s rooms.|other": "Salva in cache i messaggi cifrati localmente in modo che appaiano nei risultati di ricerca, usando %(size)s per salvarli da %(rooms)s stanze." } From fc3542ac4c681cf257235d7e2d1e232228692edd Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Thu, 19 Nov 2020 11:07:44 +0000 Subject: [PATCH 058/319] Extend Platform to support idpId for SSO flows --- src/BasePlatform.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/BasePlatform.ts b/src/BasePlatform.ts index 0a1f06f0b3..4f7c7126e9 100644 --- a/src/BasePlatform.ts +++ b/src/BasePlatform.ts @@ -248,15 +248,16 @@ export default abstract class BasePlatform { * @param {MatrixClient} mxClient the matrix client using which we should start the flow * @param {"sso"|"cas"} loginType the type of SSO it is, CAS/SSO. * @param {string} fragmentAfterLogin the hash to pass to the app during sso callback. + * @param {string} idpId The ID of the Identity Provider being targeted, optional. */ - startSingleSignOn(mxClient: MatrixClient, loginType: "sso" | "cas", fragmentAfterLogin: string) { + startSingleSignOn(mxClient: MatrixClient, loginType: "sso" | "cas", fragmentAfterLogin: string, idpId?: string) { // persist hs url and is url for when the user is returned to the app with the login token localStorage.setItem(SSO_HOMESERVER_URL_KEY, mxClient.getHomeserverUrl()); if (mxClient.getIdentityServerUrl()) { localStorage.setItem(SSO_ID_SERVER_URL_KEY, mxClient.getIdentityServerUrl()); } const callbackUrl = this.getSSOCallbackUrl(fragmentAfterLogin); - window.location.href = mxClient.getSsoLoginUrl(callbackUrl.toString(), loginType); // redirect to SSO + window.location.href = mxClient.getSsoLoginUrl(callbackUrl.toString(), loginType, idpId); // redirect to SSO } onKeyDown(ev: KeyboardEvent): boolean { From a1351ea1cdf549565dee3c8854c4fc8b523e5a9c Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Fri, 20 Nov 2020 15:45:34 +0000 Subject: [PATCH 059/319] Increase Dialog button mixin border-radius to 8px --- res/themes/dark/css/_dark.scss | 2 +- res/themes/legacy-dark/css/_legacy-dark.scss | 2 +- res/themes/legacy-light/css/_legacy-light.scss | 2 +- res/themes/light/css/_light.scss | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/res/themes/dark/css/_dark.scss b/res/themes/dark/css/_dark.scss index 76cc5e2df9..82042d5ea3 100644 --- a/res/themes/dark/css/_dark.scss +++ b/res/themes/dark/css/_dark.scss @@ -214,7 +214,7 @@ $composer-shadow-color: rgba(0, 0, 0, 0.28); /* align images in buttons (eg spinners) */ vertical-align: middle; border: 0px; - border-radius: 4px; + border-radius: 8px; font-family: $font-family; font-size: $font-14px; color: $button-fg-color; diff --git a/res/themes/legacy-dark/css/_legacy-dark.scss b/res/themes/legacy-dark/css/_legacy-dark.scss index 716d8c7385..a377b86ff9 100644 --- a/res/themes/legacy-dark/css/_legacy-dark.scss +++ b/res/themes/legacy-dark/css/_legacy-dark.scss @@ -205,7 +205,7 @@ $composer-shadow-color: tranparent; /* align images in buttons (eg spinners) */ vertical-align: middle; border: 0px; - border-radius: 4px; + border-radius: 8px; font-family: $font-family; font-size: $font-14px; color: $button-fg-color; diff --git a/res/themes/legacy-light/css/_legacy-light.scss b/res/themes/legacy-light/css/_legacy-light.scss index 8c42c5c97f..fa03729c57 100644 --- a/res/themes/legacy-light/css/_legacy-light.scss +++ b/res/themes/legacy-light/css/_legacy-light.scss @@ -328,7 +328,7 @@ $composer-shadow-color: tranparent; /* align images in buttons (eg spinners) */ vertical-align: middle; border: 0px; - border-radius: 4px; + border-radius: 8px; font-family: $font-family; font-size: $font-14px; color: $button-fg-color; diff --git a/res/themes/light/css/_light.scss b/res/themes/light/css/_light.scss index 5437a6de1c..2e2d234f37 100644 --- a/res/themes/light/css/_light.scss +++ b/res/themes/light/css/_light.scss @@ -332,7 +332,7 @@ $composer-shadow-color: rgba(0, 0, 0, 0.04); /* align images in buttons (eg spinners) */ vertical-align: middle; border: 0px; - border-radius: 4px; + border-radius: 8px; font-family: $font-family; font-size: $font-14px; color: $button-fg-color; From 02d9ff3455ded19f3ea496c03017e8073f4ee8de Mon Sep 17 00:00:00 2001 From: Tuomas Hietala Date: Fri, 20 Nov 2020 16:13:28 +0000 Subject: [PATCH 060/319] Translated using Weblate (Finnish) Currently translated at 82.0% (2168 of 2642 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/fi/ --- src/i18n/strings/fi.json | 74 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 72 insertions(+), 2 deletions(-) diff --git a/src/i18n/strings/fi.json b/src/i18n/strings/fi.json index 6c20ed2fae..380fadd880 100644 --- a/src/i18n/strings/fi.json +++ b/src/i18n/strings/fi.json @@ -2245,7 +2245,7 @@ "Add widgets, bridges & bots": "Lisää sovelmia, siltoja ja botteja", "Edit widgets, bridges & bots": "Muokkaa sovelmia, siltoja ja botteja", "Widgets": "Sovelmat", - "Communities v2 prototypes. Requires compatible homeserver. Highly experimental - use with caution.": "Yhteisöjen v2 prototyypit. Vaatii yhteensopivan kotipalvelimen. Erittäin kokeellinen — käytä varoen.", + "Communities v2 prototypes. Requires compatible homeserver. Highly experimental - use with caution.": "Yhteisöjen v2 prototyypit. Vaatii yhteensopivan kotipalvelimen. Erittäin kokeellinen – käytä varoen.", "Change notification settings": "Muokkaa ilmoitusasetuksia", "The person who invited you already left the room, or their server is offline.": "Henkilö, joka kutsui sinut, on jo lähtenyt huoneesta, tai hänen palvelin on pois verkosta.", "The person who invited you already left the room.": "Henkilö, joka kutsui sinut, lähti jo huoneesta.", @@ -2263,5 +2263,75 @@ "Answered Elsewhere": "Vastattu muualla", "The call could not be established": "Puhelua ei voitu aloittaa", "The other party declined the call.": "Toinen osapuoli hylkäsi puhelun.", - "Call Declined": "Puhelu hylätty" + "Call Declined": "Puhelu hylätty", + "%(brand)s Android": "%(brand)s Android", + "%(brand)s iOS": "%(brand)s iOS", + "Starting microphone...": "Käynnistetään mikrofonia...", + "Starting camera...": "Käynnistetään kameraa...", + "Call connecting...": "Yhdistetään puhelua...", + "Calling...": "Soitetaan...", + "%(creator)s created this DM.": "%(creator)s loi tämän yksityisviestin.", + "You do not have permission to create rooms in this community.": "Sinulla ei ole lupaa luoda huoneita tähän yhteisöön.", + "Cannot create rooms in this community": "Tähän yhteisöön ei voi luoda huoneita", + "Welcome %(name)s": "Tervetuloa, %(name)s", + "Create community": "Luo yhteisö", + "No files visible in this room": "Tässä huoneessa ei näy tiedostoja", + "Take a picture": "Ota kuva", + "Your server isn't responding to some of your requests. Below are some of the most likely reasons.": "Palvelimesi ei vastaa joihinkin pyynnöistäsi. Alla on joitakin todennäköisimpiä syitä.", + "Server isn't responding": "Palvelin ei vastaa", + "Add comment": "Lisää kommentti", + "Update community": "Päivitä yhteisö", + "Create a room in %(communityName)s": "Luo huone yhteisöön %(communityName)s", + "Your server requires encryption to be enabled in private rooms.": "Palvelimesi edellyttää, että salaus on käytössä yksityisissä huoneissa.", + "An image will help people identify your community.": "Kuva auttaa ihmisiä tunnistamaan yhteisösi.", + "Add image (optional)": "Lisää kuva (valinnainen)", + "Enter name": "Syötä nimi", + "What's the name of your community or team?": "Mikä on yhteisösi tai tiimisi nimi?", + "Invite people to join %(communityName)s": "Kutsu ihmisiä yhteisöön %(communityName)s", + "Send %(count)s invites|one": "Lähetä %(count)s kutsu", + "Send %(count)s invites|other": "Lähetä %(count)s kutsua", + "Add another email": "Lisää toinen sähköposti", + "Click to view edits": "Napsauta nähdäksesi muokkaukset", + "Edited at %(date)s": "Muokattu %(date)s", + "Role": "Rooli", + "Show files": "Näytä tiedostot", + "%(count)s people|one": "%(count)s henkilö", + "%(count)s people|other": "%(count)s ihmistä", + "Forget Room": "Unohda huone", + "Show previews of messages": "Näytä viestien esikatselut", + "Show rooms with unread messages first": "Näytä ensimmäisenä huoneet, joissa on lukemattomia viestejä", + "%(count)s results|one": "%(count)s tulos", + "%(count)s results|other": "%(count)s tulosta", + "Start a new chat": "Aloita uusi keskustelu", + "Can't see what you’re looking for?": "Etkö löydä, mitä etsit?", + "This is the start of .": "Tästä alkaa .", + "%(displayName)s created this room.": "%(displayName)s loi tämän huoneen.", + "You created this room.": "Loit tämän huoneen.", + "Add a topic to help people know what it is about.": "Lisää aihe, jotta ihmiset tietävät mistä on kyse.", + "Topic: %(topic)s ": "Aihe: %(topic)s ", + "Topic: %(topic)s (edit)": "Aihe: %(topic)s (muokkaa)", + "This is the beginning of your direct message history with .": "Tästä alkaa yksityisviestihistoriasi käyttäjän kanssa.", + "Only the two of you are in this conversation, unless either of you invites anyone to join.": "Vain te kaksi olette tässä keskustelussa, ellei jompi kumpi kutsu muita.", + "Remove messages sent by others": "Poista toisten lähettämät viestit", + "Privacy": "Tietosuoja", + "not ready": "ei valmis", + "ready": "valmis", + "unexpected type": "odottamaton tyyppi", + "Algorithm:": "Algoritmi:", + "Failed to save your profile": "Profiilisi tallentaminen ei onnistunut", + "Your server isn't responding to some requests.": "Palvelimesi ei vastaa joihinkin pyyntöihin.", + "Incoming call": "Saapuva puhelu", + "Incoming video call": "Saapuva videopuhelu", + "Incoming voice call": "Saapuva äänipuhelu", + "Unknown caller": "Tuntematon soittaja", + "Enable experimental, compact IRC style layout": "Ota käyttöön kokeellinen, IRC-tyylinen asettelu", + "Use Ctrl + Enter to send a message": "Ctrl + Enter lähettää viestin", + "Use Command + Enter to send a message": "Komento + Enter lähettää viestin", + "%(senderName)s ended the call": "%(senderName)s lopetti puhelun", + "You ended the call": "Lopetit puhelun", + "New version of %(brand)s is available": "%(brand)s-sovelluksesta on saatavilla uusi versio", + "Update %(brand)s": "Päivitä %(brand)s", + "Enable desktop notifications": "Ota työpöytäilmoitukset käyttöön", + "Takes the call in the current room off hold": "Ottaa nykyisen huoneen puhelun pois pidosta", + "Places the call in the current room on hold": "Asettaa nykyisen huoneen puhelun pitoon" } From f33fc1da07ecb43d677f43da6cbe13a104008ea3 Mon Sep 17 00:00:00 2001 From: aWeinzierl Date: Fri, 20 Nov 2020 17:19:19 +0000 Subject: [PATCH 061/319] Translated using Weblate (German) Currently translated at 90.3% (2440 of 2702 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/de/ --- src/i18n/strings/de_DE.json | 94 ++++++++++++++++++++++++++++++++++++- 1 file changed, 93 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/de_DE.json b/src/i18n/strings/de_DE.json index 34e46c6173..7ef7ad76ff 100644 --- a/src/i18n/strings/de_DE.json +++ b/src/i18n/strings/de_DE.json @@ -2554,5 +2554,97 @@ "Rate %(brand)s": "%(brand)s bewerten", "Feedback sent": "Feedback gesendet", "Takes the call in the current room off hold": "Beendet das Halten des Anrufs", - "Places the call in the current room on hold": "Den aktuellen Anruf halten" + "Places the call in the current room on hold": "Den aktuellen Anruf halten", + "Uzbekistan": "Uzbekistan", + "Send stickers into this room": "Stickers in diesen Raum senden", + "Send stickers into your active room": "Stickers in deinen aktiven Raum senden", + "Change which room you're viewing": "Ändern welchen Raum du siehst", + "Change the topic of this room": "Das Thema von diesem Raum ändern", + "See when the topic changes in this room": "Sehen wenn sich das Thema in diesem Raum ändert", + "Change the topic of your active room": "Das Thema von deinem aktiven Raum ändern", + "See when the topic changes in your active room": "Sehen wenn sich das Thema in deinem aktiven Raum ändert", + "Change the name of this room": "Name von diesem Raum ändern", + "See when the name changes in this room": "Sehen wenn sich der Name in diesem Raum ändert", + "Change the name of your active room": "Den Namen deines aktiven Raums ändern", + "See when the name changes in your active room": "Sehen wenn der Name sich in deinem aktiven Raum ändert", + "Change the avatar of this room": "Avatar von diesem Raum ändern", + "See when the avatar changes in this room": "Sehen wenn der Avatar sich in diesem Raum ändert", + "Change the avatar of your active room": "Den Avatar deines aktiven Raums ändern", + "See when the avatar changes in your active room": "Sehen wenn ein Avatar in deinem aktiven Raum geändert wird", + "Send stickers to this room as you": "Einen Sticker in diesen Raum als du senden", + "See when a sticker is posted in this room": "Sehe wenn ein Sticker in diesen Raum gesendet wird", + "Send stickers to your active room as you": "Einen Sticker als du in deinen aktiven Raum senden", + "See when anyone posts a sticker to your active room": "Sehen wenn jemand einen Sticker in deinen aktiven Raum sendet", + "with an empty state key": "mit einem leeren Zustandsschlüssel", + "with state key %(stateKey)s": "mit Zustandsschlüssel %(stateKey)s", + "Send %(eventType)s events as you in this room": "%(eventType)s-Events als du in diesem Raum senden", + "See %(eventType)s events posted to this room": "In diesem Raum gesendete %(eventType)s-Events anzeigen", + "Send %(eventType)s events as you in your active room": "%(eventType)s-Events als du in deinem aktiven Raum senden", + "See %(eventType)s events posted to your active room": "In deinem aktiven Raum gesendete %(eventType)s-Events anzeigen", + "The %(capability)s capability": "Die %(capability)s Fähigkeit", + "Send messages as you in this room": "Nachrichten als du in diesem Raum senden", + "Send messages as you in your active room": "Eine Nachricht als du in deinem aktiven Raum senden", + "See messages posted to this room": "In diesem Raum gesendete Nachrichten anzeigen", + "See messages posted to your active room": "In deinem aktiven Raum gesendete Nachrichten anzeigen", + "Send text messages as you in this room": "Textnachrichten als du in diesem Raum senden", + "Send text messages as you in your active room": "Textnachrichten als du in deinem aktiven Raum senden", + "See text messages posted to this room": "In diesem Raum gesendete Textnachrichten anzeigen", + "See text messages posted to your active room": "In deinem aktiven Raum gesendete Textnachrichten anzeigen", + "Send emotes as you in this room": "Emojis als du in diesem Raum senden", + "Send emotes as you in your active room": "Emojis als du in deinem aktiven Raum senden", + "See emotes posted to this room": "In diesem Raum gesendete Emojis anzeigen", + "See emotes posted to your active room": "In deinem aktiven Raum gesendete Emojis anzeigen", + "See videos posted to your active room": "In deinem aktiven Raum gesendete Videos anzeigen", + "See videos posted to this room": "In diesem Raum gesendete Videos anzeigen", + "Send images as you in this room": "Bilder als du in diesem Raum senden", + "Send images as you in your active room": "Bilder als du in deinem aktiven Raum senden", + "See images posted to this room": "In diesem Raum gesendete Bilder anzeigen", + "See images posted to your active room": "In deinem aktiven Raum gesendete Bilder anzeigen", + "Send videos as you in this room": "Videos als du in diesem Raum senden", + "Send videos as you in your active room": "Videos als du in deinem aktiven Raum senden", + "Send general files as you in this room": "Allgemeine Dateien als du in diesem Raum senden", + "Send general files as you in your active room": "Allgemeine Dateien als du in deinem aktiven Raum senden", + "See general files posted to your active room": "Allgemeine in deinem aktiven Raum gesendete Dateien anzeigen", + "See general files posted to this room": "Allgemeine in diesem Raum gesendete Dateien anzeigen", + "Send %(msgtype)s messages as you in this room": "Sende %(msgtype)s Nachrichten als du in diesem Raum", + "Send %(msgtype)s messages as you in your active room": "Sende %(msgtype)s Nachrichten als du in deinem aktiven Raum", + "See %(msgtype)s messages posted to this room": "Zeige %(msgtype)s Nachrichten, welche in diesem Raum gesendet worden sind", + "See %(msgtype)s messages posted to your active room": "Zeige %(msgtype)s Nachrichten, welche in deinem aktiven Raum gesendet worden sind", + "Don't miss a reply": "Verpasse keine Antwort", + "Enable desktop notifications": "Aktiviere Desktopbenachrichtigungen", + "Update %(brand)s": "Aktualisiere %(brand)s", + "New version of %(brand)s is available": "Neue Version von %(brand)s verfügbar", + "You ended the call": "Du hast den Anruf beendet", + "%(senderName)s ended the call": "%(senderName)s hat den Anruf beendet", + "Use Command + Enter to send a message": "Benutze Betriebssystemtaste + Enter um eine Nachricht zu senden", + "Use Ctrl + Enter to send a message": "Benutze Strg + Enter um eine Nachricht zu senden", + "Call Paused": "Anruf pausiert", + "Securely cache encrypted messages locally for them to appear in search results, using %(size)s to store messages from %(rooms)s rooms.|other": "Verschlüsselte Nachrichten sicher lokal zwischenspeichern um sie in Suchergebnissen finden zu können, benötigt %(size)s um die Nachrichten von den Räumen %(rooms)s zu speichern.", + "Securely cache encrypted messages locally for them to appear in search results, using %(size)s to store messages from %(rooms)s rooms.|one": "Verschlüsselte Nachrichten sicher lokal zwischenspeichern um sie in Suchergebnissen finden zu können, benötigt %(size)s um die Nachrichten vom Raum %(rooms)s zu speichern.", + "Only the two of you are in this conversation, unless either of you invites anyone to join.": "Nur ihr zwei seid in dieser Konversation, außer einer von euch lädt jemanden neues ein.", + "This is the beginning of your direct message history with .": "Dies ist der Beginn deiner Direktnachrichtenhistorie mit .", + "Topic: %(topic)s (edit)": "Thema: %(topic)s (ändern)", + "Topic: %(topic)s ": "Thema: %(topic)s ", + "Add a topic to help people know what it is about.": "Füge ein Thema hinzu um Personen zu verdeutlichen um was es in ihm geht.", + "You created this room.": "Du hast diesen Raum erstellt.", + "%(displayName)s created this room.": "%(displayName)s erstellte diesen Raum.", + "Add a photo, so people can easily spot your room.": "Füge ein Foto hinzu, sodass Personen deinen Raum einfach finden können.", + "This is the start of .": "Dies ist der Beginn von .", + "Start a new chat": "Starte einen neuen Chat", + "Role": "Rolle", + "Messages here are end-to-end encrypted. Verify %(displayName)s in their profile - tap on their avatar.": "Nachrichten hier sind Ende-zu-Ende-verschlüsselt. Verifiziere %(displayName)s im deren Profil - klicke auf deren Avatar.", + "Messages in this room are end-to-end encrypted. When people join, you can verify them in their profile, just tap on their avatar.": "Nachrichten in diesem Raum sind Ende-zu-Ende-verschlüsselt. Wenn Personen beitreten, kannst du sie in ihrem Profil verifizieren, klicke hierfür auf deren Avatar.", + "Tell us below how you feel about %(brand)s so far.": "Erzähle uns wie %(brand)s dir soweit gefällt.", + "Please go into as much detail as you like, so we can track down the problem.": "Bitte nenne so viele Details wie du möchtest, sodass wir das Problem finden können.", + "Comment": "Kommentar", + "There are two ways you can provide feedback and help us improve %(brand)s.": "Es gibt zwei Wege wie du Feedback geben kannst und uns helfen kannst %(brand)s zu verbessern.", + "Please view existing bugs on Github first. No match? Start a new one.": "Bitte wirf einen Blick auf existierende Bugs auf Github. Keinen gefunden? Erstelle einen neuen.", + "PRO TIP: If you start a bug, please submit debug logs to help us track down the problem.": "PRO TIPP: Wenn du einen Bug meldest, füge bitte Debug-Logs hinzu um uns zu helfen das Problem zu finden.", + "Invite by email": "Via Email einladen", + "Start a conversation with someone using their name, email address or username (like ).": "Beginne eine Konversation mit jemanden unter Benutzung des Namens, Email-Addresse oder Benutzername (siehe ).", + "Invite someone using their name, email address, username (like ) or share this room.": "Lade jemanden unter Benutzung seines Namens, E-Mailaddresse oder Benutzername (siehe ) ein, oder teile diesen Raum.", + "Approve widget permissions": "Rechte für das Widget genehmigen", + "This widget would like to:": "Dieses Widget würde gerne:", + "Approve": "Zustimmen", + "Decline All": "Alles ablehnen" } From d8941a66560bdf1f1d283dc4258c9079270bbc59 Mon Sep 17 00:00:00 2001 From: Jeff Huang Date: Sat, 21 Nov 2020 13:37:37 +0000 Subject: [PATCH 062/319] Translated using Weblate (Chinese (Traditional)) Currently translated at 100.0% (2702 of 2702 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/zh_Hant/ --- src/i18n/strings/zh_Hant.json | 65 ++++++++++++++++++++++++++++++++++- 1 file changed, 64 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/zh_Hant.json b/src/i18n/strings/zh_Hant.json index 2ea4ca7f47..134cae7cf0 100644 --- a/src/i18n/strings/zh_Hant.json +++ b/src/i18n/strings/zh_Hant.json @@ -2851,5 +2851,68 @@ "A confirmation email has been sent to %(emailAddress)s": "確認電子郵件已寄送至 %(emailAddress)s", "Start a new chat": "開始新聊天", "Securely cache encrypted messages locally for them to appear in search results, using %(size)s to store messages from %(rooms)s rooms.|one": "使用 %(size)s 來儲存來自 %(rooms)s 個聊天室的訊息,在本機安全地快取已加密的訊息以使其出現在搜尋結果中。", - "Securely cache encrypted messages locally for them to appear in search results, using %(size)s to store messages from %(rooms)s rooms.|other": "使用 %(size)s 來儲存來自 %(rooms)s 個聊天室的訊息,在本機安全地快取已加密的訊息以使其出現在搜尋結果中。" + "Securely cache encrypted messages locally for them to appear in search results, using %(size)s to store messages from %(rooms)s rooms.|other": "使用 %(size)s 來儲存來自 %(rooms)s 個聊天室的訊息,在本機安全地快取已加密的訊息以使其出現在搜尋結果中。", + "

HTML for your community's page

\n

\n Use the long description to introduce new members to the community, or distribute\n some important links\n

\n

\n You can even add images with Matrix URLs \n

\n": "

您社群頁面的 HTML

\n

\n 使用詳細說明向社群介紹新成員,或散佈\n 一些重要的連結\n

\n

\n 您甚至可以使用 Matrix URL 新增圖片\n

\n", + "Decline All": "全部拒絕", + "Approve": "批准", + "This widget would like to:": "這個小工具想要:", + "Approve widget permissions": "批准小工具權限", + "Use Ctrl + Enter to send a message": "使用 Ctrl + Enter 來傳送訊息", + "Use Command + Enter to send a message": "使用 Command + Enter 來傳送訊息", + "See %(msgtype)s messages posted to your active room": "檢視發佈到您的活躍聊天室的 %(msgtype)s 訊息", + "See %(msgtype)s messages posted to this room": "檢視發佈到此聊天室的 %(msgtype)s 訊息", + "Send %(msgtype)s messages as you in your active room": "在您的活躍聊天室中以您的身份傳送 %(msgtype)s 訊息", + "Send %(msgtype)s messages as you in this room": "在此聊天室中以您的身份傳送 %(msgtype)s 訊息", + "See general files posted to your active room": "檢視在您的活躍聊天室中發佈的一般檔案", + "See general files posted to this room": "檢視在此聊天室中發佈的一般檔案", + "Send general files as you in your active room": "在您的活躍聊天室中以您的身份傳送一般檔案", + "Send general files as you in this room": "在此聊天室中以您的身份傳送一般檔案", + "See videos posted to your active room": "檢視發佈到您的活躍聊天室的影片", + "See videos posted to this room": "檢視發佈到此聊天室的影片", + "Send videos as you in your active room": "在您的活躍聊天室中以您的身份傳送影片", + "Send videos as you in this room": "在此聊天室中以您的身份傳送影片", + "See images posted to your active room": "檢視發佈到您的活躍聊天室的圖片", + "See images posted to this room": "檢視發佈到此聊天室的圖片", + "Send images as you in your active room": "在您活躍的聊天室以您的身份傳送圖片", + "Send images as you in this room": "在此聊天室以您的身份傳送圖片", + "See emotes posted to your active room": "檢視發佈到您的活躍聊天室的表情符號", + "See emotes posted to this room": "檢視發佈到此聊天室的表情符號", + "Send emotes as you in your active room": "在您的活躍聊天室中以您的身份傳送表情符號", + "Send emotes as you in this room": "在此聊天室中以您的身份傳送表情符號", + "See text messages posted to your active room": "檢視發佈到您的活躍聊天室的文字訊息", + "See text messages posted to this room": "檢視發佈到此聊天室的文字訊息", + "Send text messages as you in your active room": "在您的活躍聊天室以您的身份傳送文字訊息", + "Send text messages as you in this room": "在此聊天室以您的身份傳送文字訊息", + "See messages posted to your active room": "檢視發佈到您的活躍聊天室的訊息", + "See messages posted to this room": "檢視發佈到此聊天室的訊息", + "Send messages as you in your active room": "在您的活躍聊天室以您的身份傳送訊息", + "Send messages as you in this room": "在此聊天室以您的身份傳送訊息", + "The %(capability)s capability": "%(capability)s 能力", + "See %(eventType)s events posted to your active room": "檢視發佈到您的活躍聊天室的 %(eventType)s 活動", + "Send %(eventType)s events as you in your active room": "以您的身份在您的活躍聊天是傳送 %(eventType)s 活動", + "See %(eventType)s events posted to this room": "檢視發佈到此聊天室的 %(eventType)s 活動", + "Send %(eventType)s events as you in this room": "以您的身份在此聊天室傳送 %(eventType)s 活動", + "with state key %(stateKey)s": "帶有狀態金鑰 %(stateKey)s", + "with an empty state key": "帶有空的狀態金鑰", + "See when anyone posts a sticker to your active room": "檢視何時有人將貼圖貼到您活躍的聊天室", + "Send stickers to your active room as you": "以您的身份傳送貼圖到您活躍的聊天室", + "See when a sticker is posted in this room": "檢視貼圖在此聊天室中何時貼出", + "Send stickers to this room as you": "以您的身份傳送貼圖到此聊天室", + "See when the avatar changes in your active room": "檢視您活躍聊天是的大頭照何時變更", + "Change the avatar of your active room": "變更您活躍聊天是的大頭照", + "See when the avatar changes in this room": "檢視此聊天是的大頭照何時變更", + "Change the avatar of this room": "變更此聊天室的大頭照", + "See when the name changes in your active room": "檢視您活躍聊天室的名稱何時變更", + "Change the name of your active room": "變更您活躍聊天室的名稱", + "See when the name changes in this room": "檢視此聊天是的名稱何時變更", + "Change the name of this room": "變更此聊天室的名稱", + "See when the topic changes in your active room": "檢視您活躍的聊天是的主題何時變更", + "Change the topic of your active room": "變更您活躍聊天是的主題", + "See when the topic changes in this room": "檢視此聊天是的主題何時變更", + "Change the topic of this room": "變更此聊天室的主題", + "Change which room you're viewing": "變更您正在檢視的聊天室", + "Send stickers into your active room": "傳送貼圖到您活躍的聊天室", + "Send stickers into this room": "傳送貼圖到此聊天室", + "Remain on your screen while running": "在執行時保留在您的畫面上", + "Remain on your screen when viewing another room, when running": "在執行與檢視其他聊天室時仍保留在您的畫面上" } From f2f5cd71278332e3a26c7204e1aec3b85f241c89 Mon Sep 17 00:00:00 2001 From: XoseM Date: Sat, 21 Nov 2020 06:39:00 +0000 Subject: [PATCH 063/319] Translated using Weblate (Galician) Currently translated at 100.0% (2702 of 2702 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/gl/ --- src/i18n/strings/gl.json | 64 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 63 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/gl.json b/src/i18n/strings/gl.json index b6fc283477..f3045877c9 100644 --- a/src/i18n/strings/gl.json +++ b/src/i18n/strings/gl.json @@ -2849,5 +2849,67 @@ "Securely cache encrypted messages locally for them to appear in search results, using %(size)s to store messages from %(rooms)s rooms.|one": "Conservar na memoria local as mensaxes cifradas de xeito seguro para que aparezan nas buscas, usando %(size)s para gardar mensaxes de %(rooms)s salas.", "Securely cache encrypted messages locally for them to appear in search results, using %(size)s to store messages from %(rooms)s rooms.|other": "Conservar na memoria local as mensaxes cifradas de xeito seguro para que aparezan nas buscas, usando %(size)s para gardar mensaxes de %(rooms)s salas.", "Go to Home View": "Ir á Páxina de Inicio", - "

HTML for your community's page

\n

\n Use the long description to introduce new members to the community, or distribute\n some important links\n

\n

\n You can even add images with Matrix URLs \n

\n": "

HTML para a páxina da túa comunidade

\n

\n Usa a descrición longa para presentar a comunidade ás novas particpantes, ou publicar \nalgunha ligazón importante\n \n

\n

\n Tamén podes engadir imaxes con URLs de Matrix \n

\n" + "

HTML for your community's page

\n

\n Use the long description to introduce new members to the community, or distribute\n some important links\n

\n

\n You can even add images with Matrix URLs \n

\n": "

HTML para a páxina da túa comunidade

\n

\n Usa a descrición longa para presentar a comunidade ás novas particpantes, ou publicar \nalgunha ligazón importante\n \n

\n

\n Tamén podes engadir imaxes con URLs de Matrix \n

\n", + "The %(capability)s capability": "A capacidade de %(capability)s", + "Decline All": "Rexeitar todo", + "Approve": "Aprobar", + "This widget would like to:": "O widget podería querer:", + "Approve widget permissions": "Aprovar permisos do widget", + "Use Ctrl + Enter to send a message": "Usar Ctrl + Enter para enviar unha mensaxe", + "Use Command + Enter to send a message": "Usar Command + Enter para enviar unha mensaxe", + "See %(msgtype)s messages posted to your active room": "Ver mensaxes %(msgtype)s publicados na túa sala activa", + "See %(msgtype)s messages posted to this room": "Ver mensaxes %(msgtype)s publicados nesta sala", + "Send %(msgtype)s messages as you in your active room": "Enviar mensaxes %(msgtype)s no teu nome á túa sala activa", + "Send %(msgtype)s messages as you in this room": "Enviar mensaxes %(msgtype)s no teu nome a esta sala", + "See general files posted to your active room": "Ver ficheiros publicados na túa sala activa", + "See general files posted to this room": "Ver ficheiros publicados nesta sala", + "Send general files as you in your active room": "Enviar ficheiros no teu nome á túa sala activa", + "Send general files as you in this room": "Enviar ficheiros no teu nome a esta sala", + "See videos posted to your active room": "Ver vídeos publicados na túa sala activa", + "See videos posted to this room": "Ver vídeos publicados nesta sala", + "Send videos as you in your active room": "Enviar vídeos no teu nome á túa sala activa", + "Send videos as you in this room": "Enviar vídeos no teu nome a esta sala", + "See images posted to your active room": "Ver imaxes publicadas na túa sala activa", + "See images posted to this room": "Ver imaxes publicadas nesta sala", + "Send images as you in your active room": "Enviar imaxes no teu nome á túa sala activa", + "Send images as you in this room": "Enviar imaxes no teu nome a esta sala", + "See emotes posted to your active room": "Ver emotes publicados na túa sala activa", + "See emotes posted to this room": "Ver emotes publicados nesta sala", + "Send emotes as you in your active room": "Enviar emotes no teu nome á túa sala activa", + "Send emotes as you in this room": "Enviar emotes no teu nome a esta sala", + "See text messages posted to your active room": "Ver mensaxes de texto publicados na túa sala activa", + "See text messages posted to this room": "Ver mensaxes de texto publicados nesta sala", + "Send text messages as you in your active room": "Enviar mensaxes de texto no teu nome á túa sala activa", + "Send text messages as you in this room": "Enviar mensaxes de texto no teu nome a esta sala", + "See messages posted to your active room": "Ver as mensaxes publicadas na túa sala activa", + "See messages posted to this room": "Ver as mensaxes publicadas nesta sala", + "Send messages as you in your active room": "Enviar mensaxes no teu nome na túa sala activa", + "Send messages as you in this room": "Enviar mensaxes no teu nome nesta sala", + "See %(eventType)s events posted to your active room": "Ver os eventos %(eventType)s publicados na túa sala activa", + "Send %(eventType)s events as you in your active room": "Envía no teu nome %(eventType)s eventos á túa sala activa", + "See %(eventType)s events posted to this room": "Ver %(eventType)s eventos publicados nesta sala", + "Send %(eventType)s events as you in this room": "Envia no teu nome %(eventType)s eventos a esta sala", + "with state key %(stateKey)s": "coa chave de estado %(stateKey)s", + "with an empty state key": "cunha chave de estado baleiro", + "See when anyone posts a sticker to your active room": "Ver cando alguén publica un adhesivo na túa sala activa", + "Send stickers to your active room as you": "Enviar no teu nome adhesivos á túa sala activa", + "See when a sticker is posted in this room": "Ver cando un adhesivo se publica nesta sala", + "Send stickers to this room as you": "Enviar no teu nome adhesivos a esta sala", + "See when the avatar changes in your active room": "Ver cando o avatar da túa sala activa cambie", + "Change the avatar of your active room": "Cambiar o avatar da túa sala activa", + "See when the avatar changes in this room": "Ver cando o avatar desta sala cambie", + "Change the avatar of this room": "Cambiar o avatar desta sala", + "See when the name changes in your active room": "Ver cando o nome da túa sala activa cambie", + "Change the name of your active room": "Cambiar o tema da túa sala activa", + "See when the name changes in this room": "Ver cando o nome desta sala cambie", + "Change the name of this room": "Cambiar o nome desta sala", + "See when the topic changes in your active room": "Ver cando o tema da túa sala activa cambie", + "Change the topic of your active room": "Cambiar o tema da túa sala activa", + "See when the topic changes in this room": "Ver cando o tema desta sala cambie", + "Change the topic of this room": "Cambiar o tema desta sala", + "Change which room you're viewing": "Cambiar a sala que estás vendo", + "Send stickers into your active room": "Enviar adhesivos á túa sala activa", + "Send stickers into this room": "Enviar adhesivos a esta sala", + "Remain on your screen while running": "Permanecer na túa pantalla mentras se executa", + "Remain on your screen when viewing another room, when running": "Permanecer na túa pantalla cando visualizas outra sala, ó executar" } From 6f6e850075bb359d5b4b0aa989834871675abe45 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Mon, 23 Nov 2020 10:23:28 +0000 Subject: [PATCH 064/319] lowercase username placeholder in Password Login and Registration Form --- src/components/views/auth/PasswordLogin.tsx | 1 + src/components/views/auth/RegistrationForm.tsx | 1 + 2 files changed, 2 insertions(+) diff --git a/src/components/views/auth/PasswordLogin.tsx b/src/components/views/auth/PasswordLogin.tsx index fced2e08d0..f29418d50e 100644 --- a/src/components/views/auth/PasswordLogin.tsx +++ b/src/components/views/auth/PasswordLogin.tsx @@ -357,6 +357,7 @@ export default class PasswordLogin extends React.PureComponent { key="username_input" type="text" label={_t("Username")} + placeholder={_t("Username").toLocaleLowerCase()} value={this.props.username} onChange={this.onUsernameChanged} onFocus={this.onUsernameFocus} diff --git a/src/components/views/auth/RegistrationForm.tsx b/src/components/views/auth/RegistrationForm.tsx index f6fb3bb3ea..58a0f63b5f 100644 --- a/src/components/views/auth/RegistrationForm.tsx +++ b/src/components/views/auth/RegistrationForm.tsx @@ -522,6 +522,7 @@ export default class RegistrationForm extends React.PureComponent Date: Mon, 23 Nov 2020 10:25:46 +0000 Subject: [PATCH 065/319] Improve no email warning during registration --- res/css/_components.scss | 1 + .../_RegistrationEmailPromptDialog.scss | 28 ++++++ .../views/auth/RegistrationForm.tsx | 54 +++++------ .../dialogs/RegistrationEmailPromptDialog.tsx | 96 +++++++++++++++++++ src/components/views/elements/Field.tsx | 4 +- src/i18n/strings/en_EN.json | 7 +- 6 files changed, 159 insertions(+), 31 deletions(-) create mode 100644 res/css/views/dialogs/_RegistrationEmailPromptDialog.scss create mode 100644 src/components/views/dialogs/RegistrationEmailPromptDialog.tsx diff --git a/res/css/_components.scss b/res/css/_components.scss index eae67a84a2..9dd65d2a4f 100644 --- a/res/css/_components.scss +++ b/res/css/_components.scss @@ -78,6 +78,7 @@ @import "./views/dialogs/_MessageEditHistoryDialog.scss"; @import "./views/dialogs/_ModalWidgetDialog.scss"; @import "./views/dialogs/_NewSessionReviewDialog.scss"; +@import "./views/dialogs/_RegistrationEmailPromptDialog.scss"; @import "./views/dialogs/_RoomSettingsDialog.scss"; @import "./views/dialogs/_RoomSettingsDialogBridges.scss"; @import "./views/dialogs/_RoomUpgradeDialog.scss"; diff --git a/res/css/views/dialogs/_RegistrationEmailPromptDialog.scss b/res/css/views/dialogs/_RegistrationEmailPromptDialog.scss new file mode 100644 index 0000000000..31fc6d7a04 --- /dev/null +++ b/res/css/views/dialogs/_RegistrationEmailPromptDialog.scss @@ -0,0 +1,28 @@ +/* +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_RegistrationEmailPromptDialog { + width: 417px; + + .mx_Dialog_content { + margin-bottom: 24px; + color: $tertiary-fg-color; + } + + .mx_Dialog_primary { + width: 100%; + } +} diff --git a/src/components/views/auth/RegistrationForm.tsx b/src/components/views/auth/RegistrationForm.tsx index 58a0f63b5f..764dfdd526 100644 --- a/src/components/views/auth/RegistrationForm.tsx +++ b/src/components/views/auth/RegistrationForm.tsx @@ -28,6 +28,9 @@ import withValidation from '../elements/Validation'; import {ValidatedServerConfig} from "../../../utils/AutoDiscoveryUtils"; import PassphraseField from "./PassphraseField"; import CountlyAnalytics from "../../../CountlyAnalytics"; +import Field from '../elements/Field'; +import RegistrationEmailPromptDialog from '../dialogs/RegistrationEmailPromptDialog'; +import QuestionDialog from '../dialogs/QuestionDialog'; enum RegistrationField { Email = "field_email", @@ -104,6 +107,7 @@ export default class RegistrationForm extends React.PureComponent { ev.preventDefault(); + ev.persist(); if (!this.props.canSubmit) return; @@ -116,36 +120,36 @@ export default class RegistrationForm extends React.PureComponent { + if (confirmed) this.doSubmit(ev); + }, + }); } else if (this.showEmail()) { - desc = _t( - "If you don't specify an email address, you won't be able to reset your password. " + - "Are you sure?", - ); + CountlyAnalytics.instance.track("onboarding_registration_submit_warn"); + Modal.createTrackedDialog("Email prompt dialog", '', RegistrationEmailPromptDialog, { + onFinished: async (confirmed: boolean, email?: string) => { + if (confirmed) { + this.setState({ + email, + }, () => { + this.doSubmit(ev); + }); + } + }, + }); } else { // user can't set an e-mail so don't prompt them to this.doSubmit(ev); return; } - - CountlyAnalytics.instance.track("onboarding_registration_submit_warn"); - - const QuestionDialog = sdk.getComponent("dialogs.QuestionDialog"); - Modal.createTrackedDialog('If you don\'t specify an email address...', '', QuestionDialog, { - title: _t("Warning!"), - description: desc, - button: _t("Continue"), - onFinished: (confirmed) => { - if (confirmed) { - this.doSubmit(ev); - } - }, - }); } else { this.doSubmit(ev); } @@ -443,7 +447,6 @@ export default class RegistrationForm extends React.PureComponent this[RegistrationField.PasswordConfirm] = field} @@ -493,7 +495,6 @@ export default class RegistrationForm extends React.PureComponent this[RegistrationField.Username] = field} diff --git a/src/components/views/dialogs/RegistrationEmailPromptDialog.tsx b/src/components/views/dialogs/RegistrationEmailPromptDialog.tsx new file mode 100644 index 0000000000..8e91a07bf5 --- /dev/null +++ b/src/components/views/dialogs/RegistrationEmailPromptDialog.tsx @@ -0,0 +1,96 @@ +/* +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 * as React from "react"; + +import { _t } from '../../../languageHandler'; +import { IDialogProps } from "./IDialogProps"; +import {useRef, useState} from "react"; +import Field from "../elements/Field"; +import CountlyAnalytics from "../../../CountlyAnalytics"; +import withValidation from "../elements/Validation"; +import * as Email from "../../../email"; +import BaseDialog from "./BaseDialog"; +import DialogButtons from "../elements/DialogButtons"; + +interface IProps extends IDialogProps { + onFinished(continued: boolean, email?: string): void; +} + +const validation = withValidation({ + rules: [ + { + key: "email", + test: ({ value }) => !value || Email.looksValid(value), + invalid: () => _t("Doesn't look like a valid email address"), + }, + ], +}); + +const RegistrationEmailPromptDialog: React.FC = ({onFinished}) => { + const [email, setEmail] = useState(""); + const fieldRef = useRef(); + + const onSubmit = async () => { + if (email) { + const valid = await fieldRef.current.validate({ allowEmpty: false }); + + if (!valid) { + fieldRef.current.focus(); + fieldRef.current.validate({ allowEmpty: false, focused: true }); + return; + } + } + + onFinished(true, email); + }; + + return onFinished(false)} + fixedWidth={false} + > +
+

{_t("Just a heads up, if you don't add an email and forget your password, you could " + + "permanently lose access to your account.", {}, { + b: sub => {sub}, + })}

+
+ { + setEmail(ev.target.value); + }} + onValidate={async fieldState => await validation(fieldState)} + onFocus={() => CountlyAnalytics.instance.track("onboarding_registration_email2_focus")} + onBlur={() => CountlyAnalytics.instance.track("onboarding_registration_email2_blur")} + /> + +
+ +
; +}; + +export default RegistrationEmailPromptDialog; diff --git a/src/components/views/elements/Field.tsx b/src/components/views/elements/Field.tsx index fb34f51b60..58bd5226b6 100644 --- a/src/components/views/elements/Field.tsx +++ b/src/components/views/elements/Field.tsx @@ -167,7 +167,7 @@ export default class Field extends React.PureComponent { } }; - private async validate({ focused, allowEmpty = true }: {focused: boolean, allowEmpty?: boolean}) { + public async validate({ focused, allowEmpty = true }: {focused?: boolean, allowEmpty?: boolean}) { if (!this.props.onValidate) { return; } @@ -196,6 +196,8 @@ export default class Field extends React.PureComponent { feedbackVisible: false, }); } + + return valid; } public render() { diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index e04c929f80..b66df6c761 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -2045,6 +2045,10 @@ "Use this session to verify your new one, granting it access to encrypted messages:": "Use this session to verify your new one, granting it access to encrypted messages:", "If you didn’t sign in to this session, your account may be compromised.": "If you didn’t sign in to this session, your account may be compromised.", "This wasn't me": "This wasn't me", + "Doesn't look like a valid email address": "Doesn't look like a valid email address", + "Continuing without email": "Continuing without email", + "Just a heads up, if you don't add an email and forget your password, you could permanently lose access to your account.": "Just a heads up, if you don't add an email and forget your password, you could permanently lose access to your account.", + "Email (optional)": "Email (optional)", "Please fill why you're reporting.": "Please fill why you're reporting.", "Report Content to Your Homeserver Administrator": "Report Content to Your Homeserver Administrator", "Reporting this message will send its unique 'event ID' to the administrator of your homeserver. If messages in this room are encrypted, your homeserver administrator will not be able to read the message text or view any files or images.": "Reporting this message will send its unique 'event ID' to the administrator of your homeserver. If messages in this room are encrypted, your homeserver administrator will not be able to read the message text or view any files or images.", @@ -2226,7 +2230,6 @@ "Keep going...": "Keep going...", "Enter username": "Enter username", "Enter email address": "Enter email address", - "Doesn't look like a valid email address": "Doesn't look like a valid email address", "Enter phone number": "Enter phone number", "Doesn't look like a valid phone number": "Doesn't look like a valid phone number", "Email": "Email", @@ -2236,14 +2239,12 @@ "Sign in with": "Sign in with", "Sign in": "Sign in", "No identity server is configured so you cannot add an email address in order to reset your password in the future.": "No identity server is configured so you cannot add an email address in order to reset your password in the future.", - "If you don't specify an email address, you won't be able to reset your password. Are you sure?": "If you don't specify an email address, you won't be able to reset your password. Are you sure?", "Use an email address to recover your account": "Use an email address to recover your account", "Enter email address (required on this homeserver)": "Enter email address (required on this homeserver)", "Passwords don't match": "Passwords don't match", "Other users can invite you to rooms using your contact details": "Other users can invite you to rooms using your contact details", "Enter phone number (required on this homeserver)": "Enter phone number (required on this homeserver)", "Use lowercase letters, numbers, dashes and underscores only": "Use lowercase letters, numbers, dashes and underscores only", - "Email (optional)": "Email (optional)", "Phone (optional)": "Phone (optional)", "Register": "Register", "Set an email for account recovery. Use email or phone to optionally be discoverable by existing contacts.": "Set an email for account recovery. Use email or phone to optionally be discoverable by existing contacts.", From ebb998d0d5b25e59bb8ebc56eaabf60e9261f67a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Priit=20J=C3=B5er=C3=BC=C3=BCt?= Date: Sun, 22 Nov 2020 17:36:06 +0000 Subject: [PATCH 066/319] Translated using Weblate (Estonian) Currently translated at 98.7% (2669 of 2702 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/et/ --- src/i18n/strings/et.json | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/et.json b/src/i18n/strings/et.json index a06458a2a1..0b648edf86 100644 --- a/src/i18n/strings/et.json +++ b/src/i18n/strings/et.json @@ -2850,5 +2850,34 @@ "

HTML for your community's page

\n

\n Use the long description to introduce new members to the community, or distribute\n some important links\n

\n

\n You can even add images with Matrix URLs \n

\n": "

Sinu kogukonna lehe HTML'i näidis - see on pealkiri

\n

\n Tutvustamaks uutele liikmetele kogukonda, kasuta seda pikka kirjeldust\n või jaga olulist teavet viidetena\n

\n

\n Pildite lisaminseks võid sa isegi kasutada img-märgendit Matrix'i url'idega \n

\n", "Go to Home View": "Avalehele", "Securely cache encrypted messages locally for them to appear in search results, using %(size)s to store messages from %(rooms)s rooms.|one": "Selleks, et sisu saaks otsingus kasutada, puhverda krüptitud sõnumid kohalikus seadmes turvaliselt. %(rooms)s jututoa andmete salvestamiseks kulub hetkel %(size)s.", - "Securely cache encrypted messages locally for them to appear in search results, using %(size)s to store messages from %(rooms)s rooms.|other": "Selleks, et sisu saaks otsingus kasutada, puhverda krüptitud sõnumid kohalikus seadmes turvaliselt. %(rooms)s jututoa andmete salvestamiseks kulub hetkel %(size)s." + "Securely cache encrypted messages locally for them to appear in search results, using %(size)s to store messages from %(rooms)s rooms.|other": "Selleks, et sisu saaks otsingus kasutada, puhverda krüptitud sõnumid kohalikus seadmes turvaliselt. %(rooms)s jututoa andmete salvestamiseks kulub hetkel %(size)s.", + "This widget would like to:": "See vidin sooviks:", + "Approve widget permissions": "Anna vidinale õigused", + "Use Ctrl + Enter to send a message": "Sõnumi saatmiseks vajuta Ctrl + Enter", + "Decline All": "Keeldu kõigist", + "Approve": "Nõustu", + "Remain on your screen when viewing another room, when running": "Kui vaatad mõnda teist jututuba, siis jää oma ekraanivaate juurde", + "Remain on your screen while running": "Jää oma ekraanivaate juurde", + "Send %(eventType)s events as you in this room": "Saada enda nimel %(eventType)s sündmusi siia jututuppa", + "with state key %(stateKey)s": "olekuvõtmega %(stateKey)s", + "with an empty state key": "tühja olekuvõtmega", + "See when anyone posts a sticker to your active room": "Vaata kui keegi on saatnud kleepse aktiivsesse jututuppa", + "Send stickers to your active room as you": "Saada enda nimel kleepse hetkel aktiivsesse jututuppa", + "See when a sticker is posted in this room": "Vaata kui uus kleeps on siia jututuppa lisatud", + "Send stickers to this room as you": "Saada sellesse jututuppa kleepse iseendana", + "See when the avatar changes in your active room": "Vaata kui hetkel aktiivse jututoa tunnuspilt muutub", + "Change the avatar of your active room": "Muuda oma aktiivse jututoa tunnuspilti", + "See when the avatar changes in this room": "Vaata kui selle jututoa tunnuspilt muutub", + "Change the avatar of this room": "Muuda selle jututoa tunnuspilti", + "See when the name changes in your active room": "Vaata kui hetkel aktiivse jututoa nimi muutub", + "Change the name of your active room": "Muuda oma aktiivse jututoa nime", + "See when the name changes in this room": "Vaata kui selle jututoa nimi muutub", + "Change the name of this room": "Muuda selle jututoa nime", + "See when the topic changes in your active room": "Vaata kui hetkel aktiivse jututoa teema muutub", + "See when the topic changes in this room": "Vaata kui selle jututoa teema muutub", + "Change the topic of your active room": "Muuda oma aktiivse jututoa teemat", + "Change the topic of this room": "Muuda selle jututoa teemat", + "Change which room you're viewing": "Vaheta vaadatavat jututuba", + "Send stickers into your active room": "Saada kleepse hetkel aktiivsesse jututuppa", + "Send stickers into this room": "Saada kleepse siia jututuppa" } From 8223add1805eab59a8545193f1e3001eea504b54 Mon Sep 17 00:00:00 2001 From: Besnik Bleta Date: Mon, 23 Nov 2020 15:32:47 +0000 Subject: [PATCH 067/319] Translated using Weblate (Albanian) Currently translated at 98.8% (2667 of 2699 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/sq/ --- src/i18n/strings/sq.json | 40 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/sq.json b/src/i18n/strings/sq.json index 29cc6292de..73beee5272 100644 --- a/src/i18n/strings/sq.json +++ b/src/i18n/strings/sq.json @@ -2841,5 +2841,43 @@ "Role": "Rol", "Start a new chat": "Nisni një fjalosje të re", "Securely cache encrypted messages locally for them to appear in search results, using %(size)s to store messages from %(rooms)s rooms.|one": "Ruajini lokalisht në fshehtinë në mënyrë të sigurt mesazhet e fshehtëzuar, që të shfaqen në përfundime kërkimi, duke përdorur %(size)s që të depozitoni mesazhe nga %(rooms)s dhomë.", - "Securely cache encrypted messages locally for them to appear in search results, using %(size)s to store messages from %(rooms)s rooms.|other": "Ruajini lokalisht në fshehtinë në mënyrë të sigurt mesazhet e fshehtëzuar, që të shfaqen në përfundime kërkimi, duke përdorur %(size)s që të depozitoni mesazhe nga %(rooms)s dhoma." + "Securely cache encrypted messages locally for them to appear in search results, using %(size)s to store messages from %(rooms)s rooms.|other": "Ruajini lokalisht në fshehtinë në mënyrë të sigurt mesazhet e fshehtëzuar, që të shfaqen në përfundime kërkimi, duke përdorur %(size)s që të depozitoni mesazhe nga %(rooms)s dhoma.", + "See emotes posted to your active room": "Shihni emotikonë postuar në dhomën tuaj aktive", + "See emotes posted to this room": "Shihni emotikone postuar në këtë dhomë", + "Send emotes as you in your active room": "Dërgoni emotikone si ju në këtë dhomë", + "Send emotes as you in this room": "Dërgoni emotikone si ju në këtë dhomë", + "See text messages posted to your active room": "Shihni mesazhe tekst postuar në dhomën tuaj aktive", + "See text messages posted to this room": "Shihni mesazhe tekst postuar në këtë dhomë", + "Send text messages as you in your active room": "Dërgoni mesazhe tekst si ju në dhomën tuaj aktive", + "Send text messages as you in this room": "Dërgoni mesazhe tekst si ju në këtë dhomë", + "See messages posted to your active room": "Shihni mesazhe të postuar në dhomën tuaj aktive", + "See messages posted to this room": "Shihni mesazhe të postuar në këtë dhomë", + "Send messages as you in your active room": "Dërgoni mesazhe si ju në dhomën tuaj aktive", + "Send messages as you in this room": "Dërgoni mesazhi si ju në këtë dhomë", + "The %(capability)s capability": "Aftësia %(capability)s", + "See %(eventType)s events posted to your active room": "Shihni akte %(eventType)s postuar në dhomën tuaj aktive", + "Send %(eventType)s events as you in your active room": "Shihni akte %(eventType)s si ju në këtë dhomë", + "See %(eventType)s events posted to this room": "Shihni akte %(eventType)s postuar në këtë dhomë", + "Send %(eventType)s events as you in this room": "Dërgoni akte %(eventType)s në këtë dhomë si ju", + "with state key %(stateKey)s": "me kyç gjendjeje %(stateKey)s", + "with an empty state key": "me një kyç të zbrazët gjendjeje", + "See when anyone posts a sticker to your active room": "Shihni kur dikush poston një ngjitës në dhomën tuaj aktive", + "Send stickers to your active room as you": "Dërgoni ngjitës në dhomën tuaj aktive si ju", + "See when a sticker is posted in this room": "Shihni kur postohet një ngjitës në këtë dhomë", + "Send stickers to this room as you": "Dërgoni ngjitës në këtë dhomë si ju", + "See when the avatar changes in your active room": "Shihni kur ndryshon avatari në dhomën tuaj aktive", + "Change the avatar of your active room": "Ndryshoni avatarin në dhomën tuaj aktive", + "See when the avatar changes in this room": "Shihni kur ndryshon avatari në këtë dhomë", + "Change the avatar of this room": "Ndryshoni avatarin e kësaj dhome", + "See when the name changes in your active room": "Shihni kur ndryshon emri në dhomën tuaj aktive", + "Change the name of your active room": "Ndryshoni emrin e dhomës tuaj aktive", + "See when the name changes in this room": "Shihni kur ndryshohet emri në këtë dhomë", + "Change the name of this room": "Ndryshoni emrin e kësaj dhome", + "See when the topic changes in your active room": "Shihni kur ndryshon tema në dhomën tuaj aktive", + "Change the topic of your active room": "Ndryshoni temën në dhomën tuaj aktive", + "See when the topic changes in this room": "Shihni kur ndryshohet tema në këtë dhomë", + "Change the topic of this room": "Ndryshoni temën e kësaj dhome", + "Change which room you're viewing": "Ndryshoni cilën dhomë shihni", + "Send stickers into your active room": "Dërgoni ngjitës në dhomën tuaj aktive", + "Send stickers into this room": "Dërgoni ngjitës në këtë dhomë" } From 146a5d56e98ccea712c6569f0e5ac658e87294c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Priit=20J=C3=B5er=C3=BC=C3=BCt?= Date: Mon, 23 Nov 2020 15:15:26 +0000 Subject: [PATCH 068/319] Translated using Weblate (Estonian) Currently translated at 99.1% (2675 of 2699 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/et/ --- src/i18n/strings/et.json | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/et.json b/src/i18n/strings/et.json index 0b648edf86..47228a0e81 100644 --- a/src/i18n/strings/et.json +++ b/src/i18n/strings/et.json @@ -2879,5 +2879,16 @@ "Change the topic of this room": "Muuda selle jututoa teemat", "Change which room you're viewing": "Vaheta vaadatavat jututuba", "Send stickers into your active room": "Saada kleepse hetkel aktiivsesse jututuppa", - "Send stickers into this room": "Saada kleepse siia jututuppa" + "Send stickers into this room": "Saada kleepse siia jututuppa", + "See text messages posted to this room": "Vaata selle jututoa tekstisõnumeid", + "Send text messages as you in your active room": "Saada oma aktiivses jututoas enda nimel tekstisõnumeid", + "Send text messages as you in this room": "Saada selles jututoas oma nimel tekstisõnumeid", + "See messages posted to your active room": "Vaata sõnumeid oma aktiivses jututoas", + "See messages posted to this room": "Vaata selle jututoa sõnumeid", + "Send messages as you in your active room": "Saada oma aktiivses jututoas enda nimel sõnumeid", + "Send messages as you in this room": "Saada selles jututoas oma nimel sõnumeid", + "The %(capability)s capability": "%(capability)s võimekus", + "See %(eventType)s events posted to your active room": "Vaata oma aktiivsesse jututuppa saadetud %(eventType)s sündmusi", + "Send %(eventType)s events as you in your active room": "Saada oma nimel oma aktiivses jututoas %(eventType)s sündmusi", + "See %(eventType)s events posted to this room": "Vaata siia jututuppa saadetud %(eventType)s sündmusi" } From ec26a2f465571d44344d42170508c1bb2661dc5e Mon Sep 17 00:00:00 2001 From: Besnik Bleta Date: Mon, 23 Nov 2020 15:41:09 +0000 Subject: [PATCH 069/319] Translated using Weblate (Albanian) Currently translated at 99.7% (2692 of 2699 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/sq/ --- src/i18n/strings/sq.json | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/sq.json b/src/i18n/strings/sq.json index 73beee5272..51f6cbb676 100644 --- a/src/i18n/strings/sq.json +++ b/src/i18n/strings/sq.json @@ -2879,5 +2879,30 @@ "Change the topic of this room": "Ndryshoni temën e kësaj dhome", "Change which room you're viewing": "Ndryshoni cilën dhomë shihni", "Send stickers into your active room": "Dërgoni ngjitës në dhomën tuaj aktive", - "Send stickers into this room": "Dërgoni ngjitës në këtë dhomë" + "Send stickers into this room": "Dërgoni ngjitës në këtë dhomë", + "Go to Home View": "Kaloni te Pamja Kreu", + "

HTML for your community's page

\n

\n Use the long description to introduce new members to the community, or distribute\n some important links\n

\n

\n You can even add images with Matrix URLs \n

\n": "

HTML për faqen e bashkësisë tuaj

\n

\n Përdoreni përshkrimin e gjatë që t’i prezantoni bashkësisë anëtarë të rinj, ose për t’u dhënë lidhje të rëndësishme\n

\n

\n Mundeni madje të shtoni figura me URL-ra Matrix \n

\n", + "Enter phone number": "Jepni numër telefoni", + "Enter email address": "Jepni adresë email-i", + "Decline All": "Hidhi Krejt Poshtë", + "Approve": "Miratojeni", + "This widget would like to:": "Ky widget do të donte të:", + "Approve widget permissions": "Miratoni leje widget-i", + "Use Ctrl + Enter to send a message": "Që të dërgoni një mesazh përdorni tastet Ctrl + Enter", + "Use Command + Enter to send a message": "Që të dërgoni një mesazh, përdorni tastet Command + Enter", + "See %(msgtype)s messages posted to your active room": "Shihni mesazhe %(msgtype)s postuar në dhomën tuaj aktive", + "See %(msgtype)s messages posted to this room": "Shihni mesazhe %(msgtype)s postuar në këtë dhomë", + "Send %(msgtype)s messages as you in your active room": "Dërgoni mesazhe %(msgtype)s si ju në dhomën tuaj aktive", + "Send %(msgtype)s messages as you in this room": "Dërgoni mesazhe %(msgtype)s si ju në këtë dhomë", + "See general files posted to your active room": "Shihni kartela të përgjithshme postuar në dhomën tuaj aktive", + "See general files posted to this room": "Shihni kartela të përgjithshme postuar në këtë dhomë", + "Send general files as you in your active room": "Dërgoni kartela të përgjithshme si ju në dhomën tuaj aktive", + "Send general files as you in this room": "Dërgoni kartela të përgjithshme si ju në këtë dhomë", + "See videos posted to your active room": "Shihni video të postuara në dhomën tuaj aktive", + "See videos posted to this room": "Shihni video të postuara në këtë dhomë", + "Send videos as you in your active room": "Dërgoni video si ju në dhomën tuaj aktive", + "Send videos as you in this room": "Dërgoni video si ju në këtë dhomë", + "See images posted to your active room": "Shihni figura postuar te dhoma juaj aktive", + "See images posted to this room": "Shihni figura postuar në këtë dhomë", + "Send images as you in your active room": "Dërgoni figura si ju në dhomën tuaj aktive" } From 613710b75c25394208aa270b1bcf46de552c323e Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Mon, 23 Nov 2020 11:28:49 +0000 Subject: [PATCH 070/319] Iterate Auth copy --- res/css/structures/auth/_Login.scss | 4 +++- res/css/views/auth/_AuthBody.scss | 9 ++++++++ src/components/structures/auth/Login.tsx | 8 ++++--- .../structures/auth/Registration.tsx | 10 +++++---- src/components/views/auth/PasswordLogin.tsx | 22 +++++++------------ .../views/auth/RegistrationForm.tsx | 18 ++++++++------- src/i18n/strings/en_EN.json | 12 +++++----- 7 files changed, 48 insertions(+), 35 deletions(-) diff --git a/res/css/structures/auth/_Login.scss b/res/css/structures/auth/_Login.scss index 02436833a2..0774ac273d 100644 --- a/res/css/structures/auth/_Login.scss +++ b/res/css/structures/auth/_Login.scss @@ -18,7 +18,7 @@ limitations under the License. .mx_Login_submit { @mixin mx_DialogButton; width: 100%; - margin-top: 35px; + margin-top: 24px; margin-bottom: 24px; box-sizing: border-box; text-align: center; @@ -91,6 +91,8 @@ limitations under the License. } div.mx_AccessibleButton_kind_link.mx_Login_forgot { + display: block; + margin: 0 auto; // style it as a link font-size: inherit; padding: 0; diff --git a/res/css/views/auth/_AuthBody.scss b/res/css/views/auth/_AuthBody.scss index 0ba0d10e06..b51511a671 100644 --- a/res/css/views/auth/_AuthBody.scss +++ b/res/css/views/auth/_AuthBody.scss @@ -146,6 +146,15 @@ limitations under the License. display: block; text-align: center; width: 100%; + margin-top: 24px; + + > a { + font-weight: $font-semi-bold; + } +} + +form + .mx_AuthBody_changeFlow { + margin-top: 0; } .mx_AuthBody_spinner { diff --git a/src/components/structures/auth/Login.tsx b/src/components/structures/auth/Login.tsx index 4cd8981a65..17220981c9 100644 --- a/src/components/structures/auth/Login.tsx +++ b/src/components/structures/auth/Login.tsx @@ -670,9 +670,11 @@ export default class LoginComponent extends React.Component { ; } else if (SettingsStore.getValue(UIFeature.Registration)) { footer = ( - - { _t('Create account') } - + + {_t("New? Create account", {}, { + a: sub => { sub }, + })} + ); } diff --git a/src/components/structures/auth/Registration.tsx b/src/components/structures/auth/Registration.tsx index f97f20cf59..004029c920 100644 --- a/src/components/structures/auth/Registration.tsx +++ b/src/components/structures/auth/Registration.tsx @@ -650,9 +650,11 @@ export default class Registration extends React.Component { ); } - const signIn = - { _t('Sign in instead') } - ; + const signIn = + {_t("Already have an account? Sign in here", {}, { + a: sub => { sub }, + })} + ; // Only show the 'go back' button if you're not looking at the form let goBack; @@ -736,7 +738,7 @@ export default class Registration extends React.Component { } body =
-

{ _t('Create your account') }

+

{ _t('Create account') }

{ errorText } { serverDeadSection } { this.renderServerComponent() } diff --git a/src/components/views/auth/PasswordLogin.tsx b/src/components/views/auth/PasswordLogin.tsx index f29418d50e..198c76849c 100644 --- a/src/components/views/auth/PasswordLogin.tsx +++ b/src/components/views/auth/PasswordLogin.tsx @@ -411,20 +411,14 @@ export default class PasswordLogin extends React.PureComponent { let forgotPasswordJsx; if (this.props.onForgotPasswordClick) { - forgotPasswordJsx = - {_t('Not sure of your password? Set a new one', {}, { - a: sub => ( - - {sub} - - ), - })} - ; + forgotPasswordJsx = + {_t("Forgot password?")} + ; } const pwFieldClass = classNames({ diff --git a/src/components/views/auth/RegistrationForm.tsx b/src/components/views/auth/RegistrationForm.tsx index 764dfdd526..610618bb3e 100644 --- a/src/components/views/auth/RegistrationForm.tsx +++ b/src/components/views/auth/RegistrationForm.tsx @@ -540,17 +540,19 @@ export default class RegistrationForm extends React.PureComponent - {_t( - "Set an email for account recovery. " + - "Use email or phone to optionally be discoverable by existing contacts.", - )} + { + _t("Add an email to be able to reset your password.") + } { + _t("Use email or phone to optionally be discoverable by existing contacts.") + }
; } else { emailHelperText =
- {_t( - "Set an email for account recovery. " + - "Use email to optionally be discoverable by existing contacts.", - )} + { + _t("Add an email to be able to reset your password.") + } { + _t("Use email to optionally be discoverable by existing contacts.") + }
; } } diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index b66df6c761..fff7bdac44 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -2235,7 +2235,7 @@ "Email": "Email", "Username": "Username", "Phone": "Phone", - "Not sure of your password? Set a new one": "Not sure of your password? Set a new one", + "Forgot password?": "Forgot password?", "Sign in with": "Sign in with", "Sign in": "Sign in", "No identity server is configured so you cannot add an email address in order to reset your password in the future.": "No identity server is configured so you cannot add an email address in order to reset your password in the future.", @@ -2247,8 +2247,9 @@ "Use lowercase letters, numbers, dashes and underscores only": "Use lowercase letters, numbers, dashes and underscores only", "Phone (optional)": "Phone (optional)", "Register": "Register", - "Set an email for account recovery. Use email or phone to optionally be discoverable by existing contacts.": "Set an email for account recovery. Use email or phone to optionally be discoverable by existing contacts.", - "Set an email for account recovery. Use email to optionally be discoverable by existing contacts.": "Set an email for account recovery. Use email to optionally be discoverable by existing contacts.", + "Add an email to be able to reset your password.": "Add an email to be able to reset your password.", + "Use email or phone to optionally be discoverable by existing contacts.": "Use email or phone to optionally be discoverable by existing contacts.", + "Use email to optionally be discoverable by existing contacts.": "Use email to optionally be discoverable by existing contacts.", "Enter your custom homeserver URL What does this mean?": "Enter your custom homeserver URL What does this mean?", "Homeserver URL": "Homeserver URL", "Enter your custom identity server URL What does this mean?": "Enter your custom identity server URL What does this mean?", @@ -2456,10 +2457,11 @@ "Syncing...": "Syncing...", "Signing In...": "Signing In...", "If you've joined lots of rooms, this might take a while": "If you've joined lots of rooms, this might take a while", - "Create account": "Create account", + "New? Create account": "New? Create account", "Unable to query for supported registration methods.": "Unable to query for supported registration methods.", "Registration has been disabled on this homeserver.": "Registration has been disabled on this homeserver.", "This server does not support authentication with a phone number.": "This server does not support authentication with a phone number.", + "Already have an account? Sign in here": "Already have an account? Sign in here", "Your new account (%(newAccountId)s) is registered, but you're already logged into a different account (%(loggedInUserId)s).": "Your new account (%(newAccountId)s) is registered, but you're already logged into a different account (%(loggedInUserId)s).", "Continue with previous account": "Continue with previous account", "Log in to your new account.": "Log in to your new account.", @@ -2467,7 +2469,7 @@ "Registration Successful": "Registration Successful", "Create your Matrix account on %(serverName)s": "Create your Matrix account on %(serverName)s", "Create your Matrix account on ": "Create your Matrix account on ", - "Create your account": "Create your account", + "Create account": "Create account", "Use Recovery Key or Passphrase": "Use Recovery Key or Passphrase", "Use Recovery Key": "Use Recovery Key", "Confirm your identity by verifying this login from one of your other sessions, granting it access to encrypted messages.": "Confirm your identity by verifying this login from one of your other sessions, granting it access to encrypted messages.", From 1d53a5cf235fcf1f1666e956f52bab0ea651aa0c Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Mon, 23 Nov 2020 17:10:15 +0000 Subject: [PATCH 071/319] Initial support for MSC2858 --- res/css/_components.scss | 1 + res/css/structures/auth/_Login.scss | 6 - res/css/views/elements/_SSOButtons.scss | 41 ++++++ src/Login.ts | 37 +++--- src/components/structures/auth/Login.tsx | 131 ++++++++----------- src/components/structures/auth/SoftLogout.js | 16 ++- src/components/views/auth/PasswordLogin.tsx | 5 - src/components/views/elements/SSOButton.js | 42 ------ src/components/views/elements/SSOButtons.tsx | 111 ++++++++++++++++ src/i18n/strings/en_EN.json | 1 + 10 files changed, 237 insertions(+), 154 deletions(-) create mode 100644 res/css/views/elements/_SSOButtons.scss delete mode 100644 src/components/views/elements/SSOButton.js create mode 100644 src/components/views/elements/SSOButtons.tsx diff --git a/res/css/_components.scss b/res/css/_components.scss index 9dd65d2a4f..53a72c4ce8 100644 --- a/res/css/_components.scss +++ b/res/css/_components.scss @@ -124,6 +124,7 @@ @import "./views/elements/_RichText.scss"; @import "./views/elements/_RoleButton.scss"; @import "./views/elements/_RoomAliasField.scss"; +@import "./views/elements/_SSOButtons.scss"; @import "./views/elements/_Slider.scss"; @import "./views/elements/_Spinner.scss"; @import "./views/elements/_StyledCheckbox.scss"; diff --git a/res/css/structures/auth/_Login.scss b/res/css/structures/auth/_Login.scss index 0774ac273d..a8cb7d7eee 100644 --- a/res/css/structures/auth/_Login.scss +++ b/res/css/structures/auth/_Login.scss @@ -33,12 +33,6 @@ limitations under the License. cursor: default; } -.mx_AuthBody a.mx_Login_sso_link:link, -.mx_AuthBody a.mx_Login_sso_link:hover, -.mx_AuthBody a.mx_Login_sso_link:visited { - color: $button-primary-fg-color; -} - .mx_Login_loader { display: inline; position: relative; diff --git a/res/css/views/elements/_SSOButtons.scss b/res/css/views/elements/_SSOButtons.scss new file mode 100644 index 0000000000..8dc5d30257 --- /dev/null +++ b/res/css/views/elements/_SSOButtons.scss @@ -0,0 +1,41 @@ +/* +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_SSOButtons { + display: flex; + justify-content: center; + + .mx_SSOButton { + position: relative; + + > img { + object-fit: contain; + position: absolute; + left: 12px; + top: 12px; + } + } + + .mx_SSOButton_mini { + box-sizing: border-box; + width: 50px; // 48px + 1px border on all sides + height: 50px; // 48px + 1px border on all sides + + & + .mx_SSOButton_mini { + margin-left: 24px; + } + } +} diff --git a/src/Login.ts b/src/Login.ts index ae4aa226ed..d5776da856 100644 --- a/src/Login.ts +++ b/src/Login.ts @@ -30,9 +30,24 @@ interface ILoginOptions { // TODO: Move this to JS SDK interface ILoginFlow { - type: string; + type: "m.login.password" | "m.login.cas"; } +export interface IIdentityProvider { + id: string; + name: string; + icon?: string; +} + +export interface ISSOFlow { + type: "m.login.sso"; + // eslint-disable-next-line camelcase + identity_providers: IIdentityProvider[]; + "org.matrix.msc2858.identity_providers": IIdentityProvider[]; // Unstable prefix for MSC2858 +} + +export type LoginFlow = ISSOFlow | ILoginFlow; + // TODO: Move this to JS SDK /* eslint-disable camelcase */ interface ILoginParams { @@ -48,9 +63,8 @@ export default class Login { private hsUrl: string; private isUrl: string; private fallbackHsUrl: string; - private currentFlowIndex: number; // TODO: Flows need a type in JS SDK - private flows: Array; + private flows: Array; private defaultDeviceDisplayName: string; private tempClient: MatrixClient; @@ -63,7 +77,6 @@ export default class Login { this.hsUrl = hsUrl; this.isUrl = isUrl; this.fallbackHsUrl = fallbackHsUrl; - this.currentFlowIndex = 0; this.flows = []; this.defaultDeviceDisplayName = opts.defaultDeviceDisplayName; this.tempClient = null; // memoize @@ -100,27 +113,13 @@ export default class Login { }); } - public async getFlows(): Promise> { + public async getFlows(): Promise> { const client = this.createTemporaryClient(); const { flows } = await client.loginFlows(); this.flows = flows; - this.currentFlowIndex = 0; - // technically the UI should display options for all flows for the - // user to then choose one, so return all the flows here. return this.flows; } - public chooseFlow(flowIndex): void { - this.currentFlowIndex = flowIndex; - } - - public getCurrentFlowStep(): string { - // technically the flow can have multiple steps, but no one does this - // for login so we can ignore it. - const flowStep = this.flows[this.currentFlowIndex]; - return flowStep ? flowStep.type : null; - } - public loginViaPassword( username: string, phoneCountry: string, diff --git a/src/components/structures/auth/Login.tsx b/src/components/structures/auth/Login.tsx index 17220981c9..dd1fcc4d9a 100644 --- a/src/components/structures/auth/Login.tsx +++ b/src/components/structures/auth/Login.tsx @@ -14,17 +14,17 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React, {ComponentProps, ReactNode} from 'react'; +import React, {ReactNode} from 'react'; +import {MatrixError} from "matrix-js-sdk/src/http-api"; import {_t, _td} from '../../../languageHandler'; import * as sdk from '../../../index'; -import Login from '../../../Login'; +import Login, {ISSOFlow, LoginFlow} from '../../../Login'; import SdkConfig from '../../../SdkConfig'; import { messageForResourceLimitError } from '../../../utils/ErrorUtils'; import AutoDiscoveryUtils, {ValidatedServerConfig} from "../../../utils/AutoDiscoveryUtils"; import classNames from "classnames"; import AuthPage from "../../views/auth/AuthPage"; -import SSOButton from "../../views/elements/SSOButton"; import PlatformPeg from '../../../PlatformPeg'; import SettingsStore from "../../../settings/SettingsStore"; import {UIFeature} from "../../../settings/UIFeature"; @@ -35,6 +35,7 @@ import PasswordLogin from "../../views/auth/PasswordLogin"; import SignInToText from "../../views/auth/SignInToText"; import InlineSpinner from "../../views/elements/InlineSpinner"; import Spinner from "../../views/elements/Spinner"; +import SSOButtons from "../../views/elements/SSOButtons"; // Enable phases for login const PHASES_ENABLED = true; @@ -90,17 +91,14 @@ interface IState { // can we attempt to log in or are there validation errors? canTryLogin: boolean; + phase: Phase; + flows?: LoginFlow[]; + // used for preserving form values when changing homeserver username: string; phoneCountry?: string; phoneNumber: string; - // Phase of the overall login dialog. - phase: Phase; - // The current login flow, such as password, SSO, etc. - // we need to load the flows from the server - currentFlow?: string; - // We perform liveliness checks later, but for now suppress the errors. // We also track the server dead errors independently of the regular errors so // that we can render it differently, and override any other error the user may @@ -113,9 +111,10 @@ interface IState { /* * A wire component which glues together login UI components and Login logic */ -export default class LoginComponent extends React.Component { +export default class LoginComponent extends React.PureComponent { private unmounted = false; private loginLogic: Login; + private readonly stepRendererMap: Record ReactNode>; constructor(props) { @@ -127,11 +126,14 @@ export default class LoginComponent extends React.Component { errorText: null, loginIncorrect: false, canTryLogin: true, + + phase: Phase.Login, + flows: null, + username: "", phoneCountry: null, phoneNumber: "", - phase: Phase.Login, - currentFlow: null, + serverIsAlive: true, serverErrorIsFatal: false, serverDeadError: "", @@ -351,13 +353,14 @@ export default class LoginComponent extends React.Component { }; onTryRegisterClick = ev => { - const step = this.getCurrentFlowStep(); - if (step === 'm.login.sso' || step === 'm.login.cas') { + const hasPasswordFlow = this.state.flows.find(flow => flow.type === "m.login.password"); + if (!hasPasswordFlow) { // If we're showing SSO it means that registration is also probably disabled, // so intercept the click and instead pretend the user clicked 'Sign in with SSO'. ev.preventDefault(); ev.stopPropagation(); - const ssoKind = step === 'm.login.sso' ? 'sso' : 'cas'; + const step = this.state.flows.find(flow => flow.type === "m.login.sso" || flow.type === "m.login.cas"); + const ssoKind = step.type === 'm.login.sso' ? 'sso' : 'cas'; PlatformPeg.get().startSingleSignOn(this.loginLogic.createTemporaryClient(), ssoKind, this.props.fragmentAfterLogin); } else { @@ -397,7 +400,6 @@ export default class LoginComponent extends React.Component { this.setState({ busy: true, - currentFlow: null, // reset flow loginIncorrect: false, }); @@ -432,27 +434,18 @@ export default class LoginComponent extends React.Component { loginLogic.getFlows().then((flows) => { // look for a flow where we understand all of the steps. - for (let i = 0; i < flows.length; i++ ) { - if (!this.isSupportedFlow(flows[i])) { - continue; - } + const supportedFlows = flows.filter(this.isSupportedFlow); - // we just pick the first flow where we support all the - // steps. (we don't have a UI for multiple logins so let's skip - // that for now). - loginLogic.chooseFlow(i); + if (supportedFlows.length > 0) { this.setState({ currentFlow: this.getCurrentFlowStep(), }); return; } - // we got to the end of the list without finding a suitable - // flow. + + // we got to the end of the list without finding a suitable flow. this.setState({ - errorText: _t( - "This homeserver doesn't offer any login flows which are " + - "supported by this client.", - ), + errorText: _t("This homeserver doesn't offer any login flows which are supported by this client."), }); }, (err) => { this.setState({ @@ -467,7 +460,7 @@ export default class LoginComponent extends React.Component { }); } - private isSupportedFlow(flow) { + private isSupportedFlow = (flow: LoginFlow): boolean => { // technically the flow can have multiple steps, but no one does this // for login and loginLogic doesn't support it so we can ignore it. if (!this.stepRendererMap[flow.type]) { @@ -475,13 +468,9 @@ export default class LoginComponent extends React.Component { return false; } return true; - } + }; - private getCurrentFlowStep() { - return this.loginLogic ? this.loginLogic.getCurrentFlowStep() : null; - } - - private errorTextFromError(err) { + private errorTextFromError(err: MatrixError): ReactNode { let errCode = err.errcode; if (!errCode && err.httpStatus) { errCode = "HTTP " + err.httpStatus; @@ -550,37 +539,38 @@ export default class LoginComponent extends React.Component { />; } - private renderLoginComponentForStep() { - if (PHASES_ENABLED && this.state.phase !== Phase.Login) { - return null; - } + renderLoginComponentForFlows() { + if (!this.state.flows) return null; - const step = this.state.currentFlow; + // this is the ideal order we want to show the flows in + const order = [ + "m.login.password", + "m.login.sso", + ]; - if (!step) { - return null; - } - - const stepRenderer = this.stepRendererMap[step]; - - if (stepRenderer) { - return stepRenderer(); - } - - return null; - } - - private renderPasswordStep = () => { let onEditServerDetailsClick = null; // If custom URLs are allowed, wire up the server details edit link. - if (PHASES_ENABLED && !SdkConfig.get()['disable_custom_urls']) { + if (!SdkConfig.get()['disable_custom_urls']) { onEditServerDetailsClick = this.onEditServerDetailsClick; } + const flows = order.map(type => this.state.flows.find(flow => flow.type === type)).filter(Boolean); + return + + { flows.map(flow => { + const stepRenderer = this.stepRendererMap[flow.type]; + return { stepRenderer() } + }) } + + } + + private renderPasswordStep = () => { return ( { }; private renderSsoStep = loginType => { - let onEditServerDetailsClick = null; - // If custom URLs are allowed, wire up the server details edit link. - if (PHASES_ENABLED && !SdkConfig.get()['disable_custom_urls']) { - onEditServerDetailsClick = this.onEditServerDetailsClick; - } - // XXX: This link does *not* have a target="_blank" because single sign-on relies on - // redirecting the user back to a URI once they're logged in. On the web, this means - // we use the same window and redirect back to Element. On Electron, this actually - // opens the SSO page in the Electron app itself due to - // https://github.com/electron/electron/issues/8841 and so happens to work. - // If this bug gets fixed, it will break SSO since it will open the SSO page in the - // user's browser, let them log into their SSO provider, then redirect their browser - // to vector://vector which, of course, will not work. + const flow = this.state.flows.find(flow => flow.type === "m.login." + loginType) as ISSOFlow; + return (
- - - flow.type === "m.login.password")} />
); @@ -689,7 +666,7 @@ export default class LoginComponent extends React.Component { { errorTextSection } { serverDeadSection } { this.renderServerComponent() } - { this.renderLoginComponentForStep() } + { this.renderLoginComponentForFlows() } { footer } diff --git a/src/components/structures/auth/SoftLogout.js b/src/components/structures/auth/SoftLogout.js index a539c8c9ee..fdc1aec96d 100644 --- a/src/components/structures/auth/SoftLogout.js +++ b/src/components/structures/auth/SoftLogout.js @@ -24,8 +24,8 @@ import Modal from '../../../Modal'; import {MatrixClientPeg} from "../../../MatrixClientPeg"; import {sendLoginRequest} from "../../../Login"; import AuthPage from "../../views/auth/AuthPage"; -import SSOButton from "../../views/elements/SSOButton"; import {SSO_HOMESERVER_URL_KEY, SSO_ID_SERVER_URL_KEY} from "../../../BasePlatform"; +import SSOButtons from "../../views/elements/SSOButtons"; const LOGIN_VIEW = { LOADING: 1, @@ -101,10 +101,11 @@ export default class SoftLogout extends React.Component { // Note: we don't use the existing Login class because it is heavily flow-based. We don't // care about login flows here, unless it is the single flow we support. const client = MatrixClientPeg.get(); - const loginViews = (await client.loginFlows()).flows.map(f => FLOWS_TO_VIEWS[f.type]); + const flows = (await client.loginFlows()).flows; + const loginViews = flows.map(f => FLOWS_TO_VIEWS[f.type]); const chosenView = loginViews.filter(f => !!f)[0] || LOGIN_VIEW.UNSUPPORTED; - this.setState({loginView: chosenView}); + this.setState({ flows, loginView: chosenView }); } onPasswordChange = (ev) => { @@ -240,13 +241,18 @@ export default class SoftLogout extends React.Component { introText = _t("Sign in and regain access to your account."); } // else we already have a message and should use it (key backup warning) + const loginType = this.state.loginView === LOGIN_VIEW.CAS ? "cas" : "sso"; + const flow = this.state.flows.find(flow => flow.type === "m.login." + loginType); + return (

{introText}

- flow.type === "m.login.password")} />
); diff --git a/src/components/views/auth/PasswordLogin.tsx b/src/components/views/auth/PasswordLogin.tsx index 198c76849c..80384ba26e 100644 --- a/src/components/views/auth/PasswordLogin.tsx +++ b/src/components/views/auth/PasswordLogin.tsx @@ -26,7 +26,6 @@ import withValidation from "../elements/Validation"; import * as Email from "../../../email"; import Field from "../elements/Field"; import CountryDropdown from "./CountryDropdown"; -import SignInToText from "./SignInToText"; // For validating phone numbers without country codes const PHONE_NUMBER_REGEX = /^[0-9()\-\s]*$/; @@ -47,7 +46,6 @@ interface IProps { onUsernameBlur?(username: string): void; onPhoneCountryChanged?(phoneCountry: string): void; onPhoneNumberChanged?(phoneNumber: string): void; - onEditServerDetailsClick?(): void; onForgotPasswordClick?(): void; } @@ -70,7 +68,6 @@ enum LoginField { */ export default class PasswordLogin extends React.PureComponent { static defaultProps = { - onEditServerDetailsClick: null, onUsernameChanged: function() {}, onUsernameBlur: function() {}, onPhoneCountryChanged: function() {}, @@ -460,8 +457,6 @@ export default class PasswordLogin extends React.PureComponent { return (
-
{loginType} {loginField} diff --git a/src/components/views/elements/SSOButton.js b/src/components/views/elements/SSOButton.js deleted file mode 100644 index 1126ae3cd7..0000000000 --- a/src/components/views/elements/SSOButton.js +++ /dev/null @@ -1,42 +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. -*/ - -import React from 'react'; -import PropTypes from 'prop-types'; - -import PlatformPeg from "../../../PlatformPeg"; -import AccessibleButton from "./AccessibleButton"; -import {_t} from "../../../languageHandler"; - -const SSOButton = ({matrixClient, loginType, fragmentAfterLogin, ...props}) => { - const onClick = () => { - PlatformPeg.get().startSingleSignOn(matrixClient, loginType, fragmentAfterLogin); - }; - - return ( - - {_t("Sign in with single sign-on")} - - ); -}; - -SSOButton.propTypes = { - matrixClient: PropTypes.object.isRequired, // does not use context as may use a temporary client - loginType: PropTypes.oneOf(["sso", "cas"]), // defaults to "sso" in base-apis - fragmentAfterLogin: PropTypes.string, -}; - -export default SSOButton; diff --git a/src/components/views/elements/SSOButtons.tsx b/src/components/views/elements/SSOButtons.tsx new file mode 100644 index 0000000000..8247d17db8 --- /dev/null +++ b/src/components/views/elements/SSOButtons.tsx @@ -0,0 +1,111 @@ +/* +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 React from "react"; +import {MatrixClient} from "matrix-js-sdk/src/client"; + +import PlatformPeg from "../../../PlatformPeg"; +import AccessibleButton from "./AccessibleButton"; +import {_t} from "../../../languageHandler"; +import {IIdentityProvider, ISSOFlow} from "../../../Login"; +import classNames from "classnames"; + +interface ISSOButtonProps extends Omit { + idp: IIdentityProvider; + mini?: boolean; +} + +const SSOButton: React.FC = ({ + matrixClient, + loginType, + fragmentAfterLogin, + idp, + primary, + mini, + ...props +}) => { + const kind = primary ? "primary" : "primary_outline"; + const label = idp ? _t("Continue with %(provider)s", { provider: idp.name }) : _t("Sign in with single sign-on"); + + const onClick = () => { + PlatformPeg.get().startSingleSignOn(matrixClient, loginType, fragmentAfterLogin, idp.id); + }; + + let icon; + if (idp && idp.icon && idp.icon.startsWith("https://")) { + // TODO sanitize images + icon = {label}; + } + + const classes = classNames("mx_SSOButton", { + mx_SSOButton_mini: mini, + }); + + if (mini) { + // TODO fallback icon + return ( + + { icon } + + ); + } + + return ( + + { icon } + { label } + + ); +}; + +interface IProps { + matrixClient: MatrixClient; + flow: ISSOFlow; + loginType?: "sso" | "cas"; + fragmentAfterLogin?: string; + primary?: boolean; +} + +const SSOButtons: React.FC = ({matrixClient, flow, loginType, fragmentAfterLogin, primary}) => { + const providers = flow.identity_providers || flow["org.matrix.msc2858.identity_providers"] || []; + if (providers.length < 2) { + return
+ +
; + } + + return
+ { providers.map(idp => ( + + )) } +
; +}; + +export default SSOButtons; diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index fff7bdac44..cfa9dd2363 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -1827,6 +1827,7 @@ "This address is available to use": "This address is available to use", "This address is already in use": "This address is already in use", "Room directory": "Room directory", + "Continue with %(provider)s": "Continue with %(provider)s", "Sign in with single sign-on": "Sign in with single sign-on", "And %(count)s more...|other": "And %(count)s more...", "Home": "Home", From f7d7182dc96f3f71926475fe4151d393d9dc2f28 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Tue, 24 Nov 2020 12:09:11 +0000 Subject: [PATCH 072/319] Iterate Multi-SSO support --- res/css/views/auth/_AuthBody.scss | 9 +- src/Login.ts | 8 +- src/components/structures/MatrixChat.tsx | 1 + .../structures/auth/ForgotPassword.js | 2 + src/components/structures/auth/Login.tsx | 33 ++--- .../structures/auth/Registration.tsx | 124 +++++++++++------- src/i18n/strings/en_EN.json | 2 + 7 files changed, 100 insertions(+), 79 deletions(-) diff --git a/res/css/views/auth/_AuthBody.scss b/res/css/views/auth/_AuthBody.scss index b51511a671..67c8df0fa8 100644 --- a/res/css/views/auth/_AuthBody.scss +++ b/res/css/views/auth/_AuthBody.scss @@ -37,6 +37,10 @@ limitations under the License. color: $authpage-primary-color; } + h4 { + text-align: center; + } + a:link, a:hover, a:visited { @@ -146,15 +150,14 @@ limitations under the License. display: block; text-align: center; width: 100%; - margin-top: 24px; > a { font-weight: $font-semi-bold; } } -form + .mx_AuthBody_changeFlow { - margin-top: 0; +.mx_SSOButtons + .mx_AuthBody_changeFlow { + margin-top: 24px; } .mx_AuthBody_spinner { diff --git a/src/Login.ts b/src/Login.ts index d5776da856..281906d861 100644 --- a/src/Login.ts +++ b/src/Login.ts @@ -29,8 +29,8 @@ interface ILoginOptions { } // TODO: Move this to JS SDK -interface ILoginFlow { - type: "m.login.password" | "m.login.cas"; +interface IPasswordFlow { + type: "m.login.password"; } export interface IIdentityProvider { @@ -40,13 +40,13 @@ export interface IIdentityProvider { } export interface ISSOFlow { - type: "m.login.sso"; + type: "m.login.sso" | "m.login.cas"; // eslint-disable-next-line camelcase identity_providers: IIdentityProvider[]; "org.matrix.msc2858.identity_providers": IIdentityProvider[]; // Unstable prefix for MSC2858 } -export type LoginFlow = ISSOFlow | ILoginFlow; +export type LoginFlow = ISSOFlow | IPasswordFlow; // TODO: Move this to JS SDK /* eslint-disable camelcase */ diff --git a/src/components/structures/MatrixChat.tsx b/src/components/structures/MatrixChat.tsx index 9fede15aa6..32b961296b 100644 --- a/src/components/structures/MatrixChat.tsx +++ b/src/components/structures/MatrixChat.tsx @@ -2009,6 +2009,7 @@ export default class MatrixChat extends React.PureComponent { onLoginClick={this.onLoginClick} onServerConfigChange={this.onServerConfigChange} defaultDeviceDisplayName={this.props.defaultDeviceDisplayName} + fragmentAfterLogin={fragmentAfterLogin} {...this.getServerProperties()} /> ); diff --git a/src/components/structures/auth/ForgotPassword.js b/src/components/structures/auth/ForgotPassword.js index f9f5263f7e..e599808f0d 100644 --- a/src/components/structures/auth/ForgotPassword.js +++ b/src/components/structures/auth/ForgotPassword.js @@ -319,6 +319,7 @@ export default class ForgotPassword extends React.Component { onChange={this.onInputChanged.bind(this, "password")} onFocus={() => CountlyAnalytics.instance.track("onboarding_forgot_password_newPassword_focus")} onBlur={() => CountlyAnalytics.instance.track("onboarding_forgot_password_newPassword_blur")} + autoComplete="new-password" /> CountlyAnalytics.instance.track("onboarding_forgot_password_newPassword2_focus")} onBlur={() => CountlyAnalytics.instance.track("onboarding_forgot_password_newPassword2_blur")} + autoComplete="new-password" />
{_t( diff --git a/src/components/structures/auth/Login.tsx b/src/components/structures/auth/Login.tsx index dd1fcc4d9a..cb09ade895 100644 --- a/src/components/structures/auth/Login.tsx +++ b/src/components/structures/auth/Login.tsx @@ -438,7 +438,7 @@ export default class LoginComponent extends React.PureComponent if (supportedFlows.length > 0) { this.setState({ - currentFlow: this.getCurrentFlowStep(), + flows: supportedFlows, }); return; } @@ -520,22 +520,13 @@ export default class LoginComponent extends React.PureComponent return null; } - if (PHASES_ENABLED && this.state.phase !== Phase.ServerDetails) { - return null; - } - - const serverDetailsProps: ComponentProps = {}; - if (PHASES_ENABLED) { - serverDetailsProps.onAfterSubmit = this.onServerDetailsNextPhaseClick; - serverDetailsProps.submitText = _t("Next"); - serverDetailsProps.submitClass = "mx_Login_submit"; - } - return ; } @@ -591,15 +582,13 @@ export default class LoginComponent extends React.PureComponent const flow = this.state.flows.find(flow => flow.type === "m.login." + loginType) as ISSOFlow; return ( -
- flow.type === "m.login.password")} - /> -
+ flow.type === "m.login.password")} + /> ); }; diff --git a/src/components/structures/auth/Registration.tsx b/src/components/structures/auth/Registration.tsx index 004029c920..45bfbcef46 100644 --- a/src/components/structures/auth/Registration.tsx +++ b/src/components/structures/auth/Registration.tsx @@ -15,7 +15,7 @@ limitations under the License. */ import Matrix from 'matrix-js-sdk'; -import React, {ComponentProps, ReactNode} from 'react'; +import React, {ReactNode} from 'react'; import {MatrixClient} from "matrix-js-sdk/src/client"; import * as sdk from '../../../index'; @@ -28,8 +28,9 @@ import classNames from "classnames"; import * as Lifecycle from '../../../Lifecycle'; import {MatrixClientPeg} from "../../../MatrixClientPeg"; import AuthPage from "../../views/auth/AuthPage"; -import Login from "../../../Login"; +import Login, {ISSOFlow} from "../../../Login"; import dis from "../../../dispatcher/dispatcher"; +import SSOButtons from "../../views/elements/SSOButtons"; // Phases enum Phase { @@ -47,6 +48,7 @@ interface IProps { clientSecret?: string; sessionId?: string; idSid?: string; + fragmentAfterLogin?: string; // Called when the user has logged in. Params: // - object with userId, deviceId, homeserverUrl, identityServerUrl, accessToken @@ -116,12 +118,14 @@ interface IState { // if a different user ID to the one we just registered is logged in, // this is the user ID that's logged in. differentLoggedInUserId?: string; + // the SSO flow definition, this is fetched from /login as that's the only + // place it is exposed. + ssoFlow?: ISSOFlow; } -// Enable phases for registration -const PHASES_ENABLED = true; - export default class Registration extends React.Component { + loginLogic: Login; + constructor(props) { super(props); @@ -141,6 +145,11 @@ export default class Registration extends React.Component { serverErrorIsFatal: false, serverDeadError: "", }; + + const {hsUrl, isUrl} = this.props.serverConfig; + this.loginLogic = new Login(hsUrl, isUrl, null, { + defaultDeviceDisplayName: "Element login check", // We shouldn't ever be used + }); } componentDidMount() { @@ -252,9 +261,21 @@ export default class Registration extends React.Component { console.log("Unable to determine is server needs id_server param", e); } + this.loginLogic.setHomeserverUrl(hsUrl); + this.loginLogic.setIdentityServerUrl(isUrl); + + let ssoFlow: ISSOFlow; + try { + const loginFlows = await this.loginLogic.getFlows(); + ssoFlow = loginFlows.find(f => f.type === "m.login.sso" || f.type === "m.login.cas") as ISSOFlow; + } catch (e) { + console.error("Failed to get login flows to check for SSO support", e); + } + this.setState({ matrixClient: cli, serverRequiresIdServer, + ssoFlow, busy: false, }); const showGenericError = (e) => { @@ -282,26 +303,16 @@ export default class Registration extends React.Component { // At this point registration is pretty much disabled, but before we do that let's // quickly check to see if the server supports SSO instead. If it does, we'll send // the user off to the login page to figure their account out. - try { - const loginLogic = new Login(hsUrl, isUrl, null, { - defaultDeviceDisplayName: "Element login check", // We shouldn't ever be used + if (ssoFlow) { + // Redirect to login page - server probably expects SSO only + dis.dispatch({action: 'start_login'}); + } else { + this.setState({ + serverErrorIsFatal: true, // fatal because user cannot continue on this server + errorText: _t("Registration has been disabled on this homeserver."), + // add empty flows array to get rid of spinner + flows: [], }); - const flows = await loginLogic.getFlows(); - const hasSsoFlow = flows.find(f => f.type === 'm.login.sso' || f.type === 'm.login.cas'); - if (hasSsoFlow) { - // Redirect to login page - server probably expects SSO only - dis.dispatch({action: 'start_login'}); - } else { - this.setState({ - serverErrorIsFatal: true, // fatal because user cannot continue on this server - errorText: _t("Registration has been disabled on this homeserver."), - // add empty flows array to get rid of spinner - flows: [], - }); - } - } catch (e) { - console.error("Failed to get login flows to check for SSO support", e); - showGenericError(e); } } else { console.log("Unable to query for supported registration methods.", e); @@ -534,7 +545,7 @@ export default class Registration extends React.Component { // which is always shown if we allow custom URLs at all. // (if there's a fatal server error, we need to show the full server // config as the user may need to change servers to resolve the error). - if (PHASES_ENABLED && this.state.phase !== Phase.ServerDetails && !this.state.serverErrorIsFatal) { + if (this.state.phase !== Phase.ServerDetails && !this.state.serverErrorIsFatal) { return
{
; } - const serverDetailsProps: ComponentProps = {}; - if (PHASES_ENABLED) { - serverDetailsProps.onAfterSubmit = this.onServerDetailsNextPhaseClick; - serverDetailsProps.submitText = _t("Next"); - serverDetailsProps.submitClass = "mx_Login_submit"; - } - let serverDetails = null; switch (this.state.serverType) { case ServerType.FREE: @@ -559,7 +563,9 @@ export default class Registration extends React.Component { serverConfig={this.props.serverConfig} onServerConfigChange={this.props.onServerConfigChange} delayTimeMs={250} - {...serverDetailsProps} + onAfterSubmit={this.onServerDetailsNextPhaseClick} + submitText={_t("Next")} + submitClass="mx_Login_submit" />; break; case ServerType.ADVANCED: @@ -568,7 +574,9 @@ export default class Registration extends React.Component { onServerConfigChange={this.props.onServerConfigChange} delayTimeMs={250} showIdentityServerIfRequiredByHomeserver={true} - {...serverDetailsProps} + onAfterSubmit={this.onServerDetailsNextPhaseClick} + submitText={_t("Next")} + submitClass="mx_Login_submit" />; break; } @@ -583,7 +591,7 @@ export default class Registration extends React.Component { } private renderRegisterComponent() { - if (PHASES_ENABLED && this.state.phase !== Phase.Registration) { + if (this.state.phase !== Phase.Registration) { return null; } @@ -610,18 +618,35 @@ export default class Registration extends React.Component { ; } else if (this.state.flows.length) { - return ; + let ssoSection; + if (this.state.ssoFlow) { + ssoSection = +

{_t("Continue with")}

+ +

{_t("Or")}

+
; + } + + return + { ssoSection } + + ; } } @@ -658,7 +683,7 @@ export default class Registration extends React.Component { // Only show the 'go back' button if you're not looking at the form let goBack; - if ((PHASES_ENABLED && this.state.phase !== Phase.Registration) || this.state.doingUIAuth) { + if (this.state.phase !== Phase.Registration || this.state.doingUIAuth) { goBack = { _t('Go back') } ; @@ -725,8 +750,7 @@ export default class Registration extends React.Component { // If custom URLs are allowed, user is not doing UIA flows and they haven't selected the Free server type, // wire up the server details edit link. let editLink = null; - if (PHASES_ENABLED && - !SdkConfig.get()['disable_custom_urls'] && + if (!SdkConfig.get()['disable_custom_urls'] && this.state.serverType !== ServerType.FREE && !this.state.doingUIAuth ) { diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index baf801b57b..f45f4c60cd 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -2517,6 +2517,8 @@ "Unable to query for supported registration methods.": "Unable to query for supported registration methods.", "Registration has been disabled on this homeserver.": "Registration has been disabled on this homeserver.", "This server does not support authentication with a phone number.": "This server does not support authentication with a phone number.", + "Continue with": "Continue with", + "Or": "Or", "Already have an account? Sign in here": "Already have an account? Sign in here", "Your new account (%(newAccountId)s) is registered, but you're already logged into a different account (%(loggedInUserId)s).": "Your new account (%(newAccountId)s) is registered, but you're already logged into a different account (%(loggedInUserId)s).", "Continue with previous account": "Continue with previous account", From f271e117cfb4657c77810e379dad92b8467c4f46 Mon Sep 17 00:00:00 2001 From: Arsh Sharma Date: Tue, 24 Nov 2020 17:45:20 +0530 Subject: [PATCH 073/319] fix(EventTile): conditionally added avatar --- src/components/views/rooms/EventTile.js | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/components/views/rooms/EventTile.js b/src/components/views/rooms/EventTile.js index c358ef610d..22c3136737 100644 --- a/src/components/views/rooms/EventTile.js +++ b/src/components/views/rooms/EventTile.js @@ -745,14 +745,26 @@ export default class EventTile extends React.Component { } if (this.props.mxEvent.sender && avatarSize) { - avatar = ( + if(this.props.mxEvent.getType()==='m.room.third_party_invite') { + avatar = (
-
- ); + ); + } + else { + avatar = ( +
+ +
+ ); + } } if (needsSenderProfile) { From 3d01deadb8acd407ed8b5da0f05bfaceebda94f7 Mon Sep 17 00:00:00 2001 From: LinAGKar Date: Tue, 24 Nov 2020 09:16:21 +0000 Subject: [PATCH 074/319] Translated using Weblate (Swedish) Currently translated at 97.3% (2621 of 2692 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/sv/ --- src/i18n/strings/sv.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/sv.json b/src/i18n/strings/sv.json index f1bf9f08cd..2ef650219f 100644 --- a/src/i18n/strings/sv.json +++ b/src/i18n/strings/sv.json @@ -2774,5 +2774,10 @@ "Central African Republic": "Centralafrikanska republiken", "Cayman Islands": "Caymanöarna", "Caribbean Netherlands": "Karibiska Nederländerna", - "Cape Verde": "Kap Verde" + "Cape Verde": "Kap Verde", + "Change which room you're viewing": "Ändra vilket rum du visar", + "Send stickers into your active room": "Skicka dekaler in i ditt aktiva rum", + "Send stickers into this room": "Skicka dekaler in i det här rummet", + "Remain on your screen while running": "Stanna kvar på skärmen när det körs", + "Remain on your screen when viewing another room, when running": "Stanna kvar på skärmen när ett annat rum visas, när det körs" } From c84a9eefc097099e659b35af298fefc0ca06eee7 Mon Sep 17 00:00:00 2001 From: Jeff Huang Date: Tue, 24 Nov 2020 01:53:47 +0000 Subject: [PATCH 075/319] Translated using Weblate (Chinese (Traditional)) Currently translated at 100.0% (2692 of 2692 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/zh_Hant/ --- src/i18n/strings/zh_Hant.json | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/zh_Hant.json b/src/i18n/strings/zh_Hant.json index 134cae7cf0..99c74874bf 100644 --- a/src/i18n/strings/zh_Hant.json +++ b/src/i18n/strings/zh_Hant.json @@ -2914,5 +2914,11 @@ "Send stickers into your active room": "傳送貼圖到您活躍的聊天室", "Send stickers into this room": "傳送貼圖到此聊天室", "Remain on your screen while running": "在執行時保留在您的畫面上", - "Remain on your screen when viewing another room, when running": "在執行與檢視其他聊天室時仍保留在您的畫面上" + "Remain on your screen when viewing another room, when running": "在執行與檢視其他聊天室時仍保留在您的畫面上", + "Enter phone number": "輸入電話號碼", + "Enter email address": "輸入電子郵件地址", + "Return to call": "回到通話", + "Fill Screen": "全螢幕", + "Voice Call": "音訊通話", + "Video Call": "視訊通話" } From fe2cc31461e6ff6dfd29194368a52ca95c3ddcf5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=AE=D1=80=D0=B8=D0=B9=20=D0=A0=D1=83=D1=80=D0=B5=D0=BD?= =?UTF-8?q?=D0=BA=D0=BE?= Date: Tue, 24 Nov 2020 15:50:06 +0000 Subject: [PATCH 076/319] Translated using Weblate (Ukrainian) Currently translated at 46.1% (1243 of 2692 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/uk/ --- src/i18n/strings/uk.json | 60 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 59 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/uk.json b/src/i18n/strings/uk.json index 4151a3f755..689086859d 100644 --- a/src/i18n/strings/uk.json +++ b/src/i18n/strings/uk.json @@ -1264,5 +1264,63 @@ "The other party cancelled the verification.": "Друга сторона скасувала звірення.", "Verified!": "Звірено!", "You've successfully verified this user.": "Ви успішно звірили цього користувача.", - "Got It": "Зрозуміло" + "Got It": "Зрозуміло", + "Comoros": "Коморські Острови", + "Colombia": "Колумбія", + "Cocos (Keeling) Islands": "Кокосові острови", + "Christmas Island": "Острів Різдва", + "China": "Китай", + "Chile": "Чилі", + "Chad": "Чад", + "Central African Republic": "Центральна Африканська Республіка", + "Cayman Islands": "Кайманові Острови", + "Caribbean Netherlands": "Карибські Нідерланди", + "Cape Verde": "Кабо-Верде", + "Canada": "Канада", + "Cameroon": "Камерун", + "Cambodia": "Камбоджа", + "Burundi": "Бурунді", + "Burkina Faso": "Буркіна Фасо", + "Bulgaria": "Болгарія", + "Brunei": "Бруней", + "British Virgin Islands": "Британські Віргінські Острови", + "British Indian Ocean Territory": "Британська Територія в Індійському Океані", + "Brazil": "Бразилія", + "Bouvet Island": "Острів Буве", + "Botswana": "Ботсвана", + "Bosnia": "Боснія", + "Bolivia": "Болівія", + "Bhutan": "Бутан", + "Bermuda": "Бермуди", + "Benin": "Бенін", + "Belize": "Беліз", + "Belgium": "Бельгія", + "Belarus": "Білорусь", + "Barbados": "Барбадос", + "Bangladesh": "Бенгладеш", + "Bahrain": "Бахрейн", + "Bahamas": "Багами", + "Azerbaijan": "Азербайджан", + "Austria": "Австрія", + "Australia": "Австралія", + "Aruba": "Аруба", + "Armenia": "Арменія", + "Argentina": "Аргентина", + "Antigua & Barbuda": "Антигуа і Барбуда", + "Antarctica": "Антарктика", + "Anguilla": "Ангілья", + "Angola": "Ангола", + "Andorra": "Андора", + "American Samoa": "Американські Самоа", + "Algeria": "Алжир", + "Albania": "Албанія", + "Åland Islands": "Аландські острови", + "Afghanistan": "Афганістан", + "United States": "Сполучені Штати Америки", + "United Kingdom": "Об'єднане Королівство", + "The call was answered on another device.": "На дзвінок відповіли на іншому пристрої.", + "Answered Elsewhere": "Відповіли деінде", + "The call could not be established": "Не вдалося встановити зв'язок", + "The other party declined the call.": "Інша сторона відхилила дзвінок.", + "Call Declined": "Дзвінок відхилено" } From 41586b6d023da623a294c54d181d59a15e4333c1 Mon Sep 17 00:00:00 2001 From: m4sk1n Date: Tue, 24 Nov 2020 08:33:56 +0000 Subject: [PATCH 077/319] Translated using Weblate (Polish) Currently translated at 58.3% (1571 of 2692 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/pl/ --- src/i18n/strings/pl.json | 92 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 91 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/pl.json b/src/i18n/strings/pl.json index 8122e93f45..c033fe1053 100644 --- a/src/i18n/strings/pl.json +++ b/src/i18n/strings/pl.json @@ -1584,5 +1584,95 @@ "Cancel entering passphrase?": "Anulować wpisywanie hasła?", "Room name or address": "Nazwa lub adres pokoju", "This will end the conference for everyone. Continue?": "Czy na pewno chcesz zakończyc połączenie grupowe? To zakończy je dla wszystkich uczestnikow.", - "End conference": "Zakończ połączenie grupowe" + "End conference": "Zakończ połączenie grupowe", + "Attach files from chat or just drag and drop them anywhere in a room.": "Załącz pliki w rozmowie lub upuść je w dowolnym miejscu rozmowy.", + "Sign in with SSO": "Zaloguj się z SSO", + "No files visible in this room": "Brak plików widocznych w tym pokoju", + "Document": "Dokument", + "Service": "Usługa", + "Summary": "Opis", + "To continue you need to accept the terms of this service.": "Aby kontynuować, musisz zaakceptować zasady użytkowania.", + "Connecting to integration manager...": "Łączenie z zarządcą integracji…", + "Add widgets, bridges & bots": "Dodaj widżety, mostki i boty", + "Forget this room": "Zapomnij o tym pokoju", + "You were kicked from %(roomName)s by %(memberName)s": "Zostałeś(-aś) wyrzucony(-a) z %(roomName)s przez %(memberName)s", + "List options": "Ustawienia listy", + "Explore all public rooms": "Przeglądaj wszystkie publiczne pokoje", + "Explore public rooms": "Przeglądaj publiczne pokoje", + "Verification Requests": "Żądania weryfikacji", + "View Servers in Room": "Zobacz serwery w pokoju", + "Changes to who can read history will only apply to future messages in this room. The visibility of existing history will be unchanged.": "Zmiany tego, kto może przeglądać historię wyszukiwania dotyczą tylko przyszłych wiadomości w pokoju. Widoczność wcześniejszej historii nie zmieni się.", + "No other published addresses yet, add one below": "Brak innych opublikowanych adresów, dodaj jakiś poniżej", + "Other published addresses:": "Inne opublikowane adresy:", + "Published addresses can be used by anyone on any server to join your room. To publish an address, it needs to be set as a local address first.": "Opublikowane adresy mogą być używane, aby każdy mógł dołączyć do Twojego pokoju. Aby opublikować adres, należy wcześniej ustawić lokalny adres.", + "Room settings": "Ustawienia pokoju", + "Messages in this room are end-to-end encrypted. When people join, you can verify them in their profile, just tap on their avatar.": "Wiadomości w tym pokoju są szyfrowane end-to-end. Jeżeli ludzie dołączą do niego, możesz zweryfikować ich na ich profilu, naciskając na ich awatar.", + "Messages in this room are not end-to-end encrypted.": "Wiadomości w tym pokoju nie są szyfrowane end-to-end.", + "Show files": "Zobacz pliki", + "%(count)s people|one": "%(count)s osoba", + "%(count)s people|other": "%(count)s ludzi(e)", + "About": "Informacje", + "Add a topic to help people know what it is about.": "Dodaj temat, aby poinformować ludzi czego to dotyczy.", + "Show info about bridges in room settings": "Pokazuj informacje o mostkach w ustawieniach pokoju", + "about a day from now": "około dnia od teraz", + "about an hour from now": "około godziny od teraz", + "about a minute from now": "około minuty od teraz", + "Room Info": "Informacje o pokoju", + "Reporting this message will send its unique 'event ID' to the administrator of your homeserver. If messages in this room are encrypted, your homeserver administrator will not be able to read the message text or view any files or images.": "Zgłoszenie tej wiadomości wyśle administratorowi serwera unikatowe „ID wydarzenia”. Jeżeli wiadomości w tym pokoju są szyfrowane, administrator serwera może nie być w stanie przeczytać treści wiadomości, lub zobaczyć plików bądź zdjęć.", + "Send report": "Wyślij zgłoszenie", + "Report Content to Your Homeserver Administrator": "Zgłoś zawartość do administratora swojego serwera", + "Private rooms can be found and joined by invitation only. Public rooms can be found and joined by anyone in this community.": "Prywatne pokoje można odnaleźć i dołączyć do nich tylko przez zaproszenie. Do publicznych pokojów może dołączyć każdy w tej społeczności.", + "Private rooms can be found and joined by invitation only. Public rooms can be found and joined by anyone.": "Prywatne pokoje można odnaleźć i dołączyć do nich tylko przez zaproszenie. Do publicznych pokojów każdy może dołączyć.", + "You might enable this if the room will only be used for collaborating with internal teams on your homeserver. This cannot be changed later.": "Możesz ustawić tę opcję, jeżeli pokój będzie używany wyłącznie do współpracy wewnętrznych zespołów na Twoim serwerze. To nie może być później zmienione.", + "Block anyone not part of %(serverName)s from ever joining this room.": "Zablokuj wszystkich niebędących użytkownikami %(serverName)s w tym pokoju.", + "You can’t disable this later. Bridges & most bots won’t work yet.": "Nie możesz wyłączyć tego później. Mostki i większość botów nie będą działać.", + "Matrix rooms": "Pokoje Matrix", + "Start a conversation with someone using their name or username (like ).": "Rozpocznij konwersację z innymi korzystając z ich nazwy lub nazwy użytkownika (np. ).", + "Start a conversation with someone using their name, email address or username (like ).": "Rozpocznij konwersację z innymi korzystając z ich nazwy, adresu e-mail lub nazwy użytkownika (np. ).", + "Show %(count)s more|one": "Pokaż %(count)s więcej", + "Show %(count)s more|other": "Pokaż %(count)s więcej", + "Room options": "Ustawienia pokoju", + "Manually verify all remote sessions": "Ręcznie weryfikuj wszystkie zdalne sesje", + "Privacy": "Prywatność", + "This version of %(brand)s does not support searching encrypted messages": "Ta wersja %(brand)s nie obsługuje wyszukiwania zabezpieczonych wiadomości", + "Use the Desktop app to search encrypted messages": "Używaj Aplikacji desktopowej, aby wyszukiwać zaszyfrowane wiadomości", + "Message search": "Wyszukiwanie wiadomości", + "Enable message search in encrypted rooms": "Włącz wyszukiwanie wiadomości w szyfrowanych pokojach", + "New version of %(brand)s is available": "Dostępna jest nowa wersja %(brand)s", + "Update %(brand)s": "Aktualizuj %(brand)s", + "Set up Secure Backup": "Skonfiguruj bezpieczny backup", + "Ok": "OK", + "Send anonymous usage data which helps us improve %(brand)s. This will use a cookie.": "Wysyłaj anonimowe dane o wykorzystywaniu, które pomogą nam usprawnić %(brand)s. To będzie korzystać z pliku cookie.", + "Help us improve %(brand)s": "Pomóż nam usprawnić %(brand)s", + "Unknown App": "Nieznana aplikacja", + "Enable desktop notifications": "Włącz powiadomienia na pulpicie", + "Don't miss a reply": "Nie przegap odpowiedzi", + "A session's public name is visible to people you communicate with": "Publiczna nazwa sesji jest widoczna dla osób z którymi się komunikujesz", + "Manage the names of and sign out of your sessions below or verify them in your User Profile.": "Zarządzaj nazwami i unieważnaj sesje poniżej, lub weryfikuj je na swoim profilu.", + "Where you’re logged in": "Gdzie jesteś zalogowany(-a)", + "Review where you’re logged in": "Przejrzyj, gdzie jesteś zalogowany(-a)", + "Show tray icon and minimize window to it on close": "Pokazuj ikonę w zasobniku i minimalizuj okno do zasobnika przy zamknięciu", + "Display your community flair in rooms configured to show it.": "Wyświetlaj swój wyróżnik społeczności w pokojach skonfigurowanych, aby go używać.", + "System font name": "Nazwa czcionki systemowej", + "Set the name of a font installed on your system & %(brand)s will attempt to use it.": "Wybierz nazwę czcionki zainstalowanej w systemie, a %(brand)s spróbuje jej użyć.", + "Use a system font": "Użyj czcionki systemowej", + "Enable experimental, compact IRC style layout": "Włącz eksperymentalny, kompaktowy układ w stylu IRC", + "Use a more compact ‘Modern’ layout": "Użyj bardziej kompaktowego „nowoczesnego” układu", + "Use custom size": "Użyj niestandardowego rozmiaru", + "Appearance Settings only affect this %(brand)s session.": "Ustawienia wyglądu wpływają tylko na tę sesję %(brand)s.", + "Customise your appearance": "Dostosuj wygląd", + "Use an Integration Manager to manage bots, widgets, and sticker packs.": "Użyj Zarządcy Integracji aby zarządzać botami, widżetami i pakietami naklejek.", + "Use an Integration Manager (%(serverName)s) to manage bots, widgets, and sticker packs.": "Użyj Zarządcy Integracji %(serverName)s aby zarządzać botami, widżetami i pakietami naklejek.", + "There are two ways you can provide feedback and help us improve %(brand)s.": "Są dwa sposoby na przekazanie informacji zwrotnych i pomoc w usprawnieniu %(brand)s.", + "Feedback sent": "Wysłano informacje zwrotne", + "Send feedback": "Wyślij informacje zwrotne", + "Feedback": "Informacje zwrotne", + "You have no visible notifications in this room.": "Nie masz widocznych powiadomień w tym pokoju.", + "%(creator)s created this DM.": "%(creator)s utworzył(a) tę wiadomość bezpośrednią.", + "You do not have permission to create rooms in this community.": "Nie masz uprawnień do tworzenia pokojów w tej społeczności.", + "Cannot create rooms in this community": "Nie można utworzyć pokojów w tej społeczności", + "Liberate your communication": "Uwolnij swoją komunikację", + "Welcome to %(appName)s": "Witamy w %(appName)s", + "Now, let's help you get started": "Teraz pomożemy Ci zacząć", + "Welcome %(name)s": "Witaj, %(name)s" } From 4758f4b971eb2f7dd897cde0d9cc0f391da0eab4 Mon Sep 17 00:00:00 2001 From: XoseM Date: Tue, 24 Nov 2020 05:44:08 +0000 Subject: [PATCH 078/319] Translated using Weblate (Galician) Currently translated at 100.0% (2692 of 2692 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/gl/ --- src/i18n/strings/gl.json | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/gl.json b/src/i18n/strings/gl.json index f3045877c9..9f281779f5 100644 --- a/src/i18n/strings/gl.json +++ b/src/i18n/strings/gl.json @@ -2911,5 +2911,11 @@ "Send stickers into your active room": "Enviar adhesivos á túa sala activa", "Send stickers into this room": "Enviar adhesivos a esta sala", "Remain on your screen while running": "Permanecer na túa pantalla mentras se executa", - "Remain on your screen when viewing another room, when running": "Permanecer na túa pantalla cando visualizas outra sala, ó executar" + "Remain on your screen when viewing another room, when running": "Permanecer na túa pantalla cando visualizas outra sala, ó executar", + "Enter phone number": "Escribe número de teléfono", + "Enter email address": "Escribe enderezo email", + "Return to call": "Volver á chamada", + "Fill Screen": "Encher a pantalla", + "Voice Call": "Chamada de voz", + "Video Call": "Chamada de vídeo" } From 6b1a3c142249b3474e25bd3c0081408b127bfe90 Mon Sep 17 00:00:00 2001 From: m4sk1n Date: Tue, 24 Nov 2020 16:37:44 +0000 Subject: [PATCH 079/319] Translated using Weblate (Polish) Currently translated at 62.5% (1685 of 2692 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/pl/ --- src/i18n/strings/pl.json | 113 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 112 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/pl.json b/src/i18n/strings/pl.json index c033fe1053..ed50e3ae25 100644 --- a/src/i18n/strings/pl.json +++ b/src/i18n/strings/pl.json @@ -1674,5 +1674,116 @@ "Liberate your communication": "Uwolnij swoją komunikację", "Welcome to %(appName)s": "Witamy w %(appName)s", "Now, let's help you get started": "Teraz pomożemy Ci zacząć", - "Welcome %(name)s": "Witaj, %(name)s" + "Welcome %(name)s": "Witaj, %(name)s", + "Israel": "Izrael", + "Isle of Man": "Man", + "Ireland": "Irlandia", + "Iraq": "Irak", + "Iran": "Iran", + "Indonesia": "Indonezja", + "India": "Indie", + "Iceland": "Islandia", + "Hungary": "Węgry", + "Hong Kong": "Hong Kong", + "Honduras": "Honduras", + "Heard & McDonald Islands": "Wyspy Heard i McDonald", + "Haiti": "Haiti", + "Guyana": "Gujana", + "Guinea-Bissau": "Gwinea Bissau", + "Guinea": "Gwinea", + "Guernsey": "Guernsey", + "Guatemala": "Gwatemala", + "Guam": "Guam", + "Guadeloupe": "Gwadelupa", + "Grenada": "Grenada", + "Greenland": "Grenlandia", + "Greece": "Grecja", + "Gibraltar": "Gibraltar", + "Ghana": "Ghana", + "Germany": "Niemcy", + "Georgia": "Gruzja", + "Gambia": "Gambia", + "Gabon": "Gabon", + "French Southern Territories": "Francuskie Terytoria Południowe i Antarktyczne", + "French Polynesia": "Polinezja Francuska", + "French Guiana": "Gujana Francuska", + "France": "Francja", + "Finland": "Finlandia", + "Fiji": "Fidżi", + "Faroe Islands": "Wyspy Owcze", + "Falkland Islands": "Falklandy", + "Ethiopia": "Etiopia", + "Estonia": "Estonia", + "Eritrea": "Erytrea", + "Equatorial Guinea": "Gwinea Równikowa", + "El Salvador": "Salwador", + "Egypt": "Egipt", + "Ecuador": "Ekwador", + "Dominican Republic": "Dominikana", + "Dominica": "Dominika", + "Djibouti": "Dżibuti", + "Denmark": "Dania", + "Côte d’Ivoire": "Wybrzeże Kości Słoniowej", + "Czech Republic": "Czechy", + "Cyprus": "Cypr", + "Curaçao": "Curaçao", + "Cuba": "Kuba", + "Croatia": "Chorwacja", + "Costa Rica": "Kostaryka", + "Cook Islands": "Wyspy Cooka", + "Congo - Kinshasa": "Kinszasa", + "Congo - Brazzaville": "Kongo", + "Comoros": "Komory", + "Colombia": "Kolumbia", + "Cocos (Keeling) Islands": "Wyspy Kokosowe", + "Christmas Island": "Wyspa Bożego Narodzenia", + "China": "Chiny", + "Chile": "Chile", + "Chad": "Czad", + "Central African Republic": "Republika Środkowoafrykańska", + "Cayman Islands": "Kajmany", + "Caribbean Netherlands": "Holandia Karaibska", + "Cape Verde": "Republika Zielonego Przylądka", + "Canada": "Kanada", + "Cameroon": "Kamerun", + "Cambodia": "Kambodża", + "Burundi": "Burundi", + "Burkina Faso": "Burkina Faso", + "Bulgaria": "Bułgaria", + "Brunei": "Brunei", + "British Virgin Islands": "Brytyjskie Wyspy Dziewicze", + "British Indian Ocean Territory": "Brytyjskie Terytorium Oceanu Indyjskiego", + "Brazil": "Brazylia", + "Bouvet Island": "Wyspa Bouveta", + "Botswana": "Botswana", + "Bosnia": "Bośnia", + "Bolivia": "Boliwia", + "Bhutan": "Bhutan", + "Bermuda": "Bermudy", + "Benin": "Benin", + "Belize": "Belize", + "Belgium": "Belgia", + "Belarus": "Białoruś", + "Barbados": "Barbados", + "Bangladesh": "Bangladesz", + "Bahrain": "Bahrajn", + "Bahamas": "Bahamy", + "Azerbaijan": "Azerbejdżan", + "Austria": "Austria", + "Australia": "Australia", + "Aruba": "Aruba", + "Armenia": "Armenia", + "Argentina": "Argentyna", + "Antigua & Barbuda": "Antigua i Barbuda", + "Antarctica": "Antarktyda", + "Anguilla": "Anguilla", + "Angola": "Angola", + "Andorra": "Andora", + "American Samoa": "Samoa Amerykańskie", + "Algeria": "Algeria", + "Albania": "Albania", + "Åland Islands": "Wyspy Alandzkie", + "Afghanistan": "Afganistan", + "United States": "Stany Zjednoczone", + "United Kingdom": "Wielka Brytania" } From 2ffdfaef68bb2ae1e5d2fbcc7d1a2ee658f4dcb6 Mon Sep 17 00:00:00 2001 From: macekj Date: Tue, 24 Nov 2020 11:42:53 -0500 Subject: [PATCH 080/319] remove unnecessary lookbehind and comment emoticon regex Signed-off-by: macekj --- src/components/views/rooms/BasicMessageComposer.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/views/rooms/BasicMessageComposer.tsx b/src/components/views/rooms/BasicMessageComposer.tsx index 43316e90f2..1fa2ad681f 100644 --- a/src/components/views/rooms/BasicMessageComposer.tsx +++ b/src/components/views/rooms/BasicMessageComposer.tsx @@ -47,7 +47,8 @@ import AutocompleteWrapperModel from "../../../editor/autocomplete"; import DocumentPosition from "../../../editor/position"; import {ICompletion} from "../../../autocomplete/Autocompleter"; -const REGEX_EMOTICON_WHITESPACE = new RegExp('(?:^|\\s|(?<=^\\+))(' + EMOTICON_REGEX.source + ')\\s$'); +// matches emoticons which follow the start of a line, whitespace, or a plus at the start of a line +const REGEX_EMOTICON_WHITESPACE = new RegExp('(?:^|\\s|^\\+)(' + EMOTICON_REGEX.source + ')\\s$'); const IS_MAC = navigator.platform.indexOf("Mac") !== -1; From d2b0e362d3110c81388cd8f795e99834919eae6f Mon Sep 17 00:00:00 2001 From: m4sk1n Date: Tue, 24 Nov 2020 16:44:26 +0000 Subject: [PATCH 081/319] Translated using Weblate (Polish) Currently translated at 63.5% (1711 of 2692 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/pl/ --- src/i18n/strings/pl.json | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/pl.json b/src/i18n/strings/pl.json index ed50e3ae25..f3785a81b7 100644 --- a/src/i18n/strings/pl.json +++ b/src/i18n/strings/pl.json @@ -1785,5 +1785,31 @@ "Åland Islands": "Wyspy Alandzkie", "Afghanistan": "Afganistan", "United States": "Stany Zjednoczone", - "United Kingdom": "Wielka Brytania" + "United Kingdom": "Wielka Brytania", + "Marshall Islands": "Wyspy Marshalla", + "Malta": "Malta", + "Mali": "Mali", + "Maldives": "Malediwy", + "Malaysia": "Malezja", + "Malawi": "Malawi", + "Madagascar": "Madagaskar", + "Macedonia": "Macedonia", + "Macau": "Makau", + "Luxembourg": "Luksemburg", + "Lithuania": "Litwa", + "Liechtenstein": "Liechtenstein", + "Libya": "Libia", + "Liberia": "Liberia", + "Lesotho": "Lesotho", + "Lebanon": "Liban", + "Latvia": "Łotwa", + "Laos": "Laos", + "Kyrgyzstan": "Kirgistan", + "Kuwait": "Kuwejt", + "Kosovo": "Kosowo", + "Kiribati": "Kiribati", + "Kenya": "Kenia", + "Kazakhstan": "Kazachstan", + "Jordan": "Jordania", + "Jersey": "Jersey" } From 5e239690da24dc50e7fb352d895b2ef4f06bb877 Mon Sep 17 00:00:00 2001 From: Arsh Sharma Date: Wed, 25 Nov 2020 12:46:14 +0530 Subject: [PATCH 082/319] fix(EventTile): made revisions --- src/components/views/rooms/EventTile.js | 34 +++++++++++-------------- 1 file changed, 15 insertions(+), 19 deletions(-) diff --git a/src/components/views/rooms/EventTile.js b/src/components/views/rooms/EventTile.js index 22c3136737..e2f037ceb9 100644 --- a/src/components/views/rooms/EventTile.js +++ b/src/components/views/rooms/EventTile.js @@ -745,26 +745,22 @@ export default class EventTile extends React.Component { } if (this.props.mxEvent.sender && avatarSize) { - if(this.props.mxEvent.getType()==='m.room.third_party_invite') { - avatar = ( -
- -
- ); - } - else { - avatar = ( -
- -
- ); + let member; + // set member to receiver (target) if it is a 3PID invite + // so that the correct avatar is show + if (this.props.mxEvent.getContent().third_party_invite) { + member=this.props.mxEvent.target; + } else { + member=this.props.mxEvent.sender; } + avatar = ( +
+ +
+ ); } if (needsSenderProfile) { From 2f64160a0e2fad9163cb0859b33530e337b25683 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Tue, 24 Nov 2020 15:58:34 +0000 Subject: [PATCH 083/319] Remove backwards compatibility in ServerConfig for m.require_identity_server --- res/css/views/auth/_ServerConfig.scss | 10 --- src/PasswordReset.js | 7 -- .../structures/auth/ForgotPassword.js | 22 ------ .../structures/auth/Registration.tsx | 12 ---- .../auth/InteractiveAuthEntryComponents.js | 13 ---- .../views/auth/RegistrationForm.tsx | 41 +---------- src/components/views/auth/ServerConfig.js | 68 ------------------- 7 files changed, 3 insertions(+), 170 deletions(-) diff --git a/res/css/views/auth/_ServerConfig.scss b/res/css/views/auth/_ServerConfig.scss index a7e0057ab3..573171e4e7 100644 --- a/res/css/views/auth/_ServerConfig.scss +++ b/res/css/views/auth/_ServerConfig.scss @@ -23,13 +23,3 @@ limitations under the License. display: block; color: $warning-color; } - -.mx_ServerConfig_identityServer { - transform: scaleY(0); - transform-origin: top; - transition: transform 0.25s; - - &.mx_ServerConfig_identityServer_shown { - transform: scaleY(1); - } -} diff --git a/src/PasswordReset.js b/src/PasswordReset.js index 9472ddc633..b38a9de960 100644 --- a/src/PasswordReset.js +++ b/src/PasswordReset.js @@ -40,10 +40,6 @@ export default class PasswordReset { this.identityServerDomain = identityUrl ? identityUrl.split("://")[1] : null; } - doesServerRequireIdServerParam() { - return this.client.doesServerRequireIdServerParam(); - } - /** * Attempt to reset the user's password. This will trigger a side-effect of * sending an email to the provided email address. @@ -78,9 +74,6 @@ export default class PasswordReset { sid: this.sessionId, client_secret: this.clientSecret, }; - if (await this.doesServerRequireIdServerParam()) { - creds.id_server = this.identityServerDomain; - } try { await this.client.setPassword({ diff --git a/src/components/structures/auth/ForgotPassword.js b/src/components/structures/auth/ForgotPassword.js index e599808f0d..e3bae7e38d 100644 --- a/src/components/structures/auth/ForgotPassword.js +++ b/src/components/structures/auth/ForgotPassword.js @@ -62,7 +62,6 @@ export default class ForgotPassword extends React.Component { serverIsAlive: true, serverErrorIsFatal: false, serverDeadError: "", - serverRequiresIdServer: null, }; constructor(props) { @@ -93,12 +92,8 @@ export default class ForgotPassword extends React.Component { serverConfig.isUrl, ); - const pwReset = new PasswordReset(serverConfig.hsUrl, serverConfig.isUrl); - const serverRequiresIdServer = await pwReset.doesServerRequireIdServerParam(); - this.setState({ serverIsAlive: true, - serverRequiresIdServer, }); } catch (e) { this.setState(AutoDiscoveryUtils.authComponentStateForError(e, "forgot_password")); @@ -216,7 +211,6 @@ export default class ForgotPassword extends React.Component { serverConfig={this.props.serverConfig} onServerConfigChange={this.props.onServerConfigChange} delayTimeMs={0} - showIdentityServerIfRequiredByHomeserver={true} onAfterSubmit={this.onServerDetailsNextPhaseClick} submitText={_t("Next")} submitClass="mx_Login_submit" @@ -274,22 +268,6 @@ export default class ForgotPassword extends React.Component { ; } - if (!this.props.serverConfig.isUrl && this.state.serverRequiresIdServer) { - return
-

- {yourMatrixAccountText} - {editLink} -

- {_t( - "No identity server is configured: " + - "add one in server settings to reset your password.", - )} - - {_t('Sign in instead')} - -
; - } - return
{errorText} {serverDeadSection} diff --git a/src/components/structures/auth/Registration.tsx b/src/components/structures/auth/Registration.tsx index 45bfbcef46..a31a07a96b 100644 --- a/src/components/structures/auth/Registration.tsx +++ b/src/components/structures/auth/Registration.tsx @@ -111,8 +111,6 @@ interface IState { // Our matrix client - part of state because we can't render the UI auth // component without it. matrixClient?: MatrixClient; - // whether the HS requires an ID server to register with a threepid - serverRequiresIdServer?: boolean; // The user ID we've just registered registeredUsername?: string; // if a different user ID to the one we just registered is logged in, @@ -254,13 +252,6 @@ export default class Registration extends React.Component { idBaseUrl: isUrl, }); - let serverRequiresIdServer = true; - try { - serverRequiresIdServer = await cli.doesServerRequireIdServerParam(); - } catch (e) { - console.log("Unable to determine is server needs id_server param", e); - } - this.loginLogic.setHomeserverUrl(hsUrl); this.loginLogic.setIdentityServerUrl(isUrl); @@ -274,7 +265,6 @@ export default class Registration extends React.Component { this.setState({ matrixClient: cli, - serverRequiresIdServer, ssoFlow, busy: false, }); @@ -573,7 +563,6 @@ export default class Registration extends React.Component { serverConfig={this.props.serverConfig} onServerConfigChange={this.props.onServerConfigChange} delayTimeMs={250} - showIdentityServerIfRequiredByHomeserver={true} onAfterSubmit={this.onServerDetailsNextPhaseClick} submitText={_t("Next")} submitClass="mx_Login_submit" @@ -644,7 +633,6 @@ export default class Registration extends React.Component { flows={this.state.flows} serverConfig={this.props.serverConfig} canSubmit={!this.state.serverErrorIsFatal} - serverRequiresIdServer={this.state.serverRequiresIdServer} /> ; } diff --git a/src/components/views/auth/InteractiveAuthEntryComponents.js b/src/components/views/auth/InteractiveAuthEntryComponents.js index 6628ca7120..60e57afc98 100644 --- a/src/components/views/auth/InteractiveAuthEntryComponents.js +++ b/src/components/views/auth/InteractiveAuthEntryComponents.js @@ -18,7 +18,6 @@ limitations under the License. import React, {createRef} from 'react'; import PropTypes from 'prop-types'; -import url from 'url'; import classnames from 'classnames'; import * as sdk from '../../../index'; @@ -500,17 +499,11 @@ export class MsisdnAuthEntry extends React.Component { }); try { - const requiresIdServerParam = - await this.props.matrixClient.doesServerRequireIdServerParam(); let result; if (this._submitUrl) { result = await this.props.matrixClient.submitMsisdnTokenOtherUrl( this._submitUrl, this._sid, this.props.clientSecret, this.state.token, ); - } else if (requiresIdServerParam) { - result = await this.props.matrixClient.submitMsisdnToken( - this._sid, this.props.clientSecret, this.state.token, - ); } else { throw new Error("The registration with MSISDN flow is misconfigured"); } @@ -519,12 +512,6 @@ export class MsisdnAuthEntry extends React.Component { sid: this._sid, client_secret: this.props.clientSecret, }; - if (requiresIdServerParam) { - const idServerParsedUrl = url.parse( - this.props.matrixClient.getIdentityServerUrl(), - ); - creds.id_server = idServerParsedUrl.host; - } this.props.submitAuthDict({ type: MsisdnAuthEntry.LOGIN_TYPE, // TODO: Remove `threepid_creds` once servers support proper UIA diff --git a/src/components/views/auth/RegistrationForm.tsx b/src/components/views/auth/RegistrationForm.tsx index 610618bb3e..b005c8e0e2 100644 --- a/src/components/views/auth/RegistrationForm.tsx +++ b/src/components/views/auth/RegistrationForm.tsx @@ -54,7 +54,6 @@ interface IProps { }[]; serverConfig: ValidatedServerConfig; canSubmit?: boolean; - serverRequiresIdServer?: boolean; onRegisterClick(params: { username: string; @@ -118,21 +117,7 @@ export default class RegistrationForm extends React.PureComponent { - if (confirmed) this.doSubmit(ev); - }, - }); - } else if (this.showEmail()) { + if (this.showEmail()) { CountlyAnalytics.instance.track("onboarding_registration_submit_warn"); Modal.createTrackedDialog("Email prompt dialog", '', RegistrationEmailPromptDialog, { onFinished: async (confirmed: boolean, email?: string) => { @@ -420,11 +405,7 @@ export default class RegistrationForm extends React.PureComponent; } } - const haveIs = Boolean(this.props.serverConfig.isUrl); - let noIsText = null; - if (this.props.serverRequiresIdServer && !haveIs) { - noIsText =
- {_t( - "No identity server is configured so you cannot add an email address in order to " + - "reset your password in the future.", - )} -
; - } return (
@@ -582,7 +548,6 @@ export default class RegistrationForm extends React.PureComponent { emailHelperText } - { noIsText } { registerButton }
diff --git a/src/components/views/auth/ServerConfig.js b/src/components/views/auth/ServerConfig.js index e04bf9e25a..448616af15 100644 --- a/src/components/views/auth/ServerConfig.js +++ b/src/components/views/auth/ServerConfig.js @@ -24,8 +24,6 @@ import { _t } from '../../../languageHandler'; import {ValidatedServerConfig} from "../../../utils/AutoDiscoveryUtils"; import AutoDiscoveryUtils from "../../../utils/AutoDiscoveryUtils"; import SdkConfig from "../../../SdkConfig"; -import { createClient } from 'matrix-js-sdk/src/matrix'; -import classNames from 'classnames'; import CountlyAnalytics from "../../../CountlyAnalytics"; /* @@ -50,10 +48,6 @@ export default class ServerConfig extends React.PureComponent { // Optional class for the submit button. Only applies if the submit button // is to be rendered. submitClass: PropTypes.string, - - // Whether the flow this component is embedded in requires an identity - // server when the homeserver says it will need one. Default false. - showIdentityServerIfRequiredByHomeserver: PropTypes.bool, }; static defaultProps = { @@ -69,7 +63,6 @@ export default class ServerConfig extends React.PureComponent { errorText: "", hsUrl: props.serverConfig.hsUrl, isUrl: props.serverConfig.isUrl, - showIdentityServer: false, }; CountlyAnalytics.instance.track("onboarding_custom_server"); @@ -92,23 +85,6 @@ export default class ServerConfig extends React.PureComponent { return result; } - // If the UI flow this component is embedded in requires an identity - // server when the homeserver says it will need one, check first and - // reveal this field if not already shown. - // XXX: This a backward compatibility path for homeservers that require - // an identity server to be passed during certain flows. - // See also https://github.com/matrix-org/synapse/pull/5868. - if ( - this.props.showIdentityServerIfRequiredByHomeserver && - !this.state.showIdentityServer && - await this.isIdentityServerRequiredByHomeserver() - ) { - this.setState({ - showIdentityServer: true, - }); - return null; - } - return result; } @@ -165,15 +141,6 @@ export default class ServerConfig extends React.PureComponent { } } - async isIdentityServerRequiredByHomeserver() { - // XXX: We shouldn't have to create a whole new MatrixClient just to - // check if the homeserver requires an identity server... Should it be - // extracted to a static utils function...? - return createClient({ - baseUrl: this.state.hsUrl, - }).doesServerRequireIdServerParam(); - } - onHomeserverBlur = (ev) => { this._hsTimeoutId = this._waitThenInvoke(this._hsTimeoutId, () => { this.validateServer(); @@ -185,17 +152,6 @@ export default class ServerConfig extends React.PureComponent { this.setState({ hsUrl }); }; - onIdentityServerBlur = (ev) => { - this._isTimeoutId = this._waitThenInvoke(this._isTimeoutId, () => { - this.validateServer(); - }); - }; - - onIdentityServerChange = (ev) => { - const isUrl = ev.target.value; - this.setState({ isUrl }); - }; - onSubmit = async (ev) => { ev.preventDefault(); ev.stopPropagation(); @@ -239,29 +195,6 @@ export default class ServerConfig extends React.PureComponent {
; } - _renderIdentityServerSection() { - const Field = sdk.getComponent('elements.Field'); - const classes = classNames({ - "mx_ServerConfig_identityServer": true, - "mx_ServerConfig_identityServer_shown": this.state.showIdentityServer, - }); - return
- {_t("Enter your custom identity server URL What does this mean?", {}, { - a: sub => - {sub} - , - })} - -
; - } - render() { const AccessibleButton = sdk.getComponent('elements.AccessibleButton'); @@ -283,7 +216,6 @@ export default class ServerConfig extends React.PureComponent {

{_t("Other servers")}

{errorText} {this._renderHomeserverSection()} - {this._renderIdentityServerSection()} {submitButton} ); From 225d5414871c06a5ece90365e6e808924deaeec3 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Wed, 25 Nov 2020 09:19:08 +0000 Subject: [PATCH 084/319] Extend Field and InfoDialog with more configurability --- src/components/views/dialogs/InfoDialog.js | 2 ++ src/components/views/elements/Field.tsx | 27 ++++++++++++++++------ 2 files changed, 22 insertions(+), 7 deletions(-) diff --git a/src/components/views/dialogs/InfoDialog.js b/src/components/views/dialogs/InfoDialog.js index 8125bc3edd..97ae968ff3 100644 --- a/src/components/views/dialogs/InfoDialog.js +++ b/src/components/views/dialogs/InfoDialog.js @@ -31,6 +31,7 @@ export default class InfoDialog extends React.Component { onFinished: PropTypes.func, hasCloseButton: PropTypes.bool, onKeyDown: PropTypes.func, + fixedWidth: PropTypes.bool, }; static defaultProps = { @@ -54,6 +55,7 @@ export default class InfoDialog extends React.Component { contentId='mx_Dialog_content' hasCancel={this.props.hasCloseButton} onKeyDown={this.props.onKeyDown} + fixedWidth={this.props.fixedWidth} >
{ this.props.description } diff --git a/src/components/views/elements/Field.tsx b/src/components/views/elements/Field.tsx index 58bd5226b6..4335cc46ac 100644 --- a/src/components/views/elements/Field.tsx +++ b/src/components/views/elements/Field.tsx @@ -61,6 +61,10 @@ interface IProps { tooltipClassName?: string; // If specified, an additional class name to apply to the field container className?: string; + // On what events should validation occur; by default on all + validateOnFocus?: boolean; + validateOnBlur?: boolean; + validateOnChange?: boolean; // All other props pass through to the . } @@ -100,6 +104,9 @@ export default class Field extends React.PureComponent { public static readonly defaultProps = { element: "input", type: "text", + validateOnFocus: true, + validateOnBlur: true, + validateOnChange: true, }; /* @@ -137,9 +144,11 @@ export default class Field extends React.PureComponent { this.setState({ focused: true, }); - this.validate({ - focused: true, - }); + if (this.props.validateOnFocus) { + this.validate({ + focused: true, + }); + } // Parent component may have supplied its own `onFocus` as well if (this.props.onFocus) { this.props.onFocus(ev); @@ -147,7 +156,9 @@ export default class Field extends React.PureComponent { }; private onChange = (ev) => { - this.validateOnChange(); + if (this.props.validateOnChange) { + this.validateOnChange(); + } // Parent component may have supplied its own `onChange` as well if (this.props.onChange) { this.props.onChange(ev); @@ -158,9 +169,11 @@ export default class Field extends React.PureComponent { this.setState({ focused: false, }); - this.validate({ - focused: false, - }); + if (this.props.validateOnBlur) { + this.validate({ + focused: false, + }); + } // Parent component may have supplied its own `onBlur` as well if (this.props.onBlur) { this.props.onBlur(ev); From 6a315e80b61f958b7d940a61fdc4ea3939294c47 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Wed, 25 Nov 2020 09:24:24 +0000 Subject: [PATCH 085/319] Improve auth error messages --- src/components/structures/auth/Login.tsx | 4 ++-- src/components/structures/auth/Registration.tsx | 2 ++ src/components/views/auth/PasswordLogin.tsx | 4 ++-- src/components/views/auth/RegistrationForm.tsx | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/components/structures/auth/Login.tsx b/src/components/structures/auth/Login.tsx index cb09ade895..f50f2167b5 100644 --- a/src/components/structures/auth/Login.tsx +++ b/src/components/structures/auth/Login.tsx @@ -476,8 +476,8 @@ export default class LoginComponent extends React.PureComponent errCode = "HTTP " + err.httpStatus; } - let errorText: ReactNode = _t("Error: Problem communicating with the given homeserver.") + - (errCode ? " (" + errCode + ")" : ""); + let errorText: ReactNode = _t("There was a problem communicating with the homeserver, " + + "please try again later.") + (errCode ? " (" + errCode + ")" : ""); if (err.cors === 'rejected') { if (window.location.protocol === 'https:' && diff --git a/src/components/structures/auth/Registration.tsx b/src/components/structures/auth/Registration.tsx index a31a07a96b..f954c50b13 100644 --- a/src/components/structures/auth/Registration.tsx +++ b/src/components/structures/auth/Registration.tsx @@ -366,6 +366,8 @@ export default class Registration extends React.Component { if (!msisdnAvailable) { msg = _t('This server does not support authentication with a phone number.'); } + } else if (response.errcode === "M_USER_IN_USE") { + msg = _t("That username already exists, please try another."); } this.setState({ busy: false, diff --git a/src/components/views/auth/PasswordLogin.tsx b/src/components/views/auth/PasswordLogin.tsx index 80384ba26e..84e583c3a5 100644 --- a/src/components/views/auth/PasswordLogin.tsx +++ b/src/components/views/auth/PasswordLogin.tsx @@ -1,5 +1,5 @@ /* -Copyright 2015, 2016, 2017, 2019 New Vector Ltd. +Copyright 2015, 2016, 2017, 2019 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. @@ -293,7 +293,7 @@ export default class PasswordLogin extends React.PureComponent { }, { key: "number", test: ({ value }) => !value || PHONE_NUMBER_REGEX.test(value), - invalid: () => _t("Doesn't look like a valid phone number"), + invalid: () => _t("That phone number doesn't look quite right, please check and try again"), }, ], }); diff --git a/src/components/views/auth/RegistrationForm.tsx b/src/components/views/auth/RegistrationForm.tsx index b005c8e0e2..8c8103fd09 100644 --- a/src/components/views/auth/RegistrationForm.tsx +++ b/src/components/views/auth/RegistrationForm.tsx @@ -346,7 +346,7 @@ export default class RegistrationForm extends React.PureComponent !value || phoneNumberLooksValid(value), - invalid: () => _t("Doesn't look like a valid phone number"), + invalid: () => _t("That phone number doesn't look quite right, please check and try again"), }, ], }); From 758b47c64dfabdce3149b18de4d252b02933e55d Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Wed, 25 Nov 2020 09:46:56 +0000 Subject: [PATCH 086/319] Replace *ServerConfig and SignInToText with ServerPicker --- res/css/_components.scss | 4 +- res/css/views/auth/_AuthBody.scss | 8 +- res/css/views/auth/_ServerConfig.scss | 25 -- res/css/views/auth/_ServerTypeSelector.scss | 69 ------ .../views/dialogs/_ServerPickerDialog.scss | 78 ++++++ res/css/views/elements/_SSOButtons.scss | 12 +- res/css/views/elements/_ServerPicker.scss | 88 +++++++ res/img/element-icons/i.svg | 3 + .../structures/auth/ForgotPassword.js | 74 +----- src/components/structures/auth/Login.tsx | 68 +----- .../structures/auth/Registration.tsx | 199 ++-------------- .../views/auth/ModularServerConfig.js | 124 ---------- src/components/views/auth/ServerConfig.js | 223 ------------------ .../views/auth/ServerTypeSelector.js | 153 ------------ src/components/views/auth/SignInToText.js | 62 ----- .../views/dialogs/ServerPickerDialog.tsx | 203 ++++++++++++++++ .../views/elements/ServerPicker.tsx | 94 ++++++++ src/i18n/strings/en_EN.json | 40 ++-- 18 files changed, 527 insertions(+), 1000 deletions(-) delete mode 100644 res/css/views/auth/_ServerConfig.scss delete mode 100644 res/css/views/auth/_ServerTypeSelector.scss create mode 100644 res/css/views/dialogs/_ServerPickerDialog.scss create mode 100644 res/css/views/elements/_ServerPicker.scss create mode 100644 res/img/element-icons/i.svg delete mode 100644 src/components/views/auth/ModularServerConfig.js delete mode 100644 src/components/views/auth/ServerConfig.js delete mode 100644 src/components/views/auth/ServerTypeSelector.js delete mode 100644 src/components/views/auth/SignInToText.js create mode 100644 src/components/views/dialogs/ServerPickerDialog.tsx create mode 100644 src/components/views/elements/ServerPicker.tsx diff --git a/res/css/_components.scss b/res/css/_components.scss index 53ca14de4a..707f73247d 100644 --- a/res/css/_components.scss +++ b/res/css/_components.scss @@ -45,8 +45,6 @@ @import "./views/auth/_InteractiveAuthEntryComponents.scss"; @import "./views/auth/_LanguageSelector.scss"; @import "./views/auth/_PassphraseField.scss"; -@import "./views/auth/_ServerConfig.scss"; -@import "./views/auth/_ServerTypeSelector.scss"; @import "./views/auth/_Welcome.scss"; @import "./views/avatars/_BaseAvatar.scss"; @import "./views/avatars/_DecoratedRoomAvatar.scss"; @@ -84,6 +82,7 @@ @import "./views/dialogs/_RoomUpgradeDialog.scss"; @import "./views/dialogs/_RoomUpgradeWarningDialog.scss"; @import "./views/dialogs/_ServerOfflineDialog.scss"; +@import "./views/dialogs/_ServerPickerDialog.scss"; @import "./views/dialogs/_SetEmailDialog.scss"; @import "./views/dialogs/_SettingsDialog.scss"; @import "./views/dialogs/_ShareDialog.scss"; @@ -126,6 +125,7 @@ @import "./views/elements/_RoleButton.scss"; @import "./views/elements/_RoomAliasField.scss"; @import "./views/elements/_SSOButtons.scss"; +@import "./views/elements/_ServerPicker.scss"; @import "./views/elements/_Slider.scss"; @import "./views/elements/_Spinner.scss"; @import "./views/elements/_StyledCheckbox.scss"; diff --git a/res/css/views/auth/_AuthBody.scss b/res/css/views/auth/_AuthBody.scss index 67c8df0fa8..8f0c758e7a 100644 --- a/res/css/views/auth/_AuthBody.scss +++ b/res/css/views/auth/_AuthBody.scss @@ -37,7 +37,7 @@ limitations under the License. color: $authpage-primary-color; } - h4 { + h3.mx_AuthBody_centered { text-align: center; } @@ -100,12 +100,6 @@ limitations under the License. } } -.mx_AuthBody_editServerDetails { - padding-left: 1em; - font-size: $font-12px; - font-weight: normal; -} - .mx_AuthBody_fieldRow { display: flex; margin-bottom: 10px; diff --git a/res/css/views/auth/_ServerConfig.scss b/res/css/views/auth/_ServerConfig.scss deleted file mode 100644 index 573171e4e7..0000000000 --- a/res/css/views/auth/_ServerConfig.scss +++ /dev/null @@ -1,25 +0,0 @@ -/* -Copyright 2015, 2016 OpenMarket Ltd -Copyright 2019 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_ServerConfig_help:link { - opacity: 0.8; -} - -.mx_ServerConfig_error { - display: block; - color: $warning-color; -} diff --git a/res/css/views/auth/_ServerTypeSelector.scss b/res/css/views/auth/_ServerTypeSelector.scss deleted file mode 100644 index fbd3d2655d..0000000000 --- a/res/css/views/auth/_ServerTypeSelector.scss +++ /dev/null @@ -1,69 +0,0 @@ -/* -Copyright 2019 New Vector Ltd - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -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_ServerTypeSelector { - display: flex; - margin-bottom: 28px; -} - -.mx_ServerTypeSelector_type { - margin: 0 5px; -} - -.mx_ServerTypeSelector_type:first-child { - margin-left: 0; -} - -.mx_ServerTypeSelector_type:last-child { - margin-right: 0; -} - -.mx_ServerTypeSelector_label { - text-align: center; - font-weight: 600; - color: $authpage-primary-color; - margin: 8px 0; -} - -.mx_ServerTypeSelector_type .mx_AccessibleButton { - padding: 10px; - border: 1px solid $input-border-color; - border-radius: 4px; -} - -.mx_ServerTypeSelector_type.mx_ServerTypeSelector_type_selected .mx_AccessibleButton { - border-color: $input-valid-border-color; -} - -.mx_ServerTypeSelector_logo { - display: flex; - justify-content: center; - height: 18px; - margin-bottom: 12px; - font-weight: 600; - color: $authpage-primary-color; -} - -.mx_ServerTypeSelector_logo > div { - display: flex; - width: 70%; - align-items: center; - justify-content: space-evenly; -} - -.mx_ServerTypeSelector_description { - font-size: $font-10px; -} diff --git a/res/css/views/dialogs/_ServerPickerDialog.scss b/res/css/views/dialogs/_ServerPickerDialog.scss new file mode 100644 index 0000000000..b01b49d7af --- /dev/null +++ b/res/css/views/dialogs/_ServerPickerDialog.scss @@ -0,0 +1,78 @@ +/* +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_ServerPickerDialog { + width: 468px; + box-sizing: border-box; + + .mx_Dialog_content { + margin-bottom: 0; + + > p { + color: $secondary-fg-color; + font-size: $font-14px; + margin: 16px 0; + + &:first-of-type { + margin-bottom: 40px; + } + + &:last-of-type { + margin: 0 24px 24px; + } + } + + > h4 { + font-size: $font-15px; + font-weight: $font-semi-bold; + color: $secondary-fg-color; + margin-left: 8px; + } + + > a { + color: $accent-color; + margin-left: 8px; + } + } + + .mx_ServerPickerDialog_otherHomeserverRadio { + input[type="radio"] + div { + margin-top: auto; + margin-bottom: auto; + } + } + + .mx_ServerPickerDialog_otherHomeserver { + border-top: none; + border-left: none; + border-right: none; + border-radius: unset; + + > input { + padding-left: 0; + } + + > label { + margin-left: 0; + } + } + + .mx_AccessibleButton_kind_primary { + width: calc(100% - 64px); + margin: 0 8px; + padding: 15px 18px; + } +} diff --git a/res/css/views/elements/_SSOButtons.scss b/res/css/views/elements/_SSOButtons.scss index 8dc5d30257..f762468c7f 100644 --- a/res/css/views/elements/_SSOButtons.scss +++ b/res/css/views/elements/_SSOButtons.scss @@ -20,12 +20,15 @@ limitations under the License. .mx_SSOButton { position: relative; + width: 100%; + padding-left: 32px; + padding-right: 32px; > img { object-fit: contain; position: absolute; - left: 12px; - top: 12px; + left: 8px; + top: 4px; } } @@ -34,6 +37,11 @@ limitations under the License. width: 50px; // 48px + 1px border on all sides height: 50px; // 48px + 1px border on all sides + > img { + left: 12px; + top: 12px; + } + & + .mx_SSOButton_mini { margin-left: 24px; } diff --git a/res/css/views/elements/_ServerPicker.scss b/res/css/views/elements/_ServerPicker.scss new file mode 100644 index 0000000000..d3d56a5cd7 --- /dev/null +++ b/res/css/views/elements/_ServerPicker.scss @@ -0,0 +1,88 @@ +/* +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_ServerPicker { + margin-bottom: 14px; + border-bottom: 1px solid rgba(141, 151, 165, 0.2); + display: grid; + grid-template-columns: auto min-content; + grid-template-rows: auto auto auto; + font-size: $font-14px; + line-height: $font-20px; + + > h3 { + font-weight: $font-semi-bold; + margin: 0 0 20px; + grid-column: 1; + grid-row: 1; + } + + .mx_ServerPicker_help { + width: 20px; + height: 20px; + background-color: $icon-button-color; + border-radius: 10px; + grid-column: 2; + grid-row: 1; + margin-left: auto; + text-align: center; + color: #ffffff; + font-size: 16px; + position: relative; + + &::before { + content: ''; + width: 24px; + height: 24px; + position: absolute; + top: -2px; + left: -2px; + mask-position: center; + mask-size: contain; + mask-repeat: no-repeat; + mask-image: url('$(res)/img/element-icons/i.svg'); + background: #ffffff; + } + } + + .mx_ServerPicker_server { + color: $primary-fg-color; + grid-column: 1; + grid-row: 2; + margin-bottom: 16px; + } + + .mx_AccessibleButton_kind_link { + padding: 0; + font-size: inherit; + grid-column: 2; + grid-row: 2; + } + + .mx_ServerPicker_desc { + margin-top: -12px; + color: $tertiary-fg-color; + grid-column: 1 / 2; + grid-row: 3; + margin-bottom: 16px; + } +} + +.mx_ServerPicker_helpDialog { + .mx_Dialog_content { + width: 456px; + } +} diff --git a/res/img/element-icons/i.svg b/res/img/element-icons/i.svg new file mode 100644 index 0000000000..6674f1ed8d --- /dev/null +++ b/res/img/element-icons/i.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/components/structures/auth/ForgotPassword.js b/src/components/structures/auth/ForgotPassword.js index e3bae7e38d..5a39fe9fd9 100644 --- a/src/components/structures/auth/ForgotPassword.js +++ b/src/components/structures/auth/ForgotPassword.js @@ -21,16 +21,14 @@ import PropTypes from 'prop-types'; import { _t } from '../../../languageHandler'; import * as sdk from '../../../index'; import Modal from "../../../Modal"; -import SdkConfig from "../../../SdkConfig"; import PasswordReset from "../../../PasswordReset"; import AutoDiscoveryUtils, {ValidatedServerConfig} from "../../../utils/AutoDiscoveryUtils"; import classNames from 'classnames'; import AuthPage from "../../views/auth/AuthPage"; import CountlyAnalytics from "../../../CountlyAnalytics"; +import ServerPicker from "../../views/elements/ServerPicker"; // Phases -// Show controls to configure server details -const PHASE_SERVER_DETAILS = 0; // Show the forgot password inputs const PHASE_FORGOT = 1; // Email is in the process of being sent @@ -172,20 +170,6 @@ export default class ForgotPassword extends React.Component { }); }; - onServerDetailsNextPhaseClick = async () => { - this.setState({ - phase: PHASE_FORGOT, - }); - }; - - onEditServerDetailsClick = ev => { - ev.preventDefault(); - ev.stopPropagation(); - this.setState({ - phase: PHASE_SERVER_DETAILS, - }); - }; - onLoginClick = ev => { ev.preventDefault(); ev.stopPropagation(); @@ -200,23 +184,6 @@ export default class ForgotPassword extends React.Component { }); } - renderServerDetails() { - const ServerConfig = sdk.getComponent("auth.ServerConfig"); - - if (SdkConfig.get()['disable_custom_urls']) { - return null; - } - - return ; - } - renderForgot() { const Field = sdk.getComponent('elements.Field'); @@ -240,41 +207,13 @@ export default class ForgotPassword extends React.Component { ); } - let yourMatrixAccountText = _t('Your Matrix account on %(serverName)s', { - serverName: this.props.serverConfig.hsName, - }); - if (this.props.serverConfig.hsNameIsDifferent) { - const TextWithTooltip = sdk.getComponent("elements.TextWithTooltip"); - - yourMatrixAccountText = _t('Your Matrix account on ', {}, { - 'underlinedServerName': () => { - return ; - }, - }); - } - - // If custom URLs are allowed, wire up the server details edit link. - let editLink = null; - if (!SdkConfig.get()['disable_custom_urls']) { - editLink = - {_t('Change')} - ; - } - return
{errorText} {serverDeadSection} -

- {yourMatrixAccountText} - {editLink} -

+
loginIncorrect: false, canTryLogin: true, - phase: Phase.Login, flows: null, username: "", @@ -369,20 +356,6 @@ export default class LoginComponent extends React.PureComponent } }; - private onServerDetailsNextPhaseClick = () => { - this.setState({ - phase: Phase.Login, - }); - }; - - private onEditServerDetailsClick = ev => { - ev.preventDefault(); - ev.stopPropagation(); - this.setState({ - phase: Phase.ServerDetails, - }); - }; - private async initLoginLogic({hsUrl, isUrl}: ValidatedServerConfig) { let isDefaultServer = false; if (this.props.serverConfig.isDefault @@ -423,13 +396,6 @@ export default class LoginComponent extends React.PureComponent busy: false, ...AutoDiscoveryUtils.authComponentStateForError(e), }); - if (this.state.serverErrorIsFatal) { - // Server is dead: show server details prompt instead - this.setState({ - phase: Phase.ServerDetails, - }); - return; - } } loginLogic.getFlows().then((flows) => { @@ -515,21 +481,6 @@ export default class LoginComponent extends React.PureComponent return errorText; } - private renderServerComponent() { - if (SdkConfig.get()['disable_custom_urls']) { - return null; - } - - return ; - } - renderLoginComponentForFlows() { if (!this.state.flows) return null; @@ -539,18 +490,8 @@ export default class LoginComponent extends React.PureComponent "m.login.sso", ]; - let onEditServerDetailsClick = null; - // If custom URLs are allowed, wire up the server details edit link. - if (!SdkConfig.get()['disable_custom_urls']) { - onEditServerDetailsClick = this.onEditServerDetailsClick; - } - const flows = order.map(type => this.state.flows.find(flow => flow.type === type)).filter(Boolean); return - { flows.map(flow => { const stepRenderer = this.stepRendererMap[flow.type]; return { stepRenderer() } @@ -654,7 +595,10 @@ export default class LoginComponent extends React.PureComponent { errorTextSection } { serverDeadSection } - { this.renderServerComponent() } + { this.renderLoginComponentForFlows() } { footer } diff --git a/src/components/structures/auth/Registration.tsx b/src/components/structures/auth/Registration.tsx index f954c50b13..bf3e4a51d3 100644 --- a/src/components/structures/auth/Registration.tsx +++ b/src/components/structures/auth/Registration.tsx @@ -22,7 +22,6 @@ import * as sdk from '../../../index'; import { _t, _td } from '../../../languageHandler'; import SdkConfig from '../../../SdkConfig'; import { messageForResourceLimitError } from '../../../utils/ErrorUtils'; -import * as ServerType from '../../views/auth/ServerTypeSelector'; import AutoDiscoveryUtils, {ValidatedServerConfig} from "../../../utils/AutoDiscoveryUtils"; import classNames from "classnames"; import * as Lifecycle from '../../../Lifecycle'; @@ -31,14 +30,7 @@ import AuthPage from "../../views/auth/AuthPage"; import Login, {ISSOFlow} from "../../../Login"; import dis from "../../../dispatcher/dispatcher"; import SSOButtons from "../../views/elements/SSOButtons"; - -// Phases -enum Phase { - // Show controls to configure server details - ServerDetails = 0, - // Show the appropriate registration flow(s) for the server - Registration = 1, -} +import ServerPicker from '../../views/elements/ServerPicker'; interface IProps { serverConfig: ValidatedServerConfig; @@ -94,9 +86,6 @@ interface IState { // If set, we've registered but are not going to log // the user in to their new account automatically. completedNoSignin: boolean; - serverType: ServerType.FREE | ServerType.PREMIUM | ServerType.ADVANCED; - // Phase of the overall registration dialog. - phase: Phase; flows: { stages: string[]; }[]; @@ -127,7 +116,6 @@ export default class Registration extends React.Component { constructor(props) { super(props); - const serverType = ServerType.getTypeFromServerConfig(this.props.serverConfig); this.state = { busy: false, errorText: null, @@ -135,8 +123,6 @@ export default class Registration extends React.Component { email: this.props.email, }, doingUIAuth: Boolean(this.props.sessionId), - serverType, - phase: Phase.Registration, flows: null, completedNoSignin: false, serverIsAlive: true, @@ -161,61 +147,8 @@ export default class Registration extends React.Component { newProps.serverConfig.isUrl === this.props.serverConfig.isUrl) return; this.replaceClient(newProps.serverConfig); - - // Handle cases where the user enters "https://matrix.org" for their server - // from the advanced option - we should default to FREE at that point. - const serverType = ServerType.getTypeFromServerConfig(newProps.serverConfig); - if (serverType !== this.state.serverType) { - // Reset the phase to default phase for the server type. - this.setState({ - serverType, - phase: Registration.getDefaultPhaseForServerType(serverType), - }); - } } - private static getDefaultPhaseForServerType(type: IState["serverType"]) { - switch (type) { - case ServerType.FREE: { - // Move directly to the registration phase since the server - // details are fixed. - return Phase.Registration; - } - case ServerType.PREMIUM: - case ServerType.ADVANCED: - return Phase.ServerDetails; - } - } - - private onServerTypeChange = (type: IState["serverType"]) => { - this.setState({ - serverType: type, - }); - - // When changing server types, set the HS / IS URLs to reasonable defaults for the - // the new type. - switch (type) { - case ServerType.FREE: { - const { serverConfig } = ServerType.TYPES.FREE; - this.props.onServerConfigChange(serverConfig); - break; - } - case ServerType.PREMIUM: - // We can accept whatever server config was the default here as this essentially - // acts as a slightly different "custom server"/ADVANCED option. - break; - case ServerType.ADVANCED: - // Use the default config from the config - this.props.onServerConfigChange(SdkConfig.get()["validated_server_config"]); - break; - } - - // Reset the phase to default phase for the server type. - this.setState({ - phase: Registration.getDefaultPhaseForServerType(type), - }); - }; - private async replaceClient(serverConfig: ValidatedServerConfig) { this.setState({ errorText: null, @@ -456,21 +389,6 @@ export default class Registration extends React.Component { this.setState({ busy: false, doingUIAuth: false, - phase: Phase.Registration, - }); - }; - - private onServerDetailsNextPhaseClick = async () => { - this.setState({ - phase: Phase.Registration, - }); - }; - - private onEditServerDetailsClick = ev => { - ev.preventDefault(); - ev.stopPropagation(); - this.setState({ - phase: Phase.ServerDetails, }); }; @@ -520,72 +438,19 @@ export default class Registration extends React.Component { }; private renderServerComponent() { - const ServerTypeSelector = sdk.getComponent("auth.ServerTypeSelector"); - const ServerConfig = sdk.getComponent("auth.ServerConfig"); - const ModularServerConfig = sdk.getComponent("auth.ModularServerConfig"); - if (SdkConfig.get()['disable_custom_urls']) { return null; } - // Hide the server picker once the user is doing UI Auth unless encountered a fatal server error - if (this.state.phase !== Phase.ServerDetails && this.state.doingUIAuth && !this.state.serverErrorIsFatal) { - return null; - } - - // If we're on a different phase, we only show the server type selector, - // which is always shown if we allow custom URLs at all. - // (if there's a fatal server error, we need to show the full server - // config as the user may need to change servers to resolve the error). - if (this.state.phase !== Phase.ServerDetails && !this.state.serverErrorIsFatal) { - return
- -
; - } - - let serverDetails = null; - switch (this.state.serverType) { - case ServerType.FREE: - break; - case ServerType.PREMIUM: - serverDetails = ; - break; - case ServerType.ADVANCED: - serverDetails = ; - break; - } - - return
- - {serverDetails} -
; + return ; } private renderRegisterComponent() { - if (this.state.phase !== Phase.Registration) { - return null; - } - const InteractiveAuth = sdk.getComponent('structures.InteractiveAuth'); const Spinner = sdk.getComponent('elements.Spinner'); const RegistrationForm = sdk.getComponent('auth.RegistrationForm'); @@ -609,17 +474,25 @@ export default class Registration extends React.Component {
; } else if (this.state.flows.length) { + let continueWithSection; + const providers = this.state.ssoFlow["org.matrix.msc2858.identity_providers"] + || this.state.ssoFlow.identity_providers || []; + // when there is only a single (or 0) providers we show a wide button with `Continue with X` text + if (providers.length > 1) { + continueWithSection =

{_t("Continue with")}

; + } + let ssoSection; if (this.state.ssoFlow) { ssoSection = -

{_t("Continue with")}

+ { continueWithSection } -

{_t("Or")}

+

{_t("Or")}

; } @@ -673,7 +546,7 @@ export default class Registration extends React.Component { // Only show the 'go back' button if you're not looking at the form let goBack; - if (this.state.phase !== Phase.Registration || this.state.doingUIAuth) { + if (this.state.doingUIAuth) { goBack = { _t('Go back') } ; @@ -719,47 +592,11 @@ export default class Registration extends React.Component { { regDoneText }
; } else { - let yourMatrixAccountText: ReactNode = _t('Create your Matrix account on %(serverName)s', { - serverName: this.props.serverConfig.hsName, - }); - if (this.props.serverConfig.hsNameIsDifferent) { - const TextWithTooltip = sdk.getComponent("elements.TextWithTooltip"); - - yourMatrixAccountText = _t('Create your Matrix account on ', {}, { - 'underlinedServerName': () => { - return ; - }, - }); - } - - // If custom URLs are allowed, user is not doing UIA flows and they haven't selected the Free server type, - // wire up the server details edit link. - let editLink = null; - if (!SdkConfig.get()['disable_custom_urls'] && - this.state.serverType !== ServerType.FREE && - !this.state.doingUIAuth - ) { - editLink = ( - - {_t('Change')} - - ); - } - body =

{ _t('Create account') }

{ errorText } { serverDeadSection } { this.renderServerComponent() } - { this.state.phase !== Phase.ServerDetails &&

- {yourMatrixAccountText} - {editLink} -

} { this.renderRegisterComponent() } { goBack } { signIn } diff --git a/src/components/views/auth/ModularServerConfig.js b/src/components/views/auth/ModularServerConfig.js deleted file mode 100644 index 28fd16379d..0000000000 --- a/src/components/views/auth/ModularServerConfig.js +++ /dev/null @@ -1,124 +0,0 @@ -/* -Copyright 2019 New Vector Ltd - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -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 * as sdk from '../../../index'; -import { _t } from '../../../languageHandler'; -import {ValidatedServerConfig} from "../../../utils/AutoDiscoveryUtils"; -import SdkConfig from "../../../SdkConfig"; -import AutoDiscoveryUtils from "../../../utils/AutoDiscoveryUtils"; -import * as ServerType from '../../views/auth/ServerTypeSelector'; -import ServerConfig from "./ServerConfig"; - -const MODULAR_URL = 'https://element.io/matrix-services' + - '?utm_source=element-web&utm_medium=web&utm_campaign=element-web-authentication'; - -// TODO: TravisR - Can this extend ServerConfig for most things? - -/* - * Configure the Modular server name. - * - * This is a variant of ServerConfig with only the HS field and different body - * text that is specific to the Modular case. - */ -export default class ModularServerConfig extends ServerConfig { - static propTypes = ServerConfig.propTypes; - - async validateAndApplyServer(hsUrl, isUrl) { - // Always try and use the defaults first - const defaultConfig: ValidatedServerConfig = SdkConfig.get()["validated_server_config"]; - if (defaultConfig.hsUrl === hsUrl && defaultConfig.isUrl === isUrl) { - this.setState({busy: false, errorText: ""}); - this.props.onServerConfigChange(defaultConfig); - return defaultConfig; - } - - this.setState({ - hsUrl, - isUrl, - busy: true, - errorText: "", - }); - - try { - const result = await AutoDiscoveryUtils.validateServerConfigWithStaticUrls(hsUrl, isUrl); - this.setState({busy: false, errorText: ""}); - this.props.onServerConfigChange(result); - return result; - } catch (e) { - console.error(e); - let message = _t("Unable to validate homeserver/identity server"); - if (e.translatedMessage) { - message = e.translatedMessage; - } - this.setState({ - busy: false, - errorText: message, - }); - - return null; - } - } - - async validateServer() { - // TODO: Do we want to support .well-known lookups here? - // If for some reason someone enters "matrix.org" for a URL, we could do a lookup to - // find their homeserver without demanding they use "https://matrix.org" - return this.validateAndApplyServer(this.state.hsUrl, ServerType.TYPES.PREMIUM.identityServerUrl); - } - - render() { - const Field = sdk.getComponent('elements.Field'); - const AccessibleButton = sdk.getComponent('elements.AccessibleButton'); - - const submitButton = this.props.submitText - ? {this.props.submitText} - : null; - - return ( -
-

{_t("Your server")}

- {_t( - "Enter the location of your Element Matrix Services homeserver. It may use your own " + - "domain name or be a subdomain of element.io.", - {}, { - a: sub => - {sub} - , - }, - )} - -
- -
- {submitButton} - -
- ); - } -} diff --git a/src/components/views/auth/ServerConfig.js b/src/components/views/auth/ServerConfig.js deleted file mode 100644 index 448616af15..0000000000 --- a/src/components/views/auth/ServerConfig.js +++ /dev/null @@ -1,223 +0,0 @@ -/* -Copyright 2015, 2016 OpenMarket Ltd -Copyright 2019 New Vector Ltd -Copyright 2019 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 PropTypes from 'prop-types'; -import Modal from '../../../Modal'; -import * as sdk from '../../../index'; -import { _t } from '../../../languageHandler'; -import {ValidatedServerConfig} from "../../../utils/AutoDiscoveryUtils"; -import AutoDiscoveryUtils from "../../../utils/AutoDiscoveryUtils"; -import SdkConfig from "../../../SdkConfig"; -import CountlyAnalytics from "../../../CountlyAnalytics"; - -/* - * A pure UI component which displays the HS and IS to use. - */ - -export default class ServerConfig extends React.PureComponent { - static propTypes = { - onServerConfigChange: PropTypes.func.isRequired, - - // The current configuration that the user is expecting to change. - serverConfig: PropTypes.instanceOf(ValidatedServerConfig).isRequired, - - delayTimeMs: PropTypes.number, // time to wait before invoking onChanged - - // Called after the component calls onServerConfigChange - onAfterSubmit: PropTypes.func, - - // Optional text for the submit button. If falsey, no button will be shown. - submitText: PropTypes.string, - - // Optional class for the submit button. Only applies if the submit button - // is to be rendered. - submitClass: PropTypes.string, - }; - - static defaultProps = { - onServerConfigChange: function() {}, - delayTimeMs: 0, - }; - - constructor(props) { - super(props); - - this.state = { - busy: false, - errorText: "", - hsUrl: props.serverConfig.hsUrl, - isUrl: props.serverConfig.isUrl, - }; - - CountlyAnalytics.instance.track("onboarding_custom_server"); - } - - // TODO: [REACT-WARNING] Replace with appropriate lifecycle event - UNSAFE_componentWillReceiveProps(newProps) { // eslint-disable-line camelcase - if (newProps.serverConfig.hsUrl === this.state.hsUrl && - newProps.serverConfig.isUrl === this.state.isUrl) return; - - this.validateAndApplyServer(newProps.serverConfig.hsUrl, newProps.serverConfig.isUrl); - } - - async validateServer() { - // TODO: Do we want to support .well-known lookups here? - // If for some reason someone enters "matrix.org" for a URL, we could do a lookup to - // find their homeserver without demanding they use "https://matrix.org" - const result = this.validateAndApplyServer(this.state.hsUrl, this.state.isUrl); - if (!result) { - return result; - } - - return result; - } - - async validateAndApplyServer(hsUrl, isUrl) { - // Always try and use the defaults first - const defaultConfig: ValidatedServerConfig = SdkConfig.get()["validated_server_config"]; - if (defaultConfig.hsUrl === hsUrl && defaultConfig.isUrl === isUrl) { - this.setState({ - hsUrl: defaultConfig.hsUrl, - isUrl: defaultConfig.isUrl, - busy: false, - errorText: "", - }); - this.props.onServerConfigChange(defaultConfig); - return defaultConfig; - } - - this.setState({ - hsUrl, - isUrl, - busy: true, - errorText: "", - }); - - try { - const result = await AutoDiscoveryUtils.validateServerConfigWithStaticUrls(hsUrl, isUrl); - this.setState({busy: false, errorText: ""}); - this.props.onServerConfigChange(result); - return result; - } catch (e) { - console.error(e); - - const stateForError = AutoDiscoveryUtils.authComponentStateForError(e); - if (!stateForError.isFatalError) { - this.setState({ - busy: false, - }); - // carry on anyway - const result = await AutoDiscoveryUtils.validateServerConfigWithStaticUrls(hsUrl, isUrl, true); - this.props.onServerConfigChange(result); - return result; - } else { - let message = _t("Unable to validate homeserver/identity server"); - if (e.translatedMessage) { - message = e.translatedMessage; - } - this.setState({ - busy: false, - errorText: message, - }); - - return null; - } - } - } - - onHomeserverBlur = (ev) => { - this._hsTimeoutId = this._waitThenInvoke(this._hsTimeoutId, () => { - this.validateServer(); - }); - }; - - onHomeserverChange = (ev) => { - const hsUrl = ev.target.value; - this.setState({ hsUrl }); - }; - - onSubmit = async (ev) => { - ev.preventDefault(); - ev.stopPropagation(); - const result = await this.validateServer(); - if (!result) return; // Do not continue. - - if (this.props.onAfterSubmit) { - this.props.onAfterSubmit(); - } - }; - - _waitThenInvoke(existingTimeoutId, fn) { - if (existingTimeoutId) { - clearTimeout(existingTimeoutId); - } - return setTimeout(fn.bind(this), this.props.delayTimeMs); - } - - showHelpPopup = () => { - const CustomServerDialog = sdk.getComponent('auth.CustomServerDialog'); - Modal.createTrackedDialog('Custom Server Dialog', '', CustomServerDialog); - }; - - _renderHomeserverSection() { - const Field = sdk.getComponent('elements.Field'); - return
- {_t("Enter your custom homeserver URL What does this mean?", {}, { - a: sub => - {sub} - , - })} - -
; - } - - render() { - const AccessibleButton = sdk.getComponent('elements.AccessibleButton'); - - const errorText = this.state.errorText - ? {this.state.errorText} - : null; - - const submitButton = this.props.submitText - ? {this.props.submitText} - : null; - - return ( -
-

{_t("Other servers")}

- {errorText} - {this._renderHomeserverSection()} - {submitButton} -
- ); - } -} diff --git a/src/components/views/auth/ServerTypeSelector.js b/src/components/views/auth/ServerTypeSelector.js deleted file mode 100644 index 71e7ac7f0e..0000000000 --- a/src/components/views/auth/ServerTypeSelector.js +++ /dev/null @@ -1,153 +0,0 @@ -/* -Copyright 2019 New Vector Ltd - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -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 PropTypes from 'prop-types'; -import { _t } from '../../../languageHandler'; -import * as sdk from '../../../index'; -import classnames from 'classnames'; -import {ValidatedServerConfig} from "../../../utils/AutoDiscoveryUtils"; -import {makeType} from "../../../utils/TypeUtils"; - -const MODULAR_URL = 'https://element.io/matrix-services' + - '?utm_source=element-web&utm_medium=web&utm_campaign=element-web-authentication'; - -export const FREE = 'Free'; -export const PREMIUM = 'Premium'; -export const ADVANCED = 'Advanced'; - -export const TYPES = { - FREE: { - id: FREE, - label: () => _t('Free'), - logo: () => , - description: () => _t('Join millions for free on the largest public server'), - serverConfig: makeType(ValidatedServerConfig, { - hsUrl: "https://matrix-client.matrix.org", - hsName: "matrix.org", - hsNameIsDifferent: false, - isUrl: "https://vector.im", - }), - }, - PREMIUM: { - id: PREMIUM, - label: () => _t('Premium'), - logo: () => , - description: () => _t('Premium hosting for organisations Learn more', {}, { - a: sub => - {sub} - , - }), - identityServerUrl: "https://vector.im", - }, - ADVANCED: { - id: ADVANCED, - label: () => _t('Advanced'), - logo: () =>
- - {_t('Other')} -
, - description: () => _t('Find other public servers or use a custom server'), - }, -}; - -export function getTypeFromServerConfig(config) { - const {hsUrl} = config; - if (!hsUrl) { - return null; - } else if (hsUrl === TYPES.FREE.serverConfig.hsUrl) { - return FREE; - } else if (new URL(hsUrl).hostname.endsWith('.modular.im')) { - // This is an unlikely case to reach, as Modular defaults to hiding the - // server type selector. - return PREMIUM; - } else { - return ADVANCED; - } -} - -export default class ServerTypeSelector extends React.PureComponent { - static propTypes = { - // The default selected type. - selected: PropTypes.string, - // Handler called when the selected type changes. - onChange: PropTypes.func.isRequired, - }; - - constructor(props) { - super(props); - - const { - selected, - } = props; - - this.state = { - selected, - }; - } - - updateSelectedType(type) { - if (this.state.selected === type) { - return; - } - this.setState({ - selected: type, - }); - if (this.props.onChange) { - this.props.onChange(type); - } - } - - onClick = (e) => { - e.stopPropagation(); - const type = e.currentTarget.dataset.id; - this.updateSelectedType(type); - }; - - render() { - const AccessibleButton = sdk.getComponent('elements.AccessibleButton'); - - const serverTypes = []; - for (const type of Object.values(TYPES)) { - const { id, label, logo, description } = type; - const classes = classnames( - "mx_ServerTypeSelector_type", - `mx_ServerTypeSelector_type_${id}`, - { - "mx_ServerTypeSelector_type_selected": id === this.state.selected, - }, - ); - - serverTypes.push(
-
- {label()} -
- -
- {logo()} -
-
- {description()} -
-
-
); - } - - return
- {serverTypes} -
; - } -} diff --git a/src/components/views/auth/SignInToText.js b/src/components/views/auth/SignInToText.js deleted file mode 100644 index 7564096b7d..0000000000 --- a/src/components/views/auth/SignInToText.js +++ /dev/null @@ -1,62 +0,0 @@ -/* -Copyright 2019 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 {_t} from "../../../languageHandler"; -import * as sdk from "../../../index"; -import PropTypes from "prop-types"; -import {ValidatedServerConfig} from "../../../utils/AutoDiscoveryUtils"; - -export default class SignInToText extends React.PureComponent { - static propTypes = { - serverConfig: PropTypes.instanceOf(ValidatedServerConfig).isRequired, - onEditServerDetailsClick: PropTypes.func, - }; - - render() { - let signInToText = _t('Sign in to your Matrix account on %(serverName)s', { - serverName: this.props.serverConfig.hsName, - }); - if (this.props.serverConfig.hsNameIsDifferent) { - const TextWithTooltip = sdk.getComponent("elements.TextWithTooltip"); - - signInToText = _t('Sign in to your Matrix account on ', {}, { - 'underlinedServerName': () => { - return ; - }, - }); - } - - let editLink = null; - if (this.props.onEditServerDetailsClick) { - editLink = - {_t('Change')} - ; - } - - return

- {signInToText} - {editLink} -

; - } -} diff --git a/src/components/views/dialogs/ServerPickerDialog.tsx b/src/components/views/dialogs/ServerPickerDialog.tsx new file mode 100644 index 0000000000..8d3ea29be9 --- /dev/null +++ b/src/components/views/dialogs/ServerPickerDialog.tsx @@ -0,0 +1,203 @@ +/* +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 React, {createRef} from 'react'; + +import AutoDiscoveryUtils, {ValidatedServerConfig} from "../../../utils/AutoDiscoveryUtils"; +import BaseDialog from './BaseDialog'; +import { _t } from '../../../languageHandler'; +import AccessibleButton from "../elements/AccessibleButton"; +import SdkConfig from "../../../SdkConfig"; +import Field from "../elements/Field"; +import StyledRadioButton from "../elements/StyledRadioButton"; +import TextWithTooltip from "../elements/TextWithTooltip"; +import withValidation, {IFieldState} from "../elements/Validation"; + +interface IProps { + title?: string; + serverConfig: ValidatedServerConfig; + onFinished(config?: ValidatedServerConfig): void; +} + +interface IState { + defaultChosen: boolean; + otherHomeserver: string; +} + +export default class ServerPickerDialog extends React.PureComponent { + private readonly defaultServer: ValidatedServerConfig; + private readonly fieldRef = createRef(); + private validatedConf: ValidatedServerConfig; + + constructor(props) { + super(props); + + const config = SdkConfig.get(); + this.defaultServer = config["validated_server_config"] as ValidatedServerConfig; + this.state = { + defaultChosen: this.props.serverConfig.isDefault, + otherHomeserver: this.props.serverConfig.isDefault ? "" : this.props.serverConfig.hsUrl, + }; + } + + private onDefaultChosen = () => { + this.setState({ defaultChosen: true }); + }; + + private onOtherChosen = () => { + this.setState({ defaultChosen: false }); + }; + + private onHomeserverChange = (ev) => { + this.setState({ otherHomeserver: ev.target.value }); + }; + + // TODO: Do we want to support .well-known lookups here? + // If for some reason someone enters "matrix.org" for a URL, we could do a lookup to + // find their homeserver without demanding they use "https://matrix.org" + private validate = withValidation({ + deriveData: async ({ value: hsUrl }) => { + // Always try and use the defaults first + const defaultConfig: ValidatedServerConfig = SdkConfig.get()["validated_server_config"]; + if (defaultConfig.hsUrl === hsUrl) return {}; + + try { + this.validatedConf = await AutoDiscoveryUtils.validateServerConfigWithStaticUrls(hsUrl); + return {}; + } catch (e) { + console.error(e); + + const stateForError = AutoDiscoveryUtils.authComponentStateForError(e); + if (!stateForError.isFatalError) { + // carry on anyway + this.validatedConf = await AutoDiscoveryUtils.validateServerConfigWithStaticUrls(hsUrl, null, true); + return {}; + } else { + let error = _t("Unable to validate homeserver/identity server"); + if (e.translatedMessage) { + error = e.translatedMessage; + } + return { error }; + } + } + }, + rules: [ + { + key: "required", + test: ({ value, allowEmpty }) => allowEmpty || !!value, + invalid: () => _t("Specify a homeserver"), + }, { + key: "valid", + test: async function({ value }, { error }) { + if (!value) return true; + return !error; + }, + invalid: function({ error }) { + return error; + }, + }, + ], + }); + + private onHomeserverValidate = (fieldState: IFieldState) => this.validate(fieldState); + + private onSubmit = async (ev) => { + ev.preventDefault(); + + const valid = await this.fieldRef.current.validate({ allowEmpty: false }); + + if (!valid) { + this.fieldRef.current.focus(); + this.fieldRef.current.validate({ allowEmpty: false, focused: true }); + return; + } + + this.props.onFinished(this.validatedConf); // TODO verify this even works + }; + + public render() { + let text; + if (this.defaultServer.hsName === "matrix.org") { + text = _t("Matrix.org is the biggest public homeserver in the world, so it’s a good place for many."); + } + + let defaultServerName = this.defaultServer.hsName; + if (this.defaultServer.hsNameIsDifferent) { + defaultServerName = ( + + ); + } + + return +
+

+ {_t("We call the places you where you can host your account ‘homeservers’.")} {text} +

+ + + {defaultServerName} + + + + + +

+ {_t("Use your preferred Matrix homeserver if you have one, or host your own.")} +

+ + + {_t("Continue")} + + +

{_t("Learn more")}

+ + {_t("About homeservers")} + +
+
; + } +} diff --git a/src/components/views/elements/ServerPicker.tsx b/src/components/views/elements/ServerPicker.tsx new file mode 100644 index 0000000000..95ad9030b2 --- /dev/null +++ b/src/components/views/elements/ServerPicker.tsx @@ -0,0 +1,94 @@ +/* +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 React from 'react'; + +import AccessibleButton from "./AccessibleButton"; +import {ValidatedServerConfig} from "../../../utils/AutoDiscoveryUtils"; +import {_t} from "../../../languageHandler"; +import TextWithTooltip from "./TextWithTooltip"; +import SdkConfig from "../../../SdkConfig"; +import Modal from "../../../Modal"; +import ServerPickerDialog from "../dialogs/ServerPickerDialog"; +import InfoDialog from "../dialogs/InfoDialog"; + +interface IProps { + title?: string; + dialogTitle?: string; + serverConfig: ValidatedServerConfig; + onServerConfigChange?(config: ValidatedServerConfig): void; +} + +const showPickerDialog = ( + title: string, + serverConfig: ValidatedServerConfig, + onFinished: (config: ValidatedServerConfig) => void, +) => { + Modal.createTrackedDialog("Server Picker", "", ServerPickerDialog, { title, serverConfig, onFinished }); +}; + +const onHelpClick = () => { + Modal.createTrackedDialog('Custom Server Dialog', '', InfoDialog, { + // TODO + title: _t("Server Options"), + description: _t("You can use the custom server options to sign into other Matrix servers by specifying " + + "a different homeserver URL. This allows you to use Element with an existing Matrix account on " + + "a different homeserver."), + button: _t("Dismiss"), + hasCloseButton: false, + fixedWidth: false, + }, "mx_ServerPicker_helpDialog"); +}; + +const ServerPicker = ({ title, dialogTitle, serverConfig, onServerConfigChange }: IProps) => { + let editBtn; + if (!SdkConfig.get()["disable_custom_urls"] && onServerConfigChange) { + const onClick = () => { + showPickerDialog(dialogTitle, serverConfig, (config?: ValidatedServerConfig) => { + if (config) { + onServerConfigChange(config); + } + }); + }; + editBtn = + {_t("Edit")} + ; + } + + let serverName = serverConfig.hsName; + if (serverConfig.hsNameIsDifferent) { + serverName = ; + } + + let desc; + if (serverConfig.hsName === "matrix.org") { + desc = + {_t("Join millions for free on the largest public server")} + ; + } + + return
+

{title || _t("Homeserver")}

+ + {serverName} + { editBtn } + { desc } +
+} + +export default ServerPicker; diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index f45f4c60cd..04556b10ef 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -1887,6 +1887,10 @@ "This address is available to use": "This address is available to use", "This address is already in use": "This address is already in use", "Room directory": "Room directory", + "Server Options": "Server Options", + "You can use the custom server options to sign into other Matrix servers by specifying a different homeserver URL. This allows you to use Element with an existing Matrix account on a different homeserver.": "You can use the custom server options to sign into other Matrix servers by specifying a different homeserver URL. This allows you to use Element with an existing Matrix account on a different homeserver.", + "Join millions for free on the largest public server": "Join millions for free on the largest public server", + "Homeserver": "Homeserver", "Continue with %(provider)s": "Continue with %(provider)s", "Sign in with single sign-on": "Sign in with single sign-on", "And %(count)s more...|other": "And %(count)s more...", @@ -2143,6 +2147,15 @@ "A connection error occurred while trying to contact the server.": "A connection error occurred while trying to contact the server.", "The server is not configured to indicate what the problem is (CORS).": "The server is not configured to indicate what the problem is (CORS).", "Recent changes that have not yet been received": "Recent changes that have not yet been received", + "Unable to validate homeserver/identity server": "Unable to validate homeserver/identity server", + "Specify a homeserver": "Specify a homeserver", + "Matrix.org is the biggest public homeserver in the world, so it’s a good place for many.": "Matrix.org is the biggest public homeserver in the world, so it’s a good place for many.", + "Sign into your homeserver": "Sign into your homeserver", + "We call the places you where you can host your account ‘homeservers’.": "We call the places you where you can host your account ‘homeservers’.", + "Other homeserver": "Other homeserver", + "Use your preferred Matrix homeserver if you have one, or host your own.": "Use your preferred Matrix homeserver if you have one, or host your own.", + "Learn more": "Learn more", + "About homeservers": "About homeservers", "Sign out and remove encryption keys?": "Sign out and remove encryption keys?", "Clear Storage and Sign Out": "Clear Storage and Sign Out", "Send Logs": "Send Logs", @@ -2286,9 +2299,6 @@ "Code": "Code", "Submit": "Submit", "Start authentication": "Start authentication", - "Unable to validate homeserver/identity server": "Unable to validate homeserver/identity server", - "Enter the location of your Element Matrix Services homeserver. It may use your own domain name or be a subdomain of element.io.": "Enter the location of your Element Matrix Services homeserver. It may use your own domain name or be a subdomain of element.io.", - "Server Name": "Server Name", "Enter password": "Enter password", "Nice, strong password!": "Nice, strong password!", "Password is allowed, but unsafe": "Password is allowed, but unsafe", @@ -2296,14 +2306,13 @@ "Enter username": "Enter username", "Enter email address": "Enter email address", "Enter phone number": "Enter phone number", - "Doesn't look like a valid phone number": "Doesn't look like a valid phone number", + "That phone number doesn't look quite right, please check and try again": "That phone number doesn't look quite right, please check and try again", "Email": "Email", "Username": "Username", "Phone": "Phone", "Forgot password?": "Forgot password?", "Sign in with": "Sign in with", "Sign in": "Sign in", - "No identity server is configured so you cannot add an email address in order to reset your password in the future.": "No identity server is configured so you cannot add an email address in order to reset your password in the future.", "Use an email address to recover your account": "Use an email address to recover your account", "Enter email address (required on this homeserver)": "Enter email address (required on this homeserver)", "Passwords don't match": "Passwords don't match", @@ -2317,16 +2326,7 @@ "Use email to optionally be discoverable by existing contacts.": "Use email to optionally be discoverable by existing contacts.", "Enter your custom homeserver URL What does this mean?": "Enter your custom homeserver URL What does this mean?", "Homeserver URL": "Homeserver URL", - "Enter your custom identity server URL What does this mean?": "Enter your custom identity server URL What does this mean?", - "Identity Server URL": "Identity Server URL", "Other servers": "Other servers", - "Free": "Free", - "Join millions for free on the largest public server": "Join millions for free on the largest public server", - "Premium": "Premium", - "Premium hosting for organisations Learn more": "Premium hosting for organisations Learn more", - "Find other public servers or use a custom server": "Find other public servers or use a custom server", - "Sign in to your Matrix account on %(serverName)s": "Sign in to your Matrix account on %(serverName)s", - "Sign in to your Matrix account on ": "Sign in to your Matrix account on ", "Sign in with SSO": "Sign in with SSO", "Couldn't load page": "Couldn't load page", "You must register to use this functionality": "You must register to use this functionality", @@ -2480,12 +2480,9 @@ "A new password must be entered.": "A new password must be entered.", "New passwords must match each other.": "New passwords must match each other.", "Changing your password will reset any end-to-end encryption keys on all of your sessions, making encrypted chat history unreadable. Set up Key Backup or export your room keys from another session before resetting your password.": "Changing your password will reset any end-to-end encryption keys on all of your sessions, making encrypted chat history unreadable. Set up Key Backup or export your room keys from another session before resetting your password.", - "Your Matrix account on %(serverName)s": "Your Matrix account on %(serverName)s", - "Your Matrix account on ": "Your Matrix account on ", - "No identity server is configured: add one in server settings to reset your password.": "No identity server is configured: add one in server settings to reset your password.", - "Sign in instead": "Sign in instead", "A verification email will be sent to your inbox to confirm setting your new password.": "A verification email will be sent to your inbox to confirm setting your new password.", "Send Reset Email": "Send Reset Email", + "Sign in instead": "Sign in instead", "An email has been sent to %(emailAddress)s. Once you've followed the link it contains, click below.": "An email has been sent to %(emailAddress)s. Once you've followed the link it contains, click below.", "I have verified my email address": "I have verified my email address", "Your password has been reset.": "Your password has been reset.", @@ -2507,7 +2504,7 @@ "Please note you are logging into the %(hs)s server, not matrix.org.": "Please note you are logging into the %(hs)s server, not matrix.org.", "Failed to perform homeserver discovery": "Failed to perform homeserver discovery", "This homeserver doesn't offer any login flows which are supported by this client.": "This homeserver doesn't offer any login flows which are supported by this client.", - "Error: Problem communicating with the given homeserver.": "Error: Problem communicating with the given homeserver.", + "There was a problem communicating with the homeserver, please try again later.": "There was a problem communicating with the homeserver, please try again later.", "Can't connect to homeserver via HTTP when an HTTPS URL is in your browser bar. Either use HTTPS or enable unsafe scripts.": "Can't connect to homeserver via HTTP when an HTTPS URL is in your browser bar. Either use HTTPS or enable unsafe scripts.", "Can't connect to homeserver - please check your connectivity, ensure your homeserver's SSL certificate is trusted, and that a browser extension is not blocking requests.": "Can't connect to homeserver - please check your connectivity, ensure your homeserver's SSL certificate is trusted, and that a browser extension is not blocking requests.", "Syncing...": "Syncing...", @@ -2517,6 +2514,9 @@ "Unable to query for supported registration methods.": "Unable to query for supported registration methods.", "Registration has been disabled on this homeserver.": "Registration has been disabled on this homeserver.", "This server does not support authentication with a phone number.": "This server does not support authentication with a phone number.", + "That username already exists, please try another.": "That username already exists, please try another.", + "Host account on": "Host account on", + "Decide where your account is hosted": "Decide where your account is hosted", "Continue with": "Continue with", "Or": "Or", "Already have an account? Sign in here": "Already have an account? Sign in here", @@ -2525,8 +2525,6 @@ "Log in to your new account.": "Log in to your new account.", "You can now close this window or log in to your new account.": "You can now close this window or log in to your new account.", "Registration Successful": "Registration Successful", - "Create your Matrix account on %(serverName)s": "Create your Matrix account on %(serverName)s", - "Create your Matrix account on ": "Create your Matrix account on ", "Create account": "Create account", "Use Recovery Key or Passphrase": "Use Recovery Key or Passphrase", "Use Recovery Key": "Use Recovery Key", From 1b1c482f9cb55b1753993894bac527496862df25 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Wed, 25 Nov 2020 10:22:16 +0000 Subject: [PATCH 087/319] Iterate tests --- res/css/views/elements/_ServerPicker.scss | 2 +- .../structures/auth/Registration.tsx | 36 ++++----- .../views/elements/ServerPicker.tsx | 2 +- test/components/structures/auth/Login-test.js | 77 ++++++++++++++++--- .../structures/auth/Registration-test.js | 30 ++++++-- 5 files changed, 108 insertions(+), 39 deletions(-) diff --git a/res/css/views/elements/_ServerPicker.scss b/res/css/views/elements/_ServerPicker.scss index d3d56a5cd7..ae1e445a9f 100644 --- a/res/css/views/elements/_ServerPicker.scss +++ b/res/css/views/elements/_ServerPicker.scss @@ -65,7 +65,7 @@ limitations under the License. margin-bottom: 16px; } - .mx_AccessibleButton_kind_link { + .mx_ServerPicker_change { padding: 0; font-size: inherit; grid-column: 2; diff --git a/src/components/structures/auth/Registration.tsx b/src/components/structures/auth/Registration.tsx index bf3e4a51d3..750e4bb88b 100644 --- a/src/components/structures/auth/Registration.tsx +++ b/src/components/structures/auth/Registration.tsx @@ -437,19 +437,6 @@ export default class Registration extends React.Component { } }; - private renderServerComponent() { - if (SdkConfig.get()['disable_custom_urls']) { - return null; - } - - return ; - } - private renderRegisterComponent() { const InteractiveAuth = sdk.getComponent('structures.InteractiveAuth'); const Spinner = sdk.getComponent('elements.Spinner'); @@ -474,16 +461,16 @@ export default class Registration extends React.Component {
; } else if (this.state.flows.length) { - let continueWithSection; - const providers = this.state.ssoFlow["org.matrix.msc2858.identity_providers"] - || this.state.ssoFlow.identity_providers || []; - // when there is only a single (or 0) providers we show a wide button with `Continue with X` text - if (providers.length > 1) { - continueWithSection =

{_t("Continue with")}

; - } - let ssoSection; if (this.state.ssoFlow) { + let continueWithSection; + const providers = this.state.ssoFlow["org.matrix.msc2858.identity_providers"] + || this.state.ssoFlow["identity_providers"] || []; + // when there is only a single (or 0) providers we show a wide button with `Continue with X` text + if (providers.length > 1) { + continueWithSection =

{_t("Continue with")}

; + } + ssoSection = { continueWithSection } {

{ _t('Create account') }

{ errorText } { serverDeadSection } - { this.renderServerComponent() } + { this.renderRegisterComponent() } { goBack } { signIn } diff --git a/src/components/views/elements/ServerPicker.tsx b/src/components/views/elements/ServerPicker.tsx index 95ad9030b2..b7fe7e8e84 100644 --- a/src/components/views/elements/ServerPicker.tsx +++ b/src/components/views/elements/ServerPicker.tsx @@ -63,7 +63,7 @@ const ServerPicker = ({ title, dialogTitle, serverConfig, onServerConfigChange } } }); }; - editBtn = + editBtn = {_t("Edit")} ; } diff --git a/test/components/structures/auth/Login-test.js b/test/components/structures/auth/Login-test.js index 7ca210ff93..0631e26cbd 100644 --- a/test/components/structures/auth/Login-test.js +++ b/test/components/structures/auth/Login-test.js @@ -52,7 +52,7 @@ describe('Login', function() { // Set non-empty flows & matrixClient to get past the loading spinner root.setState({ - currentFlow: "m.login.password", + flows: [{ type: "m.login.password" }], }); const form = ReactTestUtils.findRenderedComponentWithType( @@ -61,10 +61,7 @@ describe('Login', function() { ); expect(form).toBeTruthy(); - const changeServerLink = ReactTestUtils.findRenderedDOMComponentWithClass( - root, - 'mx_AuthBody_editServerDetails', - ); + const changeServerLink = ReactTestUtils.findRenderedDOMComponentWithClass(root, 'mx_ServerPicker_change'); expect(changeServerLink).toBeTruthy(); }); @@ -77,7 +74,7 @@ describe('Login', function() { // Set non-empty flows & matrixClient to get past the loading spinner root.setState({ - currentFlow: "m.login.password", + flows: [{ type: "m.login.password" }], }); const form = ReactTestUtils.findRenderedComponentWithType( @@ -86,10 +83,70 @@ describe('Login', function() { ); expect(form).toBeTruthy(); - const changeServerLinks = ReactTestUtils.scryRenderedDOMComponentsWithClass( - root, - 'mx_AuthBody_editServerDetails', - ); + const changeServerLinks = ReactTestUtils.scryRenderedDOMComponentsWithClass(root, 'mx_ServerPicker_change'); expect(changeServerLinks).toHaveLength(0); }); + + it("should show SSO button if that flow is available", () => { + jest.spyOn(SdkConfig, "get").mockReturnValue({ + disable_custom_urls: true, + }); + + const root = render(); + + // Set non-empty flows & matrixClient to get past the loading spinner + root.setState({ + flows: [{ type: "m.login.sso" }], + }); + + const ssoButton = ReactTestUtils.findRenderedDOMComponentWithClass(root, "mx_SSOButton"); + expect(ssoButton).toBeTruthy(); + }); + + it("should show both SSO button and username+password if both are available", () => { + jest.spyOn(SdkConfig, "get").mockReturnValue({ + disable_custom_urls: true, + }); + + const root = render(); + + // Set non-empty flows & matrixClient to get past the loading spinner + root.setState({ + flows: [{ type: "m.login.password" }, { type: "m.login.sso" }], + }); + + const form = ReactTestUtils.findRenderedComponentWithType(root, sdk.getComponent('auth.PasswordLogin')); + expect(form).toBeTruthy(); + + const ssoButton = ReactTestUtils.findRenderedDOMComponentWithClass(root, "mx_SSOButton"); + expect(ssoButton).toBeTruthy(); + }); + + it("should show multiple SSO buttons if multiple identity_providers are available", () => { + jest.spyOn(SdkConfig, "get").mockReturnValue({ + disable_custom_urls: true, + }); + + const root = render(); + + // Set non-empty flows & matrixClient to get past the loading spinner + root.setState({ + flows: [{ + type: "m.login.sso", + identity_providers: [{ + id: "a", + name: "Provider 1", + }, { + id: "b", + name: "Provider 2", + }, { + id: "c", + name: "Provider 3", + }], + }], + }); + + const ssoButtons = ReactTestUtils.scryRenderedDOMComponentsWithClass(root, "mx_SSOButton"); + expect(ssoButtons.length).toBe(3); + }); }); diff --git a/test/components/structures/auth/Registration-test.js b/test/components/structures/auth/Registration-test.js index bf26763a79..3e8e887329 100644 --- a/test/components/structures/auth/Registration-test.js +++ b/test/components/structures/auth/Registration-test.js @@ -48,12 +48,9 @@ describe('Registration', function() { />, parentDiv); } - it('should show server type selector', function() { + it('should show server picker', function() { const root = render(); - const selector = ReactTestUtils.findRenderedComponentWithType( - root, - sdk.getComponent('auth.ServerTypeSelector'), - ); + const selector = ReactTestUtils.findRenderedDOMComponentWithClass(root, "mx_ServerPicker"); expect(selector).toBeTruthy(); }); @@ -79,4 +76,27 @@ describe('Registration', function() { ); expect(form).toBeTruthy(); }); + + it("should show SSO options if those are available", () => { + jest.spyOn(SdkConfig, "get").mockReturnValue({ + disable_custom_urls: true, + }); + + const root = render(); + + // Set non-empty flows & matrixClient to get past the loading spinner + root.setState({ + flows: [{ + stages: [], + }], + ssoFlow: { + type: "m.login.sso", + }, + matrixClient: {}, + busy: false, + }); + + const ssoButton = ReactTestUtils.findRenderedDOMComponentWithClass(root, "mx_SSOButton"); + expect(ssoButton).toBeTruthy(); + }); }); From c4084196d11c87870dcbde57d3e96641060c8f5f Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Wed, 25 Nov 2020 10:39:44 +0000 Subject: [PATCH 088/319] delint --- .../structures/auth/Registration.tsx | 1 - .../views/auth/RegistrationForm.tsx | 1 - .../views/dialogs/ServerPickerDialog.tsx | 2 +- src/i18n/strings/en_EN.json | 7 ++----- test/end-to-end-tests/src/usecases/signup.js | 20 ++++--------------- 5 files changed, 7 insertions(+), 24 deletions(-) diff --git a/src/components/structures/auth/Registration.tsx b/src/components/structures/auth/Registration.tsx index 750e4bb88b..512972d0b4 100644 --- a/src/components/structures/auth/Registration.tsx +++ b/src/components/structures/auth/Registration.tsx @@ -20,7 +20,6 @@ import {MatrixClient} from "matrix-js-sdk/src/client"; import * as sdk from '../../../index'; import { _t, _td } from '../../../languageHandler'; -import SdkConfig from '../../../SdkConfig'; import { messageForResourceLimitError } from '../../../utils/ErrorUtils'; import AutoDiscoveryUtils, {ValidatedServerConfig} from "../../../utils/AutoDiscoveryUtils"; import classNames from "classnames"; diff --git a/src/components/views/auth/RegistrationForm.tsx b/src/components/views/auth/RegistrationForm.tsx index 8c8103fd09..a0c7ab7b4f 100644 --- a/src/components/views/auth/RegistrationForm.tsx +++ b/src/components/views/auth/RegistrationForm.tsx @@ -30,7 +30,6 @@ import PassphraseField from "./PassphraseField"; import CountlyAnalytics from "../../../CountlyAnalytics"; import Field from '../elements/Field'; import RegistrationEmailPromptDialog from '../dialogs/RegistrationEmailPromptDialog'; -import QuestionDialog from '../dialogs/QuestionDialog'; enum RegistrationField { Email = "field_email", diff --git a/src/components/views/dialogs/ServerPickerDialog.tsx b/src/components/views/dialogs/ServerPickerDialog.tsx index 8d3ea29be9..5a3a08670f 100644 --- a/src/components/views/dialogs/ServerPickerDialog.tsx +++ b/src/components/views/dialogs/ServerPickerDialog.tsx @@ -189,7 +189,7 @@ export default class ServerPickerDialog extends React.PureComponent - + {_t("Continue")} diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index 04556b10ef..e008f4d365 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -2324,9 +2324,6 @@ "Add an email to be able to reset your password.": "Add an email to be able to reset your password.", "Use email or phone to optionally be discoverable by existing contacts.": "Use email or phone to optionally be discoverable by existing contacts.", "Use email to optionally be discoverable by existing contacts.": "Use email to optionally be discoverable by existing contacts.", - "Enter your custom homeserver URL What does this mean?": "Enter your custom homeserver URL What does this mean?", - "Homeserver URL": "Homeserver URL", - "Other servers": "Other servers", "Sign in with SSO": "Sign in with SSO", "Couldn't load page": "Couldn't load page", "You must register to use this functionality": "You must register to use this functionality", @@ -2515,8 +2512,6 @@ "Registration has been disabled on this homeserver.": "Registration has been disabled on this homeserver.", "This server does not support authentication with a phone number.": "This server does not support authentication with a phone number.", "That username already exists, please try another.": "That username already exists, please try another.", - "Host account on": "Host account on", - "Decide where your account is hosted": "Decide where your account is hosted", "Continue with": "Continue with", "Or": "Or", "Already have an account? Sign in here": "Already have an account? Sign in here", @@ -2526,6 +2521,8 @@ "You can now close this window or log in to your new account.": "You can now close this window or log in to your new account.", "Registration Successful": "Registration Successful", "Create account": "Create account", + "Host account on": "Host account on", + "Decide where your account is hosted": "Decide where your account is hosted", "Use Recovery Key or Passphrase": "Use Recovery Key or Passphrase", "Use Recovery Key": "Use Recovery Key", "Confirm your identity by verifying this login from one of your other sessions, granting it access to encrypted messages.": "Confirm your identity by verifying this login from one of your other sessions, granting it access to encrypted messages.", diff --git a/test/end-to-end-tests/src/usecases/signup.js b/test/end-to-end-tests/src/usecases/signup.js index ef8a259091..dd4404f55c 100644 --- a/test/end-to-end-tests/src/usecases/signup.js +++ b/test/end-to-end-tests/src/usecases/signup.js @@ -22,24 +22,12 @@ module.exports = async function signup(session, username, password, homeserver) await session.goto(session.url('/#/register')); // change the homeserver by clicking the advanced section if (homeserver) { - const advancedButton = await session.query('.mx_ServerTypeSelector_type_Advanced'); - await advancedButton.click(); + const changeButton = await session.query('.mx_ServerPicker_change'); + await changeButton.click(); - // depending on what HS is configured as the default, the advanced registration - // goes the HS/IS entry directly (for matrix.org) or takes you to the user/pass entry (not matrix.org). - // To work with both, we look for the "Change" link in the user/pass entry but don't fail when we can't find it - // As this link should be visible immediately, and to not slow down the case where it isn't present, - // pick a lower timeout of 5000ms - try { - const changeHsField = await session.query('.mx_AuthBody_editServerDetails', 5000); - if (changeHsField) { - await changeHsField.click(); - } - } catch (err) {} - - const hsInputField = await session.query('#mx_ServerConfig_hsUrl'); + const hsInputField = await session.query('.mx_ServerPickerDialog_otherHomeserver'); await session.replaceInputText(hsInputField, homeserver); - const nextButton = await session.query('.mx_Login_submit'); + const nextButton = await session.query('.mx_ServerPickerDialog_continue'); // accept homeserver await nextButton.click(); } From 3bdedd73f77eae1611accbfe6b4e88a40e053215 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Wed, 25 Nov 2020 11:38:43 +0000 Subject: [PATCH 089/319] fix another test --- test/end-to-end-tests/src/usecases/signup.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/end-to-end-tests/src/usecases/signup.js b/test/end-to-end-tests/src/usecases/signup.js index dd4404f55c..804cee9599 100644 --- a/test/end-to-end-tests/src/usecases/signup.js +++ b/test/end-to-end-tests/src/usecases/signup.js @@ -56,7 +56,7 @@ module.exports = async function signup(session, username, password, homeserver) await registerButton.click(); //confirm dialog saying you cant log back in without e-mail - const continueButton = await session.query('.mx_QuestionDialog button.mx_Dialog_primary'); + const continueButton = await session.query('.mx_RegistrationEmailPromptDialog button.mx_Dialog_primary'); await continueButton.click(); //find the privacy policy checkbox and check it From b9af446c1bcd28e9c3d99364c8f9b7cdb5f0df83 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Wed, 25 Nov 2020 19:42:57 -0700 Subject: [PATCH 090/319] Make it possible in-code to hide rooms from the room list Fixes https://github.com/vector-im/element-web/issues/15745 This was surprisingly easy given the number of errors I remember last time, but here it is. This also includes an over-engineered VisibilityProvider with the intention that it'll get used in the future for things like Spaces and other X as Rooms stuff. --- src/customisations/RoomList.ts | 45 ++++++++++++++ src/stores/room-list/RoomListStore.ts | 4 +- src/stores/room-list/algorithms/Algorithm.ts | 5 ++ .../room-list/filters/VisibilityProvider.ts | 59 +++++++++++++++++++ 4 files changed, 112 insertions(+), 1 deletion(-) create mode 100644 src/customisations/RoomList.ts create mode 100644 src/stores/room-list/filters/VisibilityProvider.ts diff --git a/src/customisations/RoomList.ts b/src/customisations/RoomList.ts new file mode 100644 index 0000000000..758b212aa2 --- /dev/null +++ b/src/customisations/RoomList.ts @@ -0,0 +1,45 @@ +/* + * 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 { Room } from "matrix-js-sdk/src/models/room"; + +// Populate this file with the details of your customisations when copying it. + +/** + * Determines if a room is visible in the room list or not. By default, + * all rooms are visible. Where special handling is performed by Element, + * those rooms will not be able to override their visibility in the room + * list - Element will make the decision without calling this function. + * + * This function should be as fast as possible to avoid slowing down the + * client. + * @param {Room} room The room to check the visibility of. + * @returns {boolean} True if the room should be visible, false otherwise. + */ +function isRoomVisible(room: Room): boolean { + return true; +} + +// This interface summarises all available customisation points and also marks +// them all as optional. This allows customisers to only define and export the +// customisations they need while still maintaining type safety. +export interface IRoomListCustomisations { + isRoomVisible?: typeof isRoomVisible; +} + +// A real customisation module will define and export one or more of the +// customisation points that make up the interface above. +export const RoomListCustomisations: IRoomListCustomisations = {}; diff --git a/src/stores/room-list/RoomListStore.ts b/src/stores/room-list/RoomListStore.ts index 0f3138fe9e..c60f35118b 100644 --- a/src/stores/room-list/RoomListStore.ts +++ b/src/stores/room-list/RoomListStore.ts @@ -34,6 +34,7 @@ import { MarkedExecution } from "../../utils/MarkedExecution"; import { AsyncStoreWithClient } from "../AsyncStoreWithClient"; import { NameFilterCondition } from "./filters/NameFilterCondition"; import { RoomNotificationStateStore } from "../notifications/RoomNotificationStateStore"; +import { VisibilityProvider } from "./filters/VisibilityProvider"; interface IState { tagsEnabled?: boolean; @@ -544,7 +545,8 @@ export class RoomListStoreClass extends AsyncStoreWithClient { public async regenerateAllLists({trigger = true}) { console.warn("Regenerating all room lists"); - const rooms = this.matrixClient.getVisibleRooms(); + const rooms = this.matrixClient.getVisibleRooms() + .filter(r => VisibilityProvider.instance.isRoomVisible(r)); const customTags = new Set(); if (this.state.tagsEnabled) { for (const room of rooms) { diff --git a/src/stores/room-list/algorithms/Algorithm.ts b/src/stores/room-list/algorithms/Algorithm.ts index 439141edb4..25059aabe7 100644 --- a/src/stores/room-list/algorithms/Algorithm.ts +++ b/src/stores/room-list/algorithms/Algorithm.ts @@ -34,6 +34,7 @@ import { EffectiveMembership, getEffectiveMembership, splitRoomsByMembership } f import { OrderingAlgorithm } from "./list-ordering/OrderingAlgorithm"; import { getListAlgorithmInstance } from "./list-ordering"; import SettingsStore from "../../../settings/SettingsStore"; +import { VisibilityProvider } from "../filters/VisibilityProvider"; /** * Fired when the Algorithm has determined a list has been updated. @@ -188,6 +189,10 @@ export class Algorithm extends EventEmitter { // Note throughout: We need async so we can wait for handleRoomUpdate() to do its thing, // otherwise we risk duplicating rooms. + if (val && !VisibilityProvider.instance.isRoomVisible(val)) { + val = null; // the room isn't visible - lie to the rest of this function + } + // Set the last sticky room to indicate that we're in a change. The code throughout the // class can safely handle a null room, so this should be safe to do as a backup. this._lastStickyRoom = this._stickyRoom || {}; diff --git a/src/stores/room-list/filters/VisibilityProvider.ts b/src/stores/room-list/filters/VisibilityProvider.ts new file mode 100644 index 0000000000..def2c20514 --- /dev/null +++ b/src/stores/room-list/filters/VisibilityProvider.ts @@ -0,0 +1,59 @@ +/* + * 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 {Room} from "matrix-js-sdk/src/models/room"; +import { RoomListCustomisations } from "../../../customisations/RoomList"; + +export class VisibilityProvider { + private static internalInstance: VisibilityProvider; + + private constructor() { + } + + public static get instance(): VisibilityProvider { + if (!VisibilityProvider.internalInstance) { + VisibilityProvider.internalInstance = new VisibilityProvider(); + } + return VisibilityProvider.internalInstance; + } + + public isRoomVisible(room: Room): boolean { + let isVisible = true; // Returned at the end of this function + let forced = false; // When true, this function won't bother calling the customisation points + + // ------ + // TODO: The `if` statements to control visibility of custom room types + // would go here. The remainder of this function assumes that the statements + // will be here. + + // An example of how the `if` statements mentioned above would look follows. + // A real check would probably check for a `type` or something instead of the room ID. + // Note: the room ID here is intentionally invalid to prevent accidental hiding of someone's room. + // TODO: Remove this statement once we have a statement to replace it (just keeping the reference count up) + if (room.roomId === '~!JFmkoouJANxFGtmMYC:localhost') { + isVisible = false; + forced = true; + } + // ------ + + const isVisibleFn = RoomListCustomisations.isRoomVisible; + if (!forced && isVisibleFn) { + isVisible = isVisibleFn(room); + } + + return isVisible; + } +} From 80b93e0843c01eeb5196dc5ece41218921b682da Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Wed, 25 Nov 2020 20:03:58 -0700 Subject: [PATCH 091/319] Mute all updates from rooms that are invisible --- src/stores/room-list/RoomListStore.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/stores/room-list/RoomListStore.ts b/src/stores/room-list/RoomListStore.ts index c60f35118b..b2fe630760 100644 --- a/src/stores/room-list/RoomListStore.ts +++ b/src/stores/room-list/RoomListStore.ts @@ -402,6 +402,10 @@ export class RoomListStoreClass extends AsyncStoreWithClient { } private async handleRoomUpdate(room: Room, cause: RoomUpdateCause): Promise { + if (!VisibilityProvider.instance.isRoomVisible(room)) { + return; // don't do anything on rooms that aren't visible + } + const shouldUpdate = await this.algorithm.handleRoomUpdate(room, cause); if (shouldUpdate) { if (SettingsStore.getValue("advancedRoomListLogging")) { From 8386e502407533571649eea375bdb750f7ea0529 Mon Sep 17 00:00:00 2001 From: Arsh Sharma Date: Thu, 26 Nov 2020 17:18:11 +0530 Subject: [PATCH 092/319] fix(EventTile): commited suggestions --- src/components/views/rooms/EventTile.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/views/rooms/EventTile.js b/src/components/views/rooms/EventTile.js index e2f037ceb9..0bd00ad051 100644 --- a/src/components/views/rooms/EventTile.js +++ b/src/components/views/rooms/EventTile.js @@ -747,11 +747,11 @@ export default class EventTile extends React.Component { if (this.props.mxEvent.sender && avatarSize) { let member; // set member to receiver (target) if it is a 3PID invite - // so that the correct avatar is show + // so that the correct avatar is shown if (this.props.mxEvent.getContent().third_party_invite) { - member=this.props.mxEvent.target; + member = this.props.mxEvent.target; } else { - member=this.props.mxEvent.sender; + member = this.props.mxEvent.sender; } avatar = (
@@ -760,7 +760,7 @@ export default class EventTile extends React.Component { viewUserOnClick={true} />
- ); + ); } if (needsSenderProfile) { From e6ef2911d68d2b7b115e12e6d26f1d6672a09c77 Mon Sep 17 00:00:00 2001 From: "@a2sc:matrix.org" Date: Thu, 26 Nov 2020 09:53:41 +0000 Subject: [PATCH 093/319] Translated using Weblate (German) Currently translated at 100.0% (2692 of 2692 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-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 7ef7ad76ff..386ea6c1d1 100644 --- a/src/i18n/strings/de_DE.json +++ b/src/i18n/strings/de_DE.json @@ -1099,7 +1099,7 @@ "Anchor": "Anker", "Headphones": "Kopfhörer", "Folder": "Ordner", - "Pin": "Stecknadel", + "Pin": "Anheften", "Timeline": "Chatverlauf", "Autocomplete delay (ms)": "Verzögerung zur Autovervollständigung (ms)", "Roles & Permissions": "Rollen & Berechtigungen", From 179daf92cdadb2e324527c400dfb2ec0b312ef3f Mon Sep 17 00:00:00 2001 From: Dellle Date: Wed, 25 Nov 2020 16:11:06 +0000 Subject: [PATCH 094/319] Translated using Weblate (German) Currently translated at 100.0% (2692 of 2692 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/de/ --- src/i18n/strings/de_DE.json | 281 +++++++++++++++++++++++++++++++++++- 1 file changed, 274 insertions(+), 7 deletions(-) diff --git a/src/i18n/strings/de_DE.json b/src/i18n/strings/de_DE.json index 386ea6c1d1..5d5ca50fc9 100644 --- a/src/i18n/strings/de_DE.json +++ b/src/i18n/strings/de_DE.json @@ -301,7 +301,7 @@ "Drop file here to upload": "Datei hier loslassen zum hochladen", "Idle": "Untätig", "Ongoing conference call%(supportedText)s.": "Laufendes Konferenzgespräch%(supportedText)s.", - "You are about to be taken to a third-party site so you can authenticate your account for use with %(integrationsUrl)s. Do you wish to continue?": "Du wirst jetzt auf die Website eines Drittanbieters weitergeleitet, damit du dein Benutzerkonto für die Verwendung von %(integrationsUrl)s authentifizieren kannst. Möchtest du fortfahren?", + "You are about to be taken to a third-party site so you can authenticate your account for use with %(integrationsUrl)s. Do you wish to continue?": "Du wirst jetzt auf die Website eines Drittanbieters weitergeleitet, damit du dein Benutzerkonto für die Verwendung von %(integrationsUrl)s authentifizieren kannst. Möchtest du fortfahren?", "Start automatically after system login": "Nach System-Login automatisch starten", "Jump to first unread message.": "Zur ersten ungelesenen Nachricht springen.", "Options": "Optionen", @@ -711,7 +711,7 @@ "Enter keywords separated by a comma:": "Schlüsselwörter kommagetrennt eingeben:", "Forward Message": "Nachricht weiterleiten", "You have successfully set a password and an email address!": "Du hast erfolgreich ein Passwort und eine E-Mail-Adresse gesetzt!", - "Remove %(name)s from the directory?": "Soll der Raum %(name)s aus dem Verzeichnis entfernt werden?", + "Remove %(name)s from the directory?": "Soll der Raum %(name)s aus dem Verzeichnis entfernt werden?", "%(brand)s uses many advanced browser features, some of which are not available or experimental in your current browser.": "%(brand)s nutzt zahlreiche fortgeschrittene Browser-Funktionen, die teilweise in deinem aktuell verwendeten Browser noch nicht verfügbar sind oder sich noch im experimentellen Status befinden.", "Developer Tools": "Entwicklerwerkzeuge", "Preparing to send logs": "Senden von Logs wird vorbereitet", @@ -2056,7 +2056,7 @@ "Your new session is now verified. Other users will see it as trusted.": "Deine neue Sitzung ist nun verifiziert. Andere Benutzer sehen sie als vertrauenswürdig an.", "well formed": "wohlgeformt", "If you don't want to use to discover and be discoverable by existing contacts you know, enter another identity server below.": "Wenn du nicht verwenden willst, um Kontakte zu finden und von anderen gefunden zu werden, trage unten einen anderen Identitätsserver ein.", - "To report a Matrix-related security issue, please read the Matrix.org Security Disclosure Policy.": "Wenn du einen sicherheitsrelevaten Fehler melden möchtest, lies bitte die Matrix.org Security Disclosure Policy.", + "To report a Matrix-related security issue, please read the Matrix.org Security Disclosure Policy.": "Wenn du einen sicherheitsrelevanten Fehler melden möchtest, lies bitte die Matrix.org Security Disclosure Policy.", "An error occurred changing the room's power level requirements. Ensure you have sufficient permissions and try again.": "Beim Ändern der Anforderungen für Benutzerrechte ist ein Fehler aufgetreten. Stelle sicher dass du die nötigen Berechtigungen besitzt und versuche es erneut.", "An error occurred changing the user's power level. Ensure you have sufficient permissions and try again.": "Beim Ändern der Benutzerrechte ist ein Fehler aufgetreten. Stelle sicher dass du die nötigen Berechtigungen besitzt und versuche es erneut.", "Unable to share email address": "E-Mail Adresse konnte nicht geteilt werden", @@ -2187,8 +2187,8 @@ "Font size": "Schriftgröße", "IRC display name width": "Breite des IRC Anzeigenamens", "Size must be a number": "Größe muss eine Zahl sein", - "Custom font size can only be between %(min)s pt and %(max)s pt": "Eigene Schriftgröße kann nur eine Zahl zwischen %(min)s pt und %(max)s pt sein", - "Use between %(min)s pt and %(max)s pt": "Verwende eine Zahl zwischen %(min)s pt und %(max)s pt", + "Custom font size can only be between %(min)s pt and %(max)s pt": "Eigene Schriftgröße kann nur eine Zahl zwischen %(min)s pt und %(max)s pt sein", + "Use between %(min)s pt and %(max)s pt": "Verwende eine Zahl zwischen %(min)s pt und %(max)s pt", "Appearance": "Erscheinungsbild", "Create room": "Raum erstellen", "Jump to oldest unread message": "Zur ältesten ungelesenen Nachricht springen", @@ -2555,7 +2555,7 @@ "Feedback sent": "Feedback gesendet", "Takes the call in the current room off hold": "Beendet das Halten des Anrufs", "Places the call in the current room on hold": "Den aktuellen Anruf halten", - "Uzbekistan": "Uzbekistan", + "Uzbekistan": "Usbekistan", "Send stickers into this room": "Stickers in diesen Raum senden", "Send stickers into your active room": "Stickers in deinen aktiven Raum senden", "Change which room you're viewing": "Ändern welchen Raum du siehst", @@ -2646,5 +2646,272 @@ "Approve widget permissions": "Rechte für das Widget genehmigen", "This widget would like to:": "Dieses Widget würde gerne:", "Approve": "Zustimmen", - "Decline All": "Alles ablehnen" + "Decline All": "Alles ablehnen", + "Go to Home View": "Zur Startseite gehen", + "Filter rooms and people": "Räume und Personen filtern", + "%(creator)s created this DM.": "%(creator)s hat diese DM erstellt.", + "Now, let's help you get started": "Nun, lassen Sie uns Ihnen den Einstieg erleichtern", + "Welcome %(name)s": "Willkommen %(name)s", + "Add a photo so people know it's you.": "Fügen Sie ein Foto hinzu, damit die Leute wissen, dass Sie es sind.", + "Great, that'll help people know it's you": "Großartig, das wird den Leuten helfen, zu wissen, dass Sie es sind", + "

HTML for your community's page

\n

\n Use the long description to introduce new members to the community, or distribute\n some important links\n

\n

\n You can even add images with Matrix URLs \n

\n": "

HTML für die Seite Ihrer Community

\n

\n Verwenden Sie die ausführliche Beschreibung, um die Community neuen Mitgliedern vorzustellen,\n oder teilen Sie einige wichtige Links links\n

\n

\n Sie können sogar Bilder mit Matrix-URLs hinzufügen \n

\n", + "Enter phone number": "Telefonnummer eingeben", + "Enter email address": "E-Mail-Adresse eingeben", + "Open the link in the email to continue registration.": "Öffnen Sie den Link in der E-Mail, um mit der Registrierung fortzufahren.", + "A confirmation email has been sent to %(emailAddress)s": "Eine Bestätigungs-E-Mail wurde an %(emailAddress)s gesendet", + "Use the + to make a new room or explore existing ones below": "Verwenden Sie das +, um einen neuen Raum zu erstellen oder unten einen bestehenden zu erkunden", + "Return to call": "Zurück zum Anruf", + "Fill Screen": "Bildschirm ausfüllen", + "Voice Call": "Sprachanruf", + "Video Call": "Videoanruf", + "Remain on your screen while running": "Bleiben Sie auf Ihrem Bildschirm während der Ausführung von", + "Remain on your screen when viewing another room, when running": "Bleiben Sie auf Ihrem Bildschirm, während Sie einen anderen Raum betrachten, wenn Sie ausführen", + "Zimbabwe": "Simbabwe", + "Zambia": "Sambia", + "Yemen": "Jemen", + "Western Sahara": "Westsahara", + "Wallis & Futuna": "Wallis und Futuna", + "Vietnam": "Vietnam", + "Venezuela": "Venezuela", + "Vatican City": "Vatikanstadt", + "Vanuatu": "Vanuatu", + "Uruguay": "Uruguay", + "United Arab Emirates": "Vereinigte Arabische Emirate", + "Ukraine": "Ukraine", + "Uganda": "Uganda", + "U.S. Virgin Islands": "Amerikanische Jungferninseln", + "Tuvalu": "Tuvalu", + "Turks & Caicos Islands": "Turks- und Caicosinseln", + "Turkmenistan": "Turkmenistan", + "Turkey": "Türkei", + "Tunisia": "Tunesien", + "Trinidad & Tobago": "Trinidad und Tobago", + "Tonga": "Tonga", + "Tokelau": "Tokelau", + "Togo": "Togo", + "Timor-Leste": "Timor-Leste", + "Thailand": "Thailand", + "Tanzania": "Tansania", + "Tajikistan": "Tadschikistan", + "Taiwan": "Taiwan", + "São Tomé & Príncipe": "São Tomé und Príncipe", + "Syria": "Syrien", + "Switzerland": "Schweiz", + "Sweden": "Schweden", + "Swaziland": "Swasiland", + "Svalbard & Jan Mayen": "Spitzbergen & Jan Mayen", + "Suriname": "Surinam", + "Sudan": "Sudan", + "St. Vincent & Grenadines": "St. Vincent und die Grenadinen", + "St. Pierre & Miquelon": "St. Pierre & Miquelon", + "St. Martin": "St. Martin", + "St. Lucia": "St. Lucia", + "St. Kitts & Nevis": "St. Kitts & Nevis", + "St. Helena": "St. Helena", + "St. Barthélemy": "St. Barthélemy", + "Sri Lanka": "Sri Lanka", + "Spain": "Spanien", + "South Sudan": "Südsudan", + "South Korea": "Südkorea", + "South Georgia & South Sandwich Islands": "Südgeorgien & Südliche Sandwichinseln", + "South Africa": "Südafrika", + "Somalia": "Somalia", + "Solomon Islands": "Salomonen", + "Slovenia": "Slowenien", + "Slovakia": "Slowakei", + "Sint Maarten": "St. Martin", + "Singapore": "Singapur", + "Sierra Leone": "Sierra Leone", + "Seychelles": "Seychellen", + "Serbia": "Serbien", + "Senegal": "Senegal", + "Saudi Arabia": "Saudi-Arabien", + "San Marino": "San Marino", + "Samoa": "Samoa", + "Réunion": "Réunion", + "Rwanda": "Ruanda", + "Russia": "Russland", + "Romania": "Rumänien", + "Qatar": "Katar", + "Puerto Rico": "Puerto Rico", + "Portugal": "Portugal", + "Poland": "Polen", + "Pitcairn Islands": "Pitcairninseln", + "Philippines": "Philippinen", + "Peru": "Peru", + "Paraguay": "Paraguay", + "Papua New Guinea": "Papua-Neuguinea", + "Panama": "Panama", + "Palestine": "Palästina", + "Palau": "Palau", + "Pakistan": "Pakistan", + "Oman": "Oman", + "Norway": "Norwegen", + "Northern Mariana Islands": "Nördliche Marianeninseln", + "North Korea": "Nordkorea", + "Norfolk Island": "Norfolkinsel", + "Niue": "Niue", + "Nigeria": "Nigeria", + "Niger": "Niger", + "Nicaragua": "Nicaragua", + "New Zealand": "Neuseeland", + "New Caledonia": "Neukaledonien", + "Netherlands": "Niederlande", + "Nepal": "Nepal", + "Nauru": "Nauru", + "Namibia": "Namibia", + "Myanmar": "Myanmar", + "Mozambique": "Mosambik", + "Morocco": "Marokko", + "Montserrat": "Montserrat", + "Montenegro": "Montenegro", + "Mongolia": "Mongolei", + "Czech Republic": "Tschechische Republik", + "Monaco": "Monaco", + "Moldova": "Moldawien", + "Micronesia": "Mikronesien", + "Mexico": "Mexiko", + "Mayotte": "Mayotte", + "Mauritius": "Mauritius", + "Mauritania": "Mauretanien", + "Martinique": "Martinique", + "Marshall Islands": "Marshallinseln", + "Malta": "Malta", + "Mali": "Mali", + "Maldives": "Malediven", + "Malaysia": "Malaysia", + "Malawi": "Malawi", + "Madagascar": "Madagaskar", + "Macedonia": "Mazedonien", + "Macau": "Macau", + "Luxembourg": "Luxemburg", + "Lithuania": "Litauen", + "Liechtenstein": "Liechtenstein", + "Libya": "Libyen", + "Liberia": "Liberia", + "Lesotho": "Lesotho", + "Lebanon": "Libanon", + "Latvia": "Lettland", + "Laos": "Laos", + "Kyrgyzstan": "Kirgisistan", + "Kuwait": "Kuwait", + "Kosovo": "Kosovo", + "Kiribati": "Kiribati", + "Kenya": "Kenia", + "Kazakhstan": "Kasachstan", + "Jordan": "Jordanien", + "Jersey": "Jersey", + "Japan": "Japan", + "Jamaica": "Jamaika", + "Italy": "Italien", + "Israel": "Israel", + "Isle of Man": "Insel Man", + "Ireland": "Irland", + "Iraq": "Irak", + "Iran": "Iran", + "Indonesia": "Indonesien", + "India": "Indien", + "Iceland": "Island", + "Hungary": "Ungarn", + "Hong Kong": "Hongkong", + "Honduras": "Honduras", + "Heard & McDonald Islands": "Heard & McDonald-Inseln", + "Haiti": "Haiti", + "Guyana": "Guyana", + "Guinea-Bissau": "Guinea-Bissau", + "Guinea": "Guinea", + "Guernsey": "Guernsey", + "Guatemala": "Guatemala", + "Guam": "Guam", + "Guadeloupe": "Guadeloupe", + "Grenada": "Grenada", + "Greenland": "Grönland", + "Greece": "Griechenland", + "Gibraltar": "Gibraltar", + "Ghana": "Ghana", + "Germany": "Deutschland", + "Georgia": "Georgien", + "Gambia": "Gambia", + "Gabon": "Gabun", + "French Southern Territories": "Französische Süd-Territorien", + "French Polynesia": "Französisch-Polynesien", + "French Guiana": "Französisch-Guayana", + "France": "Frankreich", + "Finland": "Finnland", + "Fiji": "Fidschi", + "Faroe Islands": "Färöer-Inseln", + "Falkland Islands": "Falklandinseln", + "Ethiopia": "Äthiopien", + "Estonia": "Estland", + "Eritrea": "Eritrea", + "Equatorial Guinea": "Äquatorialguinea", + "El Salvador": "El Salvador", + "Egypt": "Ägypten", + "Ecuador": "Ecuador", + "Dominican Republic": "Dominikanische Republik", + "Dominica": "Dominica", + "Djibouti": "Dschibuti", + "Denmark": "Dänemark", + "Côte d’Ivoire": "Tschechische Republik", + "Cyprus": "Zypern", + "Curaçao": "Curaçao", + "Cuba": "Kuba", + "Croatia": "Kroatien", + "Cook Islands": "Cookinseln", + "Costa Rica": "Costa Rica", + "Congo - Kinshasa": "Republik Kongo - Kinshasa", + "Congo - Brazzaville": "Republik Kongo - Brazzaville", + "Comoros": "Komoren", + "Colombia": "Kolumbien", + "Cocos (Keeling) Islands": "Kokosinseln (Keeling)", + "Christmas Island": "Weihnachtsinsel", + "China": "China", + "Chile": "Chile", + "Chad": "Tschad", + "Central African Republic": "Zentralafrikanische Republik", + "Cayman Islands": "Kaimaninseln", + "Caribbean Netherlands": "Karibische Niederlande", + "Cape Verde": "Kap Verde", + "Canada": "Kanada", + "Cameroon": "Kamerun", + "Cambodia": "Kambodscha", + "Burundi": "Burundi", + "Burkina Faso": "Burkina Faso", + "Bulgaria": "Bulgarien", + "Brunei": "Brunei", + "British Virgin Islands": "Britische Jungferninseln", + "British Indian Ocean Territory": "Britisches Territorium im Indischen Ozean", + "Brazil": "Brasilien", + "Bouvet Island": "Bouvetinsel", + "Botswana": "Botswana", + "Bosnia": "Bosnien", + "Bolivia": "Bolivien", + "Bhutan": "Bhutan", + "Bermuda": "Bermuda", + "Benin": "Benin", + "Belize": "Belize", + "Belgium": "Belgien", + "Belarus": "Weißrussland", + "Barbados": "Barbados", + "Bangladesh": "Bangladesch", + "Bahrain": "Bahrain", + "Bahamas": "Bahamas", + "Azerbaijan": "Aserbaidschan", + "Austria": "Österreich", + "Australia": "Australien", + "Aruba": "Aruba", + "Armenia": "Armenien", + "Argentina": "Argentinien", + "Antigua & Barbuda": "Antigua und Barbuda", + "Antarctica": "Antarktis", + "Anguilla": "Anguilla", + "Angola": "Angola", + "Andorra": "Andorra", + "American Samoa": "Amerikanisch-Samoa", + "Algeria": "Algerien", + "Albania": "Albanien", + "Åland Islands": "Äland-Inseln", + "Afghanistan": "Afghanistan", + "United States": "Vereinigte Staaten", + "United Kingdom": "Großbritannien" } From 2b140470f9ee8bb8cf806c15395ba4e18d891487 Mon Sep 17 00:00:00 2001 From: notramo Date: Tue, 24 Nov 2020 19:03:29 +0000 Subject: [PATCH 095/319] Translated using Weblate (Hungarian) Currently translated at 97.3% (2622 of 2692 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/hu/ --- src/i18n/strings/hu.json | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/i18n/strings/hu.json b/src/i18n/strings/hu.json index 9c00c8ff6e..2739154c19 100644 --- a/src/i18n/strings/hu.json +++ b/src/i18n/strings/hu.json @@ -2663,8 +2663,8 @@ "Bolivia": "Bolívia", "Bhutan": "Bhután", "Topic: %(topic)s (edit)": "Téma: %(topic)s (szerkesztés)", - "This is the beginning of your direct message history with .": "Ez a közvetlen üzeneteinek előzményeinek eleje a következővel: .", - "Only the two of you are in this conversation, unless either of you invites anyone to join.": "Csak ketten vannak ebben a beszélgetésben, hacsak valamelyikőjük nem hív meg valakit, hogy csatlakozzon.", + "This is the beginning of your direct message history with .": "Ez a közvetlen beszélgetés kezdete felhasználóval.", + "Only the two of you are in this conversation, unless either of you invites anyone to join.": "Csak önök ketten vannak ebben a beszélgetésben, hacsak valamelyikőjük nem hív meg valakit, hogy csatlakozzon.", "Call Paused": "Hívás szüneteltetve", "Takes the call in the current room off hold": "Visszaveszi tartásból a jelenlegi szoba hívását", "Places the call in the current room on hold": "Tartásba teszi a jelenlegi szoba hívását", @@ -2832,11 +2832,19 @@ "Gibraltar": "Gibraltár", "%(creator)s created this DM.": "%(creator)s hozta létre ezt az üzenetet.", "Messages in this room are end-to-end encrypted. When people join, you can verify them in their profile, just tap on their avatar.": "A szobában lévő üzenetek végpontok között titkosítottak. Miután csatlakoztak a felhasználók, ellenőrizheted őket a profiljukban, amit a profilképükre kattintással nyithatsz meg.", - "Messages here are end-to-end encrypted. Verify %(displayName)s in their profile - tap on their avatar.": "Az üzenetek végpontok között titkosítottak. Ellenőrizze %(displayName)s személyazonosságát a profilján – koppintson a profilképére.", + "Messages here are end-to-end encrypted. Verify %(displayName)s in their profile - tap on their avatar.": "Az üzenetek végpontok között titkosítottak. Ellenőrizze %(displayName)s személyazonosságát a profilján – kattintson %(displayName)s profilképére.", "This is the start of .": "Ez a(z) kezdete.", "Add a photo, so people can easily spot your room.": "Állíts be egy fényképet, hogy az emberek könnyebben felismerjék a szobát!", "%(displayName)s created this room.": "%(displayName)s készítette ezt a szobát.", "You created this room.": "Te készítetted ezt a szobát.", "Add a topic to help people know what it is about.": "Állítsd be a szoba témáját, hogy az emberek tudják, hogy miről van itt szó.", - "Topic: %(topic)s ": "Téma: %(topic)s " + "Topic: %(topic)s ": "Téma: %(topic)s ", + "Send stickers to this room as you": "Ön helyett matricák küldése a szobába", + "Change the avatar of this room": "A szoba képének megváltoztatása", + "Change the name of this room": "A szoba nevének megváltoztatása", + "Change the topic of your active room": "Az aktív szoba témájának megváltoztatása", + "Change the topic of this room": "A szoba témájának megváltoztatása", + "Change which room you're viewing": "Az ön által nézett szoba megváltoztatása", + "Send stickers into your active room": "Matricák küldése az ön aktív szobájába", + "Send stickers into this room": "Matricák küldése a szobába" } From 928436020fc13f7d89eb7f957c305a7d36a33afe Mon Sep 17 00:00:00 2001 From: LinAGKar Date: Thu, 26 Nov 2020 08:01:05 +0000 Subject: [PATCH 096/319] Translated using Weblate (Swedish) Currently translated at 97.4% (2623 of 2692 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/sv/ --- src/i18n/strings/sv.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/sv.json b/src/i18n/strings/sv.json index 2ef650219f..74e5fc0125 100644 --- a/src/i18n/strings/sv.json +++ b/src/i18n/strings/sv.json @@ -2779,5 +2779,7 @@ "Send stickers into your active room": "Skicka dekaler in i ditt aktiva rum", "Send stickers into this room": "Skicka dekaler in i det här rummet", "Remain on your screen while running": "Stanna kvar på skärmen när det körs", - "Remain on your screen when viewing another room, when running": "Stanna kvar på skärmen när ett annat rum visas, när det körs" + "Remain on your screen when viewing another room, when running": "Stanna kvar på skärmen när ett annat rum visas, när det körs", + "See when the topic changes in this room": "Se när ämnet ändras i det här rummet", + "Change the topic of this room": "Ändra ämnet för det här rummet" } From d98a13adb9512f2aa71ee3265fd07c5906d70cde Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=AE=D1=80=D0=B8=D0=B9=20=D0=A0=D1=83=D1=80=D0=B5=D0=BD?= =?UTF-8?q?=D0=BA=D0=BE?= Date: Wed, 25 Nov 2020 17:36:53 +0000 Subject: [PATCH 097/319] Translated using Weblate (Ukrainian) Currently translated at 46.9% (1265 of 2692 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/uk/ --- src/i18n/strings/uk.json | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/uk.json b/src/i18n/strings/uk.json index 689086859d..dbc89b2fa8 100644 --- a/src/i18n/strings/uk.json +++ b/src/i18n/strings/uk.json @@ -1322,5 +1322,27 @@ "Answered Elsewhere": "Відповіли деінде", "The call could not be established": "Не вдалося встановити зв'язок", "The other party declined the call.": "Інша сторона відхилила дзвінок.", - "Call Declined": "Дзвінок відхилено" + "Call Declined": "Дзвінок відхилено", + "Falkland Islands": "Фолклендські Острови", + "Ethiopia": "Ефіопія", + "Estonia": "Естонія", + "Eritrea": "Еритрея", + "Equatorial Guinea": "Екваторіальна Гвінея", + "El Salvador": "Сальвадор", + "Egypt": "Єгипет", + "Ecuador": "Еквадор", + "Dominican Republic": "Домініканська Республіка", + "Dominica": "Домініка", + "Djibouti": "Джибуті", + "Denmark": "Данія", + "Côte d’Ivoire": "Кот-д'Івуар", + "Czech Republic": "Чехія", + "Cyprus": "Кіпр", + "Curaçao": "Кюрасао", + "Cuba": "Куба", + "Croatia": "Хорватія", + "Costa Rica": "Коста Ріка", + "Cook Islands": "Острова Кука", + "Congo - Kinshasa": "Конга - Киншаса", + "Congo - Brazzaville": "Конго - Браззавиль" } From 2be4a0439d904cb51f73112e38a644d67298b04c Mon Sep 17 00:00:00 2001 From: m4sk1n Date: Tue, 24 Nov 2020 17:27:46 +0000 Subject: [PATCH 098/319] Translated using Weblate (Polish) Currently translated at 69.4% (1870 of 2692 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/pl/ --- src/i18n/strings/pl.json | 165 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 162 insertions(+), 3 deletions(-) diff --git a/src/i18n/strings/pl.json b/src/i18n/strings/pl.json index f3785a81b7..f5171c8472 100644 --- a/src/i18n/strings/pl.json +++ b/src/i18n/strings/pl.json @@ -385,7 +385,7 @@ "Error decrypting audio": "Błąd deszyfrowania audio", "Error decrypting image": "Błąd deszyfrowania obrazu", "Error decrypting video": "Błąd deszyfrowania wideo", - "Tried to load a specific point in this room's timeline, but was unable to find it.": "Próbowano załadować konkretny punkt na osi czasu w tym pokoju, ale nie nie można go znaleźć.", + "Tried to load a specific point in this room's timeline, but was unable to find it.": "Próbowano załadować konkretny punkt na osi czasu w tym pokoju, ale nie można go znaleźć.", "The exported file will allow anyone who can read it to decrypt any encrypted messages that you can see, so you should be careful to keep it secure. To help with this, you should enter a passphrase below, which will be used to encrypt the exported data. It will only be possible to import the data by using the same passphrase.": "Wyeksportowany plik pozwoli każdej osobie będącej w stanie go odczytać na deszyfrację jakichkolwiek zaszyfrowanych wiadomości, które możesz zobaczyć, tak więc zalecane jest zachowanie ostrożności. Aby w tym pomóc, powinieneś/aś wpisać hasło poniżej; hasło to będzie użyte do zaszyfrowania wyeksportowanych danych. Późniejsze zaimportowanie tych danych będzie możliwe tylko po uprzednim podaniu owego hasła.", " (unsupported)": " (niewspierany)", "Idle": "Bezczynny(-a)", @@ -1150,7 +1150,7 @@ "Disconnect from the identity server ?": "Odłączyć od serwera tożsamości ?", "Disconnect": "Odłącz", "Identity Server (%(server)s)": "Serwer tożsamości (%(server)s)", - "You are currently using to discover and be discoverable by existing contacts you know. You can change your identity server below.": "Używasz , aby odnajdywać i móc być odnajdywanym przez istniejące kontakty, które znasz. Możesz zmienić serwer tożsamości poniżej.", + "You are currently using to discover and be discoverable by existing contacts you know. You can change your identity server below.": "Używasz , aby odnajdywać i móc być odnajdywanym przez istniejące kontakty, które znasz. Możesz zmienić serwer tożsamości poniżej.", "Identity Server": "Serwer Tożsamości", "You are not currently using an identity server. To discover and be discoverable by existing contacts you know, add one below.": "Nie używasz serwera tożsamości. Aby odkrywać i być odkrywanym przez istniejące kontakty które znasz, dodaj jeden poniżej.", "Disconnecting from your identity server will mean you won't be discoverable by other users and you won't be able to invite others by email or phone.": "Odłączenie się od serwera tożsamości oznacza, że inni nie będą mogli Cię odnaleźć ani Ty nie będziesz w stanie zaprosić nikogo za pomocą e-maila czy telefonu.", @@ -1811,5 +1811,164 @@ "Kenya": "Kenia", "Kazakhstan": "Kazachstan", "Jordan": "Jordania", - "Jersey": "Jersey" + "Jersey": "Jersey", + "User rules": "Zasady użytkownika", + "Server rules": "Zasady serwera", + "not found": "nie znaleziono", + "Decline (%(counter)s)": "Odrzuć (%(counter)s)", + "Starting backup...": "Rozpoczynanie kopii zapasowej…", + "User Autocomplete": "Autouzupełnianie użytkowników", + "Community Autocomplete": "Autouzupełnianie społeczności", + "Room Autocomplete": "Autouzupełnianie pokojów", + "Notification Autocomplete": "Autouzupełnianie powiadomień", + "Emoji Autocomplete": "Autouzupełnianie emoji", + "Phone (optional)": "Telefon (opcjonalny)", + "Upload Error": "Błąd wysyłania", + "GitHub issue": "Błąd na GitHubie", + "Close dialog": "Zamknij okno dialogowe", + "Show all": "Zobacz wszystko", + "Deactivate user": "Dezaktywuj użytkownika", + "Deactivate user?": "Dezaktywować użytkownika?", + "Revoke invite": "Wygaś zaproszenie", + "Code block": "Blok kodu", + "Ban users": "Zablokuj użytkowników", + "Kick users": "Wyrzuć użytkowników", + "Syncing...": "Synchronizacja…", + "General failure": "Ogólny błąd", + "Removing…": "Usuwanie…", + "Premium": "Premium", + "Cancelling…": "Anulowanie…", + "Algorithm:": "Algorytm:", + "Bulk options": "Masowe działania", + "Modern": "Współczesny", + "Compact": "Kompaktowy", + "Approve": "Zatwierdź", + "Incompatible Database": "Niekompatybilna baza danych", + "Show": "Pokaż", + "Information": "Informacje", + "Categories": "Kategorie", + "Reactions": "Reakcje", + "Role": "Rola", + "Trusted": "Zaufane", + "Accepting…": "Akceptowanie…", + "Re-join": "Dołącz ponownie", + "Unencrypted": "Nieszyfrowane", + "Revoke": "Unieważnij", + "Encrypted": "Szyfrowane", + "Unsubscribe": "Odsubskrybuj", + "None": "Brak", + "exists": "istnieje", + "Change the topic of this room": "Zmień temat tego pokoju", + "Change which room you're viewing": "Zmień pokój który przeglądasz", + "Send stickers into your active room": "Wyślij naklejki w swoim aktywnym pokoju", + "Send stickers into this room": "Wyślij naklejki w tym pokoju", + "Zimbabwe": "Zimbabwe", + "Zambia": "Zambia", + "Yemen": "Jemen", + "Western Sahara": "Sahara Zachodnia", + "Wallis & Futuna": "Wallis i Futuna", + "Vietnam": "Wietnam", + "Venezuela": "Wenezuela", + "Vatican City": "Watykan", + "Vanuatu": "Vanuatu", + "Uzbekistan": "Uzbekistan", + "Uruguay": "Urugwaj", + "United Arab Emirates": "Zjednoczone Emiraty Arabskie", + "Ukraine": "Ukraina", + "Uganda": "Uganda", + "U.S. Virgin Islands": "Wyspy Dziewicze Stanów Zjednoczonych", + "Tuvalu": "Tuvalu", + "Turks & Caicos Islands": "Turks i Caicos", + "Turkmenistan": "Turkmenistan", + "Turkey": "Turcja", + "Tunisia": "Tunezja", + "Trinidad & Tobago": "Trynidad i Tobago", + "Tonga": "Tonga", + "Tokelau": "Tokelau", + "Togo": "Togo", + "Timor-Leste": "Timor Wschodni", + "Thailand": "Tajlandia", + "Tanzania": "Tanzania", + "Tajikistan": "Tadżykistan", + "Taiwan": "Tajwan", + "São Tomé & Príncipe": "Wyspy Świętego Tomasza i Książęca", + "Syria": "Syria", + "Switzerland": "Szwajcaria", + "Sweden": "Szwecja", + "Swaziland": "Eswatini", + "Svalbard & Jan Mayen": "Svalbard i Jan Mayen", + "Suriname": "Surinam", + "Sudan": "Sudan", + "St. Vincent & Grenadines": "Saint Vincent i Grenadyny", + "St. Pierre & Miquelon": "Saint-Pierre i Miquelon", + "St. Martin": "Sint Maarten", + "St. Lucia": "Saint Lucia", + "St. Kitts & Nevis": "Saint Kitts & Nevis", + "St. Helena": "Święta Helena", + "St. Barthélemy": "Wspólnota Saint-Barthélemy", + "Sri Lanka": "Sri Lanka", + "Spain": "Hiszpania", + "South Sudan": "Sudan Południowy", + "South Korea": "Korea Południowa", + "South Georgia & South Sandwich Islands": "Georgia Południowa i Sandwich Południowy", + "South Africa": "Republika Południowej Afryki", + "Somalia": "Somalia", + "Solomon Islands": "Wyspy Salomona", + "Slovenia": "Słowenia", + "Slovakia": "Słowacja", + "Sint Maarten": "Sint Maarten", + "Singapore": "Singapur", + "Sierra Leone": "Sierra Leone", + "Seychelles": "Seszele", + "Serbia": "Serbia", + "Senegal": "Senegal", + "Saudi Arabia": "Arabia Saudyjska", + "San Marino": "San Marino", + "Samoa": "Samoa", + "Réunion": "Reunion", + "Rwanda": "Rwanda", + "Russia": "Rosja", + "Romania": "Rumunia", + "Qatar": "Katar", + "Puerto Rico": "Portoryko", + "Portugal": "Portugalia", + "Poland": "Polska", + "Pitcairn Islands": "Pitcairn", + "Philippines": "Filipiny", + "Peru": "Peru", + "Paraguay": "Paragwaj", + "Papua New Guinea": "Papua Nowa Gwinea", + "Panama": "Panama", + "Palestine": "Palestyna", + "Palau": "Palau", + "Pakistan": "Pakistan", + "Oman": "Oman", + "Norway": "Norwegia", + "Northern Mariana Islands": "Mariany Północne", + "North Korea": "Korea Północna", + "Norfolk Island": "Norfolk", + "Niue": "Niue", + "Nigeria": "Nigeria", + "Niger": "Niger", + "Nicaragua": "Nikaragua", + "New Zealand": "Nowa Zelandia", + "New Caledonia": "Nowa Kaledonia", + "Netherlands": "Holandia", + "Nepal": "Nepal", + "Nauru": "Nauru", + "Namibia": "Namibia", + "Myanmar": "Mjanma", + "Mozambique": "Mozambik", + "Morocco": "Maroko", + "Montserrat": "Montserrat", + "Montenegro": "Czarnogóra", + "Mongolia": "Mongolia", + "Monaco": "Monako", + "Moldova": "Mołdawia", + "Micronesia": "Mikronezja", + "Mexico": "Meksyk", + "Mayotte": "Majotta", + "Mauritius": "Mauritius", + "Mauritania": "Mauretania", + "Martinique": "Martynika" } From 5c176f15d921e1a560d70a5321ac02f20480fa92 Mon Sep 17 00:00:00 2001 From: XoseM Date: Wed, 25 Nov 2020 06:07:23 +0000 Subject: [PATCH 099/319] Translated using Weblate (Galician) Currently translated at 100.0% (2692 of 2692 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/gl/ --- src/i18n/strings/gl.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/i18n/strings/gl.json b/src/i18n/strings/gl.json index 9f281779f5..1d8dfaa8ee 100644 --- a/src/i18n/strings/gl.json +++ b/src/i18n/strings/gl.json @@ -1580,7 +1580,7 @@ "Dark": "Escuro", "Customise your appearance": "Personaliza o aspecto", "Appearance Settings only affect this %(brand)s session.": "Os axustes da aparencia só lle afectan a esta sesión %(brand)s.", - "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.", + "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 volver 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", @@ -1713,7 +1713,7 @@ "Remove recent messages": "Eliminar mensaxes recentes", "%(role)s in %(roomName)s": "%(role)s en %(roomName)s", "Deactivate user?": "¿Desactivar usuaria?", - "Deactivating this user will log them out and prevent them from logging back in. Additionally, they will leave all the rooms they are in. This action cannot be reversed. Are you sure you want to deactivate this user?": "Ao desactivar esta usuaria ficará desconectada e non poderá voltar a conectar. Ademáis deixará todas as salas nas que estivese. Esta acción non ten volta, ¿desexas desactivar esta usuaria?", + "Deactivating this user will log them out and prevent them from logging back in. Additionally, they will leave all the rooms they are in. This action cannot be reversed. Are you sure you want to deactivate this user?": "Ao desactivar esta usuaria ficará desconectada e non poderá volver a conectar. Ademáis deixará todas as salas nas que estivese. Esta acción non ten volta, ¿desexas desactivar esta usuaria?", "Deactivate user": "Desactivar usuaria", "Failed to deactivate user": "Fallo ao desactivar a usuaria", "This client does not support end-to-end encryption.": "Este cliente non soporta o cifrado extremo-a-extremo.", @@ -1864,8 +1864,8 @@ "Hide advanced": "Ocultar Avanzado", "Show advanced": "Mostrar Avanzado", "Block users on other matrix homeservers from joining this room (This setting cannot be changed later!)": "Evitar que usuarias de outros servidores matrix se unan a esta sala (Este axuste non se pode cambiar máis tarde!)", - "To avoid losing your chat history, you must export your room keys before logging out. You will need to go back to the newer version of %(brand)s to do this": "Para evitar perder o historial da conversa, debes exportar as chaves da sala antes de desconectarte. Necesitarás voltar á nova versión de %(brand)s para facer esto", - "You've previously used a newer version of %(brand)s with this session. To use this version again with end to end encryption, you will need to sign out and back in again.": "Xa utilizaches unha versión máis nova de %(brand)s nesta sesión. Para usar esta versión novamente con cifrado extremo-a-extremo tes que desconectarte e voltar a conectar.", + "To avoid losing your chat history, you must export your room keys before logging out. You will need to go back to the newer version of %(brand)s to do this": "Para evitar perder o historial da conversa, debes exportar as chaves da sala antes de desconectarte. Necesitarás volver á nova versión de %(brand)s para facer esto", + "You've previously used a newer version of %(brand)s with this session. To use this version again with end to end encryption, you will need to sign out and back in again.": "Xa utilizaches unha versión máis nova de %(brand)s nesta sesión. Para usar esta versión novamente con cifrado extremo-a-extremo tes que desconectarte e volver a conectar.", "Incompatible Database": "Base de datos non compatible", "Continue With Encryption Disabled": "Continuar con Cifrado Desactivado", "Are you sure you want to deactivate your account? This is irreversible.": "¿Tes a certeza de querer desactivar a túa conta? Esto é irreversible.", @@ -1918,7 +1918,7 @@ "The authenticity of this encrypted message can't be guaranteed on this device.": "A autenticidade desta mensaxe cifrada non está garantida neste dispositivo.", "Signature upload success": "Subeuse correctamente a sinatura", "Signature upload failed": "Fallou a subida da sinatura", - "You've previously used %(brand)s on %(host)s with lazy loading of members enabled. In this version lazy loading is disabled. As the local cache is not compatible between these two settings, %(brand)s needs to resync your account.": "Anteriormente utilizaches %(brand)s en %(host)s con carga preguiceira de membros. Nesta versión a carga preguiceira está desactivada. Como a caché local non é compatible entre as dúas configuracións, %(brand)s precisa voltar a sincronizar a conta.", + "You've previously used %(brand)s on %(host)s with lazy loading of members enabled. In this version lazy loading is disabled. As the local cache is not compatible between these two settings, %(brand)s needs to resync your account.": "Anteriormente utilizaches %(brand)s en %(host)s con carga preguiceira de membros. Nesta versión a carga preguiceira está desactivada. Como a caché local non é compatible entre as dúas configuracións, %(brand)s precisa volver a sincronizar a conta.", "Incompatible local cache": "Caché local incompatible", "Clear cache and resync": "Baleirar caché e sincronizar", "%(brand)s now uses 3-5x less memory, by only loading information about other users when needed. Please wait whilst we resynchronise with the server!": "%(brand)s utiliza agora entre 3 e 5 veces menos memoria, cargando só información sobre as usuarias cando é preciso. Agarda mentras se sincroniza co servidor!", @@ -2079,7 +2079,7 @@ "Premium hosting for organisations Learn more": "Hospedaxe Premium para organizacións Saber máis", "Find other public servers or use a custom server": "Atopa outros servidores públicos ou usa un servidor personalizado", "Couldn't load page": "Non se puido cargar a páxina", - "You are an administrator of this community. You will not be able to rejoin without an invite from another administrator.": "Administras esta comunidade. Non poderás voltar a unirte sen un convite doutra persoa administradora.", + "You are an administrator of this community. You will not be able to rejoin without an invite from another administrator.": "Administras esta comunidade. Non poderás volver a unirte sen un convite doutra persoa administradora.", "Want more than a community? Get your own server": "¿Queres algo máis que unha comunidade? Monta o teu propio servidor", "This homeserver does not support communities": "Este servidor non soporta comunidades", "Welcome to %(appName)s": "Benvida a %(appName)s", From 9e90037163daa42d7f05a91f528a306ab7ed9dfb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Priit=20J=C3=B5er=C3=BC=C3=BCt?= Date: Tue, 24 Nov 2020 22:29:33 +0000 Subject: [PATCH 100/319] Translated using Weblate (Estonian) Currently translated at 100.0% (2692 of 2692 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/et/ --- src/i18n/strings/et.json | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/et.json b/src/i18n/strings/et.json index 47228a0e81..bc3ca203a5 100644 --- a/src/i18n/strings/et.json +++ b/src/i18n/strings/et.json @@ -2890,5 +2890,33 @@ "The %(capability)s capability": "%(capability)s võimekus", "See %(eventType)s events posted to your active room": "Vaata oma aktiivsesse jututuppa saadetud %(eventType)s sündmusi", "Send %(eventType)s events as you in your active room": "Saada oma nimel oma aktiivses jututoas %(eventType)s sündmusi", - "See %(eventType)s events posted to this room": "Vaata siia jututuppa saadetud %(eventType)s sündmusi" + "See %(eventType)s events posted to this room": "Vaata siia jututuppa saadetud %(eventType)s sündmusi", + "Enter phone number": "Sisesta telefoninumber", + "Enter email address": "Sisesta e-posti aadress", + "Return to call": "Pöördu tagasi kõne juurde", + "Fill Screen": "Täida ekraan", + "Voice Call": "Häälkõne", + "Video Call": "Videokõne", + "Use Command + Enter to send a message": "Sõnumi saatmiseks vajuta Command + Enter klahve", + "See %(msgtype)s messages posted to your active room": "Näha sinu aktiivsesse jututuppa saadetud %(msgtype)s sõnumeid", + "See %(msgtype)s messages posted to this room": "Näha sellesse jututuppa saadetud %(msgtype)s sõnumeid", + "Send %(msgtype)s messages as you in your active room": "Saata sinu nimel %(msgtype)s sõnumeid sinu aktiivsesse jututuppa", + "Send %(msgtype)s messages as you in this room": "Saata sinu nimel %(msgtype)s sõnumeid siia jututuppa", + "See general files posted to your active room": "Näha sinu aktiivsesse jututuppa lisatud muid faile", + "See general files posted to this room": "Näha sellesse jututuppa lisatud muid faile", + "Send general files as you in your active room": "Saata sinu nimel muid faile sinu aktiivsesse jututuppa", + "Send general files as you in this room": "Saata sinu nimel muid faile siia jututuppa", + "See videos posted to your active room": "Näha videosid sinu aktiivses jututoas", + "See videos posted to this room": "Näha siia jututuppa lisatud videosid", + "Send videos as you in your active room": "Saata sinu nimel videosid sinu aktiivsesse jututuppa", + "Send videos as you in this room": "Saata sinu nimel videosid siia jututuppa", + "See images posted to your active room": "Näha sinu aktiivsesse jututuppa lisatud pilte", + "See images posted to this room": "Näha siia jututuppa lisatud pilte", + "Send images as you in your active room": "Saata sinu nimel pilte sinu aktiivsesse jututuppa", + "Send images as you in this room": "Saata sinu nimel pilte siia jututuppa", + "See emotes posted to your active room": "Näha emotesid sinu aktiivses jututoas", + "See emotes posted to this room": "Vaata selle jututoa emotesid", + "Send emotes as you in your active room": "Saada oma aktiivses jututoas enda nimel emotesid", + "Send emotes as you in this room": "Saada selles jututoas oma nimel emotesid", + "See text messages posted to your active room": "Vaata tekstisõnumeid oma aktiivses jututoas" } From 2a02e57a953154dc15f0fd14f0321d95e3bcb3c9 Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 26 Nov 2020 14:35:09 +0000 Subject: [PATCH 101/319] Add UI for hold functionality --- res/css/_components.scss | 1 + .../views/context_menus/_CallContextMenu.scss | 23 +++ res/css/views/voip/_CallView.scss | 100 ++++++++++++ src/components/structures/ContextMenu.tsx | 6 +- .../views/context_menus/CallContextMenu.tsx | 51 ++++++ src/components/views/voip/CallView.tsx | 152 ++++++++++++++++-- src/i18n/strings/en_EN.json | 4 + 7 files changed, 320 insertions(+), 17 deletions(-) create mode 100644 res/css/views/context_menus/_CallContextMenu.scss create mode 100644 src/components/views/context_menus/CallContextMenu.tsx diff --git a/res/css/_components.scss b/res/css/_components.scss index 445ed70ff4..414e2dc6a6 100644 --- a/res/css/_components.scss +++ b/res/css/_components.scss @@ -53,6 +53,7 @@ @import "./views/avatars/_MemberStatusMessageAvatar.scss"; @import "./views/avatars/_PulsedAvatar.scss"; @import "./views/avatars/_WidgetAvatar.scss"; +@import "./views/context_menus/_CallContextMenu.scss"; @import "./views/context_menus/_IconizedContextMenu.scss"; @import "./views/context_menus/_MessageContextMenu.scss"; @import "./views/context_menus/_StatusMessageContextMenu.scss"; diff --git a/res/css/views/context_menus/_CallContextMenu.scss b/res/css/views/context_menus/_CallContextMenu.scss new file mode 100644 index 0000000000..55b73b0344 --- /dev/null +++ b/res/css/views/context_menus/_CallContextMenu.scss @@ -0,0 +1,23 @@ +/* +Copyright 2020 New Vector Ltd + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +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_CallContextMenu_item { + width: 205px; + height: 40px; + padding-left: 16px; + line-height: 40px; + vertical-align: center; +} diff --git a/res/css/views/voip/_CallView.scss b/res/css/views/voip/_CallView.scss index 2b87181b1e..d5e58c94c5 100644 --- a/res/css/views/voip/_CallView.scss +++ b/res/css/views/voip/_CallView.scss @@ -43,17 +43,99 @@ limitations under the License. .mx_CallView_voice { position: relative; display: flex; + flex-direction: column; align-items: center; justify-content: center; background-color: $inverted-bg-color; } +.mx_CallView_voice_hold { + // This masks the avatar image so when it's blurred, the edge is still crisp + .mx_CallView_voice_avatarContainer { + border-radius: 2000px; + overflow: hidden; + position: relative; + &::after { + position: absolute; + content: ''; + width: 20px; + height: 20px; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + background-image: url('$(res)/img/voip/paused.svg'); + background-position: center; + background-size: cover; + } + } + .mx_BaseAvatar { + filter: blur(20px); + overflow: hidden; + } +} + +.mx_CallView_voice_holdText { + height: 16px; + color: $accent-fg-color; + .mx_AccessibleButton_hasKind { + padding: 0px; + } +} + .mx_CallView_video { width: 100%; position: relative; z-index: 30; } +.mx_CallView_video_hold { + overflow: hidden; + + // we keep these around in the DOM: it saved wiring them up again when the call + // is resumed and keeps the container the right size + .mx_VideoFeed { + visibility: hidden; + } +} + +.mx_CallView_video_holdBackground { + position: absolute; + width: 100%; + height: 100%; + left: 0; + right: 0; + background-repeat: no-repeat; + background-size: cover; + background-position: center; + filter: blur(20px); +} + +.mx_CallView_video_holdContent { + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + font-weight: bold; + color: $accent-fg-color; + text-align: center; + + &::before { + display: block; + margin-left: auto; + margin-right: auto; + content: ''; + width: 20px; + height: 20px; + background-image: url('$(res)/img/voip/paused.svg'); + background-position: center; + background-size: cover; + } + .mx_AccessibleButton_hasKind { + display: block; + padding: 0px; + } +} + .mx_CallView_header { height: 44px; display: flex; @@ -173,6 +255,12 @@ limitations under the License. } } +// Makes the alignment correct +.mx_CallView_callControls_nothing { + margin-right: auto; + cursor: initial; +} + .mx_CallView_callControls_button_micOn { &::before { background-image: url('$(res)/img/voip/mic-on.svg'); @@ -203,6 +291,18 @@ limitations under the License. } } +.mx_CallView_callControls_button_more { + margin-left: auto; + &::before { + background-image: url('$(res)/img/voip/more.svg'); + } +} + +.mx_CallView_callControls_button_more_hidden { + margin-left: auto; + cursor: initial; +} + .mx_CallView_callControls_button_invisible { visibility: hidden; pointer-events: none; diff --git a/src/components/structures/ContextMenu.tsx b/src/components/structures/ContextMenu.tsx index fa0d6682dd..190b231b74 100644 --- a/src/components/structures/ContextMenu.tsx +++ b/src/components/structures/ContextMenu.tsx @@ -398,7 +398,7 @@ export const toRightOf = (elementRect: DOMRect, chevronOffset = 12) => { }; // Placement method for to position context menu right-aligned and flowing to the left of elementRect -export const aboveLeftOf = (elementRect: DOMRect, chevronFace = ChevronFace.None) => { +export const aboveLeftOf = (elementRect: DOMRect, chevronFace = ChevronFace.None, vPadding = 0) => { const menuOptions: IPosition & { chevronFace: ChevronFace } = { chevronFace }; const buttonRight = elementRect.right + window.pageXOffset; @@ -408,9 +408,9 @@ export const aboveLeftOf = (elementRect: DOMRect, chevronFace = ChevronFace.None menuOptions.right = window.innerWidth - buttonRight; // Align the menu vertically on whichever side of the button has more space available. if (buttonBottom < window.innerHeight / 2) { - menuOptions.top = buttonBottom; + menuOptions.top = buttonBottom + vPadding; } else { - menuOptions.bottom = window.innerHeight - buttonTop; + menuOptions.bottom = (window.innerHeight - buttonTop) + vPadding; } return menuOptions; diff --git a/src/components/views/context_menus/CallContextMenu.tsx b/src/components/views/context_menus/CallContextMenu.tsx new file mode 100644 index 0000000000..31e82c19b1 --- /dev/null +++ b/src/components/views/context_menus/CallContextMenu.tsx @@ -0,0 +1,51 @@ +/* +Copyright 2020 New Vector Ltd + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +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 PropTypes from 'prop-types'; +import { _t } from '../../../languageHandler'; +import { ContextMenu, IProps as IContextMenuProps, MenuItem } from '../../structures/ContextMenu'; +import { MatrixCall } from 'matrix-js-sdk/src/webrtc/call'; + +interface IProps extends IContextMenuProps { + call: MatrixCall; +} + +export default class CallContextMenu extends React.Component { + static propTypes = { + // js-sdk User object. Not required because it might not exist. + user: PropTypes.object, + }; + + constructor(props) { + super(props); + } + + onHoldUnholdClick = () => { + this.props.call.setRemoteOnHold(!this.props.call.isRemoteOnHold()); + this.props.onFinished(); + } + + render() { + const holdUnholdCaption = this.props.call.isRemoteOnHold() ? _t("Resume") : _t("Hold"); + + return + + {holdUnholdCaption} + + ; + } +} diff --git a/src/components/views/voip/CallView.tsx b/src/components/views/voip/CallView.tsx index db6d2b7ae0..c9f5db77e6 100644 --- a/src/components/views/voip/CallView.tsx +++ b/src/components/views/voip/CallView.tsx @@ -15,7 +15,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React, { createRef } from 'react'; +import React, { createRef, CSSProperties } from 'react'; import Room from 'matrix-js-sdk/src/models/room'; import dis from '../../../dispatcher/dispatcher'; import CallHandler from '../../../CallHandler'; @@ -28,6 +28,9 @@ import { CallEvent } from 'matrix-js-sdk/src/webrtc/call'; import classNames from 'classnames'; import AccessibleButton from '../elements/AccessibleButton'; import {isOnlyCtrlOrCmdKeyEvent, Key} from '../../../Keyboard'; +import {aboveLeftOf, ChevronFace, ContextMenuButton} from '../../structures/ContextMenu'; +import CallContextMenu from '../context_menus/CallContextMenu'; +import { avatarUrlForMember } from '../../../Avatar'; interface IProps { // js-sdk room object. If set, we will only show calls for the given @@ -51,10 +54,12 @@ interface IProps { interface IState { call: MatrixCall; isLocalOnHold: boolean, + isRemoteOnHold: boolean, micMuted: boolean, vidMuted: boolean, callState: CallState, controlsVisible: boolean, + showMoreMenu: boolean, } function getFullScreenElement() { @@ -89,11 +94,14 @@ const CONTROLS_HIDE_DELAY = 1000; // Height of the header duplicated from CSS because we need to subtract it from our max // height to get the max height of the video const HEADER_HEIGHT = 44; +const CONTEXT_MENU_VPADDING = 8; // How far the context menu sits above the button (px) export default class CallView extends React.Component { private dispatcherRef: string; private contentRef = createRef(); private controlsHideTimer: number = null; + private contextMenuButton = createRef(); + constructor(props: IProps) { super(props); @@ -101,10 +109,12 @@ export default class CallView extends React.Component { this.state = { call, isLocalOnHold: call ? call.isLocalOnHold() : null, + isRemoteOnHold: call ? call.isRemoteOnHold() : null, micMuted: call ? call.isMicrophoneMuted() : null, vidMuted: call ? call.isLocalVideoMuted() : null, callState: call ? call.state : null, controlsVisible: true, + showMoreMenu: false, } this.updateCallListeners(null, call); @@ -149,11 +159,16 @@ export default class CallView extends React.Component { this.setState({ call: newCall, isLocalOnHold: newCall ? newCall.isLocalOnHold() : null, + isRemoteOnHold: newCall ? newCall.isRemoteOnHold() : null, micMuted: newCall ? newCall.isMicrophoneMuted() : null, vidMuted: newCall ? newCall.isLocalVideoMuted() : null, callState: newCall ? newCall.state : null, controlsVisible: newControlsVisible, }); + } else { + this.setState({ + callState: newCall ? newCall.state : null, + }); } if (!newCall && getFullScreenElement()) { exitFullscreen(); @@ -187,16 +202,30 @@ export default class CallView extends React.Component { private updateCallListeners(oldCall: MatrixCall, newCall: MatrixCall) { if (oldCall === newCall) return; - if (oldCall) oldCall.removeListener(CallEvent.HoldUnhold, this.onCallHoldUnhold); - if (newCall) newCall.on(CallEvent.HoldUnhold, this.onCallHoldUnhold); + if (oldCall) { + oldCall.removeListener(CallEvent.LocalHoldUnhold, this.onCallLocalHoldUnhold); + oldCall.removeListener(CallEvent.RemoteHoldUnhold, this.onCallRemoteHoldUnhold); + } + if (newCall) { + newCall.on(CallEvent.LocalHoldUnhold, this.onCallLocalHoldUnhold); + newCall.on(CallEvent.RemoteHoldUnhold, this.onCallRemoteHoldUnhold); + } } - private onCallHoldUnhold = () => { + private onCallLocalHoldUnhold = () => { this.setState({ isLocalOnHold: this.state.call ? this.state.call.isLocalOnHold() : null, }); }; + private onCallRemoteHoldUnhold = () => { + this.setState({ + isRemoteOnHold: this.state.call ? this.state.call.isRemoteOnHold() : null, + // update both here because isLocalOnHold changes when we hold the call too + isLocalOnHold: this.state.call ? this.state.call.isLocalOnHold() : null, + }); + }; + private onFullscreenClick = () => { dis.dispatch({ action: 'video_fullscreen', @@ -223,6 +252,8 @@ export default class CallView extends React.Component { } private showControls() { + if (this.state.showMoreMenu) return; + if (!this.state.controlsVisible) { this.setState({ controlsVisible: true, @@ -252,6 +283,25 @@ export default class CallView extends React.Component { this.setState({vidMuted: newVal}); } + private onMoreClick = () => { + if (this.controlsHideTimer) { + clearTimeout(this.controlsHideTimer); + this.controlsHideTimer = null; + } + + this.setState({ + showMoreMenu: true, + controlsVisible: true, + }); + } + + private closeContextMenu = () => { + this.setState({ + showMoreMenu: false, + }); + this.controlsHideTimer = window.setTimeout(this.onControlsHideTimer, CONTROLS_HIDE_DELAY); + } + // we register global shortcuts here, they *must not conflict* with local shortcuts elsewhere or both will fire // Note that this assumes we always have a callview on screen at any given time // CallHandler would probably be a better place for this @@ -292,14 +342,32 @@ export default class CallView extends React.Component { }); } + private onCallResumeClick = () => { + this.state.call.setRemoteOnHold(false); + } + public render() { if (!this.state.call) return null; const client = MatrixClientPeg.get(); const callRoom = client.getRoom(this.state.call.roomId); + let contextMenu; + let callControls; if (this.props.room) { + if (this.state.showMoreMenu) { + contextMenu = ; + } + const micClasses = classNames({ mx_CallView_callControls_button: true, mx_CallView_callControls_button_micOn: !this.state.micMuted, @@ -333,17 +401,29 @@ export default class CallView extends React.Component { mx_CallView_callControls_hidden: !this.state.controlsVisible, }); - const vidMuteButton = this.state.call.type === CallType.Video ?
: null; + // The 'more' button actions are only relevant in a connected call + // When not connected, we have to put something there to make the flexbox alignment correct + const contextMenuButton = this.state.callState === CallState.Connected ? :
; + + // in the near future, the dial pad button will go on the left. For now, it's the nothing button + // because something needs to have margin-right: auto to make the alignment correct. callControls =
-
+ -
{ dis.dispatch({ @@ -355,6 +435,7 @@ export default class CallView extends React.Component { {vidMuteButton}
+ {contextMenuButton}
; } @@ -362,24 +443,66 @@ export default class CallView extends React.Component { // for voice calls (fills the bg) let contentView: React.ReactNode; + const isOnHold = this.state.isLocalOnHold || this.state.isRemoteOnHold; + let onHoldText = null; + if (this.state.isRemoteOnHold) { + onHoldText = _t("You held the call Resume", {}, { + a: sub => + {sub} + , + }); + } else if (this.state.isLocalOnHold) { + onHoldText = _t("%(peerName)s held the call", { + peerName: this.state.call.getOpponentMember().name, + }); + } + if (this.state.call.type === CallType.Video) { + let onHoldContent = null; + let onHoldBackground = null; + const backgroundStyle: CSSProperties = {}; + const containerClasses = classNames({ + mx_CallView_video: true, + mx_CallView_video_hold: isOnHold, + }); + if (isOnHold) { + onHoldContent =
+ {onHoldText} +
; + const backgroundAvatarUrl = avatarUrlForMember( + // is it worth getting the size of the div to pass here? + this.state.call.getOpponentMember(), 1024, 1024, 'crop', + ); + backgroundStyle.backgroundImage = 'url(' + backgroundAvatarUrl + ')'; + onHoldBackground =
; + } + // if we're fullscreen, we don't want to set a maxHeight on the video element. const maxVideoHeight = getFullScreenElement() ? null : this.props.maxVideoHeight - HEADER_HEIGHT; - contentView =
+ contentView =
+ {onHoldBackground} + {onHoldContent} {callControls}
; } else { const avatarSize = this.props.room ? 200 : 75; - contentView =
- + const classes = classNames({ + mx_CallView_voice: true, + mx_CallView_voice_hold: isOnHold, + }); + contentView =
+
+ +
+
{onHoldText}
{callControls}
; } @@ -431,6 +554,7 @@ export default class CallView extends React.Component { return
{header} {contentView} + {contextMenu}
; } } diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index 0d50128f32..de1c20be1b 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -836,6 +836,8 @@ "When rooms are upgraded": "When rooms are upgraded", "My Ban List": "My Ban List", "This is your list of users/servers you have blocked - don't leave the room!": "This is your list of users/servers you have blocked - don't leave the room!", + "You held the call Resume": "You held the call Resume", + "%(peerName)s held the call": "%(peerName)s held the call", "Video Call": "Video Call", "Voice Call": "Voice Call", "Fill Screen": "Fill Screen", @@ -2231,6 +2233,8 @@ "Warning: You should only set up key backup from a trusted computer.": "Warning: You should only set up key backup from a trusted computer.", "Access your secure message history and set up secure messaging by entering your recovery key.": "Access your secure message history and set up secure messaging by entering your recovery key.", "If you've forgotten your recovery key you can ": "If you've forgotten your recovery key you can ", + "Resume": "Resume", + "Hold": "Hold", "Reject invitation": "Reject invitation", "Are you sure you want to reject the invitation?": "Are you sure you want to reject the invitation?", "Unable to reject invite": "Unable to reject invite", From 5b7ad079d2471051f7d5c921ed0f76b0149ead5f Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 26 Nov 2020 14:55:07 +0000 Subject: [PATCH 102/319] Add SVGs --- res/img/voip/more.svg | 17 +++++++++++++++++ res/img/voip/paused.svg | 3 +++ 2 files changed, 20 insertions(+) create mode 100644 res/img/voip/more.svg create mode 100644 res/img/voip/paused.svg diff --git a/res/img/voip/more.svg b/res/img/voip/more.svg new file mode 100644 index 0000000000..7990f6bcff --- /dev/null +++ b/res/img/voip/more.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/res/img/voip/paused.svg b/res/img/voip/paused.svg new file mode 100644 index 0000000000..a967bf8ddf --- /dev/null +++ b/res/img/voip/paused.svg @@ -0,0 +1,3 @@ + + + From 86025459f40c661e4118d54d9e34eaaf19773e43 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Thu, 26 Nov 2020 15:01:12 +0000 Subject: [PATCH 103/319] Remove unused dialog, todo comments and other tiny tweaks --- .../views/auth/CustomServerDialog.js | 47 ------------------- .../dialogs/RegistrationEmailPromptDialog.tsx | 2 +- .../views/dialogs/ServerPickerDialog.tsx | 2 +- src/components/views/elements/SSOButtons.tsx | 1 - .../views/elements/ServerPicker.tsx | 1 - 5 files changed, 2 insertions(+), 51 deletions(-) delete mode 100644 src/components/views/auth/CustomServerDialog.js diff --git a/src/components/views/auth/CustomServerDialog.js b/src/components/views/auth/CustomServerDialog.js deleted file mode 100644 index 138f8c4689..0000000000 --- a/src/components/views/auth/CustomServerDialog.js +++ /dev/null @@ -1,47 +0,0 @@ -/* -Copyright 2015, 2016 OpenMarket Ltd -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 { _t } from '../../../languageHandler'; -import SdkConfig from '../../../SdkConfig'; - -export default class CustomServerDialog extends React.Component { - render() { - const brand = SdkConfig.get().brand; - return ( -
-
- { _t("Custom Server Options") } -
-
-

{_t( - "You can use the custom server options to sign into other " + - "Matrix servers by specifying a different homeserver URL. This " + - "allows you to use %(brand)s with an existing Matrix account on a " + - "different homeserver.", - { brand }, - )}

-
-
- -
-
- ); - } -} diff --git a/src/components/views/dialogs/RegistrationEmailPromptDialog.tsx b/src/components/views/dialogs/RegistrationEmailPromptDialog.tsx index 8e91a07bf5..b7cc81c113 100644 --- a/src/components/views/dialogs/RegistrationEmailPromptDialog.tsx +++ b/src/components/views/dialogs/RegistrationEmailPromptDialog.tsx @@ -67,7 +67,7 @@ const RegistrationEmailPromptDialog: React.FC = ({onFinished}) => { >

{_t("Just a heads up, if you don't add an email and forget your password, you could " + - "permanently lose access to your account.", {}, { + "permanently lose access to your account.", {}, { b: sub => {sub}, })}

diff --git a/src/components/views/dialogs/ServerPickerDialog.tsx b/src/components/views/dialogs/ServerPickerDialog.tsx index 5a3a08670f..9eb819c98e 100644 --- a/src/components/views/dialogs/ServerPickerDialog.tsx +++ b/src/components/views/dialogs/ServerPickerDialog.tsx @@ -125,7 +125,7 @@ export default class ServerPickerDialog extends React.PureComponent = ({ let icon; if (idp && idp.icon && idp.icon.startsWith("https://")) { - // TODO sanitize images icon = {label}; } diff --git a/src/components/views/elements/ServerPicker.tsx b/src/components/views/elements/ServerPicker.tsx index b7fe7e8e84..7637ab7b8d 100644 --- a/src/components/views/elements/ServerPicker.tsx +++ b/src/components/views/elements/ServerPicker.tsx @@ -42,7 +42,6 @@ const showPickerDialog = ( const onHelpClick = () => { Modal.createTrackedDialog('Custom Server Dialog', '', InfoDialog, { - // TODO title: _t("Server Options"), description: _t("You can use the custom server options to sign into other Matrix servers by specifying " + "a different homeserver URL. This allows you to use Element with an existing Matrix account on " + From b9c57f47b04df359eb840a53ce94f08778864e7a Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Thu, 26 Nov 2020 08:01:38 -0700 Subject: [PATCH 104/319] Remove example --- src/stores/room-list/filters/VisibilityProvider.ts | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/stores/room-list/filters/VisibilityProvider.ts b/src/stores/room-list/filters/VisibilityProvider.ts index def2c20514..2e4eb485c0 100644 --- a/src/stores/room-list/filters/VisibilityProvider.ts +++ b/src/stores/room-list/filters/VisibilityProvider.ts @@ -38,15 +38,6 @@ export class VisibilityProvider { // TODO: The `if` statements to control visibility of custom room types // would go here. The remainder of this function assumes that the statements // will be here. - - // An example of how the `if` statements mentioned above would look follows. - // A real check would probably check for a `type` or something instead of the room ID. - // Note: the room ID here is intentionally invalid to prevent accidental hiding of someone's room. - // TODO: Remove this statement once we have a statement to replace it (just keeping the reference count up) - if (room.roomId === '~!JFmkoouJANxFGtmMYC:localhost') { - isVisible = false; - forced = true; - } // ------ const isVisibleFn = RoomListCustomisations.isRoomVisible; From c2c328e23c66f4d1a50e163432b1fd029fbbe0cd Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Thu, 26 Nov 2020 08:06:48 -0700 Subject: [PATCH 105/319] Appease the linter --- src/stores/room-list/filters/VisibilityProvider.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/stores/room-list/filters/VisibilityProvider.ts b/src/stores/room-list/filters/VisibilityProvider.ts index 2e4eb485c0..553dd33ce0 100644 --- a/src/stores/room-list/filters/VisibilityProvider.ts +++ b/src/stores/room-list/filters/VisibilityProvider.ts @@ -31,13 +31,17 @@ export class VisibilityProvider { } public isRoomVisible(room: Room): boolean { + /* eslint-disable prefer-const */ let isVisible = true; // Returned at the end of this function let forced = false; // When true, this function won't bother calling the customisation points + /* eslint-enable prefer-const */ // ------ // TODO: The `if` statements to control visibility of custom room types // would go here. The remainder of this function assumes that the statements // will be here. + // + // When removing this comment block, please remove the lint disable lines in the area. // ------ const isVisibleFn = RoomListCustomisations.isRoomVisible; From 5f03cbd88fc3e0546f2d76b32e9d22901afdac38 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Thu, 26 Nov 2020 15:45:15 +0000 Subject: [PATCH 106/319] Iterate PR some more --- src/components/structures/auth/Login.tsx | 11 ++++++----- src/i18n/strings/en_EN.json | 4 +--- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/components/structures/auth/Login.tsx b/src/components/structures/auth/Login.tsx index 9e2105d0c2..606aeb44ab 100644 --- a/src/components/structures/auth/Login.tsx +++ b/src/components/structures/auth/Login.tsx @@ -341,13 +341,14 @@ export default class LoginComponent extends React.PureComponent onTryRegisterClick = ev => { const hasPasswordFlow = this.state.flows.find(flow => flow.type === "m.login.password"); - if (!hasPasswordFlow) { - // If we're showing SSO it means that registration is also probably disabled, - // so intercept the click and instead pretend the user clicked 'Sign in with SSO'. + const ssoFlow = this.state.flows.find(flow => flow.type === "m.login.sso" || flow.type === "m.login.cas"); + // If has no password flow but an SSO flow guess that the user wants to register with SSO. + // TODO: instead hide the Register button if registration is disabled by checking with the server, + // has no specific errCode currently and uses M_FORBIDDEN. + if (ssoFlow && !hasPasswordFlow) { ev.preventDefault(); ev.stopPropagation(); - const step = this.state.flows.find(flow => flow.type === "m.login.sso" || flow.type === "m.login.cas"); - const ssoKind = step.type === 'm.login.sso' ? 'sso' : 'cas'; + const ssoKind = ssoFlow.type === 'm.login.sso' ? 'sso' : 'cas'; PlatformPeg.get().startSingleSignOn(this.loginLogic.createTemporaryClient(), ssoKind, this.props.fragmentAfterLogin); } else { diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index e008f4d365..4ae0019e5e 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -2112,7 +2112,7 @@ "This wasn't me": "This wasn't me", "Doesn't look like a valid email address": "Doesn't look like a valid email address", "Continuing without email": "Continuing without email", - "Just a heads up, if you don't add an email and forget your password, you could permanently lose access to your account.": "Just a heads up, if you don't add an email and forget your password, you could permanently lose access to your account.", + "Just a heads up, if you don't add an email and forget your password, you could permanently lose access to your account.": "Just a heads up, if you don't add an email and forget your password, you could permanently lose access to your account.", "Email (optional)": "Email (optional)", "Please fill why you're reporting.": "Please fill why you're reporting.", "Report Content to Your Homeserver Administrator": "Report Content to Your Homeserver Administrator", @@ -2284,8 +2284,6 @@ "powered by Matrix": "powered by Matrix", "This homeserver would like to make sure you are not a robot.": "This homeserver would like to make sure you are not a robot.", "Country Dropdown": "Country Dropdown", - "Custom Server Options": "Custom Server Options", - "You can use the custom server options to sign into other Matrix servers by specifying a different homeserver URL. This allows you to use %(brand)s with an existing Matrix account on a different homeserver.": "You can use the custom server options to sign into other Matrix servers by specifying a different homeserver URL. This allows you to use %(brand)s with an existing Matrix account on a different homeserver.", "Confirm your identity by entering your account password below.": "Confirm your identity by entering your account password below.", "Password": "Password", "Missing captcha public key in homeserver configuration. Please report this to your homeserver administrator.": "Missing captcha public key in homeserver configuration. Please report this to your homeserver administrator.", From ede67684e4d436be9602c3e570079dfa036617af Mon Sep 17 00:00:00 2001 From: Steffen Kolmer Date: Thu, 26 Nov 2020 18:27:35 +0100 Subject: [PATCH 107/319] Removed trailing space --- src/SlashCommands.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SlashCommands.tsx b/src/SlashCommands.tsx index c7d5b1b08c..45c7251c3b 100644 --- a/src/SlashCommands.tsx +++ b/src/SlashCommands.tsx @@ -1096,7 +1096,7 @@ export const Commands = [ category: CommandCategories.messages, hideCompletionAfterSpace: true, }), - + ...effects.map((effect) => { return new Command({ command: effect.command, From 80f1df6d954eeb2ed666d302c485d15dc6773fd1 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Thu, 26 Nov 2020 15:09:08 -0700 Subject: [PATCH 108/319] Don't needlessly persist user widgets Fixes https://github.com/vector-im/element-web/issues/15842 We don't have a concept of a stickerpicker staying on screen, so don't make it a thing yet. --- src/components/views/elements/AppTile.js | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/src/components/views/elements/AppTile.js b/src/components/views/elements/AppTile.js index b862a1e912..7e0ae965bb 100644 --- a/src/components/views/elements/AppTile.js +++ b/src/components/views/elements/AppTile.js @@ -375,17 +375,20 @@ export default class AppTile extends React.Component {
); - // all widgets can theoretically be allowed to remain on screen, so we wrap - // them all in a PersistedElement from the get-go. If we wait, the iframe will - // be re-mounted later, which means the widget has to start over, which is bad. + if (!this.props.userWidget) { + // All room widgets can theoretically be allowed to remain on screen, so we + // wrap them all in a PersistedElement from the get-go. If we wait, the iframe + // will be re-mounted later, which means the widget has to start over, which is + // bad. - // Also wrap the PersistedElement in a div to fix the height, otherwise - // AppTile's border is in the wrong place - appTileBody =
- - {appTileBody} - -
; + // Also wrap the PersistedElement in a div to fix the height, otherwise + // AppTile's border is in the wrong place + appTileBody =
+ + {appTileBody} + +
; + } } } From f2bc3db8fd4fdd8410f42b67f2f1c76f65e992da Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Thu, 26 Nov 2020 15:09:44 -0700 Subject: [PATCH 109/319] Fix visual gap of sticker picker at bottom Fixes https://github.com/vector-im/element-web/issues/15690 --- res/css/views/rooms/_Stickers.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/res/css/views/rooms/_Stickers.scss b/res/css/views/rooms/_Stickers.scss index 94f42efe83..da86797f42 100644 --- a/res/css/views/rooms/_Stickers.scss +++ b/res/css/views/rooms/_Stickers.scss @@ -22,7 +22,7 @@ iframe { // Sticker picker depends on the fixed height previously used for all tiles - height: 273px; + height: 283px; // height of the popout minus the AppTile menu bar } } From cb3b8b6c77d2a9476fb4875cfe820d087d07296b Mon Sep 17 00:00:00 2001 From: Arsh Sharma Date: Fri, 27 Nov 2020 14:13:42 +0530 Subject: [PATCH 110/319] fix(EventTile): updated comment --- src/components/views/rooms/EventTile.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/views/rooms/EventTile.js b/src/components/views/rooms/EventTile.js index 0bd00ad051..11277daa57 100644 --- a/src/components/views/rooms/EventTile.js +++ b/src/components/views/rooms/EventTile.js @@ -747,7 +747,8 @@ export default class EventTile extends React.Component { if (this.props.mxEvent.sender && avatarSize) { let member; // set member to receiver (target) if it is a 3PID invite - // so that the correct avatar is shown + // so that the correct avatar is shown as the text is + // `$target accepted the invitation for $email` if (this.props.mxEvent.getContent().third_party_invite) { member = this.props.mxEvent.target; } else { From d468a37de5e1f13d729b0c09131374de06c4a6ea Mon Sep 17 00:00:00 2001 From: LinAGKar Date: Thu, 26 Nov 2020 15:30:02 +0000 Subject: [PATCH 111/319] Translated using Weblate (Swedish) Currently translated at 97.5% (2625 of 2692 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/sv/ --- src/i18n/strings/sv.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/sv.json b/src/i18n/strings/sv.json index 74e5fc0125..93ff8808cb 100644 --- a/src/i18n/strings/sv.json +++ b/src/i18n/strings/sv.json @@ -2781,5 +2781,7 @@ "Remain on your screen while running": "Stanna kvar på skärmen när det körs", "Remain on your screen when viewing another room, when running": "Stanna kvar på skärmen när ett annat rum visas, när det körs", "See when the topic changes in this room": "Se när ämnet ändras i det här rummet", - "Change the topic of this room": "Ändra ämnet för det här rummet" + "Change the topic of this room": "Ändra ämnet för det här rummet", + "See when the topic changes in your active room": "Se när ämnet ändras i ditt aktiva rum", + "Change the topic of your active room": "Ändra ämnet för ditt aktiva rum" } From a609b396cd913269005e6afb0096659f40de859c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=AE=D1=80=D0=B8=D0=B9=20=D0=A0=D1=83=D1=80=D0=B5=D0=BD?= =?UTF-8?q?=D0=BA=D0=BE?= Date: Fri, 27 Nov 2020 08:47:43 +0000 Subject: [PATCH 112/319] Translated using Weblate (Ukrainian) Currently translated at 53.5% (1441 of 2692 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/uk/ --- src/i18n/strings/uk.json | 180 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 179 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/uk.json b/src/i18n/strings/uk.json index dbc89b2fa8..4862f31a40 100644 --- a/src/i18n/strings/uk.json +++ b/src/i18n/strings/uk.json @@ -1344,5 +1344,183 @@ "Costa Rica": "Коста Ріка", "Cook Islands": "Острова Кука", "Congo - Kinshasa": "Конга - Киншаса", - "Congo - Brazzaville": "Конго - Браззавиль" + "Congo - Brazzaville": "Конго - Браззавиль", + "%(senderDisplayName)s changed the server ACLs for this room.": "%(senderDisplayName)s змінив серверні права доступу для цієї кімнати.", + "%(senderDisplayName)s set the server ACLs for this room.": "%(senderDisplayName)s встановив серверні права доступу для цієї кімнати", + "Takes the call in the current room off hold": "Зніміть дзвінок у поточній кімнаті з утримання", + "Places the call in the current room on hold": "Переведіть дзвінок у поточній кімнаті на утримання", + "Zimbabwe": "Зімбабве", + "Zambia": "Замбія", + "Yemen": "Ємен", + "Western Sahara": "Західна Сахара", + "Wallis & Futuna": "Волліс і Футуна", + "Vietnam": "В'єтнам", + "Venezuela": "Венесуела", + "Vatican City": "Ватикан", + "Vanuatu": "Вануату", + "Uzbekistan": "Узбекистан", + "Uruguay": "Уругвай", + "United Arab Emirates": "Об'єднані Арабські Емірати", + "Ukraine": "Україна", + "Uganda": "Уганда", + "U.S. Virgin Islands": "Американські Віргінські Острови", + "Tuvalu": "Тувалу", + "Turks & Caicos Islands": "Острови Теркс і Кайкос", + "Turkmenistan": "Туркменістан", + "Turkey": "Турція", + "Tunisia": "Туніс", + "Trinidad & Tobago": "Тринідад і Тобаго", + "Tonga": "Тонга", + "Tokelau": "Токелау", + "Togo": "Того", + "Timor-Leste": "Східний Тимор", + "Thailand": "Тайланд", + "Tanzania": "Танзанія", + "Tajikistan": "Таджикистан", + "Taiwan": "Тайвань", + "São Tomé & Príncipe": "Сан-Томе і Принсіпі", + "Syria": "Сирія", + "Switzerland": "Швейцарія", + "Sweden": "Швеція", + "Swaziland": "Есватіні", + "Svalbard & Jan Mayen": "Свальбард і Ян-Маєн", + "Suriname": "Суринам", + "Sudan": "Судан", + "St. Vincent & Grenadines": "Сент-Вінсент і Гренадини", + "St. Pierre & Miquelon": "Сен-П'єр і Мікелон", + "St. Martin": "Сен-Мартен", + "St. Lucia": "Сент-Люсія", + "St. Kitts & Nevis": "Сент-Кіттс і Невіс", + "St. Helena": "Острів Святої Єлени", + "St. Barthélemy": "Сен-Бартельмі", + "Sri Lanka": "Шрі-Ланка", + "Spain": "Іспанія", + "South Sudan": "Південний Судан", + "South Korea": "Південна Корея", + "South Georgia & South Sandwich Islands": "Південна Джорджія і Південні Сандвічеві Острови", + "South Africa": "Південна Африка", + "Somalia": "Сомалі", + "Solomon Islands": "Соломонові Острови", + "Slovenia": "Словенія", + "Slovakia": "Словаччина", + "Sint Maarten": "Сінт-Мартен", + "Singapore": "Сингапур", + "Sierra Leone": "Сьєрра-Леоне", + "Seychelles": "Сейшели", + "Serbia": "Сербія", + "Senegal": "Сенегал", + "Saudi Arabia": "Саудівська Аравія", + "San Marino": "Сан Марино", + "Samoa": "Самоа", + "Réunion": "Реюньйон", + "Rwanda": "Руанда", + "Russia": "Росія", + "Romania": "Ромунія", + "Qatar": "Катар", + "Puerto Rico": "Пуерто-Рико", + "Portugal": "Португалія", + "Poland": "Польща", + "Pitcairn Islands": "Острови Піткерн", + "Philippines": "Філіппіни", + "Peru": "Перу", + "Paraguay": "Парагвай", + "Papua New Guinea": "Папуа Нова Гвінея", + "Panama": "Панама", + "Palestine": "Палестина", + "Palau": "Палау", + "Pakistan": "Пакистан", + "Oman": "Оман", + "Norway": "Норвегія", + "Northern Mariana Islands": "Північні Маріанські Острови", + "North Korea": "Північна Корея", + "Norfolk Island": "Острів Норфолк", + "Niue": "Ніуе", + "Nigeria": "Нігерія", + "Niger": "Нігер", + "Nicaragua": "Нікарагуа", + "New Zealand": "Нова Зеландія", + "New Caledonia": "Нова Каледонія", + "Netherlands": "Нідерланди", + "Nepal": "Непал", + "Nauru": "Науру", + "Namibia": "Намібія", + "Myanmar": "М'янма", + "Mozambique": "Мозамбік", + "Morocco": "Марокко", + "Montserrat": "Монтсеррат", + "Montenegro": "Монтенегро", + "Mongolia": "Монголія", + "Monaco": "Монако", + "Moldova": "Молдова", + "Micronesia": "Мікронезія", + "Mexico": "Мексика", + "Mayotte": "Майотта", + "Mauritius": "Маврикій", + "Mauritania": "Мавританія", + "Martinique": "Мартиніка", + "Marshall Islands": "Маршаллові Острови", + "Malta": "Мальта", + "Mali": "Малі", + "Maldives": "Мальдіви", + "Malaysia": "Малайзія", + "Malawi": "Малаві", + "Madagascar": "Мадагаскар", + "Macedonia": "Македонія", + "Macau": "Макао", + "Luxembourg": "Люксембург", + "Lithuania": "Литва", + "Liechtenstein": "Ліхтенштейн", + "Libya": "Лівія", + "Liberia": "Ліберія", + "Lesotho": "Лесото", + "Lebanon": "Ліван", + "Latvia": "Латвія", + "Laos": "Лаос", + "Kyrgyzstan": "Киргизстан", + "Kuwait": "Кувейт", + "Kosovo": "Косово", + "Kiribati": "Кірібаті", + "Kenya": "Кенія", + "Kazakhstan": "Казахстан", + "Jordan": "Йорданія", + "Jersey": "Джерсі", + "Japan": "Японія", + "Jamaica": "Ямайка", + "Italy": "Італія", + "Israel": "Ізраїль", + "Isle of Man": "Острів Мен", + "Ireland": "Ірландія", + "Iraq": "Ірак", + "Iran": "Іран", + "Indonesia": "Індонезія", + "India": "Індія", + "Iceland": "Ісландія", + "Hungary": "Угорщина", + "Hong Kong": "Гонконг", + "Honduras": "Гондурас", + "Heard & McDonald Islands": "Острови Герд і Макдональд", + "Haiti": "Гаїті", + "Guyana": "Гаяна", + "Guinea-Bissau": "Гвінея-Бісау", + "Guinea": "Гвінея", + "Guernsey": "Гернсі", + "Guatemala": "Гватемала", + "Guam": "Гуам", + "Guadeloupe": "Гваделупа", + "Grenada": "Гренада", + "Greenland": "Гренландія", + "Greece": "Греція", + "Gibraltar": "Гібралтар", + "Ghana": "Гана", + "Germany": "Німеччина", + "Georgia": "Грузія", + "Gambia": "Гамбія", + "Gabon": "Габон", + "French Southern Territories": "Французькі Південні Території", + "French Polynesia": "Французька Полінезія", + "French Guiana": "Французька Гвіана", + "France": "Франція", + "Finland": "Фінляндія", + "Fiji": "Фіджі", + "Faroe Islands": "Фарерські острови" } From 859f842cbd0b43838e77629f45985f7cc83e13a0 Mon Sep 17 00:00:00 2001 From: Tuomas Hietala Date: Thu, 26 Nov 2020 17:52:03 +0000 Subject: [PATCH 113/319] Translated using Weblate (Finnish) Currently translated at 81.5% (2196 of 2692 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/fi/ --- src/i18n/strings/fi.json | 47 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 45 insertions(+), 2 deletions(-) diff --git a/src/i18n/strings/fi.json b/src/i18n/strings/fi.json index 380fadd880..075c1e278a 100644 --- a/src/i18n/strings/fi.json +++ b/src/i18n/strings/fi.json @@ -1631,7 +1631,7 @@ "Discovery options will appear once you have added a phone number above.": "Etsinnän asetukset näkyvät sen jälkeen, kun olet lisännyt puhelinnumeron.", "Failed to connect to integration manager": "Yhdistäminen integraatioiden lähteeseen epäonnistui", "Trusted": "Luotettu", - "Not trusted": "Epäluotettu", + "Not trusted": "Ei-luotettu", "This client does not support end-to-end encryption.": "Tämä asiakasohjelma ei tue osapuolten välistä salausta.", "Messages in this room are not end-to-end encrypted.": "Tämän huoneen viestit eivät ole salattuja.", "Messages in this room are end-to-end encrypted.": "Tämän huoneen viestit ovat salattuja.", @@ -2333,5 +2333,48 @@ "Update %(brand)s": "Päivitä %(brand)s", "Enable desktop notifications": "Ota työpöytäilmoitukset käyttöön", "Takes the call in the current room off hold": "Ottaa nykyisen huoneen puhelun pois pidosta", - "Places the call in the current room on hold": "Asettaa nykyisen huoneen puhelun pitoon" + "Places the call in the current room on hold": "Asettaa nykyisen huoneen puhelun pitoon", + "Away": "Poissa", + "A confirmation email has been sent to %(emailAddress)s": "Vahvistussähköposti on lähetetty osoitteeseen %(emailAddress)s", + "Open the link in the email to continue registration.": "Jatka rekisteröitymistä avaamalla sähköpostissa oleva linkki.", + "Enter email address": "Syötä sähköpostiosoite", + "Enter phone number": "Syötä puhelinnumero", + "Now, let's help you get started": "Autetaanpa sinut alkuun", + "delete the address.": "poista osoite.", + "Filter rooms and people": "Suodata huoneita ja ihmisiä", + "Go to Home View": "Siirry kotinäkymään", + "Community and user menu": "Yhteisö- ja käyttäjävalikko", + "Decline All": "Kieltäydy kaikista", + "Approve": "Hyväksy", + "Your area is experiencing difficulties connecting to the internet.": "Alueellasi on ongelmia internet-yhteyksissä.", + "The server is offline.": "Palvelin ei ole verkossa.", + "Your firewall or anti-virus is blocking the request.": "Palomuurisi tai virustentorjuntaohjelmasi estää pyynnön.", + "The server (%(serverName)s) took too long to respond.": "Palvelin (%(serverName)s) ei vastannut ajoissa.", + "Feedback sent": "Palaute lähetetty", + "There was an error updating your community. The server is unable to process your request.": "Yhteisösi päivittämisessä tapahtui virhe. Palvelin ei voi käsitellä pyyntöäsi.", + "You can change this later if needed.": "Voit tarvittaessa vaihtaa tämän myöhemmin.", + "There was an error creating your community. The name may be taken or the server is unable to process your request.": "Yhteisösi luomisessa tapahtui virhe. Nimi saattaa olla varattu tai palvelin ei voi käsitellä pyyntöäsi.", + "Download logs": "Lataa lokit", + "Preparing to download logs": "Valmistellaan lokien lataamista", + "About": "Tietoa", + "Unpin": "Poista kiinnitys", + "Customise your appearance": "Mukauta ulkoasuasi", + "Appearance Settings only affect this %(brand)s session.": "Ulkoasuasetukset vaikuttavat vain tähän %(brand)s-istuntoon.", + "Set the name of a font installed on your system & %(brand)s will attempt to use it.": "Aseta käyttöjärjestelmääsi asennetun fontin nimi, niin %(brand)s pyrkii käyttämään sitä.", + "The operation could not be completed": "Toimintoa ei voitu tehdä loppuun asti", + "There are advanced notifications which are not shown here.": "On edistyneitä ilmoituksia, joita ei näytetä tässä.", + "Return to call": "Palaa puheluun", + "Voice Call": "Äänipuhelu", + "Video Call": "Videopuhelu", + "Send stickers to your active room as you": "Lähetä aktiiviseen huoneeseesi tarroja itsenäsi", + "Send stickers to this room as you": "Lähetä tähän huoneeseen tarroja itsenäsi", + "Change the avatar of your active room": "Vaihda aktiivisen huoneesi kuva", + "Change the avatar of this room": "Vaihda huoneen kuva", + "Change the name of your active room": "Muuta aktiivisen huoneesi nimeä", + "Change the name of this room": "Muuta tämän huoneen nimeä", + "Change the topic of your active room": "Muuta aktiivisen huoneesi aihetta", + "Change the topic of this room": "Muuta huoneen aihetta", + "Change which room you're viewing": "Vaihda näytettävää huonetta", + "Send stickers into your active room": "Lähetä tarroja aktiiviseen huoneeseesi", + "Send stickers into this room": "Lähetä tarroja tähän huoneeseen" } From 65ab0ee6650badd474c6f322b69f3fda9df5f319 Mon Sep 17 00:00:00 2001 From: David Baker Date: Fri, 27 Nov 2020 12:53:09 +0000 Subject: [PATCH 114/319] Slightly better error if we can't capture user media Fixes https://github.com/vector-im/element-web/issues/15837 --- src/CallHandler.tsx | 39 +++++++++++++++++++++++++++++++++++-- src/i18n/strings/en_EN.json | 7 +++++++ 2 files changed, 44 insertions(+), 2 deletions(-) diff --git a/src/CallHandler.tsx b/src/CallHandler.tsx index 3be203ab98..710cd10f99 100644 --- a/src/CallHandler.tsx +++ b/src/CallHandler.tsx @@ -80,6 +80,7 @@ import { MatrixCall, CallErrorCode, CallState, CallEvent, CallParty, CallType } import Analytics from './Analytics'; import CountlyAnalytics from "./CountlyAnalytics"; import {UIFeature} from "./settings/UIFeature"; +import { CallError } from "matrix-js-sdk/src/webrtc/call"; enum AudioID { Ring = 'ringAudio', @@ -226,11 +227,17 @@ export default class CallHandler { } private setCallListeners(call: MatrixCall) { - call.on(CallEvent.Error, (err) => { + call.on(CallEvent.Error, (err: CallError) => { if (!this.matchesCallForThisRoom(call)) return; - Analytics.trackEvent('voip', 'callError', 'error', err); + Analytics.trackEvent('voip', 'callError', 'error', err.toString()); console.error("Call error:", err); + + if (err.code === CallErrorCode.NoUserMedia) { + this.showMediaCaptureError(call); + return; + } + if ( MatrixClientPeg.get().getTurnServers().length === 0 && SettingsStore.getValue("fallbackICEServerAllowed") === null @@ -377,6 +384,34 @@ export default class CallHandler { }, null, true); } + private showMediaCaptureError(call: MatrixCall) { + let title; + let description; + + if (call.type === CallType.Voice) { + title = _t("Unable to access microphone"); + description =
+ {_t( + "Call failed because no microphone could not be accessed. " + + "Check that a microphone is plugged in and set up correctly.", + )} +
; + } else if (call.type === CallType.Video) { + title = _t("Unable to access webcam / microphone"); + description =
+ {_t("Call failed because no webcam or microphone could not be accessed. Check that:")} +
    +
  • {_t("A microphone and webcam are plugged in and set up correctly")}
  • +
  • {_t("Permission is granted to usethe webcam")}
  • +
  • {_t("No other application is using the webcam")}
  • +
+
; + } + + Modal.createTrackedDialog('Media capture failed', '', ErrorDialog, { + title, description, + }, null, true); + } private placeCall( roomId: string, type: PlaceCallType, diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index 0d50128f32..165a312332 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -46,6 +46,13 @@ "Alternatively, you can try to use the public server at turn.matrix.org, but this will not be as reliable, and it will share your IP address with that server. You can also manage this in Settings.": "Alternatively, you can try to use the public server at turn.matrix.org, but this will not be as reliable, and it will share your IP address with that server. You can also manage this in Settings.", "Try using turn.matrix.org": "Try using turn.matrix.org", "OK": "OK", + "Unable to access microphone": "Unable to access microphone", + "Call failed because no microphone could not be accessed. Check that a microphone is plugged in and set up correctly.": "Call failed because no microphone could not be accessed. Check that a microphone is plugged in and set up correctly.", + "Unable to access webcam / microphone": "Unable to access webcam / microphone", + "Call failed because no webcam or microphone could not be accessed. Check that:": "Call failed because no webcam or microphone could not be accessed. Check that:", + "A microphone and webcam are plugged in and set up correctly": "A microphone and webcam are plugged in and set up correctly", + "Permission is granted to usethe webcam": "Permission is granted to usethe webcam", + "No other application is using the webcam": "No other application is using the webcam", "Unable to capture screen": "Unable to capture screen", "Existing Call": "Existing Call", "You are already in a call.": "You are already in a call.", From 522c2d9dc77d38db6f6447597102ed5494f959b7 Mon Sep 17 00:00:00 2001 From: David Baker Date: Fri, 27 Nov 2020 14:03:52 +0000 Subject: [PATCH 115/319] Typo Co-authored-by: J. Ryan Stinnett --- src/CallHandler.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CallHandler.tsx b/src/CallHandler.tsx index 710cd10f99..abfe5cc9bf 100644 --- a/src/CallHandler.tsx +++ b/src/CallHandler.tsx @@ -402,7 +402,7 @@ export default class CallHandler { {_t("Call failed because no webcam or microphone could not be accessed. Check that:")}
  • {_t("A microphone and webcam are plugged in and set up correctly")}
  • -
  • {_t("Permission is granted to usethe webcam")}
  • +
  • {_t("Permission is granted to use the webcam")}
  • {_t("No other application is using the webcam")}
; From 9a5f2c85cd03bf27e0cfc7b8070acd901f49078e Mon Sep 17 00:00:00 2001 From: David Baker Date: Fri, 27 Nov 2020 14:04:27 +0000 Subject: [PATCH 116/319] 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 165a312332..cc85a95271 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -51,7 +51,7 @@ "Unable to access webcam / microphone": "Unable to access webcam / microphone", "Call failed because no webcam or microphone could not be accessed. Check that:": "Call failed because no webcam or microphone could not be accessed. Check that:", "A microphone and webcam are plugged in and set up correctly": "A microphone and webcam are plugged in and set up correctly", - "Permission is granted to usethe webcam": "Permission is granted to usethe webcam", + "Permission is granted to use the webcam": "Permission is granted to use the webcam", "No other application is using the webcam": "No other application is using the webcam", "Unable to capture screen": "Unable to capture screen", "Existing Call": "Existing Call", From 6ce5d3b044ce5f0cfd448c8f058553a12505913a Mon Sep 17 00:00:00 2001 From: nurjinn jafar Date: Fri, 27 Nov 2020 14:54:21 +0100 Subject: [PATCH 117/319] refactored effects dir and changed effects exported name --- src/SlashCommands.tsx | 4 +- src/components/structures/RoomView.tsx | 10 ++--- .../elements/{effects => }/EffectsOverlay.tsx | 25 ++++++++++-- .../views/elements/effects/effectUtilities.ts | 8 ---- .../views/rooms/SendMessageComposer.js | 6 +-- .../elements => }/effects/ICanvasEffect.ts | 17 ++++++++ .../elements => }/effects/confetti/index.ts | 40 +++++++++---------- src/effects/effectUtilities.ts | 25 ++++++++++++ .../views/elements => }/effects/index.ts | 23 +++++++++-- 9 files changed, 110 insertions(+), 48 deletions(-) rename src/components/views/elements/{effects => }/EffectsOverlay.tsx (74%) delete mode 100644 src/components/views/elements/effects/effectUtilities.ts rename src/{components/views/elements => }/effects/ICanvasEffect.ts (60%) rename src/{components/views/elements => }/effects/confetti/index.ts (88%) create mode 100644 src/effects/effectUtilities.ts rename src/{components/views/elements => }/effects/index.ts (70%) diff --git a/src/SlashCommands.tsx b/src/SlashCommands.tsx index 45c7251c3b..e2ae875ac3 100644 --- a/src/SlashCommands.tsx +++ b/src/SlashCommands.tsx @@ -46,7 +46,7 @@ import { EffectiveMembership, getEffectiveMembership, leaveRoomBehaviour } from import SdkConfig from "./SdkConfig"; import SettingsStore from "./settings/SettingsStore"; import {UIFeature} from "./settings/UIFeature"; -import effects from "./components/views/elements/effects" +import {CHAT_EFFECTS} from "./effects" import CallHandler from "./CallHandler"; // XXX: workaround for https://github.com/microsoft/TypeScript/issues/31816 @@ -1097,7 +1097,7 @@ export const Commands = [ hideCompletionAfterSpace: true, }), - ...effects.map((effect) => { + ...CHAT_EFFECTS.map((effect) => { return new Command({ command: effect.command, description: effect.description(), diff --git a/src/components/structures/RoomView.tsx b/src/components/structures/RoomView.tsx index 59f8db5837..8189420a52 100644 --- a/src/components/structures/RoomView.tsx +++ b/src/components/structures/RoomView.tsx @@ -69,9 +69,9 @@ import AuxPanel from "../views/rooms/AuxPanel"; import RoomHeader from "../views/rooms/RoomHeader"; import {XOR} from "../../@types/common"; import { IThreepidInvite } from "../../stores/ThreepidInviteStore"; -import EffectsOverlay from "../views/elements/effects/EffectsOverlay"; -import {containsEmoji} from '../views/elements/effects/effectUtilities'; -import effects from '../views/elements/effects' +import EffectsOverlay from "../views/elements/EffectsOverlay"; +import {containsEmoji} from '../../effects/effectUtilities'; +import {CHAT_EFFECTS} from '../../effects' import { CallState, MatrixCall } from "matrix-js-sdk/src/webrtc/call"; import WidgetStore from "../../stores/WidgetStore"; import {UPDATE_EVENT} from "../../stores/AsyncStore"; @@ -802,9 +802,9 @@ export default class RoomView extends React.Component { if (!this.state.room || !this.state.matrixClientIsReady || this.state.room.getUnreadNotificationCount() === 0) return; - effects.forEach(effect => { + CHAT_EFFECTS.forEach(effect => { if (containsEmoji(ev.getContent(), effect.emojis) || ev.getContent().msgtype === effect.msgType) { - dis.dispatch({action: `effects.${effect.command}`}); + dis.dispatch({action: `CHAT_EFFECTS.${effect.command}`}); } }) }; diff --git a/src/components/views/elements/effects/EffectsOverlay.tsx b/src/components/views/elements/EffectsOverlay.tsx similarity index 74% rename from src/components/views/elements/effects/EffectsOverlay.tsx rename to src/components/views/elements/EffectsOverlay.tsx index b2ecec8753..4c6a3c06ae 100644 --- a/src/components/views/elements/effects/EffectsOverlay.tsx +++ b/src/components/views/elements/EffectsOverlay.tsx @@ -1,7 +1,24 @@ +/* + Copyright 2020 Nurjin Jafar + Copyright 2020 Nordeck IT + Consulting GmbH. + + + 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, { FunctionComponent, useEffect, useRef } from 'react'; -import dis from '../../../../dispatcher/dispatcher'; -import ICanvasEffect, { ICanvasEffectConstructable } from './ICanvasEffect.js'; -import effects from './index' +import dis from '../../../dispatcher/dispatcher'; +import ICanvasEffect, { ICanvasEffectConstructable } from '../../../effects/ICanvasEffect.js'; +import {CHAT_EFFECTS} from '../../../effects' export type EffectsOverlayProps = { roomWidth: number; @@ -15,7 +32,7 @@ const EffectsOverlay: FunctionComponent = ({ roomWidth }) = if (!name) return null; let effect: ICanvasEffect | null = effectsRef.current[name] || null; if (effect === null) { - const options = effects.find((e) => e.command === name)?.options + const options = CHAT_EFFECTS.find((e) => e.command === name)?.options try { const { default: Effect }: { default: ICanvasEffectConstructable } = await import(`./${name}`); effect = new Effect(options); diff --git a/src/components/views/elements/effects/effectUtilities.ts b/src/components/views/elements/effects/effectUtilities.ts deleted file mode 100644 index e94287c745..0000000000 --- a/src/components/views/elements/effects/effectUtilities.ts +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Checks a message if it contains one of the provided emojis - * @param {Object} content The message - * @param {Array} emojis The list of emojis to check for - */ -export const containsEmoji = (content: { msgtype: string, body: string }, emojis: Array): boolean => { - return emojis.some((emoji) => content.body && content.body.includes(emoji)); -} diff --git a/src/components/views/rooms/SendMessageComposer.js b/src/components/views/rooms/SendMessageComposer.js index 583a3c6368..6a7270c3d6 100644 --- a/src/components/views/rooms/SendMessageComposer.js +++ b/src/components/views/rooms/SendMessageComposer.js @@ -42,8 +42,8 @@ import {Key, isOnlyCtrlOrCmdKeyEvent} from "../../../Keyboard"; import MatrixClientContext from "../../../contexts/MatrixClientContext"; import RateLimitedFunc from '../../../ratelimitedfunc'; import {Action} from "../../../dispatcher/actions"; -import {containsEmoji} from "../elements/effects/effectUtilities"; -import effects from '../elements/effects'; +import {containsEmoji} from "../../../effects/effectUtilities"; +import {CHAT_EFFECTS} from '../../../effects'; import SettingsStore from "../../../settings/SettingsStore"; import CountlyAnalytics from "../../../CountlyAnalytics"; @@ -328,7 +328,7 @@ export default class SendMessageComposer extends React.Component { }); } dis.dispatch({action: "message_sent"}); - effects.forEach((effect) => { + CHAT_EFFECTS.forEach((effect) => { if (containsEmoji(content, effect.emojis)) { dis.dispatch({action: `effects.${effect.command}`}); } diff --git a/src/components/views/elements/effects/ICanvasEffect.ts b/src/effects/ICanvasEffect.ts similarity index 60% rename from src/components/views/elements/effects/ICanvasEffect.ts rename to src/effects/ICanvasEffect.ts index 400f42af73..dbbde3dbe7 100644 --- a/src/components/views/elements/effects/ICanvasEffect.ts +++ b/src/effects/ICanvasEffect.ts @@ -1,3 +1,20 @@ +/* + Copyright 2020 Nurjin Jafar + Copyright 2020 Nordeck IT + Consulting GmbH. + + + 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. + */ /** * Defines the constructor of a canvas based room effect */ diff --git a/src/components/views/elements/effects/confetti/index.ts b/src/effects/confetti/index.ts similarity index 88% rename from src/components/views/elements/effects/confetti/index.ts rename to src/effects/confetti/index.ts index aee8f54a3a..646ac30524 100644 --- a/src/components/views/elements/effects/confetti/index.ts +++ b/src/effects/confetti/index.ts @@ -1,12 +1,22 @@ +/* + Copyright 2020 Nurjin Jafar + Copyright 2020 Nordeck IT + Consulting GmbH. + + + 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 ICanvasEffect from '../ICanvasEffect'; -declare global { - interface Window { - mozRequestAnimationFrame: any; - oRequestAnimationFrame: any; - msRequestAnimationFrame: any; - } -} export type ConfettiOptions = { /** @@ -58,11 +68,7 @@ export default class Confetti implements ICanvasEffect { } private context: CanvasRenderingContext2D | null = null; - private supportsAnimationFrame = window.requestAnimationFrame || - window.webkitRequestAnimationFrame || - window.mozRequestAnimationFrame || - window.oRequestAnimationFrame || - window.msRequestAnimationFrame; + private supportsAnimationFrame = window.requestAnimationFrame; private colors = ['rgba(30,144,255,', 'rgba(107,142,35,', 'rgba(255,215,0,', 'rgba(255,192,203,', 'rgba(106,90,205,', 'rgba(173,216,230,', 'rgba(238,130,238,', 'rgba(152,251,152,', 'rgba(70,130,180,', @@ -78,16 +84,6 @@ export default class Confetti implements ICanvasEffect { if (!canvas) { return; } - window.requestAnimationFrame = (function() { - return window.requestAnimationFrame || - window.webkitRequestAnimationFrame || - window.mozRequestAnimationFrame || - window.oRequestAnimationFrame || - window.msRequestAnimationFrame || - function(callback) { - return window.setTimeout(callback, this.options.frameInterval); - }; - })(); this.context = canvas.getContext('2d'); this.particles = []; const count = this.options.maxCount; diff --git a/src/effects/effectUtilities.ts b/src/effects/effectUtilities.ts new file mode 100644 index 0000000000..e708f4864e --- /dev/null +++ b/src/effects/effectUtilities.ts @@ -0,0 +1,25 @@ +/* + Copyright 2020 Nurjin Jafar + Copyright 2020 Nordeck IT + Consulting GmbH. + + + 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. + */ +/** + * Checks a message if it contains one of the provided emojis + * @param {Object} content The message + * @param {Array} emojis The list of emojis to check for + */ +export const containsEmoji = (content: { msgtype: string, body: string }, emojis: Array): boolean => { + return emojis.some((emoji) => content.body && content.body.includes(emoji)); +} diff --git a/src/components/views/elements/effects/index.ts b/src/effects/index.ts similarity index 70% rename from src/components/views/elements/effects/index.ts rename to src/effects/index.ts index 0f01f2624e..067bd6848c 100644 --- a/src/components/views/elements/effects/index.ts +++ b/src/effects/index.ts @@ -1,4 +1,21 @@ -import { _t, _td } from "../../../../languageHandler"; +/* + Copyright 2020 Nurjin Jafar + Copyright 2020 Nordeck IT + Consulting GmbH. + + + 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 { _t, _td } from "../languageHandler"; export type Effect = { /** @@ -53,7 +70,7 @@ type ConfettiOptions = { /** * This configuration defines room effects that can be triggered by custom message types and emojis */ -const effects: Array> = [ +export const CHAT_EFFECTS: Array> = [ { emojis: ['🎊', '🎉'], msgType: 'nic.custom.confetti', @@ -70,6 +87,4 @@ const effects: Array> = [ } as Effect, ]; -export default effects; - From 2f72c9ee55c9f037800a4446ed034e54faa099db Mon Sep 17 00:00:00 2001 From: nurjinn jafar Date: Fri, 27 Nov 2020 16:47:07 +0100 Subject: [PATCH 118/319] update translation file --- src/i18n/strings/en_EN.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index bd8895d4c0..c432eb4b27 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -846,6 +846,8 @@ "When rooms are upgraded": "When rooms are upgraded", "My Ban List": "My Ban List", "This is your list of users/servers you have blocked - don't leave the room!": "This is your list of users/servers you have blocked - don't leave the room!", + "Sends the given message with confetti": "Sends the given message with confetti", + "sends confetti": "sends confetti", "Video Call": "Video Call", "Voice Call": "Voice Call", "Fill Screen": "Fill Screen", @@ -1900,8 +1902,6 @@ "Sign in with single sign-on": "Sign in with single sign-on", "And %(count)s more...|other": "And %(count)s more...", "Home": "Home", - "Sends the given message with confetti": "Sends the given message with confetti", - "sends confetti": "sends confetti", "Enter a server name": "Enter a server name", "Looks good": "Looks good", "Can't find this server or its room list": "Can't find this server or its room list", From 0e53e220d0bbb35b8ba489e4f44b25a11046ff86 Mon Sep 17 00:00:00 2001 From: Steffen Kolmer Date: Fri, 27 Nov 2020 17:25:34 +0100 Subject: [PATCH 119/319] Fixed copy paste error --- src/components/structures/RoomView.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/structures/RoomView.tsx b/src/components/structures/RoomView.tsx index 8189420a52..618a397697 100644 --- a/src/components/structures/RoomView.tsx +++ b/src/components/structures/RoomView.tsx @@ -804,7 +804,7 @@ export default class RoomView extends React.Component { this.state.room.getUnreadNotificationCount() === 0) return; CHAT_EFFECTS.forEach(effect => { if (containsEmoji(ev.getContent(), effect.emojis) || ev.getContent().msgtype === effect.msgType) { - dis.dispatch({action: `CHAT_EFFECTS.${effect.command}`}); + dis.dispatch({action: `effects.${effect.command}`}); } }) }; From 200c061968a12c2fb0a5d53e0d7ad6f857ab35d0 Mon Sep 17 00:00:00 2001 From: macekj Date: Fri, 27 Nov 2020 19:41:45 -0500 Subject: [PATCH 120/319] remove unnecessary plus checks in emoji regexes Signed-off-by: macekj --- src/autocomplete/EmojiProvider.tsx | 2 +- src/components/views/rooms/BasicMessageComposer.tsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/autocomplete/EmojiProvider.tsx b/src/autocomplete/EmojiProvider.tsx index d4791d69f1..705474f8d0 100644 --- a/src/autocomplete/EmojiProvider.tsx +++ b/src/autocomplete/EmojiProvider.tsx @@ -34,7 +34,7 @@ const LIMIT = 20; // Match for ascii-style ";-)" emoticons or ":wink:" shortcodes provided by emojibase // anchored to only match from the start of parts otherwise it'll show emoji suggestions whilst typing matrix IDs -const EMOJI_REGEX = new RegExp('(' + EMOTICON_REGEX.source + '|(?:^|\\s|(?<=^\\+)):[+-\\w]*:?)$', 'g'); +const EMOJI_REGEX = new RegExp('(' + EMOTICON_REGEX.source + '|(?:^|\\s):[+-\\w]*:?)$', 'g'); interface IEmojiShort { emoji: IEmoji; diff --git a/src/components/views/rooms/BasicMessageComposer.tsx b/src/components/views/rooms/BasicMessageComposer.tsx index 1fa2ad681f..2ececdeaed 100644 --- a/src/components/views/rooms/BasicMessageComposer.tsx +++ b/src/components/views/rooms/BasicMessageComposer.tsx @@ -47,8 +47,8 @@ import AutocompleteWrapperModel from "../../../editor/autocomplete"; import DocumentPosition from "../../../editor/position"; import {ICompletion} from "../../../autocomplete/Autocompleter"; -// matches emoticons which follow the start of a line, whitespace, or a plus at the start of a line -const REGEX_EMOTICON_WHITESPACE = new RegExp('(?:^|\\s|^\\+)(' + EMOTICON_REGEX.source + ')\\s$'); +// matches emoticons which follow the start of a line or whitespace +const REGEX_EMOTICON_WHITESPACE = new RegExp('(?:^|\\s)(' + EMOTICON_REGEX.source + ')\\s$'); const IS_MAC = navigator.platform.indexOf("Mac") !== -1; From e92ac6715241eaf94063fb36b3325ffcb56e7f42 Mon Sep 17 00:00:00 2001 From: Simon Merrick Date: Sat, 28 Nov 2020 21:50:51 +1300 Subject: [PATCH 121/319] Use room alias in generated permalink for rooms Signed-off-by: Simon Merrick --- src/utils/permalinks/Permalinks.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/utils/permalinks/Permalinks.js b/src/utils/permalinks/Permalinks.js index 0f54bcce05..2f673e0346 100644 --- a/src/utils/permalinks/Permalinks.js +++ b/src/utils/permalinks/Permalinks.js @@ -130,7 +130,13 @@ export class RoomPermalinkCreator { } forRoom() { - return getPermalinkConstructor().forRoom(this._roomId, this._serverCandidates); + try { + // Prefer to use canonical alias for permalink if possible + const alias = this._room.getCanonicalAlias(); + return getPermalinkConstructor().forRoom(alias, this._serverCandidates); + } catch (error) { + return getPermalinkConstructor().forRoom(this._roomId, this._serverCandidates); + } } onRoomState(event) { From 7ad46cb6eb9dd4bc1334a9a7031464a18823c469 Mon Sep 17 00:00:00 2001 From: Marcelo Filho Date: Fri, 27 Nov 2020 18:09:32 +0000 Subject: [PATCH 122/319] Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (2702 of 2702 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/pt_BR/ --- src/i18n/strings/pt_BR.json | 81 ++++++++++++++++++++++++++++++++++++- 1 file changed, 80 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/pt_BR.json b/src/i18n/strings/pt_BR.json index 71c277aef1..613f889370 100644 --- a/src/i18n/strings/pt_BR.json +++ b/src/i18n/strings/pt_BR.json @@ -2780,5 +2780,84 @@ "Filter rooms and people": "Pesquisar salas e pessoas", "Open the link in the email to continue registration.": "Abra o link no e-mail para continuar o registro.", "A confirmation email has been sent to %(emailAddress)s": "Um e-mail de confirmação foi enviado para %(emailAddress)s", - "Go to Home View": "Ir para a tela inicial" + "Go to Home View": "Ir para a tela inicial", + "

HTML for your community's page

\n

\n Use the long description to introduce new members to the community, or distribute\n some important links\n

\n

\n You can even add images with Matrix URLs \n

\n": "

HTML para a página da sua comunidade

\n

\n Escreva uma descrição longa para apresentar novos membros à comunidade, ou liste\n alguns links importantes\n

\n

\n Você pode até adicionar fotos com URLs na Matrix \n

\n", + "Remain on your screen while running": "Permaneça na tela, quando executar", + "Remain on your screen when viewing another room, when running": "Permaneça na tela ao visualizar outra sala, quando executar", + "New here? Create an account": "Novo por aqui? Crie uma conta", + "Got an account? Sign in": "Já tem uma conta? Login", + "Use Command + Enter to send a message": "Usar Command + Enter para enviar uma mensagem", + "Enter phone number": "Digite o número de telefone", + "Enter email address": "Digite o endereço de e-mail", + "Decline All": "Recusar tudo", + "Approve": "Autorizar", + "This widget would like to:": "Este widget gostaria de:", + "Approve widget permissions": "Autorizar as permissões do widget", + "Return to call": "Retornar para a chamada", + "Fill Screen": "Preencher a tela", + "Voice Call": "Chamada de voz", + "Video Call": "Chamada de vídeo", + "Use Ctrl + Enter to send a message": "Usar Ctrl + Enter para enviar uma mensagem", + "Render LaTeX maths in messages": "Renderizar fórmulas matemáticas LaTeX em mensagens", + "See %(msgtype)s messages posted to your active room": "Veja mensagens de %(msgtype)s enviadas nesta sala ativa", + "See %(msgtype)s messages posted to this room": "Veja mensagens de %(msgtype)s enviadas nesta sala", + "Send %(msgtype)s messages as you in your active room": "Enviar mensagens de %(msgtype)s nesta sala ativa", + "Send %(msgtype)s messages as you in this room": "Enviar mensagens de %(msgtype)s nesta sala", + "See general files posted to your active room": "Veja os arquivos enviados nesta sala ativa", + "See general files posted to this room": "Veja os arquivos enviados nesta sala", + "Send general files as you in your active room": "Enviar arquivos nesta sala ativa", + "Send general files as you in this room": "Enviar arquivos nesta sala", + "See videos posted to your active room": "Veja os vídeos enviados nesta sala ativa", + "See videos posted to this room": "Veja os vídeos enviados nesta sala", + "Send videos as you in your active room": "Enviar vídeos nesta sala ativa", + "Send videos as you in this room": "Enviar vídeos nesta sala", + "See images posted to your active room": "Veja as fotos enviadas nesta sala ativa", + "See images posted to this room": "Veja as fotos enviadas nesta sala", + "Send images as you in your active room": "Enviar fotos nesta sala ativa", + "Send images as you in this room": "Enviar fotos nesta sala", + "See emotes posted to your active room": "Veja emojis enviados nesta sala ativa", + "See emotes posted to this room": "Veja emojis enviados nesta sala", + "Send emotes as you in your active room": "Enviar emojis nesta sala ativa", + "Send emotes as you in this room": "Enviar emojis nesta sala", + "See text messages posted to your active room": "Veja as mensagens de texto enviadas nesta sala ativa", + "See text messages posted to this room": "Veja as mensagens de texto enviadas nesta sala", + "Send text messages as you in your active room": "Enviar mensagens de texto nesta sala ativa", + "Send text messages as you in this room": "Enviar mensagens de texto nesta sala", + "See messages posted to your active room": "Veja as mensagens enviadas nesta sala ativa", + "See messages posted to this room": "Veja as mensagens enviadas nesta sala", + "Send messages as you in your active room": "Enviar mensagens nesta sala ativa", + "Send messages as you in this room": "Enviar mensagens nesta sala", + "The %(capability)s capability": "A permissão %(capability)s", + "See %(eventType)s events posted to your active room": "Veja eventos de %(eventType)s enviados nesta sala ativa", + "Send %(eventType)s events as you in your active room": "Enviar eventos de %(eventType)s nesta sala ativa", + "See %(eventType)s events posted to this room": "Veja eventos de %(eventType)s postados nesta sala", + "Send %(eventType)s events as you in this room": "Enviar eventos de %(eventType)s nesta sala", + "with state key %(stateKey)s": "com chave de estado %(stateKey)s", + "with an empty state key": "com uma chave de estado vazia", + "See when anyone posts a sticker to your active room": "Veja quando alguém enviar uma figurinha nesta sala ativa", + "Send stickers to your active room as you": "Enviar figurinhas para esta sala ativa", + "See when a sticker is posted in this room": "Veja quando uma figurinha for enviada nesta sala", + "Send stickers to this room as you": "Enviar figurinhas para esta sala", + "See when the avatar changes in your active room": "Veja quando a foto desta sala ativa for alterada", + "Change the avatar of your active room": "Alterar a foto desta sala ativa", + "See when the avatar changes in this room": "Veja quando a foto desta sala for alterada", + "Change the avatar of this room": "Alterar a foto desta sala", + "See when the name changes in your active room": "Veja quando o nome desta sala ativa for alterado", + "Change the name of your active room": "Alterar o nome desta sala ativa", + "See when the name changes in this room": "Veja quando o nome desta sala for alterado", + "Change the name of this room": "Alterar o nome desta sala", + "See when the topic changes in your active room": "Veja quando a descrição for alterada nesta sala ativa", + "Change the topic of your active room": "Alterar a descrição desta sala ativa", + "See when the topic changes in this room": "Veja quando a descrição for alterada nesta sala", + "Change the topic of this room": "Alterar a descrição desta sala", + "Change which room you're viewing": "Alterar a sala que você está vendo", + "Send stickers into your active room": "Enviar figurinhas nesta sala ativa", + "Send stickers into this room": "Enviar figurinhas nesta sala", + "No other application is using the webcam": "Nenhum outro aplicativo está usando a câmera", + "Permission is granted to use the webcam": "Permissão concedida para usar a câmera", + "A microphone and webcam are plugged in and set up correctly": "Um microfone e uma câmera estão conectados e configurados corretamente", + "Call failed because no webcam or microphone could not be accessed. Check that:": "A chamada falhou porque não foi possível acessar alguma câmera ou microfone. Verifique se:", + "Unable to access webcam / microphone": "Não é possível acessar a câmera/microfone", + "Call failed because no microphone could not be accessed. Check that a microphone is plugged in and set up correctly.": "A chamada falhou porque não foi possível acessar algum microfone. Verifique se o microfone está conectado e configurado corretamente.", + "Unable to access microphone": "Não é possível acessar o microfone" } From 302f284b9de5fc0fd466280777608230e862da73 Mon Sep 17 00:00:00 2001 From: XoseM Date: Fri, 27 Nov 2020 18:06:01 +0000 Subject: [PATCH 123/319] Translated using Weblate (Galician) Currently translated at 100.0% (2702 of 2702 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/gl/ --- src/i18n/strings/gl.json | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/gl.json b/src/i18n/strings/gl.json index 1d8dfaa8ee..fec99d1e7c 100644 --- a/src/i18n/strings/gl.json +++ b/src/i18n/strings/gl.json @@ -2917,5 +2917,15 @@ "Return to call": "Volver á chamada", "Fill Screen": "Encher a pantalla", "Voice Call": "Chamada de voz", - "Video Call": "Chamada de vídeo" + "Video Call": "Chamada de vídeo", + "New here? Create an account": "Acabas de coñecernos? Crea unha conta", + "Got an account? Sign in": "Tes unha conta? Conéctate", + "Render LaTeX maths in messages": "Mostrar fórmulas matemáticas LaTex", + "No other application is using the webcam": "Outra aplicación non está usando a cámara", + "Permission is granted to use the webcam": "Tes permiso para acceder ó uso da cámara", + "A microphone and webcam are plugged in and set up correctly": "O micrófono e a cámara están conectados e correctamente configurados", + "Call failed because no webcam or microphone could not be accessed. Check that:": "A chamada fallou porque non están accesibles a cámara ou o micrófono. Comproba que:", + "Unable to access webcam / microphone": "Non se puido acceder a cámara / micrófono", + "Call failed because no microphone could not be accessed. Check that a microphone is plugged in and set up correctly.": "A chamada fallou porque non se puido acceder a un micrófono. Comproba que o micrófono está conectado e correctamente configurado.", + "Unable to access microphone": "Non se puido acceder ó micrófono" } From 53535f0db88f5aa08872acfe91f8e932adaf57dc Mon Sep 17 00:00:00 2001 From: MamasLT Date: Sat, 28 Nov 2020 18:38:27 +0000 Subject: [PATCH 124/319] Translated using Weblate (Lithuanian) Currently translated at 70.2% (1899 of 2702 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/lt/ --- src/i18n/strings/lt.json | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/lt.json b/src/i18n/strings/lt.json index cdee2c3549..b1f7cd7060 100644 --- a/src/i18n/strings/lt.json +++ b/src/i18n/strings/lt.json @@ -2010,5 +2010,12 @@ "Verify this session by confirming the following number appears on its screen.": "Patvirtinkite šį seansą, įsitikindami, kad jo ekrane rodomas toliau esantis skaičius.", "Privacy": "Privatumas", "Accept all %(invitedRooms)s invites": "Priimti visus %(invitedRooms)s pakvietimus", - "Bulk options": "Grupinės parinktys" + "Bulk options": "Grupinės parinktys", + "Confirm Security Phrase": "Patvirtinkite Slaptafrazę", + "Set a Security Phrase": "Nustatyti Slaptafrazę", + "Use a secret phrase only you know, and optionally save a Security Key to use for backup.": "Naudokite slaptafrazę, kurią žinote tik jūs ir pasirinktinai išsaugokite Apsaugos Raktą, naudoti kaip atsarginę kopiją.", + "Enter a Security Phrase": "Įveskite Slaptafrazę", + "Security Phrase": "Slaptafrazė", + "Enter a security phrase only you know, as it’s used to safeguard your data. To be secure, you shouldn’t re-use your account password.": "Įveskite slaptafrazę, kurią žinote tik jūs, nes ji naudojama jūsų duomenims apsaugoti. Tam, kad būtumėte saugūs, neturėtumėte vėl naudoti savo paskyros slaptažodžio.", + "Enter your Security Phrase or to continue.": "Įveskite savo Slaptafrazę arba , kad tęstumėte." } From bfe800fc35b8bbc7c7d951ae42437328b019be1f Mon Sep 17 00:00:00 2001 From: Besnik Bleta Date: Fri, 27 Nov 2020 16:42:19 +0000 Subject: [PATCH 125/319] Translated using Weblate (Albanian) Currently translated at 99.7% (2695 of 2702 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/sq/ --- src/i18n/strings/sq.json | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/sq.json b/src/i18n/strings/sq.json index 51f6cbb676..74a85031ac 100644 --- a/src/i18n/strings/sq.json +++ b/src/i18n/strings/sq.json @@ -2904,5 +2904,20 @@ "Send videos as you in this room": "Dërgoni video si ju në këtë dhomë", "See images posted to your active room": "Shihni figura postuar te dhoma juaj aktive", "See images posted to this room": "Shihni figura postuar në këtë dhomë", - "Send images as you in your active room": "Dërgoni figura si ju në dhomën tuaj aktive" + "Send images as you in your active room": "Dërgoni figura si ju në dhomën tuaj aktive", + "New here? Create an account": "I sapoardhur? Krijoni një llogari", + "Got an account? Sign in": "Keni një llogari? Hyni", + "Return to call": "Kthehu te thirrja", + "Fill Screen": "Mbushe Ekranin", + "Voice Call": "Thirrje Zanore", + "Video Call": "Thirrje Video", + "Render LaTeX maths in messages": "Formo formula LaTeX në mesazhe", + "Send images as you in this room": "Dërgoni figura si ju, në këtë dhomë", + "No other application is using the webcam": "Kamerën s’po e përdor aplikacion tjetër", + "Permission is granted to use the webcam": "Është dhënë leje për përdorimin e kamerës", + "A microphone and webcam are plugged in and set up correctly": "Një mikrofon dhe një kamerë janë futur dhe ujdisur si duhet", + "Call failed because no webcam or microphone could not be accessed. Check that:": "Thirrja dështoi, ngaqë s’u bë dot hyrje në kamerë ose mikrofon. Kontrolloni që:", + "Unable to access webcam / microphone": "S’arrihet të përdoret kamerë / mikrofon", + "Call failed because no microphone could not be accessed. Check that a microphone is plugged in and set up correctly.": "Thirrja dështoi, ngaqë s’u hap dot ndonjë mikrofon. Shihni që të jetë futur një mikrofon dhe ujdiseni saktë.", + "Unable to access microphone": "S’arrihet të përdoret mikrofoni" } From f6a377e5af596dfe39257b11322f0b7dad915549 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Priit=20J=C3=B5er=C3=BC=C3=BCt?= Date: Fri, 27 Nov 2020 17:41:41 +0000 Subject: [PATCH 126/319] Translated using Weblate (Estonian) Currently translated at 100.0% (2702 of 2702 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/et/ --- src/i18n/strings/et.json | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/et.json b/src/i18n/strings/et.json index bc3ca203a5..0b338bd9d4 100644 --- a/src/i18n/strings/et.json +++ b/src/i18n/strings/et.json @@ -2918,5 +2918,15 @@ "See emotes posted to this room": "Vaata selle jututoa emotesid", "Send emotes as you in your active room": "Saada oma aktiivses jututoas enda nimel emotesid", "Send emotes as you in this room": "Saada selles jututoas oma nimel emotesid", - "See text messages posted to your active room": "Vaata tekstisõnumeid oma aktiivses jututoas" + "See text messages posted to your active room": "Vaata tekstisõnumeid oma aktiivses jututoas", + "New here? Create an account": "Täitsa uus asi sinu jaoks? Loo omale kasutajakonto", + "Got an account? Sign in": "Sul on kasutajakonto olemas? Siis logi sisse", + "Render LaTeX maths in messages": "Sõnumites visualiseeri LaTeX-vormingus matemaatikat", + "No other application is using the webcam": "Ainsamgi muu rakendus ei kasuta veebikaamerat", + "Permission is granted to use the webcam": "Rakendusel õigus veebikaamerat kasutada", + "A microphone and webcam are plugged in and set up correctly": "Veebikaamera ja mikrofon oleks ühendatud ja seadistatud", + "Call failed because no webcam or microphone could not be accessed. Check that:": "Kuna veebikaamerat või mikrofoni kasutada ei saanud, siis kõne ei õnnestunud. Palun kontrolli, et:", + "Unable to access webcam / microphone": "Puudub ligipääs veebikaamerale ja mikrofonile", + "Call failed because no microphone could not be accessed. Check that a microphone is plugged in and set up correctly.": "Kuna mikrofoni kasutada ei saanud, siis kõne ei õnnestunud. Palun kontrolli, et mikrofon oleks ühendatud ja seadistatud.", + "Unable to access microphone": "Puudub ligipääs mikrofonile" } From 2a50de1536de46a15355270d7656a0531d63d6e4 Mon Sep 17 00:00:00 2001 From: Jeff Huang Date: Mon, 30 Nov 2020 02:11:12 +0000 Subject: [PATCH 127/319] Translated using Weblate (Chinese (Traditional)) Currently translated at 100.0% (2702 of 2702 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/zh_Hant/ --- src/i18n/strings/zh_Hant.json | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/zh_Hant.json b/src/i18n/strings/zh_Hant.json index 99c74874bf..3355a7d383 100644 --- a/src/i18n/strings/zh_Hant.json +++ b/src/i18n/strings/zh_Hant.json @@ -2920,5 +2920,15 @@ "Return to call": "回到通話", "Fill Screen": "全螢幕", "Voice Call": "音訊通話", - "Video Call": "視訊通話" + "Video Call": "視訊通話", + "New here? Create an account": "新手?建立帳號", + "Got an account? Sign in": "有帳號了嗎?登入", + "Render LaTeX maths in messages": "在訊息中彩現 LaTeX 數學", + "No other application is using the webcam": "無其他應用程式正在使用網路攝影機", + "Permission is granted to use the webcam": "授予使用網路攝影機的權限", + "A microphone and webcam are plugged in and set up correctly": "麥克風與網路攝影機已插入並正確設定", + "Call failed because no webcam or microphone could not be accessed. Check that:": "因為無法存取網路攝影機或麥克風,所以通話失敗。請檢查:", + "Unable to access webcam / microphone": "無法存取網路攝影機/麥克風", + "Call failed because no microphone could not be accessed. Check that a microphone is plugged in and set up correctly.": "因為無法存取麥克風,所以通話失敗。請檢查是否已插入麥克風並正確設定。", + "Unable to access microphone": "無法存取麥克風" } From 35b720e8ef5cf6feec2977bee2c8ac168fb6790a Mon Sep 17 00:00:00 2001 From: strix aluco Date: Mon, 30 Nov 2020 05:28:57 +0000 Subject: [PATCH 128/319] Translated using Weblate (Ukrainian) Currently translated at 53.3% (1442 of 2702 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/uk/ --- src/i18n/strings/uk.json | 81 ++++++++++++++++++++-------------------- 1 file changed, 41 insertions(+), 40 deletions(-) diff --git a/src/i18n/strings/uk.json b/src/i18n/strings/uk.json index 4862f31a40..eaf8fdbe88 100644 --- a/src/i18n/strings/uk.json +++ b/src/i18n/strings/uk.json @@ -1267,63 +1267,63 @@ "Got It": "Зрозуміло", "Comoros": "Коморські Острови", "Colombia": "Колумбія", - "Cocos (Keeling) Islands": "Кокосові острови", + "Cocos (Keeling) Islands": "Кокосові (Кілінг) Острови", "Christmas Island": "Острів Різдва", "China": "Китай", "Chile": "Чилі", "Chad": "Чад", - "Central African Republic": "Центральна Африканська Республіка", + "Central African Republic": "Центральноафриканська Республіка", "Cayman Islands": "Кайманові Острови", - "Caribbean Netherlands": "Карибські Нідерланди", + "Caribbean Netherlands": "Бонайре, Сінт-Естатіус і Саба", "Cape Verde": "Кабо-Верде", "Canada": "Канада", "Cameroon": "Камерун", "Cambodia": "Камбоджа", "Burundi": "Бурунді", - "Burkina Faso": "Буркіна Фасо", + "Burkina Faso": "Буркіна-Фасо", "Bulgaria": "Болгарія", "Brunei": "Бруней", "British Virgin Islands": "Британські Віргінські Острови", - "British Indian Ocean Territory": "Британська Територія в Індійському Океані", + "British Indian Ocean Territory": "Британська територія в Індійському океані", "Brazil": "Бразилія", "Bouvet Island": "Острів Буве", "Botswana": "Ботсвана", - "Bosnia": "Боснія", + "Bosnia": "Боснія і Герцеговина", "Bolivia": "Болівія", "Bhutan": "Бутан", - "Bermuda": "Бермуди", + "Bermuda": "Бермудські Острови", "Benin": "Бенін", "Belize": "Беліз", "Belgium": "Бельгія", "Belarus": "Білорусь", "Barbados": "Барбадос", - "Bangladesh": "Бенгладеш", + "Bangladesh": "Бангладеш", "Bahrain": "Бахрейн", - "Bahamas": "Багами", + "Bahamas": "Багамські Острови", "Azerbaijan": "Азербайджан", "Austria": "Австрія", "Australia": "Австралія", "Aruba": "Аруба", - "Armenia": "Арменія", + "Armenia": "Вірменія", "Argentina": "Аргентина", "Antigua & Barbuda": "Антигуа і Барбуда", "Antarctica": "Антарктика", "Anguilla": "Ангілья", "Angola": "Ангола", - "Andorra": "Андора", - "American Samoa": "Американські Самоа", + "Andorra": "Андорра", + "American Samoa": "Американське Самоа", "Algeria": "Алжир", "Albania": "Албанія", - "Åland Islands": "Аландські острови", + "Åland Islands": "Аландські Острови", "Afghanistan": "Афганістан", "United States": "Сполучені Штати Америки", - "United Kingdom": "Об'єднане Королівство", + "United Kingdom": "Велика Британія", "The call was answered on another device.": "На дзвінок відповіли на іншому пристрої.", "Answered Elsewhere": "Відповіли деінде", "The call could not be established": "Не вдалося встановити зв'язок", "The other party declined the call.": "Інша сторона відхилила дзвінок.", "Call Declined": "Дзвінок відхилено", - "Falkland Islands": "Фолклендські Острови", + "Falkland Islands": "Фолклендські (Мальвінські) Острови", "Ethiopia": "Ефіопія", "Estonia": "Естонія", "Eritrea": "Еритрея", @@ -1335,16 +1335,16 @@ "Dominica": "Домініка", "Djibouti": "Джибуті", "Denmark": "Данія", - "Côte d’Ivoire": "Кот-д'Івуар", + "Côte d’Ivoire": "Кот-Д'Івуар", "Czech Republic": "Чехія", "Cyprus": "Кіпр", "Curaçao": "Кюрасао", "Cuba": "Куба", "Croatia": "Хорватія", - "Costa Rica": "Коста Ріка", - "Cook Islands": "Острова Кука", - "Congo - Kinshasa": "Конга - Киншаса", - "Congo - Brazzaville": "Конго - Браззавиль", + "Costa Rica": "Коста-Рика", + "Cook Islands": "Острови Кука", + "Congo - Kinshasa": "Демократична Республіка Конго", + "Congo - Brazzaville": "Конго", "%(senderDisplayName)s changed the server ACLs for this room.": "%(senderDisplayName)s змінив серверні права доступу для цієї кімнати.", "%(senderDisplayName)s set the server ACLs for this room.": "%(senderDisplayName)s встановив серверні права доступу для цієї кімнати", "Takes the call in the current room off hold": "Зніміть дзвінок у поточній кімнаті з утримання", @@ -1363,18 +1363,18 @@ "United Arab Emirates": "Об'єднані Арабські Емірати", "Ukraine": "Україна", "Uganda": "Уганда", - "U.S. Virgin Islands": "Американські Віргінські Острови", + "U.S. Virgin Islands": "Віргінські Острови (США)", "Tuvalu": "Тувалу", "Turks & Caicos Islands": "Острови Теркс і Кайкос", - "Turkmenistan": "Туркменістан", - "Turkey": "Турція", + "Turkmenistan": "Туркменистан", + "Turkey": "Туреччина", "Tunisia": "Туніс", "Trinidad & Tobago": "Тринідад і Тобаго", "Tonga": "Тонга", "Tokelau": "Токелау", "Togo": "Того", - "Timor-Leste": "Східний Тимор", - "Thailand": "Тайланд", + "Timor-Leste": "Тимор-Лешті", + "Thailand": "Таїланд", "Tanzania": "Танзанія", "Tajikistan": "Таджикистан", "Taiwan": "Тайвань", @@ -1390,14 +1390,14 @@ "St. Pierre & Miquelon": "Сен-П'єр і Мікелон", "St. Martin": "Сен-Мартен", "St. Lucia": "Сент-Люсія", - "St. Kitts & Nevis": "Сент-Кіттс і Невіс", + "St. Kitts & Nevis": "Сент-Кітс і Невіс", "St. Helena": "Острів Святої Єлени", - "St. Barthélemy": "Сен-Бартельмі", + "St. Barthélemy": "Сен-Бартелемі", "Sri Lanka": "Шрі-Ланка", "Spain": "Іспанія", "South Sudan": "Південний Судан", "South Korea": "Південна Корея", - "South Georgia & South Sandwich Islands": "Південна Джорджія і Південні Сандвічеві Острови", + "South Georgia & South Sandwich Islands": "Південна Джорджія та Південні Сандвічеві Острови", "South Africa": "Південна Африка", "Somalia": "Сомалі", "Solomon Islands": "Соломонові Острови", @@ -1406,25 +1406,25 @@ "Sint Maarten": "Сінт-Мартен", "Singapore": "Сингапур", "Sierra Leone": "Сьєрра-Леоне", - "Seychelles": "Сейшели", + "Seychelles": "Сейшельські Острови", "Serbia": "Сербія", "Senegal": "Сенегал", "Saudi Arabia": "Саудівська Аравія", - "San Marino": "Сан Марино", + "San Marino": "Сан-Марино", "Samoa": "Самоа", "Réunion": "Реюньйон", "Rwanda": "Руанда", - "Russia": "Росія", - "Romania": "Ромунія", + "Russia": "Російська Федерація", + "Romania": "Румунія", "Qatar": "Катар", "Puerto Rico": "Пуерто-Рико", "Portugal": "Португалія", "Poland": "Польща", - "Pitcairn Islands": "Острови Піткерн", + "Pitcairn Islands": "Піткерн", "Philippines": "Філіппіни", "Peru": "Перу", "Paraguay": "Парагвай", - "Papua New Guinea": "Папуа Нова Гвінея", + "Papua New Guinea": "Папуа-Нова Гвінея", "Panama": "Панама", "Palestine": "Палестина", "Palau": "Палау", @@ -1448,7 +1448,7 @@ "Mozambique": "Мозамбік", "Morocco": "Марокко", "Montserrat": "Монтсеррат", - "Montenegro": "Монтенегро", + "Montenegro": "Чорногорія", "Mongolia": "Монголія", "Monaco": "Монако", "Moldova": "Молдова", @@ -1465,7 +1465,7 @@ "Malaysia": "Малайзія", "Malawi": "Малаві", "Madagascar": "Мадагаскар", - "Macedonia": "Македонія", + "Macedonia": "Північна Македонія", "Macau": "Макао", "Luxembourg": "Люксембург", "Lithuania": "Литва", @@ -1475,11 +1475,11 @@ "Lesotho": "Лесото", "Lebanon": "Ліван", "Latvia": "Латвія", - "Laos": "Лаос", + "Laos": "Лаоська Народно-Демократична Республіка", "Kyrgyzstan": "Киргизстан", "Kuwait": "Кувейт", "Kosovo": "Косово", - "Kiribati": "Кірібаті", + "Kiribati": "Кірибаті", "Kenya": "Кенія", "Kazakhstan": "Казахстан", "Jordan": "Йорданія", @@ -1498,7 +1498,7 @@ "Hungary": "Угорщина", "Hong Kong": "Гонконг", "Honduras": "Гондурас", - "Heard & McDonald Islands": "Острови Герд і Макдональд", + "Heard & McDonald Islands": "Острів Герд і Острови Макдоналд", "Haiti": "Гаїті", "Guyana": "Гаяна", "Guinea-Bissau": "Гвінея-Бісау", @@ -1522,5 +1522,6 @@ "France": "Франція", "Finland": "Фінляндія", "Fiji": "Фіджі", - "Faroe Islands": "Фарерські острови" + "Faroe Islands": "Фарерські Острови", + "Unable to access microphone": "Неможливо доступитись до мікрофона" } From 9e48493f677adcf0147d06061381627d3b719d6f Mon Sep 17 00:00:00 2001 From: MamasLT Date: Sun, 29 Nov 2020 21:30:57 +0000 Subject: [PATCH 129/319] Translated using Weblate (Lithuanian) Currently translated at 70.6% (1909 of 2702 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/lt/ --- src/i18n/strings/lt.json | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/src/i18n/strings/lt.json b/src/i18n/strings/lt.json index b1f7cd7060..c1191aa020 100644 --- a/src/i18n/strings/lt.json +++ b/src/i18n/strings/lt.json @@ -218,7 +218,7 @@ "Room %(roomId)s not visible": "Kambarys %(roomId)s nematomas", "/ddg is not a command": "/ddg nėra komanda", "Changes your display nickname": "Pakeičia jūsų rodomą slapyvardį", - "Invites user with given id to current room": "Pakviečia naudotoją su nurodytu id į esamą kambarį", + "Invites user with given id to current room": "Pakviečia vartotoją su nurodytu id į dabartinį kambarį", "You are now ignoring %(userId)s": "Dabar ignoruojate %(userId)s", "Opens the Developer Tools dialog": "Atveria Programuotojo Įrankių dialogą", "Verified key": "Patvirtintas raktas", @@ -272,7 +272,7 @@ "%(senderName)s uploaded a file": "%(senderName)s įkėlė failą", "Options": "Parinktys", "Key request sent.": "Rakto užklausa išsiųsta.", - "Failed to mute user": "Nepavyko nutildyti naudotoją", + "Failed to mute user": "Nepavyko nutildyti vartotojo", "Are you sure?": "Ar tikrai?", "Ignore": "Ignoruoti", "Invite": "Pakviesti", @@ -422,13 +422,13 @@ "Autoplay GIFs and videos": "Automatiškai paleisti GIF ir vaizdo įrašus", "This event could not be displayed": "Nepavyko parodyti šio įvykio", "Kick": "Išmesti", - "Kick this user?": "Išmesti šį naudotoją?", + "Kick this user?": "Išmesti šį vartotoją?", "Failed to kick": "Nepavyko išmesti", "Unban": "Atblokuoti", "Ban": "Užblokuoti", - "Unban this user?": "Atblokuoti šį naudotoją?", - "Ban this user?": "Užblokuoti šį naudotoją?", - "Failed to ban user": "Nepavyko užblokuoti naudotoją", + "Unban this user?": "Atblokuoti šį vartotoją?", + "Ban this user?": "Užblokuoti šį vartotoją?", + "Failed to ban user": "Nepavyko užblokuoti vartotojo", "Invited": "Pakviestas", "Filter room members": "Filtruoti kambario dalyvius", "Server unavailable, overloaded, or something else went wrong.": "Serveris neprieinamas, perkrautas arba nutiko kažkas kito.", @@ -661,7 +661,7 @@ "Public Chat": "Viešas pokalbis", "There are no visible files in this room": "Šiame kambaryje nėra matomų failų", "Add a Room": "Pridėti kambarį", - "Add a User": "Pridėti naudotoją", + "Add a User": "Pridėti Vartotoją", "Long Description (HTML)": "Ilgasis aprašas (HTML)", "Description": "Aprašas", "Community %(groupId)s not found": "Bendruomenė %(groupId)s nerasta", @@ -2017,5 +2017,15 @@ "Enter a Security Phrase": "Įveskite Slaptafrazę", "Security Phrase": "Slaptafrazė", "Enter a security phrase only you know, as it’s used to safeguard your data. To be secure, you shouldn’t re-use your account password.": "Įveskite slaptafrazę, kurią žinote tik jūs, nes ji naudojama jūsų duomenims apsaugoti. Tam, kad būtumėte saugūs, neturėtumėte vėl naudoti savo paskyros slaptažodžio.", - "Enter your Security Phrase or to continue.": "Įveskite savo Slaptafrazę arba , kad tęstumėte." + "Enter your Security Phrase or to continue.": "Įveskite savo Slaptafrazę arba , kad tęstumėte.", + "%(creator)s created this DM.": "%(creator)s sukūrė šį tiesioginio susirašymo kambarį.", + "Only the two of you are in this conversation, unless either of you invites anyone to join.": "Šiame pokalbyje esate tik jūs dviese, nebent kuris nors iš jūsų pakvies ką nors prisijungti.", + "This is the beginning of your direct message history with .": "Tai yra jūsų tiesioginių žinučių su istorijos pradžia.", + "Messages here are end-to-end encrypted. Verify %(displayName)s in their profile - tap on their avatar.": "Žinutės čia yra visapusiškai užšifruotos. Patvirtinkite %(displayName)s jų profilyje - paspauskite ant jų pseudoportreto.", + "See when the avatar changes in your active room": "Matyti kada jūsų aktyviame kambaryje pasikeičia pseudoportretas", + "Change the avatar of your active room": "Pakeisti jūsų aktyvaus kambario pseudoportretą", + "See when the avatar changes in this room": "Matyti kada šiame kambaryje pasikeičia pseudoportretas", + "Change the avatar of this room": "Pakeisti šio kambario pseudoportretą", + "Messages in this room are end-to-end encrypted. When people join, you can verify them in their profile, just tap on their avatar.": "Žinutės šiame kambaryje yra visapusiškai užšifruotos. Kai žmonės prisijungia, jūs galite patvirtinti juos jų profilyje, tiesiog paspauskite ant jų pseudoportreto.", + "Mentions & Keywords": "Paminėjimai ir Raktažodžiai" } From 3a3775b5233642c3be3b378c40e5ecad1dc3f63d Mon Sep 17 00:00:00 2001 From: David Baker Date: Mon, 30 Nov 2020 15:17:20 +0000 Subject: [PATCH 130/319] Only show 'answered elsewhere' if we tried to answer too and don't play the hangup tone Fixes https://github.com/vector-im/element-web/issues/15735 --- src/CallHandler.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/CallHandler.tsx b/src/CallHandler.tsx index abfe5cc9bf..b5f696008d 100644 --- a/src/CallHandler.tsx +++ b/src/CallHandler.tsx @@ -306,8 +306,9 @@ export default class CallHandler { Modal.createTrackedDialog('Call Handler', 'Call Failed', ErrorDialog, { title, description, }); - } else if (call.hangupReason === CallErrorCode.AnsweredElsewhere) { - this.play(AudioID.Busy); + } else if ( + call.hangupReason === CallErrorCode.AnsweredElsewhere && oldState === CallState.Connecting + ) { Modal.createTrackedDialog('Call Handler', 'Call Failed', ErrorDialog, { title: _t("Answered Elsewhere"), description: _t("The call was answered on another device."), From f2c79c1e8c960669c0b5d39f213c0df51567127a Mon Sep 17 00:00:00 2001 From: Nikita Epifanov Date: Mon, 30 Nov 2020 13:18:20 +0000 Subject: [PATCH 131/319] Translated using Weblate (Russian) Currently translated at 87.9% (2376 of 2702 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/ru/ --- src/i18n/strings/ru.json | 42 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/ru.json b/src/i18n/strings/ru.json index 8bf1ee15d3..0007ae5629 100644 --- a/src/i18n/strings/ru.json +++ b/src/i18n/strings/ru.json @@ -2558,5 +2558,45 @@ "Rate %(brand)s": "Оценить %(brand)s", "Feedback sent": "Отзыв отправлен", "%(senderName)s ended the call": "%(senderName)s завершил(а) звонок", - "You ended the call": "Вы закончили звонок" + "You ended the call": "Вы закончили звонок", + "Send stickers into this room": "Отправить стикеры в эту комнату", + "Use Ctrl + Enter to send a message": "Используйте Ctrl + Enter, чтобы отправить сообщение", + "Use Command + Enter to send a message": "Используйте Command + Enter, чтобы отправить сообщение", + "Go to Home View": "Перейти на главную страницу", + "Filter rooms and people": "Фильтровать комнаты и людей", + "Open the link in the email to continue registration.": "Откройте ссылку в письме, чтобы продолжить регистрацию.", + "A confirmation email has been sent to %(emailAddress)s": "Письмо с подтверждением отправлено на %(emailAddress)s", + "Start a new chat": "Начать новый чат", + "Role": "Роль", + "Messages in this room are end-to-end encrypted. When people join, you can verify them in their profile, just tap on their avatar.": "Сообщения в этой комнате полностью зашифрованы. Когда люди присоединяются, вы можете проверить их в их профиле, просто нажмите на их аватар.", + "This is the start of .": "Это начало .", + "Add a photo, so people can easily spot your room.": "Добавьте фото, чтобы люди могли легко заметить вашу комнату.", + "%(displayName)s created this room.": "%(displayName)s создал(а) эту комнату.", + "You created this room.": "Вы создали эту комнату.", + "Add a topic to help people know what it is about.": "Добавьте тему, чтобы люди знали, о чём комната.", + "Topic: %(topic)s ": "Тема: %(topic)s ", + "Topic: %(topic)s (edit)": "Тема: %(topic)s (изменить)", + "This is the beginning of your direct message history with .": "Это начало вашей истории прямых сообщений с .", + "Only the two of you are in this conversation, unless either of you invites anyone to join.": "В этом разговоре только вы двое, если только кто-нибудь из вас не пригласит кого-нибудь присоединиться.", + "Takes the call in the current room off hold": "Прекратить удержание вызова в текущей комнате", + "Places the call in the current room on hold": "Перевести вызов в текущей комнате на удержание", + "Now, let's help you get started": "Теперь давайте поможем вам начать", + "Invite someone using their name, email address, username (like ) or share this room.": "Пригласите кого-нибудь, используя его имя, адрес электронной почты, имя пользователя (например, ) или поделитесь этой комнатой.", + "Start a conversation with someone using their name, email address or username (like ).": "Начните разговор с кем-нибудь, используя его имя, адрес электронной почты или имя пользователя (например, ).", + "Invite by email": "Пригласить по электронной почте", + "Welcome %(name)s": "Добро пожаловать, %(name)s", + "Add a photo so people know it's you.": "Добавьте фото, чтобы люди знали, что это вы.", + "Great, that'll help people know it's you": "Отлично, это поможет людям узнать, что это ты", + "Use the + to make a new room or explore existing ones below": "Используйте +, чтобы создать новую комнату или изучить существующие ниже", + "New version of %(brand)s is available": "Доступна новая версия %(brand)s!", + "Update %(brand)s": "Обновление %(brand)s", + "Enable desktop notifications": "Включить уведомления на рабочем столе", + "Don't miss a reply": "Не пропустите ответ", + "No other application is using the webcam": "Никакое другое приложение не использует веб-камеру", + "Permission is granted to use the webcam": "Разрешение на использование еб-камеры предоставлено", + "A microphone and webcam are plugged in and set up correctly": "Микрофон и веб-камера подключены и правильно настроены", + "Call failed because no webcam or microphone could not be accessed. Check that:": "Вызов не удался, потому что не удалось получить доступ к веб-камере или микрофону. Проверьте это:", + "Unable to access webcam / microphone": "Невозможно получить доступ к веб-камере / микрофону", + "Call failed because no microphone could not be accessed. Check that a microphone is plugged in and set up correctly.": "Вызов не удался, потому что нет доступа к микрофону. Убедитесь, что микрофон подключен и правильно настроен.", + "Unable to access microphone": "Нет доступа к микрофону" } From cb6c080828ba8b1034e2989243bebf3d5445f5ca Mon Sep 17 00:00:00 2001 From: David Baker Date: Mon, 30 Nov 2020 16:44:31 +0000 Subject: [PATCH 132/319] Fix remote video being too tall and causing aux panel to scroll --- res/css/views/voip/_CallView.scss | 3 ++- src/components/views/voip/CallView.tsx | 8 +++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/res/css/views/voip/_CallView.scss b/res/css/views/voip/_CallView.scss index d5e58c94c5..6cc420236f 100644 --- a/res/css/views/voip/_CallView.scss +++ b/res/css/views/voip/_CallView.scss @@ -25,7 +25,8 @@ limitations under the License. } .mx_CallView_large { - padding-bottom: 10px; + // XXX: This should be 10 but somehow it's gaining an extra 4px from somewhere... + padding-bottom: 6px; .mx_CallView_voice { height: 360px; diff --git a/src/components/views/voip/CallView.tsx b/src/components/views/voip/CallView.tsx index c9f5db77e6..34952f521b 100644 --- a/src/components/views/voip/CallView.tsx +++ b/src/components/views/voip/CallView.tsx @@ -94,6 +94,10 @@ const CONTROLS_HIDE_DELAY = 1000; // Height of the header duplicated from CSS because we need to subtract it from our max // height to get the max height of the video const HEADER_HEIGHT = 44; + +// Also duplicated from the CSS: the bottom padding on the call view +const CALL_PADDING_BOTTOM = 10; + const CONTEXT_MENU_VPADDING = 8; // How far the context menu sits above the button (px) export default class CallView extends React.Component { @@ -478,7 +482,9 @@ export default class CallView extends React.Component { } // if we're fullscreen, we don't want to set a maxHeight on the video element. - const maxVideoHeight = getFullScreenElement() ? null : this.props.maxVideoHeight - HEADER_HEIGHT; + const maxVideoHeight = getFullScreenElement() ? null : ( + this.props.maxVideoHeight - HEADER_HEIGHT - CALL_PADDING_BOTTOM + ); contentView =
{onHoldBackground} Date: Mon, 30 Nov 2020 21:33:52 +0100 Subject: [PATCH 133/319] Update i18n for Appearance User Settings The variable has to be added to the i18n files as well (I don't know how to do that) --- .../views/settings/tabs/user/AppearanceUserSettingsTab.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/views/settings/tabs/user/AppearanceUserSettingsTab.tsx b/src/components/views/settings/tabs/user/AppearanceUserSettingsTab.tsx index 9f9acd8e3c..209f245b11 100644 --- a/src/components/views/settings/tabs/user/AppearanceUserSettingsTab.tsx +++ b/src/components/views/settings/tabs/user/AppearanceUserSettingsTab.tsx @@ -394,7 +394,7 @@ export default class AppearanceUserSettingsTab extends React.Component this.setState({showAdvanced: !this.state.showAdvanced})} > - {this.state.showAdvanced ? "Hide advanced" : "Show advanced"} + {this.state.showAdvanced ? _t("Hide advanced") : _t("Show advanced")}
; let advanced: React.ReactNode; From 9b6f93da5f79269cbe19c86d1cfb6ea7c1c0a50c Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Mon, 30 Nov 2020 13:42:29 -0700 Subject: [PATCH 134/319] Update i18n --- src/i18n/strings/en_EN.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index 8746df20cc..b33cbffb8f 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -1136,6 +1136,8 @@ "Message layout": "Message layout", "Compact": "Compact", "Modern": "Modern", + "Hide advanced": "Hide advanced", + "Show advanced": "Show advanced", "Set the name of a font installed on your system & %(brand)s will attempt to use it.": "Set the name of a font installed on your system & %(brand)s will attempt to use it.", "Customise your appearance": "Customise your appearance", "Appearance Settings only affect this %(brand)s session.": "Appearance Settings only affect this %(brand)s session.", @@ -1989,8 +1991,6 @@ "Name": "Name", "Topic (optional)": "Topic (optional)", "Make this room public": "Make this room public", - "Hide advanced": "Hide advanced", - "Show advanced": "Show advanced", "Block anyone not part of %(serverName)s from ever joining this room.": "Block anyone not part of %(serverName)s from ever joining this room.", "Create Room": "Create Room", "Sign out": "Sign out", From 26e1cdb82ccd59fcc1c08335f543a71577a954ae Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Tue, 1 Dec 2020 12:04:41 +0000 Subject: [PATCH 135/319] Update i18n --- src/components/structures/auth/Registration.tsx | 10 ++++++++-- src/i18n/strings/en_EN.json | 4 ++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/components/structures/auth/Registration.tsx b/src/components/structures/auth/Registration.tsx index 512972d0b4..e1a2fc5590 100644 --- a/src/components/structures/auth/Registration.tsx +++ b/src/components/structures/auth/Registration.tsx @@ -467,9 +467,13 @@ export default class Registration extends React.Component { || this.state.ssoFlow["identity_providers"] || []; // when there is only a single (or 0) providers we show a wide button with `Continue with X` text if (providers.length > 1) { - continueWithSection =

{_t("Continue with")}

; + // i18n: ssoButtons is a placeholder to help translators understand context + continueWithSection =

+ { _t("Continue with %(ssoButtons)s", { ssoButtons: "" }).trim() } +

; } + // i18n: ssoButtons & usernamePassword are placeholders to help translators understand context ssoSection = { continueWithSection } { loginType={this.state.ssoFlow.type === "m.login.sso" ? "sso" : "cas"} fragmentAfterLogin={this.props.fragmentAfterLogin} /> -

{_t("Or")}

+

+ { _t("%(ssoButtons)s Or %(usernamePassword)s", { ssoButtons: "", usernamePassword: ""}).trim() } +

; } diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index 4ae0019e5e..5760cf9ca1 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -2510,8 +2510,8 @@ "Registration has been disabled on this homeserver.": "Registration has been disabled on this homeserver.", "This server does not support authentication with a phone number.": "This server does not support authentication with a phone number.", "That username already exists, please try another.": "That username already exists, please try another.", - "Continue with": "Continue with", - "Or": "Or", + "Continue with %(ssoButtons)s": "Continue with %(ssoButtons)s", + "%(ssoButtons)s Or %(usernamePassword)s": "%(ssoButtons)s Or %(usernamePassword)s", "Already have an account? Sign in here": "Already have an account? Sign in here", "Your new account (%(newAccountId)s) is registered, but you're already logged into a different account (%(loggedInUserId)s).": "Your new account (%(newAccountId)s) is registered, but you're already logged into a different account (%(loggedInUserId)s).", "Continue with previous account": "Continue with previous account", From 4ca35fabefe5ada2edcc631f9f6ec84b12b2e30b Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 1 Dec 2020 13:44:24 +0000 Subject: [PATCH 136/319] Visual tweaks --- res/css/views/voip/_CallView.scss | 21 +++++++++++++++------ src/CallHandler.tsx | 14 ++++++-------- 2 files changed, 21 insertions(+), 14 deletions(-) diff --git a/res/css/views/voip/_CallView.scss b/res/css/views/voip/_CallView.scss index d5e58c94c5..57806470a1 100644 --- a/res/css/views/voip/_CallView.scss +++ b/res/css/views/voip/_CallView.scss @@ -58,8 +58,8 @@ limitations under the License. &::after { position: absolute; content: ''; - width: 20px; - height: 20px; + width: 40px; + height: 40px; top: 50%; left: 50%; transform: translate(-50%, -50%); @@ -67,6 +67,10 @@ limitations under the License. background-position: center; background-size: cover; } + .mx_CallView_pip &::after { + width: 30px; + height: 30px; + } } .mx_BaseAvatar { filter: blur(20px); @@ -75,8 +79,10 @@ limitations under the License. } .mx_CallView_voice_holdText { - height: 16px; + height: 20px; + padding-top: 10px; color: $accent-fg-color; + font-weight: bold; .mx_AccessibleButton_hasKind { padding: 0px; } @@ -124,14 +130,17 @@ limitations under the License. margin-left: auto; margin-right: auto; content: ''; - width: 20px; - height: 20px; + width: 40px; + height: 40px; background-image: url('$(res)/img/voip/paused.svg'); background-position: center; background-size: cover; } + .mx_CallView_pip &::before { + width: 30px; + height: 30px; + } .mx_AccessibleButton_hasKind { - display: block; padding: 0px; } } diff --git a/src/CallHandler.tsx b/src/CallHandler.tsx index 3be203ab98..544eb0851d 100644 --- a/src/CallHandler.tsx +++ b/src/CallHandler.tsx @@ -477,20 +477,18 @@ export default class CallHandler { break; case 'incoming_call': { - if (this.getAnyActiveCall()) { - // ignore multiple incoming calls. in future, we may want a line-1/line-2 setup. - // we avoid rejecting with "busy" in case the user wants to answer it on a different device. - // in future we could signal a "local busy" as a warning to the caller. - // see https://github.com/vector-im/vector-web/issues/1964 - return; - } - // if the runtime env doesn't do VoIP, stop here. if (!MatrixClientPeg.get().supportsVoip()) { return; } const call = payload.call as MatrixCall; + + if (this.getCallForRoom(call.roomId)) { + // ignore multiple incoming calls to the same room + return; + } + Analytics.trackEvent('voip', 'receiveCall', 'type', call.type); this.calls.set(call.roomId, call) this.setCallListeners(call); From d3b1ec0648f3f5db4bc3b6f494ba70c0a2bb6904 Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 1 Dec 2020 15:08:59 +0000 Subject: [PATCH 137/319] Revert unintentional part of 4ca35fabefe5ada2edcc631f9f6ec84b12b2e30b --- src/CallHandler.tsx | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/CallHandler.tsx b/src/CallHandler.tsx index 544eb0851d..3be203ab98 100644 --- a/src/CallHandler.tsx +++ b/src/CallHandler.tsx @@ -477,18 +477,20 @@ export default class CallHandler { break; case 'incoming_call': { + if (this.getAnyActiveCall()) { + // ignore multiple incoming calls. in future, we may want a line-1/line-2 setup. + // we avoid rejecting with "busy" in case the user wants to answer it on a different device. + // in future we could signal a "local busy" as a warning to the caller. + // see https://github.com/vector-im/vector-web/issues/1964 + return; + } + // if the runtime env doesn't do VoIP, stop here. if (!MatrixClientPeg.get().supportsVoip()) { return; } const call = payload.call as MatrixCall; - - if (this.getCallForRoom(call.roomId)) { - // ignore multiple incoming calls to the same room - return; - } - Analytics.trackEvent('voip', 'receiveCall', 'type', call.type); this.calls.set(call.roomId, call) this.setCallListeners(call); From 1bf7ff8994356daa8a94c7ec94de064aabbf932c Mon Sep 17 00:00:00 2001 From: nurjinn jafar Date: Tue, 1 Dec 2020 17:15:02 +0100 Subject: [PATCH 138/319] null check added path to confetti fixed after refactoring --- src/components/views/elements/EffectsOverlay.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/views/elements/EffectsOverlay.tsx b/src/components/views/elements/EffectsOverlay.tsx index 4c6a3c06ae..0bffaf526f 100644 --- a/src/components/views/elements/EffectsOverlay.tsx +++ b/src/components/views/elements/EffectsOverlay.tsx @@ -34,11 +34,11 @@ const EffectsOverlay: FunctionComponent = ({ roomWidth }) = if (effect === null) { const options = CHAT_EFFECTS.find((e) => e.command === name)?.options try { - const { default: Effect }: { default: ICanvasEffectConstructable } = await import(`./${name}`); + const { default: Effect }: { default: ICanvasEffectConstructable } = await import(`../../../effects/${name}`); effect = new Effect(options); effectsRef.current[name] = effect; } catch (err) { - console.warn('Unable to load effect module at \'./${name}\'.', err) + console.warn('Unable to load effect module at \'../../../effects/${name}\'.', err) } } return effect; @@ -46,7 +46,9 @@ const EffectsOverlay: FunctionComponent = ({ roomWidth }) = useEffect(() => { const resize = () => { - canvasRef.current.height = window.innerHeight; + if (canvasRef.current) { + canvasRef.current.height = window.innerHeight; + } }; const onAction = (payload: { action: string }) => { const actionPrefix = 'effects.'; From 111515e794ad5e8fcc389ca9137ed9e79abd27d3 Mon Sep 17 00:00:00 2001 From: nurjinn jafar Date: Tue, 1 Dec 2020 17:37:28 +0100 Subject: [PATCH 139/319] fixed linter problem --- src/components/views/elements/EffectsOverlay.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/views/elements/EffectsOverlay.tsx b/src/components/views/elements/EffectsOverlay.tsx index 0bffaf526f..684b647365 100644 --- a/src/components/views/elements/EffectsOverlay.tsx +++ b/src/components/views/elements/EffectsOverlay.tsx @@ -34,7 +34,8 @@ const EffectsOverlay: FunctionComponent = ({ roomWidth }) = if (effect === null) { const options = CHAT_EFFECTS.find((e) => e.command === name)?.options try { - const { default: Effect }: { default: ICanvasEffectConstructable } = await import(`../../../effects/${name}`); + const { default: Effect }: { default: ICanvasEffectConstructable } + = await import(`../../../effects/${name}`); effect = new Effect(options); effectsRef.current[name] = effect; } catch (err) { From e0b68441bc4040b39941ca0fefbc348309c58852 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Tue, 1 Dec 2020 16:39:26 +0000 Subject: [PATCH 140/319] i18n --- src/i18n/strings/en_EN.json | 68 ++++++++++++++++++------------------- 1 file changed, 33 insertions(+), 35 deletions(-) diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index b33cbffb8f..81fc932fc7 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -1897,6 +1897,11 @@ "This address is available to use": "This address is available to use", "This address is already in use": "This address is already in use", "Room directory": "Room directory", + "Server Options": "Server Options", + "You can use the custom server options to sign into other Matrix servers by specifying a different homeserver URL. This allows you to use Element with an existing Matrix account on a different homeserver.": "You can use the custom server options to sign into other Matrix servers by specifying a different homeserver URL. This allows you to use Element with an existing Matrix account on a different homeserver.", + "Join millions for free on the largest public server": "Join millions for free on the largest public server", + "Homeserver": "Homeserver", + "Continue with %(provider)s": "Continue with %(provider)s", "Sign in with single sign-on": "Sign in with single sign-on", "And %(count)s more...|other": "And %(count)s more...", "Home": "Home", @@ -2113,6 +2118,10 @@ "Use this session to verify your new one, granting it access to encrypted messages:": "Use this session to verify your new one, granting it access to encrypted messages:", "If you didn’t sign in to this session, your account may be compromised.": "If you didn’t sign in to this session, your account may be compromised.", "This wasn't me": "This wasn't me", + "Doesn't look like a valid email address": "Doesn't look like a valid email address", + "Continuing without email": "Continuing without email", + "Just a heads up, if you don't add an email and forget your password, you could permanently lose access to your account.": "Just a heads up, if you don't add an email and forget your password, you could permanently lose access to your account.", + "Email (optional)": "Email (optional)", "Please fill why you're reporting.": "Please fill why you're reporting.", "Report Content to Your Homeserver Administrator": "Report Content to Your Homeserver Administrator", "Reporting this message will send its unique 'event ID' to the administrator of your homeserver. If messages in this room are encrypted, your homeserver administrator will not be able to read the message text or view any files or images.": "Reporting this message will send its unique 'event ID' to the administrator of your homeserver. If messages in this room are encrypted, your homeserver administrator will not be able to read the message text or view any files or images.", @@ -2146,6 +2155,15 @@ "A connection error occurred while trying to contact the server.": "A connection error occurred while trying to contact the server.", "The server is not configured to indicate what the problem is (CORS).": "The server is not configured to indicate what the problem is (CORS).", "Recent changes that have not yet been received": "Recent changes that have not yet been received", + "Unable to validate homeserver/identity server": "Unable to validate homeserver/identity server", + "Specify a homeserver": "Specify a homeserver", + "Matrix.org is the biggest public homeserver in the world, so it’s a good place for many.": "Matrix.org is the biggest public homeserver in the world, so it’s a good place for many.", + "Sign into your homeserver": "Sign into your homeserver", + "We call the places you where you can host your account ‘homeservers’.": "We call the places you where you can host your account ‘homeservers’.", + "Other homeserver": "Other homeserver", + "Use your preferred Matrix homeserver if you have one, or host your own.": "Use your preferred Matrix homeserver if you have one, or host your own.", + "Learn more": "Learn more", + "About homeservers": "About homeservers", "Sign out and remove encryption keys?": "Sign out and remove encryption keys?", "Clear Storage and Sign Out": "Clear Storage and Sign Out", "Send Logs": "Send Logs", @@ -2274,8 +2292,6 @@ "powered by Matrix": "powered by Matrix", "This homeserver would like to make sure you are not a robot.": "This homeserver would like to make sure you are not a robot.", "Country Dropdown": "Country Dropdown", - "Custom Server Options": "Custom Server Options", - "You can use the custom server options to sign into other Matrix servers by specifying a different homeserver URL. This allows you to use %(brand)s with an existing Matrix account on a different homeserver.": "You can use the custom server options to sign into other Matrix servers by specifying a different homeserver URL. This allows you to use %(brand)s with an existing Matrix account on a different homeserver.", "Confirm your identity by entering your account password below.": "Confirm your identity by entering your account password below.", "Password": "Password", "Missing captcha public key in homeserver configuration. Please report this to your homeserver administrator.": "Missing captcha public key in homeserver configuration. Please report this to your homeserver administrator.", @@ -2289,48 +2305,30 @@ "Code": "Code", "Submit": "Submit", "Start authentication": "Start authentication", - "Unable to validate homeserver/identity server": "Unable to validate homeserver/identity server", - "Enter the location of your Element Matrix Services homeserver. It may use your own domain name or be a subdomain of element.io.": "Enter the location of your Element Matrix Services homeserver. It may use your own domain name or be a subdomain of element.io.", - "Server Name": "Server Name", "Enter password": "Enter password", "Nice, strong password!": "Nice, strong password!", "Password is allowed, but unsafe": "Password is allowed, but unsafe", "Keep going...": "Keep going...", "Enter username": "Enter username", "Enter email address": "Enter email address", - "Doesn't look like a valid email address": "Doesn't look like a valid email address", "Enter phone number": "Enter phone number", - "Doesn't look like a valid phone number": "Doesn't look like a valid phone number", + "That phone number doesn't look quite right, please check and try again": "That phone number doesn't look quite right, please check and try again", "Email": "Email", "Username": "Username", "Phone": "Phone", - "Not sure of your password? Set a new one": "Not sure of your password? Set a new one", + "Forgot password?": "Forgot password?", "Sign in with": "Sign in with", "Sign in": "Sign in", - "No identity server is configured so you cannot add an email address in order to reset your password in the future.": "No identity server is configured so you cannot add an email address in order to reset your password in the future.", - "If you don't specify an email address, you won't be able to reset your password. Are you sure?": "If you don't specify an email address, you won't be able to reset your password. Are you sure?", "Use an email address to recover your account": "Use an email address to recover your account", "Enter email address (required on this homeserver)": "Enter email address (required on this homeserver)", "Other users can invite you to rooms using your contact details": "Other users can invite you to rooms using your contact details", "Enter phone number (required on this homeserver)": "Enter phone number (required on this homeserver)", "Use lowercase letters, numbers, dashes and underscores only": "Use lowercase letters, numbers, dashes and underscores only", - "Email (optional)": "Email (optional)", "Phone (optional)": "Phone (optional)", "Register": "Register", - "Set an email for account recovery. Use email or phone to optionally be discoverable by existing contacts.": "Set an email for account recovery. Use email or phone to optionally be discoverable by existing contacts.", - "Set an email for account recovery. Use email to optionally be discoverable by existing contacts.": "Set an email for account recovery. Use email to optionally be discoverable by existing contacts.", - "Enter your custom homeserver URL What does this mean?": "Enter your custom homeserver URL What does this mean?", - "Homeserver URL": "Homeserver URL", - "Enter your custom identity server URL What does this mean?": "Enter your custom identity server URL What does this mean?", - "Identity Server URL": "Identity Server URL", - "Other servers": "Other servers", - "Free": "Free", - "Join millions for free on the largest public server": "Join millions for free on the largest public server", - "Premium": "Premium", - "Premium hosting for organisations Learn more": "Premium hosting for organisations Learn more", - "Find other public servers or use a custom server": "Find other public servers or use a custom server", - "Sign in to your Matrix account on %(serverName)s": "Sign in to your Matrix account on %(serverName)s", - "Sign in to your Matrix account on ": "Sign in to your Matrix account on ", + "Add an email to be able to reset your password.": "Add an email to be able to reset your password.", + "Use email or phone to optionally be discoverable by existing contacts.": "Use email or phone to optionally be discoverable by existing contacts.", + "Use email to optionally be discoverable by existing contacts.": "Use email to optionally be discoverable by existing contacts.", "Sign in with SSO": "Sign in with SSO", "Couldn't load page": "Couldn't load page", "You must register to use this functionality": "You must register to use this functionality", @@ -2377,7 +2375,6 @@ "Everyone": "Everyone", "Your community hasn't got a Long Description, a HTML page to show to community members.
Click here to open settings and give it one!": "Your community hasn't got a Long Description, a HTML page to show to community members.
Click here to open settings and give it one!", "Long Description (HTML)": "Long Description (HTML)", - "Upload avatar": "Upload avatar", "Description": "Description", "Community %(groupId)s not found": "Community %(groupId)s not found", "This homeserver does not support communities": "This homeserver does not support communities", @@ -2486,13 +2483,10 @@ "A new password must be entered.": "A new password must be entered.", "New passwords must match each other.": "New passwords must match each other.", "Changing your password will reset any end-to-end encryption keys on all of your sessions, making encrypted chat history unreadable. Set up Key Backup or export your room keys from another session before resetting your password.": "Changing your password will reset any end-to-end encryption keys on all of your sessions, making encrypted chat history unreadable. Set up Key Backup or export your room keys from another session before resetting your password.", - "Your Matrix account on %(serverName)s": "Your Matrix account on %(serverName)s", - "Your Matrix account on ": "Your Matrix account on ", - "No identity server is configured: add one in server settings to reset your password.": "No identity server is configured: add one in server settings to reset your password.", - "Sign in instead": "Sign in instead", "New Password": "New Password", "A verification email will be sent to your inbox to confirm setting your new password.": "A verification email will be sent to your inbox to confirm setting your new password.", "Send Reset Email": "Send Reset Email", + "Sign in instead": "Sign in instead", "An email has been sent to %(emailAddress)s. Once you've followed the link it contains, click below.": "An email has been sent to %(emailAddress)s. Once you've followed the link it contains, click below.", "I have verified my email address": "I have verified my email address", "Your password has been reset.": "Your password has been reset.", @@ -2514,24 +2508,28 @@ "Please note you are logging into the %(hs)s server, not matrix.org.": "Please note you are logging into the %(hs)s server, not matrix.org.", "Failed to perform homeserver discovery": "Failed to perform homeserver discovery", "This homeserver doesn't offer any login flows which are supported by this client.": "This homeserver doesn't offer any login flows which are supported by this client.", - "Error: Problem communicating with the given homeserver.": "Error: Problem communicating with the given homeserver.", + "There was a problem communicating with the homeserver, please try again later.": "There was a problem communicating with the homeserver, please try again later.", "Can't connect to homeserver via HTTP when an HTTPS URL is in your browser bar. Either use HTTPS or enable unsafe scripts.": "Can't connect to homeserver via HTTP when an HTTPS URL is in your browser bar. Either use HTTPS or enable unsafe scripts.", "Can't connect to homeserver - please check your connectivity, ensure your homeserver's SSL certificate is trusted, and that a browser extension is not blocking requests.": "Can't connect to homeserver - please check your connectivity, ensure your homeserver's SSL certificate is trusted, and that a browser extension is not blocking requests.", "Syncing...": "Syncing...", "Signing In...": "Signing In...", "If you've joined lots of rooms, this might take a while": "If you've joined lots of rooms, this might take a while", - "Create account": "Create account", + "New? Create account": "New? Create account", "Unable to query for supported registration methods.": "Unable to query for supported registration methods.", "Registration has been disabled on this homeserver.": "Registration has been disabled on this homeserver.", "This server does not support authentication with a phone number.": "This server does not support authentication with a phone number.", + "That username already exists, please try another.": "That username already exists, please try another.", + "Continue with %(ssoButtons)s": "Continue with %(ssoButtons)s", + "%(ssoButtons)s Or %(usernamePassword)s": "%(ssoButtons)s Or %(usernamePassword)s", + "Already have an account? Sign in here": "Already have an account? Sign in here", "Your new account (%(newAccountId)s) is registered, but you're already logged into a different account (%(loggedInUserId)s).": "Your new account (%(newAccountId)s) is registered, but you're already logged into a different account (%(loggedInUserId)s).", "Continue with previous account": "Continue with previous account", "Log in to your new account.": "Log in to your new account.", "You can now close this window or log in to your new account.": "You can now close this window or log in to your new account.", "Registration Successful": "Registration Successful", - "Create your Matrix account on %(serverName)s": "Create your Matrix account on %(serverName)s", - "Create your Matrix account on ": "Create your Matrix account on ", - "Create your account": "Create your account", + "Create account": "Create account", + "Host account on": "Host account on", + "Decide where your account is hosted": "Decide where your account is hosted", "Use Recovery Key or Passphrase": "Use Recovery Key or Passphrase", "Use Recovery Key": "Use Recovery Key", "Confirm your identity by verifying this login from one of your other sessions, granting it access to encrypted messages.": "Confirm your identity by verifying this login from one of your other sessions, granting it access to encrypted messages.", From bd1de8d45b953cc9f87c310121600921b2111ce2 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Tue, 1 Dec 2020 13:05:48 -0700 Subject: [PATCH 141/319] Require a room ID for WidgetStore's pinned widget contracts This should alleviate https://github.com/vector-im/element-web/issues/15705 from happening, though the cause is still unknown. Requiring a room ID is safe for this because only room widgets can be pinned, and widget IDs are not globally unique which means from a logical standpoint the contract still makes sense here. --- .../views/context_menus/WidgetContextMenu.tsx | 6 ++--- .../views/messages/MJitsiWidgetEvent.tsx | 2 +- .../views/right_panel/RoomSummaryCard.tsx | 13 ++++----- .../views/right_panel/WidgetCard.tsx | 2 +- src/stores/WidgetStore.ts | 27 +++++++++---------- 5 files changed, 24 insertions(+), 26 deletions(-) diff --git a/src/components/views/context_menus/WidgetContextMenu.tsx b/src/components/views/context_menus/WidgetContextMenu.tsx index 7656e70341..8026942038 100644 --- a/src/components/views/context_menus/WidgetContextMenu.tsx +++ b/src/components/views/context_menus/WidgetContextMenu.tsx @@ -57,7 +57,7 @@ const WidgetContextMenu: React.FC = ({ let unpinButton; if (showUnpin) { const onUnpinClick = () => { - WidgetStore.instance.unpinWidget(app.id); + WidgetStore.instance.unpinWidget(room.roomId, app.id); onFinished(); }; @@ -143,7 +143,7 @@ const WidgetContextMenu: React.FC = ({ let moveLeftButton; if (showUnpin && widgetIndex > 0) { const onClick = () => { - WidgetStore.instance.movePinnedWidget(app.id, -1); + WidgetStore.instance.movePinnedWidget(roomId, app.id, -1); onFinished(); }; @@ -153,7 +153,7 @@ const WidgetContextMenu: React.FC = ({ let moveRightButton; if (showUnpin && widgetIndex < pinnedWidgets.length - 1) { const onClick = () => { - WidgetStore.instance.movePinnedWidget(app.id, 1); + WidgetStore.instance.movePinnedWidget(roomId, app.id, 1); onFinished(); }; diff --git a/src/components/views/messages/MJitsiWidgetEvent.tsx b/src/components/views/messages/MJitsiWidgetEvent.tsx index 82aa32d3b7..b87efd472a 100644 --- a/src/components/views/messages/MJitsiWidgetEvent.tsx +++ b/src/components/views/messages/MJitsiWidgetEvent.tsx @@ -35,7 +35,7 @@ export default class MJitsiWidgetEvent extends React.PureComponent { const senderName = this.props.mxEvent.sender?.name || this.props.mxEvent.getSender(); let joinCopy = _t('Join the conference at the top of this room'); - if (!WidgetStore.instance.isPinned(this.props.mxEvent.getStateKey())) { + if (!WidgetStore.instance.isPinned(this.props.mxEvent.getRoomId(), this.props.mxEvent.getStateKey())) { joinCopy = _t('Join the conference from the room information card on the right'); } diff --git a/src/components/views/right_panel/RoomSummaryCard.tsx b/src/components/views/right_panel/RoomSummaryCard.tsx index 621e85e1d4..4ce4b75f9b 100644 --- a/src/components/views/right_panel/RoomSummaryCard.tsx +++ b/src/components/views/right_panel/RoomSummaryCard.tsx @@ -83,9 +83,10 @@ export const useWidgets = (room: Room) => { interface IAppRowProps { app: IApp; + room: Room; } -const AppRow: React.FC = ({ app }) => { +const AppRow: React.FC = ({ app, room }) => { const name = WidgetUtils.getWidgetName(app); const dataTitle = WidgetUtils.getWidgetDataTitle(app); const subtitle = dataTitle && " - " + dataTitle; @@ -100,10 +101,10 @@ const AppRow: React.FC = ({ app }) => { }); }; - const isPinned = WidgetStore.instance.isPinned(app.id); + const isPinned = WidgetStore.instance.isPinned(room.roomId, app.id); const togglePin = isPinned - ? () => { WidgetStore.instance.unpinWidget(app.id); } - : () => { WidgetStore.instance.pinWidget(app.id); }; + ? () => { WidgetStore.instance.unpinWidget(room.roomId, app.id); } + : () => { WidgetStore.instance.pinWidget(room.roomId, app.id); }; const [menuDisplayed, handle, openMenu, closeMenu] = useContextMenu(); let contextMenu; @@ -118,7 +119,7 @@ const AppRow: React.FC = ({ app }) => { />; } - const cannotPin = !isPinned && !WidgetStore.instance.canPin(app.id); + const cannotPin = !isPinned && !WidgetStore.instance.canPin(room.roomId, app.id); let pinTitle: string; if (cannotPin) { @@ -183,7 +184,7 @@ const AppsSection: React.FC = ({ room }) => { }; return - { apps.map(app => ) } + { apps.map(app => ) } { apps.length > 0 ? _t("Edit widgets, bridges & bots") : _t("Add widgets, bridges & bots") } diff --git a/src/components/views/right_panel/WidgetCard.tsx b/src/components/views/right_panel/WidgetCard.tsx index c1753e90e3..593bd0dde7 100644 --- a/src/components/views/right_panel/WidgetCard.tsx +++ b/src/components/views/right_panel/WidgetCard.tsx @@ -42,7 +42,7 @@ const WidgetCard: React.FC = ({ room, widgetId, onClose }) => { const apps = useWidgets(room); const app = apps.find(a => a.id === widgetId); - const isPinned = app && WidgetStore.instance.isPinned(app.id); + const isPinned = app && WidgetStore.instance.isPinned(room.roomId, app.id); const [menuDisplayed, handle, openMenu, closeMenu] = useContextMenu(); diff --git a/src/stores/WidgetStore.ts b/src/stores/WidgetStore.ts index a8040f57de..42a230d53a 100644 --- a/src/stores/WidgetStore.ts +++ b/src/stores/WidgetStore.ts @@ -163,44 +163,42 @@ export default class WidgetStore extends AsyncStoreWithClient { this.emit(UPDATE_EVENT); }; - public isPinned(widgetId: string) { - const roomId = this.getRoomId(widgetId); + public isPinned(roomId: string, widgetId: string) { return !!this.getPinnedApps(roomId).find(w => w.id === widgetId); } - public canPin(widgetId: string) { - const roomId = this.getRoomId(widgetId); + // dev note: we don't need the widgetId on this function, but the contract makes more sense + // when we require it. + public canPin(roomId: string, widgetId: string) { return this.getPinnedApps(roomId).length < MAX_PINNED; } - public pinWidget(widgetId: string) { - const roomId = this.getRoomId(widgetId); + public pinWidget(roomId: string, widgetId: string) { const roomInfo = this.getRoom(roomId); if (!roomInfo) return; // When pinning, first confirm all the widgets (Jitsi) which were autopinned so that the order is correct const autoPinned = this.getPinnedApps(roomId).filter(app => !roomInfo.pinned[app.id]); autoPinned.forEach(app => { - this.setPinned(app.id, true); + this.setPinned(roomId, app.id, true); }); - this.setPinned(widgetId, true); + this.setPinned(roomId, widgetId, true); // Show the apps drawer upon the user pinning a widget if (RoomViewStore.getRoomId() === this.getRoomId(widgetId)) { defaultDispatcher.dispatch({ action: "appsDrawer", show: true, - }) + }); } } - public unpinWidget(widgetId: string) { - this.setPinned(widgetId, false); + public unpinWidget(roomId: string, widgetId: string) { + this.setPinned(roomId, widgetId, false); } - private setPinned(widgetId: string, value: boolean) { - const roomId = this.getRoomId(widgetId); + private setPinned(roomId: string, widgetId: string, value: boolean) { const roomInfo = this.getRoom(roomId); if (!roomInfo) return; if (roomInfo.pinned[widgetId] === false && value) { @@ -221,9 +219,8 @@ export default class WidgetStore extends AsyncStoreWithClient { this.emit(UPDATE_EVENT); } - public movePinnedWidget(widgetId: string, delta: 1 | -1) { + public movePinnedWidget(roomId: string, widgetId: string, delta: 1 | -1) { // TODO simplify this by changing the storage medium of pinned to an array once the Jitsi default-on goes away - const roomId = this.getRoomId(widgetId); const roomInfo = this.getRoom(roomId); if (!roomInfo || roomInfo.pinned[widgetId] === false) return; From 5df693205143f6ae0e5de84abe68b0ae67eefc3e Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Tue, 1 Dec 2020 13:19:51 -0700 Subject: [PATCH 142/319] Add various amounts of sanity checking for widget pinning This should also help https://github.com/vector-im/element-web/issues/15705 by either implicitly fixing the problem, causing chaos as described in the issue, or by forcing a crash to identify the problem more easily. --- src/stores/WidgetStore.ts | 42 +++++++++++++++++++++++++++++++++++---- 1 file changed, 38 insertions(+), 4 deletions(-) diff --git a/src/stores/WidgetStore.ts b/src/stores/WidgetStore.ts index 42a230d53a..8e08fc016c 100644 --- a/src/stores/WidgetStore.ts +++ b/src/stores/WidgetStore.ts @@ -39,9 +39,11 @@ export interface IApp extends IWidget { avatar_url: string; // MSC2765 https://github.com/matrix-org/matrix-doc/pull/2765 } +type PinnedWidgets = Record; + interface IRoomWidgets { widgets: IApp[]; - pinned: Record; + pinned: PinnedWidgets; } export const MAX_PINNED = 3; @@ -51,8 +53,9 @@ export const MAX_PINNED = 3; export default class WidgetStore extends AsyncStoreWithClient { private static internalInstance = new WidgetStore(); - private widgetMap = new Map(); - private roomMap = new Map(); + // TODO: Come up with a unique key for widgets as their IDs are not globally unique, but can exist anywhere + private widgetMap = new Map(); // Key is widget ID + private roomMap = new Map(); // Key is room ID private constructor() { super(defaultDispatcher, {}); @@ -132,6 +135,15 @@ export default class WidgetStore extends AsyncStoreWithClient { }); this.generateApps(room).forEach(app => { + // Sanity check for https://github.com/vector-im/element-web/issues/15705 + const existingApp = this.widgetMap.get(app.id); + if (existingApp) { + console.warn( + `Possible widget ID conflict for ${app.id} - wants to store in room ${app.roomId} ` + + `but is currently stored as ${existingApp.roomId} - letting the want win`, + ); + } + this.widgetMap.set(app.id, app); roomInfo.widgets.push(app); }); @@ -149,6 +161,13 @@ export default class WidgetStore extends AsyncStoreWithClient { public getRoomId = (widgetId: string) => { const app = this.widgetMap.get(widgetId); if (!app) return null; + + // Sanity check for https://github.com/vector-im/element-web/issues/15705 + const roomInfo = this.getRoom(app.roomId); + if (!roomInfo.widgets?.some(w => w.id === app.id)) { + throw new Error(`Widget ${app.id} says it is in ${app.roomId} but was not found there`); + } + return app.roomId; } @@ -158,7 +177,22 @@ export default class WidgetStore extends AsyncStoreWithClient { private onPinnedWidgetsChange = (settingName: string, roomId: string) => { this.initRoom(roomId); - this.getRoom(roomId).pinned = SettingsStore.getValue(settingName, roomId); + + const pinned: PinnedWidgets = SettingsStore.getValue(settingName, roomId); + + // Sanity check for https://github.com/vector-im/element-web/issues/15705 + const roomInfo = this.getRoom(roomId); + const remappedPinned: PinnedWidgets = {}; + for (const widgetId of Object.keys(pinned)) { + const isPinned = pinned[widgetId]; + if (!roomInfo.widgets?.some(w => w.id === widgetId)) { + console.warn(`Skipping pinned widget update for ${widgetId} in ${roomId} -- wrong room`); + } else { + remappedPinned[widgetId] = isPinned; + } + } + roomInfo.pinned = remappedPinned; + this.emit(roomId); this.emit(UPDATE_EVENT); }; From 3a3e42e439cf17ffff0666ba55358e3482b9e020 Mon Sep 17 00:00:00 2001 From: Nikita Epifanov Date: Tue, 1 Dec 2020 19:55:29 +0000 Subject: [PATCH 143/319] Translated using Weblate (Russian) Currently translated at 88.1% (2383 of 2702 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/ru/ --- src/i18n/strings/ru.json | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/ru.json b/src/i18n/strings/ru.json index 0007ae5629..3c5ead3aa1 100644 --- a/src/i18n/strings/ru.json +++ b/src/i18n/strings/ru.json @@ -2598,5 +2598,12 @@ "Call failed because no webcam or microphone could not be accessed. Check that:": "Вызов не удался, потому что не удалось получить доступ к веб-камере или микрофону. Проверьте это:", "Unable to access webcam / microphone": "Невозможно получить доступ к веб-камере / микрофону", "Call failed because no microphone could not be accessed. Check that a microphone is plugged in and set up correctly.": "Вызов не удался, потому что нет доступа к микрофону. Убедитесь, что микрофон подключен и правильно настроен.", - "Unable to access microphone": "Нет доступа к микрофону" + "Unable to access microphone": "Нет доступа к микрофону", + "Video Call": "Видеовызов", + "Voice Call": "Голосовой вызов", + "Fill Screen": "Заполнить экран", + "Return to call": "Вернуться к звонку", + "Got an account? Sign in": "Есть учётная запись? Войти", + "New here? Create an account": "Впервые здесь? Создать учётную запись", + "Render LaTeX maths in messages": "Отображать математику LaTeX в сообщениях" } From 58ed858f40c6bb9ea9653e1a1a55bd1885a7cb68 Mon Sep 17 00:00:00 2001 From: MSG-maniac Date: Tue, 1 Dec 2020 09:57:54 +0000 Subject: [PATCH 144/319] Translated using Weblate (Chinese (Simplified)) Currently translated at 83.2% (2250 of 2702 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/zh_Hans/ --- src/i18n/strings/zh_Hans.json | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/zh_Hans.json b/src/i18n/strings/zh_Hans.json index 809be89383..672b1befd1 100644 --- a/src/i18n/strings/zh_Hans.json +++ b/src/i18n/strings/zh_Hans.json @@ -2398,5 +2398,16 @@ "Privacy": "隐私", "Explore community rooms": "探索社区聊天室", "%(count)s results|one": "%(count)s 个结果", - "Room Info": "聊天室信息" + "Room Info": "聊天室信息", + "No other application is using the webcam": "没有其他应用程序正在使用摄像头", + "Permission is granted to use the webcam": "授予使用网络摄像头的权限", + "A microphone and webcam are plugged in and set up correctly": "麦克风和摄像头已插入并正确设置", + "Call failed because no webcam or microphone could not be accessed. Check that:": "通话失败,因为无法访问摄像头或麦克风。 检查:", + "Unable to access webcam / microphone": "无法访问摄像头/麦克风", + "Call failed because no microphone could not be accessed. Check that a microphone is plugged in and set up correctly.": "呼叫失败,因为无法访问任何麦克风。 检查是否已插入麦克风并正确设置。", + "Unable to access microphone": "无法使用麦克风", + "The call was answered on another device.": "在另一台设备上应答了该通话。", + "The call could not be established": "无法建立通话", + "The other party declined the call.": "对方拒绝了通话。", + "Call Declined": "通话被拒绝" } From 89eaa9654f1fe7807a85ceed888a03415eb0e966 Mon Sep 17 00:00:00 2001 From: Hassan Algoz Date: Tue, 1 Dec 2020 09:58:58 +0000 Subject: [PATCH 145/319] Translated using Weblate (Arabic) Currently translated at 53.9% (1458 of 2702 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/ar/ --- src/i18n/strings/ar.json | 68 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 67 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/ar.json b/src/i18n/strings/ar.json index fec025da8d..5da09afd23 100644 --- a/src/i18n/strings/ar.json +++ b/src/i18n/strings/ar.json @@ -1422,5 +1422,71 @@ "This will end the conference for everyone. Continue?": "هذا سينهي المؤتمر للجميع. استمر؟", "The call was answered on another device.": "تم الرد على المكالمة على جهاز آخر.", "The call could not be established": "تعذر إجراء المكالمة", - "Call Declined": "رُفض الاتصال" + "Call Declined": "رُفض الاتصال", + "See videos posted to your active room": "أظهر الفيديوهات المرسلة إلى هذه غرفتك النشطة", + "See videos posted to this room": "أظهر الفيديوهات المرسلة إلى هذه الغرفة", + "Send videos as you in your active room": "أرسل الفيديوهات بهويتك في غرفتك النشطة", + "Send videos as you in this room": "أرسل الفيديوهات بهويتك في هذه الغرفة", + "See messages posted to this room": "أرسل الرسائل المرسلة إلى هذه الغرفة", + "See images posted to your active room": "أظهر الصور المرسلة إلى غرفتك النشطة", + "See images posted to this room": "أظهر الصور المرسلة إلى هذه الغرفة", + "Send images as you in your active room": "أرسل الصور بهويتك في غرفتك النشطة", + "Send images as you in this room": "أرسل الصور بهويتك في هذه الغرفة", + "See emotes posted to your active room": "أظهر الرموز التعبيرية المرسلة لغرفتك النشطة", + "See emotes posted to this room": "أظهر الرموز التعبيرية المرسلة إلى هذه الغرفة", + "Send emotes as you in your active room": "أظهر الرموز التعبيرية بهويتك في غرفتك النشطة", + "Send emotes as you in this room": "أرسل الرموز التعبيرية بهويتك", + "See text messages posted to your active room": "أظهر الرسائل النصية المرسلة إلى غرفتك النشطة", + "See text messages posted to this room": "أظهر الرسائل النصية المرسلة إلى هذه الغرفة", + "Send text messages as you in your active room": "أرسل الرسائل النصية بهويتك في غرفتك النشطة", + "Send text messages as you in this room": "أرسل الرسائل النصية بهويتك في هذه الغرفة", + "See messages posted to your active room": "أظهر الرسائل المرسلة إلى غرفتك النشطة", + "Send messages as you in your active room": "أرسل رسائل بهويتك في غرفتك النشطة", + "Send messages as you in this room": "أرسل رسائل بهويتك في هذه الغرفة", + "The %(capability)s capability": "القدرة %(capability)s", + "See %(eventType)s events posted to your active room": "أظهر أحداث %(eventType)s المنشورة بغرفة النشطة", + "Send %(eventType)s events as you in your active room": "أرسل أحداث %(eventType)s بهويتك في غرفتك النشطة", + "See %(eventType)s events posted to this room": "أظهر أحداث %(eventType)s المنشورة في هذه الغرفة", + "Send %(eventType)s events as you in this room": "أرسل أحداث %(eventType)s بهويتك في هذه الغرفة", + "with state key %(stateKey)s": "مع مفتاح الحالة %(stateKey)s", + "with an empty state key": "بمفتاح حالة فارغ", + "See when anyone posts a sticker to your active room": "أظهر وضع أي أحد للملصقات لغرفتك النشطة", + "Send stickers to your active room as you": "أرسل ملصقات لغرفتك النشطة بهويتك", + "See when a sticker is posted in this room": "أظهر وضع الملصقات في هذه الغرفة", + "Send stickers to this room as you": "أرسل ملصقات لهذه الغرفة بهويتك", + "See when the avatar changes in your active room": "أظهر تغييرات صورة غرفتك النشطة", + "Change the avatar of your active room": "غير صورة غرفتك النشطة", + "See when the avatar changes in this room": "أظهر تغييرات الصورة في هذه الغرفة", + "Change the avatar of this room": "غير صورة هذه الغرفة", + "See when the name changes in your active room": "أظهر تغييرات الاسم في غرفتك النشطة", + "Change the name of your active room": "غير اسم غرفتك النشطة", + "See when the name changes in this room": "أظهر تغييرات الاسم في هذه الغرفة", + "Change the name of this room": "غير اسم هذه الغرفة", + "See when the topic changes in your active room": "أظهر تغيير موضوع غرفتك النشطة", + "Change the topic of your active room": "غير موضوع غرفتك النشطة", + "See when the topic changes in this room": "أظهر تغير موضوع هذه الغرفة", + "Change the topic of this room": "تغيير موضوع هذه الغرفة", + "Change which room you're viewing": "تغيير الغرفة التي تشاهدها", + "Send stickers into your active room": "أرسل ملصقات إلى غرفتك النشطة", + "Send stickers into this room": "أرسل ملصقات إلى هذه الغرفة", + "Remain on your screen while running": "ابقَ على شاشتك أثناء إجراء", + "Remain on your screen when viewing another room, when running": "ابقَ على شاشتك عند مشاهدة غرفة أخرى أثناء إجراء", + "%(senderName)s created a rule banning users matching %(glob)s for %(reason)s": "%(senderName)s حدَّث قاعدة حظر المستخدمين المطابقة %(glob)s بسبب %(reason)s", + "%(senderName)s updated the rule banning servers matching %(glob)s for %(reason)s": "%(senderName)s حدَّث قاعدة حظر الخوادم المطابقة %(glob)s بسبب %(reason)s", + "%(senderName)s updated the rule banning rooms matching %(glob)s for %(reason)s": "%(senderName)s حدَّث قاعدة حظر الغرفة المطابقة %(glob)s بسبب %(reason)s", + "%(senderName)s declined the call.": "%(senderName)s رفض المكالمة.", + "(an error occurred)": "(حدث خطأ)", + "(their device couldn't start the camera / microphone)": "(تعذر على جهازهم بدء تشغيل الكاميرا / الميكروفون)", + "(connection failed)": "(فشل الاتصال)", + "🎉 All servers are banned from participating! This room can no longer be used.": "🎉 جميع الخوادم ممنوعة من المشاركة! لم يعد من الممكن استخدام هذه الغرفة.", + "Takes the call in the current room off hold": "يوقف المكالمة في الغرفة الحالية", + "Places the call in the current room on hold": "يضع المكالمة في الغرفة الحالية قيد الانتظار", + "Prepends ( ͡° ͜ʖ ͡°) to a plain-text message": "يلصق (͡ ° ͜ʖ ͡ °) أوَّل رسالة نصية عادية", + "No other application is using the webcam": "لا يوجد تطبيق آخر يستخدم كاميرا الويب", + "Permission is granted to use the webcam": "منح الإذن باستخدام كاميرا الويب", + "A microphone and webcam are plugged in and set up correctly": "الميكروفون وكاميرا ويب موصولان ومعدان بشكل صحيح", + "Call failed because no webcam or microphone could not be accessed. Check that:": "فشلت المكالمة نظرًا لتعذر الوصول إلى كاميرا الويب أو الميكروفون. تحقق مما يلي:", + "Unable to access webcam / microphone": "تعذر الوصول إلى كاميرا الويب / الميكروفون", + "Call failed because no microphone could not be accessed. Check that a microphone is plugged in and set up correctly.": "فشلت المكالمة لأنه لا يمكن الوصول إلى ميكروفون. تحقق من توصيل الميكروفون وإعداده بشكل صحيح.", + "Unable to access microphone": "تعذر الوصول إلى الميكروفون" } From cf8c98e07665ec8f68846a5524b566d980c22e90 Mon Sep 17 00:00:00 2001 From: Simon Merrick Date: Wed, 2 Dec 2020 12:34:43 +1300 Subject: [PATCH 146/319] More explicit reference checking --- src/utils/permalinks/Permalinks.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/utils/permalinks/Permalinks.js b/src/utils/permalinks/Permalinks.js index 2f673e0346..2c38a982d3 100644 --- a/src/utils/permalinks/Permalinks.js +++ b/src/utils/permalinks/Permalinks.js @@ -130,13 +130,14 @@ export class RoomPermalinkCreator { } forRoom() { - try { + if (this._room) { // Prefer to use canonical alias for permalink if possible const alias = this._room.getCanonicalAlias(); - return getPermalinkConstructor().forRoom(alias, this._serverCandidates); - } catch (error) { - return getPermalinkConstructor().forRoom(this._roomId, this._serverCandidates); + if (alias) { + return getPermalinkConstructor().forRoom(alias, this._serverCandidates); + } } + return getPermalinkConstructor().forRoom(this._roomId, this._serverCandidates); } onRoomState(event) { From 6670c727a4adc4e177284d1fdc46a343fd6452d1 Mon Sep 17 00:00:00 2001 From: Simon Merrick Date: Wed, 2 Dec 2020 13:28:35 +1300 Subject: [PATCH 147/319] Add getCanonicalAlias to mock --- test/utils/permalinks/Permalinks-test.js | 1 + 1 file changed, 1 insertion(+) diff --git a/test/utils/permalinks/Permalinks-test.js b/test/utils/permalinks/Permalinks-test.js index 72cd66cb69..0bd4466d97 100644 --- a/test/utils/permalinks/Permalinks-test.js +++ b/test/utils/permalinks/Permalinks-test.js @@ -34,6 +34,7 @@ function mockRoom(roomId, members, serverACL) { return { roomId, + getCanonicalAlias: () => roomId, getJoinedMembers: () => members, getMember: (userId) => members.find(m => m.userId === userId), currentState: { From 4a503fb32ed958895a90a29181d079fc94d48595 Mon Sep 17 00:00:00 2001 From: David Baker Date: Wed, 2 Dec 2020 12:14:41 +0000 Subject: [PATCH 148/319] Fix VoIP call plinth on dark theme Fixes https://github.com/vector-im/element-web/issues/15873 --- res/css/views/voip/_CallView.scss | 2 +- res/themes/dark/css/_dark.scss | 3 +++ res/themes/legacy-dark/css/_legacy-dark.scss | 3 +++ res/themes/legacy-light/css/_legacy-light.scss | 3 +++ res/themes/light/css/_light.scss | 3 +++ 5 files changed, 13 insertions(+), 1 deletion(-) diff --git a/res/css/views/voip/_CallView.scss b/res/css/views/voip/_CallView.scss index 2b87181b1e..e62c354491 100644 --- a/res/css/views/voip/_CallView.scss +++ b/res/css/views/voip/_CallView.scss @@ -17,7 +17,7 @@ limitations under the License. .mx_CallView { border-radius: 10px; - background-color: $input-lighter-bg-color; + background-color: $voipcall-plinth-color; padding-left: 8px; padding-right: 8px; // XXX: CallContainer sets pointer-events: none - should probably be set back in a better place diff --git a/res/themes/dark/css/_dark.scss b/res/themes/dark/css/_dark.scss index 76cc5e2df9..1b7ff9598d 100644 --- a/res/themes/dark/css/_dark.scss +++ b/res/themes/dark/css/_dark.scss @@ -108,6 +108,9 @@ $eventtile-meta-color: $roomtopic-color; $header-divider-color: $header-panel-text-primary-color; $composer-e2e-icon-color: $header-panel-text-primary-color; +// this probably shouldn't have it's own colour +$voipcall-plinth-color: #21262c; + // ******************** $theme-button-bg-color: #e3e8f0; diff --git a/res/themes/legacy-dark/css/_legacy-dark.scss b/res/themes/legacy-dark/css/_legacy-dark.scss index 716d8c7385..932a37b46e 100644 --- a/res/themes/legacy-dark/css/_legacy-dark.scss +++ b/res/themes/legacy-dark/css/_legacy-dark.scss @@ -105,6 +105,9 @@ $eventtile-meta-color: $roomtopic-color; $header-divider-color: $header-panel-text-primary-color; $composer-e2e-icon-color: $header-panel-text-primary-color; +// this probably shouldn't have it's own colour +$voipcall-plinth-color: #f2f5f8; + // ******************** $theme-button-bg-color: #e3e8f0; diff --git a/res/themes/legacy-light/css/_legacy-light.scss b/res/themes/legacy-light/css/_legacy-light.scss index 8c42c5c97f..dba8fa6415 100644 --- a/res/themes/legacy-light/css/_legacy-light.scss +++ b/res/themes/legacy-light/css/_legacy-light.scss @@ -172,6 +172,9 @@ $eventtile-meta-color: $roomtopic-color; $composer-e2e-icon-color: #91a1c0; $header-divider-color: #91a1c0; +// this probably shouldn't have it's own colour +$voipcall-plinth-color: #f2f5f8; + // ******************** $theme-button-bg-color: #e3e8f0; diff --git a/res/themes/light/css/_light.scss b/res/themes/light/css/_light.scss index 5437a6de1c..f89b9f2c75 100644 --- a/res/themes/light/css/_light.scss +++ b/res/themes/light/css/_light.scss @@ -166,6 +166,9 @@ $eventtile-meta-color: $roomtopic-color; $composer-e2e-icon-color: #91A1C0; $header-divider-color: #91A1C0; +// this probably shouldn't have it's own colour +$voipcall-plinth-color: #f2f5f8; + // ******************** $theme-button-bg-color: #e3e8f0; From 5c6b0409834ba3e1805e0f5a85539d090963ad08 Mon Sep 17 00:00:00 2001 From: Ezwen Date: Wed, 2 Dec 2020 13:05:53 +0000 Subject: [PATCH 149/319] Translated using Weblate (French) Currently translated at 86.5% (2338 of 2702 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/fr/ --- src/i18n/strings/fr.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/i18n/strings/fr.json b/src/i18n/strings/fr.json index 29af11cb58..efae1f7b26 100644 --- a/src/i18n/strings/fr.json +++ b/src/i18n/strings/fr.json @@ -2503,7 +2503,7 @@ "No files visible in this room": "Aucun fichier visible dans ce salon", "Enter the location of your Element Matrix Services homeserver. It may use your own domain name or be a subdomain of element.io.": "Entrez l'emplacement de votre serveur d'accueil Element Matrix Services. Cela peut utiliser votre propre nom de domaine ou être un sous-domaine de element.io.", "You can use the custom server options to sign into other Matrix servers by specifying a different homeserver URL. This allows you to use %(brand)s with an existing Matrix account on a different homeserver.": "Vous pouvez utiliser l'option de serveur personnalisé pour vous connecter à d'autres serveurs Matrix en spécifiant une URL de serveur d'accueil différente. Cela vous permet d'utiliser %(brand)s avec un compte Matrix existant sur un serveur d'accueil différent.", - "Away": "Tout droit", + "Away": "Absent", "Move right": "Aller à droite", "Move left": "Aller à gauche", "Revoke permissions": "Révoquer les permissions", From ed59b504480f943c3ddc2dbc55c81ab980e714cd Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Wed, 2 Dec 2020 14:25:55 +0000 Subject: [PATCH 150/319] Upgrade matrix-js-sdk to 9.3.0-rc.1 --- package.json | 4 ++-- yarn.lock | 27 ++++++++++++++------------- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/package.json b/package.json index f3b8104663..76723bb12d 100644 --- a/package.json +++ b/package.json @@ -58,6 +58,7 @@ "blueimp-canvas-to-blob": "^3.27.0", "browser-encrypt-attachment": "^0.3.0", "browser-request": "^0.3.3", + "cheerio": "^1.0.0-rc.3", "classnames": "^2.2.6", "commonmark": "^0.29.1", "counterpart": "^0.18.6", @@ -77,10 +78,9 @@ "html-entities": "^1.3.1", "is-ip": "^2.0.0", "katex": "^0.12.0", - "cheerio": "^1.0.0-rc.3", "linkifyjs": "^2.1.9", "lodash": "^4.17.19", - "matrix-js-sdk": "github:matrix-org/matrix-js-sdk#develop", + "matrix-js-sdk": "9.3.0-rc.1", "matrix-widget-api": "^0.1.0-beta.10", "minimist": "^1.2.5", "pako": "^1.0.11", diff --git a/yarn.lock b/yarn.lock index c06494d319..2a49110d58 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1256,10 +1256,10 @@ dependencies: regenerator-runtime "^0.13.4" -"@babel/runtime@^7.11.2": - version "7.11.2" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.11.2.tgz#f549c13c754cc40b87644b9fa9f09a6a95fe0736" - integrity sha512-TeWkU52so0mPtDcaCTxNBI/IHiz0pZgr8VEFqXFtZWpYD08ZB6FaSwVAS8MKRQAP3bYKiVjwysOJgMFY28o6Tw== +"@babel/runtime@^7.12.5": + version "7.12.5" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.12.5.tgz#410e7e487441e1b360c29be715d870d9b985882e" + integrity sha512-plcc+hbExy3McchJCEQG3knOsuh3HH+Prx1P6cLIkET/0dLuQDEnrT+s27Axgc9bqfsmNUNHfscgMUdBpC9xfg== dependencies: regenerator-runtime "^0.13.4" @@ -6390,10 +6390,10 @@ log-symbols@^2.0.0, log-symbols@^2.2.0: dependencies: chalk "^2.0.1" -loglevel@^1.7.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.7.0.tgz#728166855a740d59d38db01cf46f042caa041bb0" - integrity sha512-i2sY04nal5jDcagM3FMfG++T69GEEM8CYuOfeOIvmXzOIcwE9a/CJPR0MFM97pYMj/u10lzz7/zd7+qwhrBTqQ== +loglevel@^1.7.1: + version "1.7.1" + resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.7.1.tgz#005fde2f5e6e47068f935ff28573e125ef72f197" + integrity sha512-Hesni4s5UkWkwCGJMQGAh71PaLUmKFM60dHvq0zi/vDhhrzuk+4GgNbTXJ12YYQJn6ZKBDNIjYcuQGKudvqrIw== lolex@^5.0.0, lolex@^5.1.2: version "5.1.2" @@ -6512,16 +6512,17 @@ 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@github:matrix-org/matrix-js-sdk#develop": - version "9.2.0" - resolved "https://codeload.github.com/matrix-org/matrix-js-sdk/tar.gz/6661bde6088e6e43f31198e8532432e162aef33c" +matrix-js-sdk@9.3.0-rc.1: + version "9.3.0-rc.1" + resolved "https://registry.yarnpkg.com/matrix-js-sdk/-/matrix-js-sdk-9.3.0-rc.1.tgz#d6ad2d9a5e0c539c6aec9e587a6dd2b5aa8bf2f6" + integrity sha512-H20QLwsgzBIO0Lp75CYBlw4QTOHT98vCESNZrnjIsu8FlFqsXIhdTa5C8BIYsNLex5luufxdp2an5BQtJEuAUQ== dependencies: - "@babel/runtime" "^7.11.2" + "@babel/runtime" "^7.12.5" another-json "^0.2.0" browser-request "^0.3.3" bs58 "^4.0.1" content-type "^1.0.4" - loglevel "^1.7.0" + loglevel "^1.7.1" qs "^6.9.4" request "^2.88.2" unhomoglyph "^1.0.6" From 054dff31d5ec472551e4ea7ed88e6a4e40fb522d Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Wed, 2 Dec 2020 14:38:28 +0000 Subject: [PATCH 151/319] Prepare changelog for v3.10.0-rc.1 --- CHANGELOG.md | 77 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5aac4e2974..6fa0612695 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,80 @@ +Changes in [3.10.0-rc.1](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.10.0-rc.1) (2020-12-02) +=============================================================================================================== +[Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v3.9.0...v3.10.0-rc.1) + + * Upgrade to JS SDK 9.3.0-rc.1 + * Translations update from Weblate + [\#5461](https://github.com/matrix-org/matrix-react-sdk/pull/5461) + * Fix VoIP call plinth on dark theme + [\#5460](https://github.com/matrix-org/matrix-react-sdk/pull/5460) + * Add sanity checking around widget pinning + [\#5459](https://github.com/matrix-org/matrix-react-sdk/pull/5459) + * Update i18n for Appearance User Settings + [\#5457](https://github.com/matrix-org/matrix-react-sdk/pull/5457) + * Only show 'answered elsewhere' if we tried to answer too + [\#5455](https://github.com/matrix-org/matrix-react-sdk/pull/5455) + * Fixed Avatar for 3PID invites + [\#5442](https://github.com/matrix-org/matrix-react-sdk/pull/5442) + * Slightly better error if we can't capture user media + [\#5449](https://github.com/matrix-org/matrix-react-sdk/pull/5449) + * Make it possible in-code to hide rooms from the room list + [\#5445](https://github.com/matrix-org/matrix-react-sdk/pull/5445) + * Fix the stickerpicker + [\#5447](https://github.com/matrix-org/matrix-react-sdk/pull/5447) + * Add live password validation to change password dialog + [\#5436](https://github.com/matrix-org/matrix-react-sdk/pull/5436) + * LaTeX rendering in element-web using KaTeX + [\#5244](https://github.com/matrix-org/matrix-react-sdk/pull/5244) + * Add lifecycle customisation point after logout + [\#5448](https://github.com/matrix-org/matrix-react-sdk/pull/5448) + * Simplify UserMenu for Guests as they can't use most of the options + [\#5421](https://github.com/matrix-org/matrix-react-sdk/pull/5421) + * Fix known issues with modal widgets + [\#5444](https://github.com/matrix-org/matrix-react-sdk/pull/5444) + * Fix existing widgets not having approved capabilities for their function + [\#5443](https://github.com/matrix-org/matrix-react-sdk/pull/5443) + * Use the WidgetDriver to run OIDC requests + [\#5440](https://github.com/matrix-org/matrix-react-sdk/pull/5440) + * Add a customisation point for widget permissions and fix amnesia issues + [\#5439](https://github.com/matrix-org/matrix-react-sdk/pull/5439) + * Fix Widget event notification text including spurious space + [\#5441](https://github.com/matrix-org/matrix-react-sdk/pull/5441) + * Move call listener out of MatrixChat + [\#5438](https://github.com/matrix-org/matrix-react-sdk/pull/5438) + * New Look in-Call View + [\#5432](https://github.com/matrix-org/matrix-react-sdk/pull/5432) + * Support arbitrary widgets sticking to the screen + sending stickers + [\#5435](https://github.com/matrix-org/matrix-react-sdk/pull/5435) + * Auth typescripting and validation tweaks + [\#5433](https://github.com/matrix-org/matrix-react-sdk/pull/5433) + * Add new widget API actions for changing rooms and sending/receiving events + [\#5385](https://github.com/matrix-org/matrix-react-sdk/pull/5385) + * Revert room header click behaviour to opening room settings + [\#5434](https://github.com/matrix-org/matrix-react-sdk/pull/5434) + * Add option to send/edit a message with Ctrl + Enter / Command + Enter + [\#5160](https://github.com/matrix-org/matrix-react-sdk/pull/5160) + * Add Analytics instrumentation to the Homepage + [\#5409](https://github.com/matrix-org/matrix-react-sdk/pull/5409) + * Fix encrypted video playback in Chrome-based browsers + [\#5430](https://github.com/matrix-org/matrix-react-sdk/pull/5430) + * Add border-radius for video + [\#5333](https://github.com/matrix-org/matrix-react-sdk/pull/5333) + * Push name to the end, near text, in IRC layout + [\#5166](https://github.com/matrix-org/matrix-react-sdk/pull/5166) + * Disable notifications for the room you have recently been active in + [\#5325](https://github.com/matrix-org/matrix-react-sdk/pull/5325) + * Search through the list of unfiltered rooms rather than the rooms in the + state which are already filtered by the search text + [\#5331](https://github.com/matrix-org/matrix-react-sdk/pull/5331) + * Lighten blockquote colour in dark mode + [\#5353](https://github.com/matrix-org/matrix-react-sdk/pull/5353) + * Specify community description img must be mxc urls + [\#5364](https://github.com/matrix-org/matrix-react-sdk/pull/5364) + * Add keyboard shortcut to close the current conversation + [\#5253](https://github.com/matrix-org/matrix-react-sdk/pull/5253) + * Redirect user home from auth screens if they are already logged in + [\#5423](https://github.com/matrix-org/matrix-react-sdk/pull/5423) + Changes in [3.9.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.9.0) (2020-11-23) =================================================================================================== [Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v3.9.0-rc.1...v3.9.0) From db354ff888a44f4560d05580e83edd7a00bb307d Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Wed, 2 Dec 2020 14:38:28 +0000 Subject: [PATCH 152/319] v3.10.0-rc.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 76723bb12d..7eff8cf388 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "matrix-react-sdk", - "version": "3.9.0", + "version": "3.10.0-rc.1", "description": "SDK for matrix.org using React", "author": "matrix.org", "repository": { From 8593845e3d1120bb8d9f7f9744f4d9a3a809a578 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Wed, 2 Dec 2020 15:12:16 +0000 Subject: [PATCH 153/319] i18n --- src/i18n/strings/en_EN.json | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index ec82211789..d44c01756a 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -2484,10 +2484,6 @@ "A new password must be entered.": "A new password must be entered.", "New passwords must match each other.": "New passwords must match each other.", "Changing your password will reset any end-to-end encryption keys on all of your sessions, making encrypted chat history unreadable. Set up Key Backup or export your room keys from another session before resetting your password.": "Changing your password will reset any end-to-end encryption keys on all of your sessions, making encrypted chat history unreadable. Set up Key Backup or export your room keys from another session before resetting your password.", - "Your Matrix account on %(serverName)s": "Your Matrix account on %(serverName)s", - "Your Matrix account on ": "Your Matrix account on ", - "No identity server is configured: add one in server settings to reset your password.": "No identity server is configured: add one in server settings to reset your password.", - "Sign in instead": "Sign in instead", "New Password": "New Password", "A verification email will be sent to your inbox to confirm setting your new password.": "A verification email will be sent to your inbox to confirm setting your new password.", "Send Reset Email": "Send Reset Email", From 5787915cb5e93666bd3fbcd995225d9eab5b4df8 Mon Sep 17 00:00:00 2001 From: LinAGKar Date: Wed, 2 Dec 2020 14:51:42 +0000 Subject: [PATCH 154/319] Translated using Weblate (Swedish) Currently translated at 97.4% (2633 of 2702 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/sv/ --- src/i18n/strings/sv.json | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/i18n/strings/sv.json b/src/i18n/strings/sv.json index 93ff8808cb..7b8e5b6383 100644 --- a/src/i18n/strings/sv.json +++ b/src/i18n/strings/sv.json @@ -2776,12 +2776,20 @@ "Caribbean Netherlands": "Karibiska Nederländerna", "Cape Verde": "Kap Verde", "Change which room you're viewing": "Ändra vilket rum du visar", - "Send stickers into your active room": "Skicka dekaler in i ditt aktiva rum", - "Send stickers into this room": "Skicka dekaler in i det här rummet", + "Send stickers into your active room": "Skicka in dekaler i ditt aktiva rum", + "Send stickers into this room": "Skicka in dekaler i det här rummet", "Remain on your screen while running": "Stanna kvar på skärmen när det körs", "Remain on your screen when viewing another room, when running": "Stanna kvar på skärmen när ett annat rum visas, när det körs", "See when the topic changes in this room": "Se när ämnet ändras i det här rummet", "Change the topic of this room": "Ändra ämnet för det här rummet", "See when the topic changes in your active room": "Se när ämnet ändras i ditt aktiva rum", - "Change the topic of your active room": "Ändra ämnet för ditt aktiva rum" + "Change the topic of your active room": "Ändra ämnet för ditt aktiva rum", + "Change the avatar of your active room": "Byta avatar för ditt aktiva rum", + "Change the avatar of this room": "Byta avatar för det här rummet", + "Change the name of your active room": "Byta namn på ditt aktiva rum", + "Change the name of this room": "Byta namn på det här rummet", + "See when the avatar changes in your active room": "Se när avataren byts för ditt aktiva rum", + "See when the avatar changes in this room": "Se när avataren byts för det här rummet", + "See when the name changes in your active room": "Se när namnet på ditt aktiva rum byts", + "See when the name changes in this room": "Se när namnet på det här rummet byts" } From d38a6ad1be80b2f915335507c97ba15c1e6d9e47 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Wed, 2 Dec 2020 12:20:59 -0700 Subject: [PATCH 155/319] Add more widget sanity checking This is for https://github.com/vector-im/element-web/issues/15705 https://github.com/matrix-org/matrix-react-sdk/pull/5459 was unable to track down all the instances of where the issue happens, so this commit tries to do a more complete job. Specifically, this replaces the getRoomId() function given widgets cannot reliably be referenced by widget ID in this way, and the store has been updated to handle a more unique widget ID for the store (just in case). Further sanity checking has also been added to ensure that we are at least returning a valid result. --- src/stores/WidgetStore.ts | 57 +++++++++++++++++++++++---------------- 1 file changed, 34 insertions(+), 23 deletions(-) diff --git a/src/stores/WidgetStore.ts b/src/stores/WidgetStore.ts index 8e08fc016c..f1b5ea9be0 100644 --- a/src/stores/WidgetStore.ts +++ b/src/stores/WidgetStore.ts @@ -29,6 +29,8 @@ import WidgetUtils from "../utils/WidgetUtils"; import {SettingLevel} from "../settings/SettingLevel"; import {WidgetType} from "../widgets/WidgetType"; import {UPDATE_EVENT} from "./AsyncStore"; +import { MatrixClientPeg } from "../MatrixClientPeg"; +import { arrayDiff, arrayHasDiff, arrayUnion } from "../utils/arrays"; interface IState {} @@ -48,13 +50,16 @@ interface IRoomWidgets { export const MAX_PINNED = 3; +function widgetUid(app: IApp): string { + return `${app.roomId ?? MatrixClientPeg.get().getUserId()}::${app.id}`; +} + // TODO consolidate WidgetEchoStore into this // TODO consolidate ActiveWidgetStore into this export default class WidgetStore extends AsyncStoreWithClient { private static internalInstance = new WidgetStore(); - // TODO: Come up with a unique key for widgets as their IDs are not globally unique, but can exist anywhere - private widgetMap = new Map(); // Key is widget ID + private widgetMap = new Map(); // Key is widget Unique ID (UID) private roomMap = new Map(); // Key is room ID private constructor() { @@ -129,14 +134,12 @@ export default class WidgetStore extends AsyncStoreWithClient { // first clean out old widgets from the map which originate from this room // otherwise we are out of sync with the rest of the app with stale widget events during removal Array.from(this.widgetMap.values()).forEach(app => { - if (app.roomId === room.roomId) { - this.widgetMap.delete(app.id); - } + this.widgetMap.delete(widgetUid(app)); }); this.generateApps(room).forEach(app => { // Sanity check for https://github.com/vector-im/element-web/issues/15705 - const existingApp = this.widgetMap.get(app.id); + const existingApp = this.widgetMap.get(widgetUid(app)); if (existingApp) { console.warn( `Possible widget ID conflict for ${app.id} - wants to store in room ${app.roomId} ` + @@ -144,7 +147,7 @@ export default class WidgetStore extends AsyncStoreWithClient { ); } - this.widgetMap.set(app.id, app); + this.widgetMap.set(widgetUid(app), app); roomInfo.widgets.push(app); }); this.emit(room.roomId); @@ -158,19 +161,6 @@ export default class WidgetStore extends AsyncStoreWithClient { this.emit(UPDATE_EVENT); }; - public getRoomId = (widgetId: string) => { - const app = this.widgetMap.get(widgetId); - if (!app) return null; - - // Sanity check for https://github.com/vector-im/element-web/issues/15705 - const roomInfo = this.getRoom(app.roomId); - if (!roomInfo.widgets?.some(w => w.id === app.id)) { - throw new Error(`Widget ${app.id} says it is in ${app.roomId} but was not found there`); - } - - return app.roomId; - } - public getRoom = (roomId: string) => { return this.roomMap.get(roomId); }; @@ -220,7 +210,7 @@ export default class WidgetStore extends AsyncStoreWithClient { this.setPinned(roomId, widgetId, true); // Show the apps drawer upon the user pinning a widget - if (RoomViewStore.getRoomId() === this.getRoomId(widgetId)) { + if (RoomViewStore.getRoomId() === roomId) { defaultDispatcher.dispatch({ action: "appsDrawer", show: true, @@ -295,12 +285,33 @@ export default class WidgetStore extends AsyncStoreWithClient { }); const order = Object.keys(roomInfo.pinned).filter(k => roomInfo.pinned[k]); - let apps = order.map(wId => this.widgetMap.get(wId)).filter(Boolean); - apps = apps.slice(0, priorityWidget ? MAX_PINNED - 1 : MAX_PINNED); + const apps = order + .map(wId => Array.from(this.widgetMap.values()) + .find(w2 => w2.roomId === roomId && w2.id === wId)) + .filter(Boolean) + .slice(0, priorityWidget ? MAX_PINNED - 1 : MAX_PINNED); if (priorityWidget) { apps.push(priorityWidget); } + // Sanity check for https://github.com/vector-im/element-web/issues/15705 + // We union the app IDs the above generated with the roomInfo's known widgets to + // get a list of IDs which both exist. We then diff that against the generated app + // IDs above to ensure that all of the app IDs are captured by the union with the + // room - if we grabbed a widget that wasn't part of the roomInfo's list, it wouldn't + // be in the union and thus result in a diff. + const appIds = apps.map(a => widgetUid(a)); + const roomAppIds = roomInfo.widgets.map(a => widgetUid(a)); + const roomAppIdsUnion = arrayUnion(appIds, roomAppIds); + const missingSomeApps = arrayHasDiff(roomAppIdsUnion, appIds); + if (missingSomeApps) { + const diff = arrayDiff(roomAppIdsUnion, appIds); + console.warn( + `${roomId} appears to have a conflict for which widgets belong to it. ` + + `Widget UIDs are: `, [...diff.added, ...diff.removed], + ); + } + return apps; } From 27a853c5861d6d6668369b5ba194981fa3ce0a8d Mon Sep 17 00:00:00 2001 From: macekj Date: Wed, 2 Dec 2020 15:01:44 -0500 Subject: [PATCH 156/319] use textSerialize function to get model text --- src/components/views/rooms/SendMessageComposer.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/views/rooms/SendMessageComposer.js b/src/components/views/rooms/SendMessageComposer.js index 4f5243a765..5e0611a953 100644 --- a/src/components/views/rooms/SendMessageComposer.js +++ b/src/components/views/rooms/SendMessageComposer.js @@ -94,8 +94,7 @@ export function createMessageContent(model, permalinkCreator, replyToEvent) { export function isQuickReaction(model) { const parts = model.parts; if (parts.length == 0) return false; - let text = parts[0].text; - text += parts[1] ? parts[1].text : ""; + const text = textSerialize(model); // shortcut takes the form "+:emoji:" or "+ :emoji:"" // can be in 1 or 2 parts if (parts.length <= 2) { From 0fd9b55b95af1969c937200b863723bf19c548e7 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Thu, 3 Dec 2020 11:08:16 +0000 Subject: [PATCH 157/319] Fix SSO buttons for Social Logins --- src/components/views/elements/SSOButtons.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/views/elements/SSOButtons.tsx b/src/components/views/elements/SSOButtons.tsx index a8bcc88412..f819b48cf6 100644 --- a/src/components/views/elements/SSOButtons.tsx +++ b/src/components/views/elements/SSOButtons.tsx @@ -41,7 +41,7 @@ const SSOButton: React.FC = ({ const label = idp ? _t("Continue with %(provider)s", { provider: idp.name }) : _t("Sign in with single sign-on"); const onClick = () => { - PlatformPeg.get().startSingleSignOn(matrixClient, loginType, fragmentAfterLogin, idp.id); + PlatformPeg.get().startSingleSignOn(matrixClient, loginType, fragmentAfterLogin, idp?.id); }; let icon; From 3223b00028535c046af44ac9be4784028f864da5 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Thu, 3 Dec 2020 11:15:55 +0000 Subject: [PATCH 158/319] Jump to home page when leaving a room so that you don't get thrown into a room you may be ignoring on purpose --- src/RoomListSorter.js | 31 ------------- src/components/structures/MatrixChat.tsx | 44 ++----------------- src/components/structures/RoomView.tsx | 4 +- .../views/dialogs/RoomSettingsDialog.js | 4 +- src/utils/membership.ts | 2 +- 5 files changed, 9 insertions(+), 76 deletions(-) delete mode 100644 src/RoomListSorter.js diff --git a/src/RoomListSorter.js b/src/RoomListSorter.js deleted file mode 100644 index 0ff37a6af2..0000000000 --- a/src/RoomListSorter.js +++ /dev/null @@ -1,31 +0,0 @@ -/* -Copyright 2015, 2016 OpenMarket Ltd - -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. -*/ - -'use strict'; - -function tsOfNewestEvent(room) { - if (room.timeline.length) { - return room.timeline[room.timeline.length - 1].getTs(); - } else { - return Number.MAX_SAFE_INTEGER; - } -} - -export function mostRecentActivityFirst(roomList) { - return roomList.sort(function(a, b) { - return tsOfNewestEvent(b) - tsOfNewestEvent(a); - }); -} diff --git a/src/components/structures/MatrixChat.tsx b/src/components/structures/MatrixChat.tsx index 9fede15aa6..8d111e7c32 100644 --- a/src/components/structures/MatrixChat.tsx +++ b/src/components/structures/MatrixChat.tsx @@ -591,7 +591,7 @@ export default class MatrixChat extends React.PureComponent { MatrixClientPeg.get().leave(payload.room_id).then(() => { modal.close(); if (this.state.currentRoomId === payload.room_id) { - dis.dispatch({action: 'view_next_room'}); + dis.dispatch({action: 'view_home_page'}); } }, (err) => { modal.close(); @@ -620,9 +620,6 @@ export default class MatrixChat extends React.PureComponent { } break; } - case 'view_next_room': - this.viewNextRoom(1); - break; case Action.ViewUserSettings: { const tabPayload = payload as OpenToTabPayload; const UserSettingsDialog = sdk.getComponent("dialogs.UserSettingsDialog"); @@ -802,35 +799,6 @@ export default class MatrixChat extends React.PureComponent { this.notifyNewScreen('register'); } - // TODO: Move to RoomViewStore - private viewNextRoom(roomIndexDelta: number) { - const allRooms = RoomListSorter.mostRecentActivityFirst( - MatrixClientPeg.get().getRooms(), - ); - // If there are 0 rooms or 1 room, view the home page because otherwise - // if there are 0, we end up trying to index into an empty array, and - // if there is 1, we end up viewing the same room. - if (allRooms.length < 2) { - dis.dispatch({ - action: 'view_home_page', - }); - return; - } - let roomIndex = -1; - for (let i = 0; i < allRooms.length; ++i) { - if (allRooms[i].roomId === this.state.currentRoomId) { - roomIndex = i; - break; - } - } - roomIndex = (roomIndex + roomIndexDelta) % allRooms.length; - if (roomIndex < 0) roomIndex = allRooms.length - 1; - dis.dispatch({ - action: 'view_room', - room_id: allRooms[roomIndex].roomId, - }); - } - // switch view to the given room // // @param {Object} roomInfo Object containing data about the room to be joined @@ -1097,9 +1065,9 @@ export default class MatrixChat extends React.PureComponent { private forgetRoom(roomId: string) { MatrixClientPeg.get().forget(roomId).then(() => { - // Switch to another room view if we're currently viewing the historical room + // Switch to home page if we're currently viewing the forgotten room if (this.state.currentRoomId === roomId) { - dis.dispatch({ action: "view_next_room" }); + dis.dispatch({ action: "view_home_page" }); } }).catch((err) => { const errCode = err.errcode || _td("unknown error code"); @@ -1233,12 +1201,8 @@ export default class MatrixChat extends React.PureComponent { } else { if (MatrixClientPeg.get().isGuest()) { dis.dispatch({action: 'view_welcome_page'}); - } else if (getHomePageUrl(this.props.config)) { - dis.dispatch({action: 'view_home_page'}); } else { - this.firstSyncPromise.promise.then(() => { - dis.dispatch({action: 'view_next_room'}); - }); + dis.dispatch({action: 'view_home_page'}); } } } diff --git a/src/components/structures/RoomView.tsx b/src/components/structures/RoomView.tsx index f4f7c6ceec..adcb401ec1 100644 --- a/src/components/structures/RoomView.tsx +++ b/src/components/structures/RoomView.tsx @@ -1332,7 +1332,7 @@ export default class RoomView extends React.Component { rejecting: true, }); this.context.leave(this.state.roomId).then(() => { - dis.dispatch({ action: 'view_next_room' }); + dis.dispatch({ action: 'view_home_page' }); this.setState({ rejecting: false, }); @@ -1366,7 +1366,7 @@ export default class RoomView extends React.Component { await this.context.setIgnoredUsers(ignoredUsers); await this.context.leave(this.state.roomId); - dis.dispatch({ action: 'view_next_room' }); + dis.dispatch({ action: 'view_home_page' }); this.setState({ rejecting: false, }); diff --git a/src/components/views/dialogs/RoomSettingsDialog.js b/src/components/views/dialogs/RoomSettingsDialog.js index a43b284c42..9d9313f08f 100644 --- a/src/components/views/dialogs/RoomSettingsDialog.js +++ b/src/components/views/dialogs/RoomSettingsDialog.js @@ -53,9 +53,9 @@ export default class RoomSettingsDialog extends React.Component { } _onAction = (payload) => { - // When room changes below us, close the room settings + // When view changes below us, close the room settings // whilst the modal is open this can only be triggered when someone hits Leave Room - if (payload.action === 'view_next_room') { + if (payload.action === 'view_home_page') { this.props.onFinished(); } }; diff --git a/src/utils/membership.ts b/src/utils/membership.ts index 696bd57880..80f04dfe76 100644 --- a/src/utils/membership.ts +++ b/src/utils/membership.ts @@ -140,6 +140,6 @@ export async function leaveRoomBehaviour(roomId: string) { } if (RoomViewStore.getRoomId() === roomId) { - dis.dispatch({action: 'view_next_room'}); + dis.dispatch({action: 'view_home_page'}); } } From f432d4e3941a879d840996cf4f3f20e974ddd664 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Thu, 3 Dec 2020 11:31:14 +0000 Subject: [PATCH 159/319] delint --- src/components/structures/MatrixChat.tsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/components/structures/MatrixChat.tsx b/src/components/structures/MatrixChat.tsx index 8d111e7c32..17bb5031ab 100644 --- a/src/components/structures/MatrixChat.tsx +++ b/src/components/structures/MatrixChat.tsx @@ -34,7 +34,6 @@ import { DecryptionFailureTracker } from "../../DecryptionFailureTracker"; import { MatrixClientPeg, IMatrixClientCreds } from "../../MatrixClientPeg"; import PlatformPeg from "../../PlatformPeg"; import SdkConfig from "../../SdkConfig"; -import * as RoomListSorter from "../../RoomListSorter"; import dis from "../../dispatcher/dispatcher"; import Notifier from '../../Notifier'; @@ -48,7 +47,6 @@ import * as Lifecycle from '../../Lifecycle'; // LifecycleStore is not used but does listen to and dispatch actions import '../../stores/LifecycleStore'; import PageTypes from '../../PageTypes'; -import { getHomePageUrl } from '../../utils/pages'; import createRoom from "../../createRoom"; import {_t, _td, getCurrentLanguage} from '../../languageHandler'; From 6772f30b51e9cdbd206591c8881be8c3353bcc38 Mon Sep 17 00:00:00 2001 From: Marcelo Filho Date: Wed, 2 Dec 2020 20:00:25 +0000 Subject: [PATCH 160/319] Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (2701 of 2701 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/pt_BR/ --- src/i18n/strings/pt_BR.json | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/pt_BR.json b/src/i18n/strings/pt_BR.json index 613f889370..fd8ef04b22 100644 --- a/src/i18n/strings/pt_BR.json +++ b/src/i18n/strings/pt_BR.json @@ -2859,5 +2859,32 @@ "Call failed because no webcam or microphone could not be accessed. Check that:": "A chamada falhou porque não foi possível acessar alguma câmera ou microfone. Verifique se:", "Unable to access webcam / microphone": "Não é possível acessar a câmera/microfone", "Call failed because no microphone could not be accessed. Check that a microphone is plugged in and set up correctly.": "A chamada falhou porque não foi possível acessar algum microfone. Verifique se o microfone está conectado e configurado corretamente.", - "Unable to access microphone": "Não é possível acessar o microfone" + "Unable to access microphone": "Não é possível acessar o microfone", + "New? Create account": "Quer se registrar? Crie uma conta", + "Decide where your account is hosted": "Decida onde a sua conta será hospedada", + "Host account on": "Hospedar conta em", + "Already have an account? Sign in here": "Já tem uma conta? Entre aqui", + "%(ssoButtons)s Or %(usernamePassword)s": "%(ssoButtons)s ou %(usernamePassword)s", + "Continue with %(ssoButtons)s": "Continuar com %(ssoButtons)s", + "That username already exists, please try another.": "Este nome de usuário já existe. Por favor, digite outro.", + "There was a problem communicating with the homeserver, please try again later.": "Ocorreu um problema de comunicação com o servidor local. Tente novamente mais tarde.", + "Use email to optionally be discoverable by existing contacts.": "Seja encontrado por seus contatos a partir de um e-mail.", + "Use email or phone to optionally be discoverable by existing contacts.": "Seja encontrado por seus contatos a partir de um e-mail ou número de telefone.", + "Add an email to be able to reset your password.": "Adicione um e-mail para depois poder redefinir sua senha.", + "Forgot password?": "Esqueceu a senha?", + "That phone number doesn't look quite right, please check and try again": "Esse número de telefone não é válido, verifique e tente novamente", + "About homeservers": "Sobre os servidores locais", + "Learn more": "Saiba mais", + "Use your preferred Matrix homeserver if you have one, or host your own.": "Use o seu servidor local Matrix preferido, ou hospede o seu próprio servidor.", + "Other homeserver": "Outro servidor local", + "We call the places you where you can host your account ‘homeservers’.": "Chamamos de \"servidores locais\" os locais onde você pode hospedar a sua conta.", + "Sign into your homeserver": "Faça login em seu servidor local", + "Matrix.org is the biggest public homeserver in the world, so it’s a good place for many.": "Matrix.org é o maior servidor local público do mundo, então é um bom lugar para muitas pessoas.", + "Specify a homeserver": "Digite um servidor local", + "Just a heads up, if you don't add an email and forget your password, you could permanently lose access to your account.": "Apenas um aviso: se você não adicionar um e-mail e depois esquecer sua senha, poderá perder permanentemente o acesso à sua conta.", + "Continuing without email": "Continuar sem e-mail", + "Continue with %(provider)s": "Continuar com %(provider)s", + "Homeserver": "Servidor local", + "You can use the custom server options to sign into other Matrix servers by specifying a different homeserver URL. This allows you to use Element with an existing Matrix account on a different homeserver.": "Você pode usar as opções personalizadas de servidor para entrar em outros servidores Matrix, especificando um URL de servidor local diferente. Isso permite que você use o Element com uma conta Matrix em um servidor local diferente.", + "Server Options": "Opções do servidor" } From 7d936dea926a00515897f848a0f1bb08007e8c6d Mon Sep 17 00:00:00 2001 From: Jeff Huang Date: Thu, 3 Dec 2020 02:15:48 +0000 Subject: [PATCH 161/319] Translated using Weblate (Chinese (Traditional)) Currently translated at 100.0% (2701 of 2701 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/zh_Hant/ --- src/i18n/strings/zh_Hant.json | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/zh_Hant.json b/src/i18n/strings/zh_Hant.json index 3355a7d383..8d7d44d61a 100644 --- a/src/i18n/strings/zh_Hant.json +++ b/src/i18n/strings/zh_Hant.json @@ -2930,5 +2930,32 @@ "Call failed because no webcam or microphone could not be accessed. Check that:": "因為無法存取網路攝影機或麥克風,所以通話失敗。請檢查:", "Unable to access webcam / microphone": "無法存取網路攝影機/麥克風", "Call failed because no microphone could not be accessed. Check that a microphone is plugged in and set up correctly.": "因為無法存取麥克風,所以通話失敗。請檢查是否已插入麥克風並正確設定。", - "Unable to access microphone": "無法存取麥克風" + "Unable to access microphone": "無法存取麥克風", + "Decide where your account is hosted": "決定託管帳號的位置", + "Host account on": "帳號託管於", + "Already have an account? Sign in here": "已有帳號?在此登入", + "%(ssoButtons)s Or %(usernamePassword)s": "%(ssoButtons)s 或 %(usernamePassword)s", + "Continue with %(ssoButtons)s": "使用 %(ssoButtons)s 繼續", + "That username already exists, please try another.": "使用者名稱已存在,請試試其他的。", + "New? Create account": "新人?建立帳號", + "There was a problem communicating with the homeserver, please try again later.": "與家伺服器通訊時出現問題,請再試一次。", + "Use email to optionally be discoverable by existing contacts.": "使用電子郵件以選擇性地被既有的聯絡人探索。", + "Use email or phone to optionally be discoverable by existing contacts.": "使用電子郵件或電話以選擇性地被既有的聯絡人探索。", + "Add an email to be able to reset your password.": "新增電子郵件以重設您的密碼。", + "Forgot password?": "忘記密碼?", + "That phone number doesn't look quite right, please check and try again": "電話號碼看起來不太對,請檢查並再試一次", + "About homeservers": "關於家伺服器", + "Learn more": "取得更多資訊", + "Use your preferred Matrix homeserver if you have one, or host your own.": "如果您有的話,可以使用您偏好的 Matrix 家伺服器,或是自己架一個。", + "Other homeserver": "其他家伺服器", + "We call the places you where you can host your account ‘homeservers’.": "我們將您可以託管您的帳號的地方稱為「家伺服器」。", + "Sign into your homeserver": "登入您的家伺服器", + "Matrix.org is the biggest public homeserver in the world, so it’s a good place for many.": "Matrix.org 是世界上最大的公開伺服器,因此對許多人來說是個好地方。", + "Specify a homeserver": "指定家伺服器", + "Just a heads up, if you don't add an email and forget your password, you could permanently lose access to your account.": "請注意,如果您不新增電子郵件且忘記密碼,您將永遠失去對您帳號的存取權。", + "Continuing without email": "不用電子郵件繼續", + "Continue with %(provider)s": "使用 %(provider)s 繼續", + "Homeserver": "家伺服器", + "You can use the custom server options to sign into other Matrix servers by specifying a different homeserver URL. This allows you to use Element with an existing Matrix account on a different homeserver.": "您可以透過指定不同的家伺服器 URL 使用自訂伺服器選項來登入其他 Matrix 伺服器。這讓您可以使用在不同家伺服器上的既有 Matrix 帳號。", + "Server Options": "伺服器選項" } From 0b94e7629d7bd4107e7b92983a9c1a724788b4bb Mon Sep 17 00:00:00 2001 From: XoseM Date: Thu, 3 Dec 2020 06:42:42 +0000 Subject: [PATCH 162/319] Translated using Weblate (Galician) Currently translated at 100.0% (2701 of 2701 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/gl/ --- src/i18n/strings/gl.json | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/gl.json b/src/i18n/strings/gl.json index fec99d1e7c..f59b05cc7a 100644 --- a/src/i18n/strings/gl.json +++ b/src/i18n/strings/gl.json @@ -2927,5 +2927,32 @@ "Call failed because no webcam or microphone could not be accessed. Check that:": "A chamada fallou porque non están accesibles a cámara ou o micrófono. Comproba que:", "Unable to access webcam / microphone": "Non se puido acceder a cámara / micrófono", "Call failed because no microphone could not be accessed. Check that a microphone is plugged in and set up correctly.": "A chamada fallou porque non se puido acceder a un micrófono. Comproba que o micrófono está conectado e correctamente configurado.", - "Unable to access microphone": "Non se puido acceder ó micrófono" + "Unable to access microphone": "Non se puido acceder ó micrófono", + "Decide where your account is hosted": "Decide onde queres crear a túa conta", + "Host account on": "Crea a conta en", + "Already have an account? Sign in here": "Xa tes unha conta? Conecta aquí", + "%(ssoButtons)s Or %(usernamePassword)s": "%(ssoButtons)s Ou %(usernamePassword)s", + "Continue with %(ssoButtons)s": "Continúa con %(ssoButtons)s", + "That username already exists, please try another.": "Ese nome de usuaria xa existe, proba con outro.", + "New? Create account": "Recén cheagada? Crea unha conta", + "There was a problem communicating with the homeserver, please try again later.": "Houbo un problema de comunicación co servidor de inicio, inténtao máis tarde.", + "Use email to optionally be discoverable by existing contacts.": "Usa o email para ser opcionalmente descubrible para os contactos existentes.", + "Use email or phone to optionally be discoverable by existing contacts.": "Usa un email ou teléfono para ser (opcionalmente) descubrible polos contactos existentes.", + "Add an email to be able to reset your password.": "Engade un email para poder restablecer o contrasinal.", + "Forgot password?": "Esqueceches o contrasinal?", + "That phone number doesn't look quite right, please check and try again": "Non semella correcto este número, compróbao e inténtao outra vez", + "About homeservers": "Acerca dos servidores de inicio", + "Learn more": "Saber máis", + "Use your preferred Matrix homeserver if you have one, or host your own.": "Usa o teu servidor de inicio Matrix preferido, ou usa o teu propio.", + "Other homeserver": "Outro servidor de inicio", + "We call the places you where you can host your account ‘homeservers’.": "Chamámoslle 'Servidores de inicio' ós servidores onde poderías ter a túa conta.", + "Sign into your homeserver": "Conecta co teu servidor de inicio", + "Matrix.org is the biggest public homeserver in the world, so it’s a good place for many.": "Matrix.org é o servidor de inicio máis grande de todos, polo que é lugar común para moitas persoas.", + "Specify a homeserver": "Indica un servidor de inicio", + "Just a heads up, if you don't add an email and forget your password, you could permanently lose access to your account.": "Lembra que se non engades un email e esqueces o contrasinal perderás de xeito permanente o acceso á conta.", + "Continuing without email": "Continuando sen email", + "Continue with %(provider)s": "Continuar con %(provider)s", + "Homeserver": "Servidor de inicio", + "You can use the custom server options to sign into other Matrix servers by specifying a different homeserver URL. This allows you to use Element with an existing Matrix account on a different homeserver.": "Podes usar as opcións do servidor para poder conectarte a outros servidores Matrix indicando o URL dese servidor. Esto permíteche usar Element cunha conta Matrix existente noutro servidor.", + "Server Options": "Opcións do servidor" } From 44954ad0845b2b5a02df962b52f016cf620ff5d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Priit=20J=C3=B5er=C3=BC=C3=BCt?= Date: Wed, 2 Dec 2020 22:38:45 +0000 Subject: [PATCH 163/319] Translated using Weblate (Estonian) Currently translated at 99.1% (2679 of 2701 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/et/ --- src/i18n/strings/et.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/et.json b/src/i18n/strings/et.json index 0b338bd9d4..a1ecae2154 100644 --- a/src/i18n/strings/et.json +++ b/src/i18n/strings/et.json @@ -2928,5 +2928,10 @@ "Call failed because no webcam or microphone could not be accessed. Check that:": "Kuna veebikaamerat või mikrofoni kasutada ei saanud, siis kõne ei õnnestunud. Palun kontrolli, et:", "Unable to access webcam / microphone": "Puudub ligipääs veebikaamerale ja mikrofonile", "Call failed because no microphone could not be accessed. Check that a microphone is plugged in and set up correctly.": "Kuna mikrofoni kasutada ei saanud, siis kõne ei õnnestunud. Palun kontrolli, et mikrofon oleks ühendatud ja seadistatud.", - "Unable to access microphone": "Puudub ligipääs mikrofonile" + "Unable to access microphone": "Puudub ligipääs mikrofonile", + "You can use the custom server options to sign into other Matrix servers by specifying a different homeserver URL. This allows you to use Element with an existing Matrix account on a different homeserver.": "Serveri seadistusi muutes võid teise koduserveri aadressi sisestamisel logida sisse muudesse Matrix'i serveritesse. See võimaldab sul vestlusrakenduses Element kasutada olemasolevat kasutajakontot teises koduserveris.", + "Continuing without email": "Jätka ilma e-posti aadressi seadistamiseta", + "Continue with %(provider)s": "Jätka %(provider)s kasutamist", + "Homeserver": "Koduserver", + "Server Options": "Serveri seadistused" } From 1afece9a141b38b2b091aa880d314db4661603b6 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Thu, 3 Dec 2020 12:20:48 +0000 Subject: [PATCH 164/319] Fix React complaining about unknown DOM props --- src/components/views/elements/Field.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/views/elements/Field.tsx b/src/components/views/elements/Field.tsx index 4335cc46ac..f5754da9ae 100644 --- a/src/components/views/elements/Field.tsx +++ b/src/components/views/elements/Field.tsx @@ -216,7 +216,8 @@ export default class Field extends React.PureComponent { public render() { /* eslint @typescript-eslint/no-unused-vars: ["error", { "ignoreRestSiblings": true }] */ const { element, prefixComponent, postfixComponent, className, onValidate, children, - tooltipContent, forceValidity, tooltipClassName, list, ...inputProps} = this.props; + tooltipContent, forceValidity, tooltipClassName, list, validateOnBlur, validateOnChange, validateOnFocus, + ...inputProps} = this.props; // Set some defaults for the element const ref = input => this.input = input; From 1fda73522284f2eb08f240de853d6cceee795b85 Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Thu, 3 Dec 2020 13:56:27 +0000 Subject: [PATCH 165/319] Rebrand various CI scripts and modules This replaces Riot with Element in various CI scripts, modules, parameters, etc. This _should_ be the last major rebranding pass (hopefully). Fixes https://github.com/vector-im/element-web/issues/14894 --- .eslintignore | 2 +- .eslintignore.errorfiles | 2 +- package.json | 2 +- scripts/ci/{riot-unit-tests.sh => app-tests.sh} | 6 +++--- scripts/ci/end-to-end-tests.sh | 14 +++++++------- scripts/ci/{layered-riot-web.sh => layered.sh} | 10 +++++----- test/end-to-end-tests/.gitignore | 2 +- test/end-to-end-tests/README.md | 11 +++++------ test/end-to-end-tests/Windows.md | 8 ++++---- test/end-to-end-tests/element/.gitignore | 2 ++ .../config-template/config.json | 2 +- .../{riot => element}/install-webserver.sh | 0 test/end-to-end-tests/element/install.sh | 16 ++++++++++++++++ test/end-to-end-tests/{riot => element}/start.sh | 10 +++++----- test/end-to-end-tests/{riot => element}/stop.sh | 6 +++--- .../{has_custom_riot.js => has-custom-app.js} | 8 ++++---- test/end-to-end-tests/riot/.gitignore | 2 -- test/end-to-end-tests/riot/install.sh | 16 ---------------- test/end-to-end-tests/run.sh | 14 +++++++------- test/end-to-end-tests/src/session.js | 12 ++++++------ test/end-to-end-tests/start.js | 6 +++--- .../config-templates/consent/homeserver.yaml | 6 +++--- 22 files changed, 78 insertions(+), 79 deletions(-) rename scripts/ci/{riot-unit-tests.sh => app-tests.sh} (56%) rename scripts/ci/{layered-riot-web.sh => layered.sh} (66%) create mode 100644 test/end-to-end-tests/element/.gitignore rename test/end-to-end-tests/{riot => element}/config-template/config.json (92%) rename test/end-to-end-tests/{riot => element}/install-webserver.sh (100%) create mode 100755 test/end-to-end-tests/element/install.sh rename test/end-to-end-tests/{riot => element}/start.sh (87%) rename test/end-to-end-tests/{riot => element}/stop.sh (79%) rename test/end-to-end-tests/{has_custom_riot.js => has-custom-app.js} (83%) delete mode 100644 test/end-to-end-tests/riot/.gitignore delete mode 100755 test/end-to-end-tests/riot/install.sh diff --git a/.eslintignore b/.eslintignore index c4f7298047..e453170087 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,4 +1,4 @@ src/component-index.js test/end-to-end-tests/node_modules/ -test/end-to-end-tests/riot/ +test/end-to-end-tests/element/ test/end-to-end-tests/synapse/ diff --git a/.eslintignore.errorfiles b/.eslintignore.errorfiles index db90d26ba7..1c0a3d1254 100644 --- a/.eslintignore.errorfiles +++ b/.eslintignore.errorfiles @@ -12,5 +12,5 @@ test/components/views/dialogs/InteractiveAuthDialog-test.js test/mock-clock.js src/component-index.js test/end-to-end-tests/node_modules/ -test/end-to-end-tests/riot/ +test/end-to-end-tests/element/ test/end-to-end-tests/synapse/ diff --git a/package.json b/package.json index f3b8104663..1e778f9875 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "lint:types": "tsc --noEmit --jsx react", "lint:style": "stylelint 'res/css/**/*.scss'", "test": "jest", - "test:e2e": "./test/end-to-end-tests/run.sh --riot-url http://localhost:8080" + "test:e2e": "./test/end-to-end-tests/run.sh --app-url http://localhost:8080" }, "dependencies": { "@babel/runtime": "^7.10.5", diff --git a/scripts/ci/riot-unit-tests.sh b/scripts/ci/app-tests.sh similarity index 56% rename from scripts/ci/riot-unit-tests.sh rename to scripts/ci/app-tests.sh index 337c0fe6c3..3ca4d8ec69 100755 --- a/scripts/ci/riot-unit-tests.sh +++ b/scripts/ci/app-tests.sh @@ -2,11 +2,11 @@ # # script which is run by the CI build (after `yarn test`). # -# clones riot-web develop and runs the tests against our version of react-sdk. +# clones element-web develop and runs the tests against our version of react-sdk. set -ev -scripts/ci/layered-riot-web.sh -cd ../riot-web +scripts/ci/layered.sh +cd ../element-web yarn build:genfiles # so the tests can run. Faster version of `build` yarn test diff --git a/scripts/ci/end-to-end-tests.sh b/scripts/ci/end-to-end-tests.sh index 7a62c03b12..65cd3f6c21 100755 --- a/scripts/ci/end-to-end-tests.sh +++ b/scripts/ci/end-to-end-tests.sh @@ -2,7 +2,7 @@ # # script which is run by the CI build (after `yarn test`). # -# clones riot-web develop and runs the tests against our version of react-sdk. +# clones element-web develop and runs the tests against our version of react-sdk. set -ev @@ -14,20 +14,20 @@ handle_error() { trap 'handle_error' ERR echo "--- Building Element" -scripts/ci/layered-riot-web.sh -cd ../riot-web -riot_web_dir=`pwd` +scripts/ci/layered.sh +cd ../element-web +element_web_dir=`pwd` CI_PACKAGE=true yarn build cd ../matrix-react-sdk # run end to end tests pushd test/end-to-end-tests -ln -s $riot_web_dir riot/riot-web +ln -s $element_web_dir element/element-web # PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true ./install.sh # CHROME_PATH=$(which google-chrome-stable) ./run.sh echo "--- Install synapse & other dependencies" ./install.sh -# install static webserver to server symlinked local copy of riot -./riot/install-webserver.sh +# install static webserver to server symlinked local copy of element +./element/install-webserver.sh rm -r logs || true mkdir logs echo "+++ Running end-to-end tests" diff --git a/scripts/ci/layered-riot-web.sh b/scripts/ci/layered.sh similarity index 66% rename from scripts/ci/layered-riot-web.sh rename to scripts/ci/layered.sh index f58794b451..51d285aff6 100755 --- a/scripts/ci/layered-riot-web.sh +++ b/scripts/ci/layered.sh @@ -1,8 +1,8 @@ #!/bin/bash -# Creates an environment similar to one that riot-web would expect for +# Creates an environment similar to one that element-web would expect for # development. This means going one directory up (and assuming we're in -# a directory like /workdir/matrix-react-sdk) and putting riot-web and +# a directory like /workdir/matrix-react-sdk) and putting element-web and # the js-sdk there. cd ../ # Assume we're at something like /workdir/matrix-react-sdk @@ -21,9 +21,9 @@ yarn link yarn install popd -# Finally, set up riot-web -matrix-react-sdk/scripts/fetchdep.sh vector-im riot-web -pushd riot-web +# Finally, set up element-web +matrix-react-sdk/scripts/fetchdep.sh vector-im element-web +pushd element-web yarn link matrix-js-sdk yarn link matrix-react-sdk yarn install diff --git a/test/end-to-end-tests/.gitignore b/test/end-to-end-tests/.gitignore index afca1ddcb3..61f9012393 100644 --- a/test/end-to-end-tests/.gitignore +++ b/test/end-to-end-tests/.gitignore @@ -1,3 +1,3 @@ node_modules *.png -riot/env +element/env diff --git a/test/end-to-end-tests/README.md b/test/end-to-end-tests/README.md index 8794ef6c9b..b173fb86c2 100644 --- a/test/end-to-end-tests/README.md +++ b/test/end-to-end-tests/README.md @@ -5,9 +5,9 @@ This directory contains tests for matrix-react-sdk. The tests fire up a headless ## Setup Run `./install.sh`. This will: - - install Synapse, fetches the master branch at the moment. If anything fails here, please refer to the Synapse README to see if you're missing one of the prerequisites. - - install Riot, this fetches the master branch at the moment. - - install dependencies (will download copy of chrome) + - install Synapse, fetches the develop branch at the moment. If anything fails here, please refer to the Synapse README to see if you're missing one of the prerequisites. + - install Element Web, this fetches the develop branch at the moment. + - install dependencies (will download copy of Chrome) ## Running the tests @@ -15,7 +15,7 @@ Run tests with `./run.sh`. ### Debug tests locally. -`./run.sh` will run the tests against the Riot copy present in `riot/riot-web` served by a static Python HTTP server. You can symlink your `riot-web` develop copy here but that doesn't work well with Webpack recompiling. You can run the test runner directly and specify parameters to get more insight into a failure or run the tests against your local Webpack server. +`./run.sh` will run the tests against the Element copy present in `element/element-web` served by a static Python HTTP server. You can symlink your `element-web` develop copy here but that doesn't work well with Webpack recompiling. You can run the test runner directly and specify parameters to get more insight into a failure or run the tests against your local Webpack server. ``` ./synapse/stop.sh && \ @@ -26,8 +26,7 @@ It's important to always stop and start Synapse before each run of the tests to start.js accepts these parameters (and more, see `node start.js --help`) that can help running the tests locally: - - `--riot-url ` don't use the Riot copy and static server provided by the tests, but use a running server like the Webpack watch server to run the tests against. Make sure to have the following local config: - - `welcomeUserId` disabled as the tests assume there is no riot-bot currently. + - `--app-url ` don't use the Element Web copy and static server provided by the tests, but use a running server like the Webpack watch server to run the tests against. - `--slow-mo` type at a human speed, useful with `--windowed`. - `--throttle-cpu ` throttle cpu in the browser by the given factor. Useful to reproduce failures because of insufficient timeouts happening on the slower CI server. - `--windowed` run the tests in an actual browser window Try to limit interacting with the windows while the tests are running. Hovering over the window tends to fail the tests, dragging the title bar should be fine though. diff --git a/test/end-to-end-tests/Windows.md b/test/end-to-end-tests/Windows.md index 39b06a9a62..f6ea87d0af 100644 --- a/test/end-to-end-tests/Windows.md +++ b/test/end-to-end-tests/Windows.md @@ -5,14 +5,14 @@ and start following these steps to get going: 1. Navigate to your working directory (`cd /mnt/c/users/travisr/whatever/matrix-react-sdk` for example). 2. Run `sudo apt-get install unzip python3 virtualenv dos2unix` -3. Run `dos2unix ./test/end-to-end-tests/*.sh ./test/end-to-end-tests/synapse/*.sh ./test/end-to-end-tests/riot/*.sh` +3. Run `dos2unix ./test/end-to-end-tests/*.sh ./test/end-to-end-tests/synapse/*.sh ./test/end-to-end-tests/element/*.sh` 4. Install NodeJS for ubuntu: ```bash curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash - sudo apt-get update sudo apt-get install nodejs ``` -5. Start Riot on Windows through `yarn start` +5. Start Element on Windows through `yarn start` 6. While that builds... Run: ```bash sudo apt-get install x11-apps @@ -25,11 +25,11 @@ and start following these steps to get going: cd ./test/end-to-end-tests ./synapse/install.sh ./install.sh - ./run.sh --riot-url http://localhost:8080 --no-sandbox + ./run.sh --app-url http://localhost:8080 --no-sandbox ``` Note that using `yarn test:e2e` probably won't work for you. You might also have to use the config.json from the -`riot/config-template` directory in order to actually succeed at the tests. +`element/config-template` directory in order to actually succeed at the tests. Also note that you'll have to use `--no-sandbox` otherwise Chrome will complain that there's no sandbox available. You could probably fix this with enough effort, or you could run a headless Chrome in the WSL container without a sandbox. diff --git a/test/end-to-end-tests/element/.gitignore b/test/end-to-end-tests/element/.gitignore new file mode 100644 index 0000000000..57fac2072f --- /dev/null +++ b/test/end-to-end-tests/element/.gitignore @@ -0,0 +1,2 @@ +element-web +element.pid diff --git a/test/end-to-end-tests/riot/config-template/config.json b/test/end-to-end-tests/element/config-template/config.json similarity index 92% rename from test/end-to-end-tests/riot/config-template/config.json rename to test/end-to-end-tests/element/config-template/config.json index b647d0bec8..b90fefc2cb 100644 --- a/test/end-to-end-tests/riot/config-template/config.json +++ b/test/end-to-end-tests/element/config-template/config.json @@ -8,7 +8,7 @@ "brand": "Element", "integrations_ui_url": "https://scalar.vector.im/", "integrations_rest_url": "https://scalar.vector.im/api", - "bug_report_endpoint_url": "https://riot.im/bugreports/submit", + "bug_report_endpoint_url": "https://element.io/bugreports/submit", "showLabsSettings": true, "default_federate": true, "welcomePageUrl": "home.html", diff --git a/test/end-to-end-tests/riot/install-webserver.sh b/test/end-to-end-tests/element/install-webserver.sh similarity index 100% rename from test/end-to-end-tests/riot/install-webserver.sh rename to test/end-to-end-tests/element/install-webserver.sh diff --git a/test/end-to-end-tests/element/install.sh b/test/end-to-end-tests/element/install.sh new file mode 100755 index 0000000000..e38f795df1 --- /dev/null +++ b/test/end-to-end-tests/element/install.sh @@ -0,0 +1,16 @@ +#!/bin/bash +set -e +ELEMENT_BRANCH=develop + +if [ -d $BASE_DIR/element-web ]; then + echo "Element is already installed" + exit +fi + +curl -L https://github.com/vector-im/element-web/archive/${ELEMENT_BRANCH}.zip --output element.zip +unzip -q element.zip +rm element.zip +mv element-web-${ELEMENT_BRANCH} element-web +cd element-web +yarn install +yarn run build diff --git a/test/end-to-end-tests/riot/start.sh b/test/end-to-end-tests/element/start.sh similarity index 87% rename from test/end-to-end-tests/riot/start.sh rename to test/end-to-end-tests/element/start.sh index be226ed257..b344f91a19 100755 --- a/test/end-to-end-tests/riot/start.sh +++ b/test/end-to-end-tests/element/start.sh @@ -3,7 +3,7 @@ set -e PORT=5000 BASE_DIR=$(cd $(dirname $0) && pwd) -PIDFILE=$BASE_DIR/riot.pid +PIDFILE=$BASE_DIR/element.pid CONFIG_BACKUP=config.e2etests_backup.json if [ -f $PIDFILE ]; then @@ -11,8 +11,8 @@ if [ -f $PIDFILE ]; then fi cd $BASE_DIR/ -echo -n "starting riot on http://localhost:$PORT ... " -pushd riot-web/webapp/ > /dev/null +echo -n "Starting Element on http://localhost:$PORT ... " +pushd element-web/webapp/ > /dev/null # backup config file before we copy template if [ -f config.json ]; then @@ -34,7 +34,7 @@ LOGFILE=$(mktemp) # NOT expected SIGTERM (128 + 15) # from stop.sh? if [ $RESULT -ne 143 ]; then - echo "failed" + echo "Failed" cat $LOGFILE rm $PIDFILE 2> /dev/null fi @@ -49,6 +49,6 @@ sleep 0.5 & wait -n; RESULT=$? # return exit code of first child to exit if [ $RESULT -eq 0 ]; then - echo "running" + echo "Running" fi exit $RESULT diff --git a/test/end-to-end-tests/riot/stop.sh b/test/end-to-end-tests/element/stop.sh similarity index 79% rename from test/end-to-end-tests/riot/stop.sh rename to test/end-to-end-tests/element/stop.sh index eb99fa11cc..e39f0077eb 100755 --- a/test/end-to-end-tests/riot/stop.sh +++ b/test/end-to-end-tests/element/stop.sh @@ -2,19 +2,19 @@ set -e BASE_DIR=$(cd $(dirname $0) && pwd) -PIDFILE=riot.pid +PIDFILE=element.pid CONFIG_BACKUP=config.e2etests_backup.json cd $BASE_DIR if [ -f $PIDFILE ]; then - echo "stopping riot server ..." + echo "Stopping Element server ..." PID=$(cat $PIDFILE) rm $PIDFILE kill $PID # revert config file - cd riot-web/webapp + cd element-web/webapp rm config.json if [ -f $CONFIG_BACKUP ]; then mv $CONFIG_BACKUP config.json diff --git a/test/end-to-end-tests/has_custom_riot.js b/test/end-to-end-tests/has-custom-app.js similarity index 83% rename from test/end-to-end-tests/has_custom_riot.js rename to test/end-to-end-tests/has-custom-app.js index 95f32d8ad0..00184088fd 100644 --- a/test/end-to-end-tests/has_custom_riot.js +++ b/test/end-to-end-tests/has-custom-app.js @@ -15,10 +15,10 @@ limitations under the License. */ // used from run.sh as getopts doesn't support long parameters -const idx = process.argv.indexOf("--riot-url"); -let hasRiotUrl = false; +const idx = process.argv.indexOf("--app-url"); +let hasAppUrl = false; if (idx !== -1) { const value = process.argv[idx + 1]; - hasRiotUrl = !!value; + hasAppUrl = !!value; } -process.stdout.write(hasRiotUrl ? "1" : "0" ); +process.stdout.write(hasAppUrl ? "1" : "0" ); diff --git a/test/end-to-end-tests/riot/.gitignore b/test/end-to-end-tests/riot/.gitignore deleted file mode 100644 index 0f07d8e498..0000000000 --- a/test/end-to-end-tests/riot/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -riot-web -riot.pid \ No newline at end of file diff --git a/test/end-to-end-tests/riot/install.sh b/test/end-to-end-tests/riot/install.sh deleted file mode 100755 index f66ab3224e..0000000000 --- a/test/end-to-end-tests/riot/install.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash -set -e -RIOT_BRANCH=develop - -if [ -d $BASE_DIR/riot-web ]; then - echo "riot is already installed" - exit -fi - -curl -L https://github.com/vector-im/riot-web/archive/${RIOT_BRANCH}.zip --output riot.zip -unzip -q riot.zip -rm riot.zip -mv riot-web-${RIOT_BRANCH} riot-web -cd riot-web -yarn install -yarn run build diff --git a/test/end-to-end-tests/run.sh b/test/end-to-end-tests/run.sh index b9d589eed9..4421bddc34 100755 --- a/test/end-to-end-tests/run.sh +++ b/test/end-to-end-tests/run.sh @@ -9,16 +9,16 @@ echo "Please first run $BASE_DIR/install.sh" exit 1 fi -has_custom_riot=$(node has_custom_riot.js $@) +has_custom_app=$(node has-custom-app.js $@) -if [ ! -d "riot/riot-web" ] && [ $has_custom_riot -ne "1" ]; then - echo "Please provide an instance of riot to test against by passing --riot-url or running $BASE_DIR/riot/install.sh" +if [ ! -d "element/element-web" ] && [ $has_custom_app -ne "1" ]; then + echo "Please provide an instance of Element to test against by passing --element-url or running $BASE_DIR/element/install.sh" exit 1 fi stop_servers() { - if [ $has_custom_riot -ne "1" ]; then - ./riot/stop.sh + if [ $has_custom_app -ne "1" ]; then + ./element/stop.sh fi ./synapse/stop.sh } @@ -32,8 +32,8 @@ handle_error() { trap 'handle_error' ERR ./synapse/start.sh -if [ $has_custom_riot -ne "1" ]; then - ./riot/start.sh +if [ $has_custom_app -ne "1" ]; then + ./element/start.sh fi node start.js $@ stop_servers diff --git a/test/end-to-end-tests/src/session.js b/test/end-to-end-tests/src/session.js index 907ee2fb8e..433baa5e48 100644 --- a/test/end-to-end-tests/src/session.js +++ b/test/end-to-end-tests/src/session.js @@ -22,12 +22,12 @@ const {delay} = require('./util'); const DEFAULT_TIMEOUT = 20000; -module.exports = class RiotSession { - constructor(browser, page, username, riotserver, hsUrl) { +module.exports = class ElementSession { + constructor(browser, page, username, elementServer, hsUrl) { this.browser = browser; this.page = page; this.hsUrl = hsUrl; - this.riotserver = riotserver; + this.elementServer = elementServer; this.username = username; this.consoleLog = new LogBuffer(page, "console", (msg) => `${msg.text()}\n`); this.networkLog = new LogBuffer(page, "requestfinished", async (req) => { @@ -38,7 +38,7 @@ module.exports = class RiotSession { this.log = new Logger(this.username); } - static async create(username, puppeteerOptions, riotserver, hsUrl, throttleCpuFactor = 1) { + static async create(username, puppeteerOptions, elementServer, hsUrl, throttleCpuFactor = 1) { const browser = await puppeteer.launch(puppeteerOptions); const page = await browser.newPage(); await page.setViewport({ @@ -50,7 +50,7 @@ module.exports = class RiotSession { console.log("throttling cpu by a factor of", throttleCpuFactor); await client.send('Emulation.setCPUThrottlingRate', { rate: throttleCpuFactor }); } - return new RiotSession(browser, page, username, riotserver, hsUrl); + return new ElementSession(browser, page, username, elementServer, hsUrl); } async tryGetInnertext(selector) { @@ -194,7 +194,7 @@ module.exports = class RiotSession { } url(path) { - return this.riotserver + path; + return this.elementServer + path; } delay(ms) { diff --git a/test/end-to-end-tests/start.js b/test/end-to-end-tests/start.js index 6c80608903..234d60da9f 100644 --- a/test/end-to-end-tests/start.js +++ b/test/end-to-end-tests/start.js @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -const RiotSession = require('./src/session'); +const ElementSession = require('./src/session'); const scenario = require('./src/scenario'); const RestSessionCreator = require('./src/rest/creator'); const fs = require("fs"); @@ -22,7 +22,7 @@ const fs = require("fs"); const program = require('commander'); program .option('--no-logs', "don't output logs, document html on error", false) - .option('--riot-url [url]', "riot url to test", "http://localhost:5000") + .option('--app-url [url]', "url to test", "http://localhost:5000") .option('--windowed', "dont run tests headless", false) .option('--slow-mo', "type at a human speed", false) .option('--dev-tools', "open chrome devtools in browser window", false) @@ -57,7 +57,7 @@ async function runTests() { ); async function createSession(username) { - const session = await RiotSession.create(username, options, program.riotUrl, hsUrl, program.throttleCpu); + const session = await ElementSession.create(username, options, program.appUrl, hsUrl, program.throttleCpu); sessions.push(session); return session; } diff --git a/test/end-to-end-tests/synapse/config-templates/consent/homeserver.yaml b/test/end-to-end-tests/synapse/config-templates/consent/homeserver.yaml index 536c017b9e..deb750666f 100644 --- a/test/end-to-end-tests/synapse/config-templates/consent/homeserver.yaml +++ b/test/end-to-end-tests/synapse/config-templates/consent/homeserver.yaml @@ -875,8 +875,8 @@ password_config: # Enable sending emails for notification events -# Defining a custom URL for Riot is only needed if email notifications -# should contain links to a self-hosted installation of Riot; when set +# Defining a custom URL for Element is only needed if email notifications +# should contain links to a self-hosted installation of Element; when set # the "app_name" setting is ignored. # # If your SMTP server requires authentication, the optional smtp_user & @@ -897,7 +897,7 @@ email: notif_template_html: notif_mail.html notif_template_text: notif_mail.txt notif_for_new_users: True - riot_base_url: "http://localhost/riot" + client_base_url: "http://localhost/element" #password_providers: From cdc57cf1f56a2c8a5cd91266090bd25bd7ab336b Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Thu, 3 Dec 2020 13:58:25 +0000 Subject: [PATCH 166/319] Add temporary symlink for pipeline --- scripts/ci/riot-unit-tests.sh | 1 + 1 file changed, 1 insertion(+) create mode 120000 scripts/ci/riot-unit-tests.sh diff --git a/scripts/ci/riot-unit-tests.sh b/scripts/ci/riot-unit-tests.sh new file mode 120000 index 0000000000..199dfb58fd --- /dev/null +++ b/scripts/ci/riot-unit-tests.sh @@ -0,0 +1 @@ +app-tests.sh \ No newline at end of file From a6e69db8f51e97ec22881a302344b9dbd33bcec6 Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Thu, 3 Dec 2020 14:56:24 +0000 Subject: [PATCH 167/319] Rebrand E2E test Docker image --- scripts/ci/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/ci/Dockerfile b/scripts/ci/Dockerfile index c153d11cc7..5351291f29 100644 --- a/scripts/ci/Dockerfile +++ b/scripts/ci/Dockerfile @@ -1,7 +1,7 @@ # Update on docker hub with the following commands in the directory of this file: -# docker build -t matrixdotorg/riotweb-ci-e2etests-env:latest . +# docker build -t vectorim/element-web-ci-e2etests-env:latest . # docker log -# docker push matrixdotorg/riotweb-ci-e2etests-env:latest +# docker push vectorim/element-web-ci-e2etests-env:latest FROM node:10 RUN apt-get update RUN apt-get -y install build-essential python3-dev libffi-dev python-pip python-setuptools sqlite3 libssl-dev python-virtualenv libjpeg-dev libxslt1-dev uuid-runtime From fb96cbbba5e2f984dfd7af27379f8aa32aca39ab Mon Sep 17 00:00:00 2001 From: LinAGKar Date: Thu, 3 Dec 2020 13:49:28 +0000 Subject: [PATCH 168/319] Translated using Weblate (Swedish) Currently translated at 97.1% (2624 of 2701 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/sv/ --- src/i18n/strings/sv.json | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/sv.json b/src/i18n/strings/sv.json index 7b8e5b6383..4cdf1faffe 100644 --- a/src/i18n/strings/sv.json +++ b/src/i18n/strings/sv.json @@ -2791,5 +2791,24 @@ "See when the avatar changes in your active room": "Se när avataren byts för ditt aktiva rum", "See when the avatar changes in this room": "Se när avataren byts för det här rummet", "See when the name changes in your active room": "Se när namnet på ditt aktiva rum byts", - "See when the name changes in this room": "Se när namnet på det här rummet byts" + "See when the name changes in this room": "Se när namnet på det här rummet byts", + "See text messages posted to your active room": "Se textmeddelanden som skickas i ditt aktiva rum", + "See text messages posted to this room": "Se textmeddelanden som skickas i det här rummet", + "Send text messages as you in your active room": "Skicka textmeddelanden som dig i ditt aktiva rum", + "Send text messages as you in this room": "Skicka textmeddelanden som dig i det här rummet", + "See messages posted to your active room": "Se meddelanden som skickas i ditt aktiva rum", + "See messages posted to this room": "Se meddelanden som skickas i det här rummet", + "Send messages as you in your active room": "Skicka meddelanden som dig i ditt aktiva rum", + "Send messages as you in this room": "Skicka meddelanden som dig i det här rummet", + "with an empty state key": "med en tom statusnyckel", + "The %(capability)s capability": "%(capability)s-kapaciteten", + "See %(eventType)s events posted to your active room": "Se %(eventType)s-händelser som skickas i ditt aktiva rum", + "Send %(eventType)s events as you in your active room": "Skicka %(eventType)s-händelser som dig i ditt aktiva rum", + "See %(eventType)s events posted to this room": "Se %(eventType)s-händelser skickade i det här rummet", + "Send %(eventType)s events as you in this room": "Skicka %(eventType)s-händelser som dig i det här rummet", + "with state key %(stateKey)s": "med statusnyckel %(stateKey)s", + "See when a sticker is posted in this room": "Se när en dekal skickas i det här rummet", + "See when anyone posts a sticker to your active room": "Se när någon skickar en dekal till ditt aktiva rum", + "Send stickers to your active room as you": "Skicka dekaler till ditt aktiva rum som dig", + "Send stickers to this room as you": "Skicka dekaler till det här rummet som dig" } From eaa4b17af44e824a321e266b98e8a3265670a91a Mon Sep 17 00:00:00 2001 From: Hivaa Date: Thu, 3 Dec 2020 15:20:01 +0000 Subject: [PATCH 169/319] Translated using Weblate (Persian) Currently translated at 7.0% (191 of 2701 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/fa/ --- src/i18n/strings/fa.json | 60 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 59 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/fa.json b/src/i18n/strings/fa.json index eacc029d03..af5e9d312c 100644 --- a/src/i18n/strings/fa.json +++ b/src/i18n/strings/fa.json @@ -158,5 +158,63 @@ "Whether or not you're logged in (we don't record your username)": "وارد حساب خود می‌شوید یا خیر (ما نام کاربری شما را ثبت نمی‌کنیم)", "Click the button below to confirm adding this phone number.": "برای تائید اضافه‌شدن این شماره تلفن، بر روی دکمه‌ی زیر کلیک کنید.", "Confirm adding this phone number by using Single Sign On to prove your identity.": "برای اثبات هویت خود، اضافه‌شدن این شماره تلفن را با استفاده از Single Sign On تائید کنید.", - "Failed to verify email address: make sure you clicked the link in the email": "خطا در تائید آدرس ایمیل: مطمئن شوید که بر روی لینک موجود در ایمیل کلیک کرده اید" + "Failed to verify email address: make sure you clicked the link in the email": "خطا در تائید آدرس ایمیل: مطمئن شوید که بر روی لینک موجود در ایمیل کلیک کرده اید", + "Forget room": "فراموش کردن اتاق", + "Filter room members": "فیلتر کردن اعضای اتاق", + "Failure to create room": "ایجاد اتاق با خطا مواجه شد", + "Failed to upload profile picture!": "آپلود عکس پروفایل با خطا مواجه شد!", + "Failed to unban": "رفع مسدودیت با خطا مواجه شد", + "Failed to set display name": "تنظیم نام نمایشی با خطا مواجه شد", + "Failed to send request.": "ارسال درخواست با خطا مواجه شد.", + "Failed to send email": "ارسال ایمیل با خطا مواجه شد", + "Failed to join room": "پیوستن به اتاق انجام نشد", + "Failed to ban user": "کاربر مسدود نشد", + "Error decrypting attachment": "خطا در رمزگشایی پیوست", + "%(senderName)s ended the call.": "%(senderName)s به تماس پایان داد.", + "Emoji": "شکلک", + "Email address": "آدرس ایمیل", + "Email": "ایمیل", + "Drop File Here": "پرونده را اینجا رها کنید", + "Download %(text)s": "دانلود 2%(text)s", + "Disinvite": "پس‌گرفتن دعوت", + "Default": "پیشفرض", + "Deops user with given id": "کاربر را با شناسه داده شده را از بین می برد", + "Decrypt %(text)s": "رمزگشایی %(text)s", + "Deactivate Account": "غیرفعال کردن حساب", + "/ddg is not a command": "/ddg یک فرمان نیست", + "Current password": "گذرواژه فعلی", + "Cryptography": "رمزنگاری", + "Create Room": "ایجاد اتاق", + "Confirm password": "تأیید گذرواژه", + "Commands": "فرمان‌ها", + "Command error": "خطای فرمان", + "Click here to fix": "برای رفع مشکل اینجا کلیک کنید", + "%(senderDisplayName)s removed the room name.": "%(senderDisplayName)s نام اتاق را حذف کرد.", + "%(senderName)s changed their profile picture.": "%(senderName)s عکس پروفایل خود را تغییر داد.", + "Change Password": "تغییر گذواژه", + "Banned users": "کاربران مسدود شده", + "Autoplay GIFs and videos": "پخش خودکار GIF و فیلم", + "Attachment": "پیوست", + "Are you sure you want to reject the invitation?": "آیا مطمئن هستید که می خواهید دعوت را رد کنید؟", + "Are you sure you want to leave the room '%(roomName)s'?": "آیا مطمئن هستید که می خواهید از اتاق '2%(roomName)s' خارج شوید؟", + "Are you sure?": "مطمئنی؟", + "Anyone who knows the room's link, including guests": "هرکسی که لینک اتاق را می داند و کاربران مهمان", + "Anyone who knows the room's link, apart from guests": "هرکسی که لینک اتاق را می‌داند، غیر از کاربران مهمان", + "Anyone": "هر کس", + "An error has occurred.": "خطایی رخ داده است.", + "%(senderName)s answered the call.": "%(senderName)s تماس را پاسخ داد.", + "A new password must be entered.": "گذواژه جدید باید وارد شود.", + "Authentication": "احراز هویت", + "Always show message timestamps": "همیشه مهر زمان‌های پیام را نشان بده", + "Advanced": "پیشرفته", + "Camera": "دوربین", + "Microphone": "میکروفون", + "Default Device": "دستگاه پیشفرض", + "No media permissions": "عدم مجوز رسانه", + "No Webcams detected": "هیچ وبکمی شناسایی نشد", + "No Microphones detected": "هیچ میکروفونی شناسایی نشد", + "Admin": "ادمین", + "Add": "افزودن", + "Access Token:": "توکن دسترسی:", + "Account": "حساب کابری" } From 52ec76158fd7802eb0e8ba7085d56a791752d621 Mon Sep 17 00:00:00 2001 From: Hivaa Date: Thu, 3 Dec 2020 15:26:43 +0000 Subject: [PATCH 170/319] Translated using Weblate (Persian) Currently translated at 7.2% (197 of 2701 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/fa/ --- src/i18n/strings/fa.json | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/i18n/strings/fa.json b/src/i18n/strings/fa.json index af5e9d312c..b16700ead6 100644 --- a/src/i18n/strings/fa.json +++ b/src/i18n/strings/fa.json @@ -71,7 +71,7 @@ "Collecting logs": "درحال جمع‌آوری گزارش‌ها", "Search": "جستجو", "(HTTP status %(httpStatus)s)": "(HTTP وضعیت %(httpStatus)s)", - "Failed to forget room %(errCode)s": "فراموش کردن گپ‌گاه %(errCode)s موفقیت‌آمیز نبود", + "Failed to forget room %(errCode)s": "فراموش کردن اتاق با خطا مواجه شد %(errCode)s", "Wednesday": "چهارشنبه", "Quote": "گفتآورد", "Send": "ارسال", @@ -175,7 +175,7 @@ "Email address": "آدرس ایمیل", "Email": "ایمیل", "Drop File Here": "پرونده را اینجا رها کنید", - "Download %(text)s": "دانلود 2%(text)s", + "Download %(text)s": "دانلود 2%(text)s", "Disinvite": "پس‌گرفتن دعوت", "Default": "پیشفرض", "Deops user with given id": "کاربر را با شناسه داده شده را از بین می برد", @@ -216,5 +216,11 @@ "Admin": "ادمین", "Add": "افزودن", "Access Token:": "توکن دسترسی:", - "Account": "حساب کابری" + "Account": "حساب کابری", + "Incorrect verification code": "کد فعال‌سازی اشتباه است", + "Incorrect username and/or password.": "نام کاربری و یا گذرواژه اشتباه است.", + "I have verified my email address": "ایمیل خود را تأید کردم", + "Home": "خانه", + "Hangup": "قطع", + "For security, this session has been signed out. Please sign in again.": "برای امنیت، این نشست نامعتبر شده است. لطفاً دوباره وارد سیستم شوید." } From 883d5d96a7ea85358c11336d4be0a2aa499d5681 Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Fri, 20 Nov 2020 17:55:48 +0000 Subject: [PATCH 171/319] Nest other layers inside on automation This changes the nesting style because some CI / CD systems do not allow moving to a directory above the checkout for the primary repo (`react-sdk` in this case). Part of https://github.com/vector-im/element-web/issues/12624 --- scripts/ci/app-tests.sh | 2 +- scripts/ci/end-to-end-tests.sh | 4 ++-- scripts/ci/layered.sh | 18 +++++++++--------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/scripts/ci/app-tests.sh b/scripts/ci/app-tests.sh index 3ca4d8ec69..97e54dce66 100755 --- a/scripts/ci/app-tests.sh +++ b/scripts/ci/app-tests.sh @@ -7,6 +7,6 @@ set -ev scripts/ci/layered.sh -cd ../element-web +cd element-web yarn build:genfiles # so the tests can run. Faster version of `build` yarn test diff --git a/scripts/ci/end-to-end-tests.sh b/scripts/ci/end-to-end-tests.sh index 65cd3f6c21..edb8870d8e 100755 --- a/scripts/ci/end-to-end-tests.sh +++ b/scripts/ci/end-to-end-tests.sh @@ -15,10 +15,10 @@ trap 'handle_error' ERR echo "--- Building Element" scripts/ci/layered.sh -cd ../element-web +cd element-web element_web_dir=`pwd` CI_PACKAGE=true yarn build -cd ../matrix-react-sdk +cd .. # run end to end tests pushd test/end-to-end-tests ln -s $element_web_dir element/element-web diff --git a/scripts/ci/layered.sh b/scripts/ci/layered.sh index 51d285aff6..306f9c9974 100755 --- a/scripts/ci/layered.sh +++ b/scripts/ci/layered.sh @@ -1,28 +1,28 @@ #!/bin/bash -# Creates an environment similar to one that element-web would expect for -# development. This means going one directory up (and assuming we're in -# a directory like /workdir/matrix-react-sdk) and putting element-web and -# the js-sdk there. +# Creates a layered environment with the full repo for the app and SDKs cloned +# and linked. -cd ../ # Assume we're at something like /workdir/matrix-react-sdk +# Note that this style is different from the recommended developer setup: this +# file nests js-sdk and element-web inside react-sdk, while the local +# development setup places them all at the same level. We are nesting them here +# because some CI systems do not allow moving to a directory above the checkout +# for the primary repo (react-sdk in this case). # Set up the js-sdk first -matrix-react-sdk/scripts/fetchdep.sh matrix-org matrix-js-sdk +scripts/fetchdep.sh matrix-org matrix-js-sdk pushd matrix-js-sdk yarn link yarn install popd # Now set up the react-sdk -pushd matrix-react-sdk yarn link matrix-js-sdk yarn link yarn install -popd # Finally, set up element-web -matrix-react-sdk/scripts/fetchdep.sh vector-im element-web +scripts/fetchdep.sh vector-im element-web pushd element-web yarn link matrix-js-sdk yarn link matrix-react-sdk From 1ce63f0fa7d94badd39b9333c419254dc290e22e Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 3 Dec 2020 17:45:49 +0000 Subject: [PATCH 172/319] Line 1 / 2 Support Support one active call plus one call on hold --- res/css/views/voip/_CallView.scss | 40 +- src/CallHandler.tsx | 85 ++++- .../views/context_menus/CallContextMenu.tsx | 14 +- src/components/views/rooms/AuxPanel.tsx | 6 +- src/components/views/voip/CallPreview.tsx | 112 ++++-- src/components/views/voip/CallView.tsx | 354 +++++++++--------- src/components/views/voip/CallViewForRoom.tsx | 87 +++++ src/i18n/strings/en_EN.json | 4 +- 8 files changed, 468 insertions(+), 234 deletions(-) create mode 100644 src/components/views/voip/CallViewForRoom.tsx diff --git a/res/css/views/voip/_CallView.scss b/res/css/views/voip/_CallView.scss index 57806470a1..6ea8192aba 100644 --- a/res/css/views/voip/_CallView.scss +++ b/res/css/views/voip/_CallView.scss @@ -38,6 +38,17 @@ limitations under the License. .mx_CallView_voice { height: 180px; } + + .mx_CallView_callControls { + bottom: 0px; + } + + .mx_CallView_callControls_button { + &::before { + width: 36px; + height: 36px; + } + } } .mx_CallView_voice { @@ -81,6 +92,7 @@ limitations under the License. .mx_CallView_voice_holdText { height: 20px; padding-top: 10px; + padding-bottom: 15px; color: $accent-fg-color; font-weight: bold; .mx_AccessibleButton_hasKind { @@ -162,8 +174,34 @@ limitations under the License. vertical-align: middle; } -.mx_CallView_header_controls { +.mx_CallView_header_secondaryCallInfo { margin-left: auto; + display: flex; + flex-direction: row; + align-items: center; + justify-content: left; + .mx_AccessibleButton_hasKind { + padding: 0px; + } +} + +.mx_CallView_header_secondaryCallInfo_avatarContainer { + width: 32px; + height: 32px; + margin-right: 12px; + + border-radius: 2000px; + overflow: hidden; + position: relative; + + .mx_BaseAvatar { + filter: blur(3px); + overflow: hidden; + } +} + +.mx_CallView_header_controls { + margin-left: 12px; } .mx_CallView_header_button { diff --git a/src/CallHandler.tsx b/src/CallHandler.tsx index b5f696008d..925c638add 100644 --- a/src/CallHandler.tsx +++ b/src/CallHandler.tsx @@ -81,6 +81,7 @@ import Analytics from './Analytics'; import CountlyAnalytics from "./CountlyAnalytics"; import {UIFeature} from "./settings/UIFeature"; import { CallError } from "matrix-js-sdk/src/webrtc/call"; +import { logger } from 'matrix-js-sdk/src/logger'; enum AudioID { Ring = 'ringAudio', @@ -115,7 +116,7 @@ function getRemoteAudioElement(): HTMLAudioElement { } export default class CallHandler { - private calls = new Map(); + private calls = new Map(); // roomId -> call private audioPromises = new Map>(); static sharedInstance() { @@ -175,6 +176,28 @@ export default class CallHandler { return null; } + getAllActiveCalls() { + const activeCalls = []; + + for (const call of this.calls.values()) { + if (call.state !== CallState.Ended && call.state !== CallState.Ringing) { + activeCalls.push(call); + } + } + return activeCalls; + } + + getAllActiveCallsNotInRoom(notInThisRoomId) { + const callsNotInThatRoom = []; + + for (const [roomId, call] of this.calls.entries()) { + if (roomId !== notInThisRoomId && call.state !== CallState.Ended) { + callsNotInThatRoom.push(call); + } + } + return callsNotInThatRoom; + } + play(audioId: AudioID) { // TODO: Attach an invisible element for this instead // which listens? @@ -425,6 +448,8 @@ export default class CallHandler { this.setCallListeners(call); this.setCallAudioElement(call); + this.setActiveCallRoomId(roomId); + if (type === PlaceCallType.Voice) { call.placeVoiceCall(); } else if (type === 'video') { @@ -453,14 +478,6 @@ export default class CallHandler { switch (payload.action) { case 'place_call': { - if (this.getAnyActiveCall()) { - Modal.createTrackedDialog('Call Handler', 'Existing Call', ErrorDialog, { - title: _t('Existing Call'), - description: _t('You are already in a call.'), - }); - return; // don't allow >1 call to be placed. - } - // if the runtime env doesn't do VoIP, whine. if (!MatrixClientPeg.get().supportsVoip()) { Modal.createTrackedDialog('Call Handler', 'VoIP is unsupported', ErrorDialog, { @@ -470,6 +487,15 @@ export default class CallHandler { return; } + // don't allow > 2 calls to be placed. + if (this.getAllActiveCalls().length > 1) { + Modal.createTrackedDialog('Call Handler', 'Existing Call', ErrorDialog, { + title: _t('Too Many Calls'), + description: _t("You've reached the maximum number of simultaneous calls."), + }); + return; + } + const room = MatrixClientPeg.get().getRoom(payload.room_id); if (!room) { console.error("Room %s does not exist.", payload.room_id); @@ -513,24 +539,21 @@ export default class CallHandler { break; case 'incoming_call': { - if (this.getAnyActiveCall()) { - // ignore multiple incoming calls. in future, we may want a line-1/line-2 setup. - // we avoid rejecting with "busy" in case the user wants to answer it on a different device. - // in future we could signal a "local busy" as a warning to the caller. - // see https://github.com/vector-im/vector-web/issues/1964 - return; - } - // if the runtime env doesn't do VoIP, stop here. if (!MatrixClientPeg.get().supportsVoip()) { return; } const call = payload.call as MatrixCall; + + if (this.getCallForRoom(call.roomId)) { + // ignore multiple incoming calls to the same room + return; + } + Analytics.trackEvent('voip', 'receiveCall', 'type', call.type); this.calls.set(call.roomId, call) this.setCallListeners(call); - this.setCallAudioElement(call); } break; case 'hangup': @@ -549,8 +572,19 @@ export default class CallHandler { if (!this.calls.has(payload.room_id)) { return; // no call to answer } + + if (this.getAllActiveCalls().length > 1) { + Modal.createTrackedDialog('Call Handler', 'Existing Call', ErrorDialog, { + title: _t('Too Many Calls'), + description: _t("You've reached the maximum number of simultaneous calls."), + }); + return; + } + const call = this.calls.get(payload.room_id); call.answer(); + this.setCallAudioElement(call); + this.setActiveCallRoomId(payload.room_id); CountlyAnalytics.instance.trackJoinCall(payload.room_id, call.type === CallType.Video, false); dis.dispatch({ action: "view_room", @@ -561,6 +595,21 @@ export default class CallHandler { } } + setActiveCallRoomId(activeCallRoomId: string) { + logger.info("Setting call in room " + activeCallRoomId + " active"); + + for (const [roomId, call] of this.calls.entries()) { + if (call.state === CallState.Ended) continue; + + if (roomId === activeCallRoomId) { + call.setRemoteOnHold(false); + } else { + logger.info("Holding call in room " + roomId + " because another call is being set active"); + call.setRemoteOnHold(true); + } + } + } + private async startCallApp(roomId: string, type: string) { dis.dispatch({ action: 'appsDrawer', diff --git a/src/components/views/context_menus/CallContextMenu.tsx b/src/components/views/context_menus/CallContextMenu.tsx index 31e82c19b1..336b72cebf 100644 --- a/src/components/views/context_menus/CallContextMenu.tsx +++ b/src/components/views/context_menus/CallContextMenu.tsx @@ -19,6 +19,7 @@ import PropTypes from 'prop-types'; import { _t } from '../../../languageHandler'; import { ContextMenu, IProps as IContextMenuProps, MenuItem } from '../../structures/ContextMenu'; import { MatrixCall } from 'matrix-js-sdk/src/webrtc/call'; +import CallHandler from '../../../CallHandler'; interface IProps extends IContextMenuProps { call: MatrixCall; @@ -34,16 +35,23 @@ export default class CallContextMenu extends React.Component { super(props); } - onHoldUnholdClick = () => { - this.props.call.setRemoteOnHold(!this.props.call.isRemoteOnHold()); + onHoldClick = () => { + this.props.call.setRemoteOnHold(true); + this.props.onFinished(); + } + + onUnholdClick = () => { + CallHandler.sharedInstance().setActiveCallRoomId(this.props.call.roomId); + this.props.onFinished(); } render() { const holdUnholdCaption = this.props.call.isRemoteOnHold() ? _t("Resume") : _t("Hold"); + const handler = this.props.call.isRemoteOnHold() ? this.onUnholdClick : this.onHoldClick; return - + {holdUnholdCaption} ; diff --git a/src/components/views/rooms/AuxPanel.tsx b/src/components/views/rooms/AuxPanel.tsx index 465c9c749a..7966643084 100644 --- a/src/components/views/rooms/AuxPanel.tsx +++ b/src/components/views/rooms/AuxPanel.tsx @@ -26,9 +26,9 @@ import classNames from 'classnames'; import RateLimitedFunc from '../../../ratelimitedfunc'; import SettingsStore from "../../../settings/SettingsStore"; import AutoHideScrollbar from "../../structures/AutoHideScrollbar"; -import CallView from "../voip/CallView"; import {UIFeature} from "../../../settings/UIFeature"; import { ResizeNotifier } from "../../../utils/ResizeNotifier"; +import CallViewForRoom from '../voip/CallViewForRoom'; interface IProps { // js-sdk room object @@ -166,8 +166,8 @@ export default class AuxPanel extends React.Component { } const callView = ( - diff --git a/src/components/views/voip/CallPreview.tsx b/src/components/views/voip/CallPreview.tsx index 8e1b0dd963..c08e52181b 100644 --- a/src/components/views/voip/CallPreview.tsx +++ b/src/components/views/voip/CallPreview.tsx @@ -24,7 +24,8 @@ import dis from '../../../dispatcher/dispatcher'; import { ActionPayload } from '../../../dispatcher/payloads'; import PersistentApp from "../elements/PersistentApp"; import SettingsStore from "../../../settings/SettingsStore"; -import { CallState, MatrixCall } from 'matrix-js-sdk/src/webrtc/call'; +import { CallEvent, CallState, MatrixCall } from 'matrix-js-sdk/src/webrtc/call'; +import { MatrixClientPeg } from '../../../MatrixClientPeg'; const SHOW_CALL_IN_STATES = [ CallState.Connected, @@ -40,9 +41,50 @@ interface IProps { interface IState { roomId: string; - activeCall: MatrixCall; + + // The main call that we are displaying (ie. not including the call in the room being viewed, if any) + primaryCall: MatrixCall; + + // Any other call we're displaying: only if the user is on two calls and not viewing either of the rooms + // they belong to + secondaryCall: MatrixCall; } +// Splits a list of calls into one 'primary' one and a list +// (which should be a single element) of other calls. +// The primary will be the one not on hold, or an arbitrary one +// if they're all on hold) +function getPrimarySecondaryCalls(calls: MatrixCall[]): [MatrixCall, MatrixCall[]] { + let primary: MatrixCall = null; + let secondaries: MatrixCall[] = []; + + for (const call of calls) { + if (!SHOW_CALL_IN_STATES.includes(call.state)) continue; + + if (!call.isRemoteOnHold() && primary === null) { + primary = call; + } else { + secondaries.push(call); + } + } + + if (primary === null && secondaries.length > 0) { + primary = secondaries[0]; + secondaries = secondaries.slice(1); + } + + if (secondaries.length > 1) { + // We should never be in more than two calls so this shouldn't happen + console.log("Found more than 1 secondary call! Other calls will not be shown."); + } + + return [primary, secondaries]; +} + +/** + * CallPreview shows a small version of CallView hovering over the UI in 'picture-in-picture' + * (PiP mode). It displays the call(s) which is *not* in the room the user is currently viewing. + */ export default class CallPreview extends React.Component { private roomStoreToken: any; private dispatcherRef: string; @@ -51,18 +93,27 @@ export default class CallPreview extends React.Component { constructor(props: IProps) { super(props); + const roomId = RoomViewStore.getRoomId(); + + const [primaryCall, secondaryCalls] = getPrimarySecondaryCalls( + CallHandler.sharedInstance().getAllActiveCallsNotInRoom(roomId), + ); + this.state = { - roomId: RoomViewStore.getRoomId(), - activeCall: CallHandler.sharedInstance().getAnyActiveCall(), + roomId, + primaryCall: primaryCall, + secondaryCall: secondaryCalls[0], }; } public componentDidMount() { this.roomStoreToken = RoomViewStore.addListener(this.onRoomViewStoreUpdate); this.dispatcherRef = dis.register(this.onAction); + MatrixClientPeg.get().on(CallEvent.RemoteHoldUnhold, this.onCallRemoteHold); } public componentWillUnmount() { + MatrixClientPeg.get().removeListener(CallEvent.RemoteHoldUnhold, this.onCallRemoteHold); if (this.roomStoreToken) { this.roomStoreToken.remove(); } @@ -72,8 +123,16 @@ export default class CallPreview extends React.Component { private onRoomViewStoreUpdate = (payload) => { if (RoomViewStore.getRoomId() === this.state.roomId) return; + + const roomId = RoomViewStore.getRoomId(); + const [primaryCall, secondaryCalls] = getPrimarySecondaryCalls( + CallHandler.sharedInstance().getAllActiveCallsNotInRoom(roomId), + ); + this.setState({ - roomId: RoomViewStore.getRoomId(), + roomId, + primaryCall: primaryCall, + secondaryCall: secondaryCalls[0], }); }; @@ -81,38 +140,35 @@ export default class CallPreview extends React.Component { switch (payload.action) { // listen for call state changes to prod the render method, which // may hide the global CallView if the call it is tracking is dead - case 'call_state': + case 'call_state': { + const [primaryCall, secondaryCalls] = getPrimarySecondaryCalls( + CallHandler.sharedInstance().getAllActiveCallsNotInRoom(this.state.roomId), + ); + this.setState({ - activeCall: CallHandler.sharedInstance().getAnyActiveCall(), + primaryCall: primaryCall, + secondaryCall: secondaryCalls[0], }); break; + } } }; - private onCallViewClick = () => { - const call = CallHandler.sharedInstance().getAnyActiveCall(); - if (call) { - dis.dispatch({ - action: 'view_room', - room_id: call.roomId, - }); - } - }; - - public render() { - const callForRoom = CallHandler.sharedInstance().getCallForRoom(this.state.roomId); - const showCall = ( - this.state.activeCall && - SHOW_CALL_IN_STATES.includes(this.state.activeCall.state) && - !callForRoom + private onCallRemoteHold = () => { + const [primaryCall, secondaryCalls] = getPrimarySecondaryCalls( + CallHandler.sharedInstance().getAllActiveCallsNotInRoom(this.state.roomId), ); - if (showCall) { + this.setState({ + primaryCall: primaryCall, + secondaryCall: secondaryCalls[0], + }); + } + + public render() { + if (this.state.primaryCall) { return ( - + ); } diff --git a/src/components/views/voip/CallView.tsx b/src/components/views/voip/CallView.tsx index c9f5db77e6..e235b81f3c 100644 --- a/src/components/views/voip/CallView.tsx +++ b/src/components/views/voip/CallView.tsx @@ -16,7 +16,6 @@ limitations under the License. */ import React, { createRef, CSSProperties } from 'react'; -import Room from 'matrix-js-sdk/src/models/room'; import dis from '../../../dispatcher/dispatcher'; import CallHandler from '../../../CallHandler'; import {MatrixClientPeg} from '../../../MatrixClientPeg'; @@ -33,26 +32,27 @@ import CallContextMenu from '../context_menus/CallContextMenu'; import { avatarUrlForMember } from '../../../Avatar'; interface IProps { - // js-sdk room object. If set, we will only show calls for the given - // room; if not, we will show any active call. - room?: Room; + // The call for us to display + call: MatrixCall, + + // Another ongoing call to display information about + secondaryCall?: MatrixCall, // maxHeight style attribute for the video panel maxVideoHeight?: number; - // a callback which is called when the user clicks on the video div - onClick?: React.MouseEventHandler; - // a callback which is called when the content in the callview changes // in a way that is likely to cause a resize. onResize?: any; - // Whether to show the hang up icon:W - showHangup?: boolean; + // Whether this call view is for picture-in-pictue mode + // otherwise, it's the larger call view when viewing the room the call is in. + // This is sort of a proxy for a number of things but we currently have no + // need to control those things separately, so this is simpler. + pipMode?: boolean; } interface IState { - call: MatrixCall; isLocalOnHold: boolean, isRemoteOnHold: boolean, micMuted: boolean, @@ -105,19 +105,17 @@ export default class CallView extends React.Component { constructor(props: IProps) { super(props); - const call = this.getCall(); this.state = { - call, - isLocalOnHold: call ? call.isLocalOnHold() : null, - isRemoteOnHold: call ? call.isRemoteOnHold() : null, - micMuted: call ? call.isMicrophoneMuted() : null, - vidMuted: call ? call.isLocalVideoMuted() : null, - callState: call ? call.state : null, + isLocalOnHold: this.props.call.isLocalOnHold(), + isRemoteOnHold: this.props.call.isRemoteOnHold(), + micMuted: this.props.call.isMicrophoneMuted(), + vidMuted: this.props.call.isLocalVideoMuted(), + callState: this.props.call.state, controlsVisible: true, showMoreMenu: false, } - this.updateCallListeners(null, call); + this.updateCallListeners(null, this.props.call); } public componentDidMount() { @@ -126,11 +124,29 @@ export default class CallView extends React.Component { } public componentWillUnmount() { + if (getFullScreenElement()) { + exitFullscreen(); + } + document.removeEventListener("keydown", this.onNativeKeyDown); - this.updateCallListeners(this.state.call, null); + this.updateCallListeners(this.props.call, null); dis.unregister(this.dispatcherRef); } + public componentDidUpdate(prevProps) { + if (this.props.call === prevProps.call) return; + + this.setState({ + isLocalOnHold: this.props.call.isLocalOnHold(), + isRemoteOnHold: this.props.call.isRemoteOnHold(), + micMuted: this.props.call.isMicrophoneMuted(), + vidMuted: this.props.call.isLocalVideoMuted(), + callState: this.props.call.state, + }); + + this.updateCallListeners(null, this.props.call); + } + private onAction = (payload) => { switch (payload.action) { case 'video_fullscreen': { @@ -144,85 +160,41 @@ export default class CallView extends React.Component { } break; } - case 'call_state': { - const newCall = this.getCall(); - if (newCall !== this.state.call) { - this.updateCallListeners(this.state.call, newCall); - let newControlsVisible = this.state.controlsVisible; - if (newCall && !this.state.call) { - newControlsVisible = true; - if (this.controlsHideTimer !== null) { - clearTimeout(this.controlsHideTimer); - } - this.controlsHideTimer = window.setTimeout(this.onControlsHideTimer, CONTROLS_HIDE_DELAY); - } - this.setState({ - call: newCall, - isLocalOnHold: newCall ? newCall.isLocalOnHold() : null, - isRemoteOnHold: newCall ? newCall.isRemoteOnHold() : null, - micMuted: newCall ? newCall.isMicrophoneMuted() : null, - vidMuted: newCall ? newCall.isLocalVideoMuted() : null, - callState: newCall ? newCall.state : null, - controlsVisible: newControlsVisible, - }); - } else { - this.setState({ - callState: newCall ? newCall.state : null, - }); - } - if (!newCall && getFullScreenElement()) { - exitFullscreen(); - } - break; - } } }; - private getCall(): MatrixCall { - let call: MatrixCall; - - if (this.props.room) { - const roomId = this.props.room.roomId; - call = CallHandler.sharedInstance().getCallForRoom(roomId); - } else { - call = CallHandler.sharedInstance().getAnyActiveCall(); - // Ignore calls if we can't get the room associated with them. - // I think the underlying problem is that the js-sdk sends events - // for calls before it has made the rooms available in the store, - // although this isn't confirmed. - if (MatrixClientPeg.get().getRoom(call.roomId) === null) { - call = null; - } - } - - if (call && [CallState.Ended, CallState.Ringing].includes(call.state)) return null; - return call; - } - private updateCallListeners(oldCall: MatrixCall, newCall: MatrixCall) { if (oldCall === newCall) return; if (oldCall) { + oldCall.removeListener(CallEvent.State, this.onCallState); oldCall.removeListener(CallEvent.LocalHoldUnhold, this.onCallLocalHoldUnhold); oldCall.removeListener(CallEvent.RemoteHoldUnhold, this.onCallRemoteHoldUnhold); } if (newCall) { + newCall.on(CallEvent.State, this.onCallState); newCall.on(CallEvent.LocalHoldUnhold, this.onCallLocalHoldUnhold); newCall.on(CallEvent.RemoteHoldUnhold, this.onCallRemoteHoldUnhold); } } + private onCallState = (state) => { + this.setState({ + callState: state, + }); + }; + private onCallLocalHoldUnhold = () => { this.setState({ - isLocalOnHold: this.state.call ? this.state.call.isLocalOnHold() : null, + isLocalOnHold: this.props.call.isLocalOnHold(), }); }; private onCallRemoteHoldUnhold = () => { this.setState({ - isRemoteOnHold: this.state.call ? this.state.call.isRemoteOnHold() : null, + isRemoteOnHold: this.props.call.isRemoteOnHold(), // update both here because isLocalOnHold changes when we hold the call too - isLocalOnHold: this.state.call ? this.state.call.isLocalOnHold() : null, + isLocalOnHold: this.props.call.isLocalOnHold(), }); }; @@ -236,7 +208,7 @@ export default class CallView extends React.Component { private onExpandClick = () => { dis.dispatch({ action: 'view_room', - room_id: this.state.call.roomId, + room_id: this.props.call.roomId, }); }; @@ -266,20 +238,16 @@ export default class CallView extends React.Component { } private onMicMuteClick = () => { - if (!this.state.call) return; - const newVal = !this.state.micMuted; - this.state.call.setMicrophoneMuted(newVal); + this.props.call.setMicrophoneMuted(newVal); this.setState({micMuted: newVal}); } private onVidMuteClick = () => { - if (!this.state.call) return; - const newVal = !this.state.vidMuted; - this.state.call.setLocalVideoMuted(newVal); + this.props.call.setLocalVideoMuted(newVal); this.setState({vidMuted: newVal}); } @@ -338,107 +306,113 @@ export default class CallView extends React.Component { private onRoomAvatarClick = () => { dis.dispatch({ action: 'view_room', - room_id: this.state.call.roomId, + room_id: this.props.call.roomId, + }); + } + + private onSecondaryRoomAvatarClick = () => { + dis.dispatch({ + action: 'view_room', + room_id: this.props.secondaryCall.roomId, }); } private onCallResumeClick = () => { - this.state.call.setRemoteOnHold(false); + CallHandler.sharedInstance().setActiveCallRoomId(this.props.call.roomId); + } + + private onSecondaryCallResumeClick = () => { + CallHandler.sharedInstance().setActiveCallRoomId(this.props.secondaryCall.roomId); } public render() { - if (!this.state.call) return null; - const client = MatrixClientPeg.get(); - const callRoom = client.getRoom(this.state.call.roomId); + const callRoom = client.getRoom(this.props.call.roomId); let contextMenu; - let callControls; - if (this.props.room) { - if (this.state.showMoreMenu) { - contextMenu = ; - } - - const micClasses = classNames({ - mx_CallView_callControls_button: true, - mx_CallView_callControls_button_micOn: !this.state.micMuted, - mx_CallView_callControls_button_micOff: this.state.micMuted, - }); - - const vidClasses = classNames({ - mx_CallView_callControls_button: true, - mx_CallView_callControls_button_vidOn: !this.state.vidMuted, - mx_CallView_callControls_button_vidOff: this.state.vidMuted, - }); - - // Put the other states of the mic/video icons in the document to make sure they're cached - // (otherwise the icon disappears briefly when toggled) - const micCacheClasses = classNames({ - mx_CallView_callControls_button: true, - mx_CallView_callControls_button_micOn: this.state.micMuted, - mx_CallView_callControls_button_micOff: !this.state.micMuted, - mx_CallView_callControls_button_invisible: true, - }); - - const vidCacheClasses = classNames({ - mx_CallView_callControls_button: true, - mx_CallView_callControls_button_vidOn: this.state.micMuted, - mx_CallView_callControls_button_vidOff: !this.state.micMuted, - mx_CallView_callControls_button_invisible: true, - }); - - const callControlsClasses = classNames({ - mx_CallView_callControls: true, - mx_CallView_callControls_hidden: !this.state.controlsVisible, - }); - - const vidMuteButton = this.state.call.type === CallType.Video ? : null; - - // The 'more' button actions are only relevant in a connected call - // When not connected, we have to put something there to make the flexbox alignment correct - const contextMenuButton = this.state.callState === CallState.Connected ? :
; - - // in the near future, the dial pad button will go on the left. For now, it's the nothing button - // because something needs to have margin-right: auto to make the alignment correct. - callControls =
-
- - { - dis.dispatch({ - action: 'hangup', - room_id: this.state.call.roomId, - }); - }} - /> - {vidMuteButton} -
-
- {contextMenuButton} -
; + if (this.state.showMoreMenu) { + contextMenu = ; } + const micClasses = classNames({ + mx_CallView_callControls_button: true, + mx_CallView_callControls_button_micOn: !this.state.micMuted, + mx_CallView_callControls_button_micOff: this.state.micMuted, + }); + + const vidClasses = classNames({ + mx_CallView_callControls_button: true, + mx_CallView_callControls_button_vidOn: !this.state.vidMuted, + mx_CallView_callControls_button_vidOff: this.state.vidMuted, + }); + + // Put the other states of the mic/video icons in the document to make sure they're cached + // (otherwise the icon disappears briefly when toggled) + const micCacheClasses = classNames({ + mx_CallView_callControls_button: true, + mx_CallView_callControls_button_micOn: this.state.micMuted, + mx_CallView_callControls_button_micOff: !this.state.micMuted, + mx_CallView_callControls_button_invisible: true, + }); + + const vidCacheClasses = classNames({ + mx_CallView_callControls_button: true, + mx_CallView_callControls_button_vidOn: this.state.micMuted, + mx_CallView_callControls_button_vidOff: !this.state.micMuted, + mx_CallView_callControls_button_invisible: true, + }); + + const callControlsClasses = classNames({ + mx_CallView_callControls: true, + mx_CallView_callControls_hidden: !this.state.controlsVisible, + }); + + const vidMuteButton = this.props.call.type === CallType.Video ? : null; + + // The 'more' button actions are only relevant in a connected call + // When not connected, we have to put something there to make the flexbox alignment correct + const contextMenuButton = this.state.callState === CallState.Connected ? :
; + + // in the near future, the dial pad button will go on the left. For now, it's the nothing button + // because something needs to have margin-right: auto to make the alignment correct. + const callControls =
+
+ + { + dis.dispatch({ + action: 'hangup', + room_id: this.props.call.roomId, + }); + }} + /> + {vidMuteButton} +
+
+ {contextMenuButton} +
; + // The 'content' for the call, ie. the videos for a video call and profile picture // for voice calls (fills the bg) let contentView: React.ReactNode; @@ -453,11 +427,11 @@ export default class CallView extends React.Component { }); } else if (this.state.isLocalOnHold) { onHoldText = _t("%(peerName)s held the call", { - peerName: this.state.call.getOpponentMember().name, + peerName: this.props.call.getOpponentMember().name, }); } - if (this.state.call.type === CallType.Video) { + if (this.props.call.type === CallType.Video) { let onHoldContent = null; let onHoldBackground = null; const backgroundStyle: CSSProperties = {}; @@ -471,7 +445,7 @@ export default class CallView extends React.Component {
; const backgroundAvatarUrl = avatarUrlForMember( // is it worth getting the size of the div to pass here? - this.state.call.getOpponentMember(), 1024, 1024, 'crop', + this.props.call.getOpponentMember(), 1024, 1024, 'crop', ); backgroundStyle.backgroundImage = 'url(' + backgroundAvatarUrl + ')'; onHoldBackground =
; @@ -481,15 +455,15 @@ export default class CallView extends React.Component { const maxVideoHeight = getFullScreenElement() ? null : this.props.maxVideoHeight - HEADER_HEIGHT; contentView =
{onHoldBackground} - - + {onHoldContent} {callControls}
; } else { - const avatarSize = this.props.room ? 200 : 75; + const avatarSize = this.props.pipMode ? 75 : 200; const classes = classNames({ mx_CallView_voice: true, mx_CallView_voice_hold: isOnHold, @@ -507,18 +481,18 @@ export default class CallView extends React.Component {
; } - const callTypeText = this.state.call.type === CallType.Video ? _t("Video Call") : _t("Voice Call"); + const callTypeText = this.props.call.type === CallType.Video ? _t("Video Call") : _t("Voice Call"); let myClassName; let fullScreenButton; - if (this.state.call.type === CallType.Video && this.props.room) { + if (this.props.call.type === CallType.Video && !this.props.pipMode) { fullScreenButton =
; } let expandButton; - if (!this.props.room) { + if (this.props.pipMode) { expandButton =
; @@ -530,7 +504,7 @@ export default class CallView extends React.Component {
; let header: React.ReactNode; - if (this.props.room) { + if (!this.props.pipMode) { header =
{callTypeText} @@ -538,6 +512,27 @@ export default class CallView extends React.Component {
; myClassName = 'mx_CallView_large'; } else { + let secondaryCallInfo; + if (this.props.secondaryCall) { + const secCallRoom = client.getRoom(this.props.secondaryCall.roomId); + secondaryCallInfo =
+
+ + + +
+
+
{secCallRoom.name}
+ + {_t("Resume")} + +
+
; + } else { + // keeps it present but empty because it has the margin-left: auto to make the alignment correct + secondaryCallInfo =
; + } + header =
@@ -546,6 +541,7 @@ export default class CallView extends React.Component {
{callRoom.name}
{callTypeText}
+ {secondaryCallInfo} {headerControls}
; myClassName = 'mx_CallView_pip'; diff --git a/src/components/views/voip/CallViewForRoom.tsx b/src/components/views/voip/CallViewForRoom.tsx new file mode 100644 index 0000000000..4cb4e66fbe --- /dev/null +++ b/src/components/views/voip/CallViewForRoom.tsx @@ -0,0 +1,87 @@ +/* +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 { CallState, MatrixCall } from 'matrix-js-sdk/src/webrtc/call'; +import React from 'react'; +import CallHandler from '../../../CallHandler'; +import CallView from './CallView'; +import dis from '../../../dispatcher/dispatcher'; + +interface IProps { + // What room we should display the call for + roomId: string, + + // maxHeight style attribute for the video panel + maxVideoHeight?: number; + + // a callback which is called when the content in the callview changes + // in a way that is likely to cause a resize. + onResize?: any; +} + +interface IState { + call: MatrixCall, +} + +/* + * Wrapper for CallView that always display the call in a given room, + * or nothing if there is no call in that room. + */ +export default class CallViewForRoom extends React.Component { + private dispatcherRef: string; + + constructor(props: IProps) { + super(props); + this.state = { + call: this.getCall(), + }; + } + + public componentDidMount() { + this.dispatcherRef = dis.register(this.onAction); + } + + public componentWillUnmount() { + dis.unregister(this.dispatcherRef); + } + + private onAction = (payload) => { + switch (payload.action) { + case 'call_state': { + const newCall = this.getCall(); + if (newCall !== this.state.call) { + this.setState({call: newCall}); + } + break; + } + } + }; + + private getCall(): MatrixCall { + const call = CallHandler.sharedInstance().getCallForRoom(this.props.roomId); + + if (call && [CallState.Ended, CallState.Ringing].includes(call.state)) return null; + return call; + } + + public render() { + if (!this.state.call) return null; + + return ; + } +} diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index 32d6caadde..251242a9c2 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -54,10 +54,10 @@ "Permission is granted to use the webcam": "Permission is granted to use the webcam", "No other application is using the webcam": "No other application is using the webcam", "Unable to capture screen": "Unable to capture screen", - "Existing Call": "Existing Call", - "You are already in a call.": "You are already in a call.", "VoIP is unsupported": "VoIP is unsupported", "You cannot place VoIP calls in this browser.": "You cannot place VoIP calls in this browser.", + "Too Many Calls": "Too Many Calls", + "You've reached the maximum number of simultaneous calls.": "You've reached the maximum number of simultaneous calls.", "You cannot place a call with yourself.": "You cannot place a call with yourself.", "Call in Progress": "Call in Progress", "A call is currently being placed!": "A call is currently being placed!", From 482c0a2f6af4224409f7bae6d5a1e610ca52f25f Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 3 Dec 2020 17:49:22 +0000 Subject: [PATCH 173/319] 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 251242a9c2..ca7796b4d1 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -850,6 +850,7 @@ "Voice Call": "Voice Call", "Fill Screen": "Fill Screen", "Return to call": "Return to call", + "Resume": "Resume", "Unknown caller": "Unknown caller", "Incoming voice call": "Incoming voice call", "Incoming video call": "Incoming video call", @@ -2241,7 +2242,6 @@ "Warning: You should only set up key backup from a trusted computer.": "Warning: You should only set up key backup from a trusted computer.", "Access your secure message history and set up secure messaging by entering your recovery key.": "Access your secure message history and set up secure messaging by entering your recovery key.", "If you've forgotten your recovery key you can ": "If you've forgotten your recovery key you can ", - "Resume": "Resume", "Hold": "Hold", "Reject invitation": "Reject invitation", "Are you sure you want to reject the invitation?": "Are you sure you want to reject the invitation?", From a8a4d44a57356ba0ce9681ac29a50602cf9be7b5 Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 3 Dec 2020 18:24:19 +0000 Subject: [PATCH 174/319] Try different branch variable to try & get netlify to work --- scripts/fetchdep.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/fetchdep.sh b/scripts/fetchdep.sh index 0142305797..fac0912ca6 100755 --- a/scripts/fetchdep.sh +++ b/scripts/fetchdep.sh @@ -34,7 +34,7 @@ elif [[ "${#BUILDKITE_BRANCH_ARRAY[@]}" == "2" ]]; then fi # Try the target branch of the push or PR. clone $deforg $defrepo $BUILDKITE_PULL_REQUEST_BASE_BRANCH -# Try the current branch from Jenkins. -clone $deforg $defrepo `"echo $GIT_BRANCH" | sed -e 's/^origin\///'` +# Try BRANCH which is set by Netlify +clone $deforg $defrepo $BRANCH # Use the default branch as the last resort. clone $deforg $defrepo $defbranch From 1ed5fb1f300c2ec5266719632dbdf32a5751b70c Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 3 Dec 2020 18:29:23 +0000 Subject: [PATCH 175/319] Try another variable BRANCH is pull/xxxx/head so that doesn't work --- scripts/fetchdep.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/fetchdep.sh b/scripts/fetchdep.sh index fac0912ca6..7669329d47 100755 --- a/scripts/fetchdep.sh +++ b/scripts/fetchdep.sh @@ -34,7 +34,7 @@ elif [[ "${#BUILDKITE_BRANCH_ARRAY[@]}" == "2" ]]; then fi # Try the target branch of the push or PR. clone $deforg $defrepo $BUILDKITE_PULL_REQUEST_BASE_BRANCH -# Try BRANCH which is set by Netlify -clone $deforg $defrepo $BRANCH +# Try HEAD which is set by Netlify +clone $deforg $defrepo $HEAD # Use the default branch as the last resort. clone $deforg $defrepo $defbranch From c853085e2930f9761aceffa62e8643703d08a4cd Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 3 Dec 2020 18:40:33 +0000 Subject: [PATCH 176/319] Add support for Netlify to fetchdep script and remove support for Jenkins --- scripts/fetchdep.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/fetchdep.sh b/scripts/fetchdep.sh index 0142305797..850eef25ec 100755 --- a/scripts/fetchdep.sh +++ b/scripts/fetchdep.sh @@ -34,7 +34,7 @@ elif [[ "${#BUILDKITE_BRANCH_ARRAY[@]}" == "2" ]]; then fi # Try the target branch of the push or PR. clone $deforg $defrepo $BUILDKITE_PULL_REQUEST_BASE_BRANCH -# Try the current branch from Jenkins. -clone $deforg $defrepo `"echo $GIT_BRANCH" | sed -e 's/^origin\///'` +# Try HEAD which is the branch name in Netlify (not BRANCH which is pull/xxxx/head for PR builds) +clone $deforg $defrepo $HEAD # Use the default branch as the last resort. clone $deforg $defrepo $defbranch From 0b3c7e0972f8ccb32f73be4eca6baa745540ed2b Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 3 Dec 2020 19:00:57 +0000 Subject: [PATCH 177/319] revert 2 testing commits to replace with real commit from develop --- scripts/fetchdep.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/fetchdep.sh b/scripts/fetchdep.sh index 7669329d47..0142305797 100755 --- a/scripts/fetchdep.sh +++ b/scripts/fetchdep.sh @@ -34,7 +34,7 @@ elif [[ "${#BUILDKITE_BRANCH_ARRAY[@]}" == "2" ]]; then fi # Try the target branch of the push or PR. clone $deforg $defrepo $BUILDKITE_PULL_REQUEST_BASE_BRANCH -# Try HEAD which is set by Netlify -clone $deforg $defrepo $HEAD +# Try the current branch from Jenkins. +clone $deforg $defrepo `"echo $GIT_BRANCH" | sed -e 's/^origin\///'` # Use the default branch as the last resort. clone $deforg $defrepo $defbranch From c63c8540f1dda6ce1a4ffed0ba9725af2359eea5 Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Fri, 4 Dec 2020 11:05:01 +0000 Subject: [PATCH 179/319] Remove old app test script path Now that https://github.com/matrix-org/pipelines/pull/112 has merged, we no longer need to support this old path for launching app-level tests. --- scripts/ci/riot-unit-tests.sh | 1 - 1 file changed, 1 deletion(-) delete mode 120000 scripts/ci/riot-unit-tests.sh diff --git a/scripts/ci/riot-unit-tests.sh b/scripts/ci/riot-unit-tests.sh deleted file mode 120000 index 199dfb58fd..0000000000 --- a/scripts/ci/riot-unit-tests.sh +++ /dev/null @@ -1 +0,0 @@ -app-tests.sh \ No newline at end of file From 5acb81aa44237873a66ae1f59d944d7c1f3145d8 Mon Sep 17 00:00:00 2001 From: Besnik Bleta Date: Fri, 4 Dec 2020 09:56:40 +0000 Subject: [PATCH 180/319] Translated using Weblate (Albanian) Currently translated at 99.7% (2694 of 2701 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/sq/ --- src/i18n/strings/sq.json | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/sq.json b/src/i18n/strings/sq.json index 74a85031ac..6082bcf65b 100644 --- a/src/i18n/strings/sq.json +++ b/src/i18n/strings/sq.json @@ -2919,5 +2919,32 @@ "Call failed because no webcam or microphone could not be accessed. Check that:": "Thirrja dështoi, ngaqë s’u bë dot hyrje në kamerë ose mikrofon. Kontrolloni që:", "Unable to access webcam / microphone": "S’arrihet të përdoret kamerë / mikrofon", "Call failed because no microphone could not be accessed. Check that a microphone is plugged in and set up correctly.": "Thirrja dështoi, ngaqë s’u hap dot ndonjë mikrofon. Shihni që të jetë futur një mikrofon dhe ujdiseni saktë.", - "Unable to access microphone": "S’arrihet të përdoret mikrofoni" + "Unable to access microphone": "S’arrihet të përdoret mikrofoni", + "Decide where your account is hosted": "Vendosni se ku të ruhet llogaria juaj", + "Host account on": "Strehoni llogari në", + "Already have an account? Sign in here": "Keni tashmë një llogari? Bëni hyrjen këtu", + "%(ssoButtons)s Or %(usernamePassword)s": "%(ssoButtons)s Ose %(usernamePassword)s", + "Continue with %(ssoButtons)s": "Vazhdo me %(ssoButtons)s", + "That username already exists, please try another.": "Ka tashmë një emër përdoruesi të tillë, ju lutemi, provoni një tjetër.", + "New? Create account": "I ri? Krijoni llogari", + "There was a problem communicating with the homeserver, please try again later.": "Pati një problem në komunikimin me shërbyesin Home, ju lutemi, riprovoni më vonë.", + "Use email to optionally be discoverable by existing contacts.": "Përdorni email që, nëse doni, të mund t’ju gjejnë kontaktet ekzistues.", + "Use email or phone to optionally be discoverable by existing contacts.": "Përdorni email ose telefon që, nëse doni, të mund t’ju gjejnë kontaktet ekzistues.", + "Add an email to be able to reset your password.": "Shtoni një email, që të jeni në gjendje të ricaktoni fjalëkalimin tuaj.", + "Forgot password?": "Harruat fjalëkalimin?", + "That phone number doesn't look quite right, please check and try again": "Ai numër telefoni s’duket i saktë, ju lutemi, rikontrollojeni dhe riprovojeni", + "About homeservers": "Mbi shërbyesit Home", + "Learn more": "Mësoni më tepër", + "Use your preferred Matrix homeserver if you have one, or host your own.": "Përdorni shërbyesin tuaj Home të parapëlqyer Matrix, nëse keni një të tillë, ose strehoni një tuajin.", + "Other homeserver": "Tjetër shërbyes home", + "We call the places you where you can host your account ‘homeservers’.": "Vendet ku mund të strehoni llogarinë tuaj i quajmë “shërbyes Home”.", + "Sign into your homeserver": "Bëni hyrjen te shërbyesi juaj Home", + "Matrix.org is the biggest public homeserver in the world, so it’s a good place for many.": "Matrix.org është shërbyesi Home më i madh në botë, ndaj është një vend i mirë për shumë vetë.", + "Specify a homeserver": "Tregoni një shërbyes Home", + "Just a heads up, if you don't add an email and forget your password, you could permanently lose access to your account.": "Që mos thoni nuk e dinim, nëse s’shtoni një email dhe harroni fjalëkalimin tuaj, mund të humbi përgjithmonë hyrjen në llogarinë tuaj.", + "Continuing without email": "Vazhdim pa email", + "Continue with %(provider)s": "Vazhdo me %(provider)s", + "Homeserver": "Shërbyes Home", + "You can use the custom server options to sign into other Matrix servers by specifying a different homeserver URL. This allows you to use Element with an existing Matrix account on a different homeserver.": "Mund të përdorni mundësi vetjake shërbyesi që të bëni hyrjen në shërbyes të tjerë Matrix duke dhënë një tjetër URL shërbyesi Home. Kjo ju lejon të përdorni Element-in me një llogari Matrix ekzistuese në një tjetër shërbyes Home.", + "Server Options": "Mundësi Shërbyesi" } From 0f1f3d43388b8dd1de8fcac6b72b93586ba4c151 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Priit=20J=C3=B5er=C3=BC=C3=BCt?= Date: Thu, 3 Dec 2020 22:09:24 +0000 Subject: [PATCH 181/319] Translated using Weblate (Estonian) Currently translated at 100.0% (2701 of 2701 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/et/ --- src/i18n/strings/et.json | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/et.json b/src/i18n/strings/et.json index a1ecae2154..b7532bdd1b 100644 --- a/src/i18n/strings/et.json +++ b/src/i18n/strings/et.json @@ -2933,5 +2933,27 @@ "Continuing without email": "Jätka ilma e-posti aadressi seadistamiseta", "Continue with %(provider)s": "Jätka %(provider)s kasutamist", "Homeserver": "Koduserver", - "Server Options": "Serveri seadistused" + "Server Options": "Serveri seadistused", + "Host account on": "Sinu kasutajakontot teenindab", + "Decide where your account is hosted": "Vali kes võiks sinu kasutajakontot teenindada", + "Already have an account? Sign in here": "Sul juba on kasutajakonto olemas? Logi siin sisse", + "%(ssoButtons)s Or %(usernamePassword)s": "%(ssoButtons)s või %(usernamePassword)s", + "Continue with %(ssoButtons)s": "Jätkamiseks kasuta %(ssoButtons)s teenuseid", + "That username already exists, please try another.": "Selline kasutajanimi on juba olemas, palun vali midagi muud.", + "New? Create account": "Täitsa uus asi sinu jaoks? Loo omale kasutajakonto", + "There was a problem communicating with the homeserver, please try again later.": "Serveriühenduses tekkis viga. Palun proovi mõne aja pärast uuesti.", + "Use email to optionally be discoverable by existing contacts.": "Kui soovid, et teised kasutajad saaksid sind leida, siis palun lisa oma e-posti aadress.", + "Use email or phone to optionally be discoverable by existing contacts.": "Kui soovid, et teised kasutajad saaksid sind leida, siis palun lisa oma e-posti aadress või telefoninumber.", + "Add an email to be able to reset your password.": "Selleks et saaksid vajadusel oma salasõna muuta, palun lisa oma e-posti aadress.", + "Forgot password?": "Kas unustasid oma salasõna?", + "That phone number doesn't look quite right, please check and try again": "See telefoninumber ei tundu õige olema, palun kontrolli ta üle ja proovi uuesti", + "About homeservers": "Teave koduserverite kohta", + "Learn more": "Loe veel", + "Use your preferred Matrix homeserver if you have one, or host your own.": "Kui sul on oma koduserveri eelistus olemas, siis kasuta seda. Samuti võid soovi korral oma enda koduserveri püsti panna.", + "Other homeserver": "Muu koduserver", + "We call the places you where you can host your account ‘homeservers’.": "Me nimetame „koduserveriks“ sellist serverit, mis haldab sinu kasutajakontot.", + "Sign into your homeserver": "Logi sisse oma koduserverisse", + "Matrix.org is the biggest public homeserver in the world, so it’s a good place for many.": "Matrix.org on maailma suurim avalik koduserver ja see sobib paljude jaoks.", + "Specify a homeserver": "Sisesta koduserver", + "Just a heads up, if you don't add an email and forget your password, you could permanently lose access to your account.": "Lihtsalt hoiatame, et kui sa ei lisa e-posti aadressi ning unustad oma konto salasõna, siis sa võid püsivalt kaotada ligipääsu oma kontole." } From 58eaccbba823a449ec2eb5cb7736155b0ab917b4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 4 Dec 2020 17:35:40 +0000 Subject: [PATCH 182/319] Bump highlight.js from 10.1.2 to 10.4.1 Bumps [highlight.js](https://github.com/highlightjs/highlight.js) from 10.1.2 to 10.4.1. - [Release notes](https://github.com/highlightjs/highlight.js/releases) - [Changelog](https://github.com/highlightjs/highlight.js/blob/master/CHANGES.md) - [Commits](https://github.com/highlightjs/highlight.js/compare/10.1.2...10.4.1) Signed-off-by: dependabot[bot] --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index c06494d319..e33e784c93 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4842,9 +4842,9 @@ has@^1.0.1, has@^1.0.3: function-bind "^1.1.1" highlight.js@^10.1.2: - version "10.1.2" - resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-10.1.2.tgz#c20db951ba1c22c055010648dfffd7b2a968e00c" - integrity sha512-Q39v/Mn5mfBlMff9r+zzA+gWxRsCRKwEMvYTiisLr/XUiFI/4puWt0Ojdko3R3JCNWGdOWaA5g/Yxqa23kC5AA== + version "10.4.1" + resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-10.4.1.tgz#d48fbcf4a9971c4361b3f95f302747afe19dbad0" + integrity sha512-yR5lWvNz7c85OhVAEAeFhVCc/GV4C30Fjzc/rCP0aCWzc1UUOPUk55dK/qdwTZHBvMZo+eZ2jpk62ndX/xMFlg== hoist-non-react-statics@^3.3.0: version "3.3.2" From faf2922b1b5b463feaa568f46a458167fd2f05a2 Mon Sep 17 00:00:00 2001 From: David Baker Date: Fri, 4 Dec 2020 19:41:48 +0000 Subject: [PATCH 183/319] Update video element when the call changes in a videoview Because that can happen now --- src/components/views/voip/VideoFeed.tsx | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/components/views/voip/VideoFeed.tsx b/src/components/views/voip/VideoFeed.tsx index 5fb71a6d69..5210f28eb1 100644 --- a/src/components/views/voip/VideoFeed.tsx +++ b/src/components/views/voip/VideoFeed.tsx @@ -42,10 +42,12 @@ export default class VideoFeed extends React.Component { componentDidMount() { this.vid.current.addEventListener('resize', this.onResize); - if (this.props.type === VideoFeedType.Local) { - this.props.call.setLocalVideoElement(this.vid.current); - } else { - this.props.call.setRemoteVideoElement(this.vid.current); + this.setVideoElement(); + } + + componentDidUpdate(prevProps) { + if (this.props.call !== prevProps.call) { + this.setVideoElement(); } } @@ -53,6 +55,14 @@ export default class VideoFeed extends React.Component { this.vid.current.removeEventListener('resize', this.onResize); } + private setVideoElement() { + if (this.props.type === VideoFeedType.Local) { + this.props.call.setLocalVideoElement(this.vid.current); + } else { + this.props.call.setRemoteVideoElement(this.vid.current); + } + } + onResize = (e) => { if (this.props.onResize) { this.props.onResize(e); From 4c50125e9d9df001c3e8a180240dc6d91a30e4cd Mon Sep 17 00:00:00 2001 From: David Baker Date: Fri, 4 Dec 2020 20:22:01 +0000 Subject: [PATCH 184/319] Don't remove call when we call hangup as hopefully explained by comment --- src/CallHandler.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/CallHandler.tsx b/src/CallHandler.tsx index 925c638add..f443e59090 100644 --- a/src/CallHandler.tsx +++ b/src/CallHandler.tsx @@ -566,7 +566,8 @@ export default class CallHandler { } else { this.calls.get(payload.room_id).hangup(CallErrorCode.UserHangup, false); } - this.removeCallForRoom(payload.room_id); + // don't remove the call yet: let the hangup event handler do it (otherwise it will throw + // the hangup event away) break; case 'answer': { if (!this.calls.has(payload.room_id)) { From ab71547c4c3e4bbf298dc279e0b438d4b1516920 Mon Sep 17 00:00:00 2001 From: David Baker Date: Fri, 4 Dec 2020 20:36:08 +0000 Subject: [PATCH 185/319] Don't let call room names push out their containers --- res/css/views/voip/_CallView.scss | 9 +++++++++ src/components/views/voip/CallView.tsx | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/res/css/views/voip/_CallView.scss b/res/css/views/voip/_CallView.scss index 898bcf62f4..31997f6734 100644 --- a/res/css/views/voip/_CallView.scss +++ b/res/css/views/voip/_CallView.scss @@ -234,10 +234,19 @@ limitations under the License. } } +.mx_CallView_header_callInfo { + margin-right: 16px; +} + .mx_CallView_header_roomName { font-weight: bold; font-size: 12px; line-height: initial; + height: 15px; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + max-width: 116px; } .mx_CallView_header_callTypeSmall { diff --git a/src/components/views/voip/CallView.tsx b/src/components/views/voip/CallView.tsx index e235b81f3c..375b704dfb 100644 --- a/src/components/views/voip/CallView.tsx +++ b/src/components/views/voip/CallView.tsx @@ -537,7 +537,7 @@ export default class CallView extends React.Component { -
+
{callRoom.name}
{callTypeText}
From 32f7e3552cf4e5c68eea592324ac2384a560709f Mon Sep 17 00:00:00 2001 From: Aaron Raimist Date: Sat, 5 Dec 2020 21:56:10 -0600 Subject: [PATCH 186/319] Remove globally defined flex and set just for group queries Signed-off-by: Aaron Raimist --- res/css/_common.scss | 1 - res/css/structures/_SearchBox.scss | 2 +- res/css/views/rooms/_MemberList.scss | 11 ++++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/res/css/_common.scss b/res/css/_common.scss index 7ab88d6f02..87336a1c03 100644 --- a/res/css/_common.scss +++ b/res/css/_common.scss @@ -170,7 +170,6 @@ input[type=text]:focus, input[type=password]:focus, textarea:focus { border: 1px solid rgba($primary-fg-color, .1); // these things should probably not be defined globally margin: 9px; - flex: 0 0 auto; } .mx_textinput { diff --git a/res/css/structures/_SearchBox.scss b/res/css/structures/_SearchBox.scss index 6b9b2ee3aa..23ee06f7b3 100644 --- a/res/css/structures/_SearchBox.scss +++ b/res/css/structures/_SearchBox.scss @@ -15,7 +15,7 @@ limitations under the License. */ .mx_SearchBox { - flex: 1 1 0 !important; + flex: 1 1 0; min-width: 0; &.mx_SearchBox_blurred:not(:hover) { diff --git a/res/css/views/rooms/_MemberList.scss b/res/css/views/rooms/_MemberList.scss index f00907aeef..591838e473 100644 --- a/res/css/views/rooms/_MemberList.scss +++ b/res/css/views/rooms/_MemberList.scss @@ -59,17 +59,18 @@ limitations under the License. flex: 1 1 0px; } -.mx_MemberList_query, -.mx_GroupMemberList_query, -.mx_GroupRoomList_query { - flex: 1 1 0; - +.mx_MemberList_query { // stricter rule to override the one in _common.scss &[type="text"] { font-size: $font-12px; } } +.mx_GroupMemberList_query, +.mx_GroupRoomList_query { + flex: 0 0 auto; +} + .mx_MemberList_query { height: 16px; } From a85648413932281b830a71d3382cc9cb89732cfe Mon Sep 17 00:00:00 2001 From: Lukas Date: Sun, 6 Dec 2020 10:32:52 +0100 Subject: [PATCH 187/319] Fix typos in some strings This commit fixes some typos that I've stumbled upon. --- src/CallHandler.tsx | 4 ++-- src/components/views/dialogs/ServerPickerDialog.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/CallHandler.tsx b/src/CallHandler.tsx index b5f696008d..2c30c51041 100644 --- a/src/CallHandler.tsx +++ b/src/CallHandler.tsx @@ -393,14 +393,14 @@ export default class CallHandler { title = _t("Unable to access microphone"); description =
{_t( - "Call failed because no microphone could not be accessed. " + + "Call failed because microphone could not be accessed. " + "Check that a microphone is plugged in and set up correctly.", )}
; } else if (call.type === CallType.Video) { title = _t("Unable to access webcam / microphone"); description =
- {_t("Call failed because no webcam or microphone could not be accessed. Check that:")} + {_t("Call failed because webcam or microphone could not be accessed. Check that:")}
  • {_t("A microphone and webcam are plugged in and set up correctly")}
  • {_t("Permission is granted to use the webcam")}
  • diff --git a/src/components/views/dialogs/ServerPickerDialog.tsx b/src/components/views/dialogs/ServerPickerDialog.tsx index 9eb819c98e..f528872587 100644 --- a/src/components/views/dialogs/ServerPickerDialog.tsx +++ b/src/components/views/dialogs/ServerPickerDialog.tsx @@ -153,7 +153,7 @@ export default class ServerPickerDialog extends React.PureComponent

    - {_t("We call the places you where you can host your account ‘homeservers’.")} {text} + {_t("We call the places where you can host your account ‘homeservers’.")} {text}

    Date: Sun, 6 Dec 2020 23:29:11 +1300 Subject: [PATCH 188/319] extract alias handling to separate function --- src/components/views/dialogs/ShareDialog.tsx | 2 +- src/utils/permalinks/Permalinks.js | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/components/views/dialogs/ShareDialog.tsx b/src/components/views/dialogs/ShareDialog.tsx index 1569977d58..5264031cc6 100644 --- a/src/components/views/dialogs/ShareDialog.tsx +++ b/src/components/views/dialogs/ShareDialog.tsx @@ -146,7 +146,7 @@ export default class ShareDialog extends React.PureComponent { const events = this.props.target.getLiveTimeline().getEvents(); matrixToUrl = this.state.permalinkCreator.forEvent(events[events.length - 1].getId()); } else { - matrixToUrl = this.state.permalinkCreator.forRoom(); + matrixToUrl = this.state.permalinkCreator.forShareableRoom(); } } else if (this.props.target instanceof User || this.props.target instanceof RoomMember) { matrixToUrl = makeUserPermalink(this.props.target.userId); diff --git a/src/utils/permalinks/Permalinks.js b/src/utils/permalinks/Permalinks.js index 2c38a982d3..39c5776852 100644 --- a/src/utils/permalinks/Permalinks.js +++ b/src/utils/permalinks/Permalinks.js @@ -129,7 +129,7 @@ export class RoomPermalinkCreator { return getPermalinkConstructor().forEvent(this._roomId, eventId, this._serverCandidates); } - forRoom() { + forShareableRoom() { if (this._room) { // Prefer to use canonical alias for permalink if possible const alias = this._room.getCanonicalAlias(); @@ -140,6 +140,10 @@ export class RoomPermalinkCreator { return getPermalinkConstructor().forRoom(this._roomId, this._serverCandidates); } + forRoom() { + return getPermalinkConstructor().forRoom(this._roomId, this._serverCandidates); + } + onRoomState(event) { switch (event.getType()) { case "m.room.server_acl": From de7f2ab2e0e2292dcf90c0106554041c25c8516f Mon Sep 17 00:00:00 2001 From: schwukas Date: Sun, 6 Dec 2020 08:42:08 +0000 Subject: [PATCH 189/319] Translated using Weblate (German) Currently translated at 99.9% (2701 of 2702 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/de/ --- src/i18n/strings/de_DE.json | 43 ++++++++++++++++++++++++++++++++++--- 1 file changed, 40 insertions(+), 3 deletions(-) diff --git a/src/i18n/strings/de_DE.json b/src/i18n/strings/de_DE.json index 5d5ca50fc9..8588ccb7d6 100644 --- a/src/i18n/strings/de_DE.json +++ b/src/i18n/strings/de_DE.json @@ -604,9 +604,9 @@ "Flair": "Abzeichen", "Showing flair for these communities:": "Abzeichen für diese Communities zeigen:", "This room is not showing flair for any communities": "Dieser Raum zeigt für keine Communities die Abzeichen an", - "Something went wrong when trying to get your communities.": "Beim Laden deiner Communites ist etwas schief gelaufen.", + "Something went wrong when trying to get your communities.": "Beim Laden deiner Communities ist etwas schief gelaufen.", "Display your community flair in rooms configured to show it.": "Zeige deinen Community-Flair in den Räumen, die es erlauben.", - "This homeserver doesn't offer any login flows which are supported by this client.": "Dieser Heimserver verfügt über keinen, von diesem Client unterstütztes Anmeldeverfahren.", + "This homeserver doesn't offer any login flows which are supported by this client.": "Dieser Heimserver verfügt über kein von diesem Client unterstütztes Anmeldeverfahren.", "Call Failed": "Anruf fehlgeschlagen", "Send": "Senden", "collapse": "Verbergen", @@ -2913,5 +2913,42 @@ "Åland Islands": "Äland-Inseln", "Afghanistan": "Afghanistan", "United States": "Vereinigte Staaten", - "United Kingdom": "Großbritannien" + "United Kingdom": "Großbritannien", + "We call the places you where you can host your account ‘homeservers’.": "Orte, an denen du dein Benutzerkonto hosten kannst, nennen wir \"Homeserver\".", + "Specify a homeserver": "Gib einen Homeserver an", + "Render LaTeX maths in messages": "Zeige LaTeX-Matheformeln in Nachrichten an", + "Decide where your account is hosted": "Gib an wo dein Benutzerkonto gehostet werden soll", + "Already have an account? Sign in here": "Hast du schon ein Benutzerkonto? Melde dich hier an", + "%(ssoButtons)s Or %(usernamePassword)s": "%(ssoButtons)s oder %(usernamePassword)s", + "Continue with %(ssoButtons)s": "Mit %(ssoButtons)s fortfahren", + "That username already exists, please try another.": "Dieser Benutzername existiert schon. Bitte versuche es mit einem anderen.", + "New? Create account": "Neu? Erstelle ein Benutzerkonto", + "There was a problem communicating with the homeserver, please try again later.": "Es gab ein Problem bei der Kommunikation mit dem Homseserver. Bitte versuche es später erneut.", + "New here? Create an account": "Neu hier? Erstelle ein Benutzerkonto", + "Got an account? Sign in": "Hast du schon ein Benutzerkonto? Melde dich an", + "Use email to optionally be discoverable by existing contacts.": "Nutze optional eine E-Mail-Adresse, um von Nutzern gefunden werden zu können.", + "Use email or phone to optionally be discoverable by existing contacts.": "Nutze optional eine E-Mail-Adresse oder Telefonnummer, um von Nutzern gefunden werden zu können.", + "Add an email to be able to reset your password.": "Füge eine E-Mail-Adresse hinzu, um dein Passwort zurücksetzen zu können.", + "Forgot password?": "Passwort vergessen?", + "That phone number doesn't look quite right, please check and try again": "Diese Telefonummer sieht nicht ganz richtig aus. Bitte überprüfe deine Eingabe und versuche es erneut", + "About homeservers": "Über Homeserver", + "Learn more": "Mehr dazu", + "Use your preferred Matrix homeserver if you have one, or host your own.": "Verwende einen Matrix-Homeserver deiner Wahl oder hoste deinen eigenen.", + "Other homeserver": "Anderer Homeserver", + "Sign into your homeserver": "Melde dich bei deinem Homeserver an", + "Matrix.org is the biggest public homeserver in the world, so it’s a good place for many.": "Matrix.org ist der größte öffentliche Homeserver der Welt und daher ein guter Ort für viele.", + "Just a heads up, if you don't add an email and forget your password, you could permanently lose access to your account.": "Aufgepasst: Wenn du keine E-Mail-Adresse angibst und dein Passwort vergisst, kannst du den Zugriff auf deinen Account dauerhaft verlieren.", + "Continuing without email": "Ohne E-Mail fortfahren", + "Reason (optional)": "Grund (optional)", + "Continue with %(provider)s": "Mit %(provider)s fortfahren", + "Homeserver": "Heimserver", + "You can use the custom server options to sign into other Matrix servers by specifying a different homeserver URL. This allows you to use Element with an existing Matrix account on a different homeserver.": "Du kannst in den benutzerdefinierten Serveroptionen eine andere Heimserver-URL angeben, um dich bei anderen Matrixservern anzumelden.", + "Server Options": "Servereinstellungen", + "No other application is using the webcam": "Keine andere Anwendung auf die Webcam zugreift", + "Permission is granted to use the webcam": "Auf die Webcam zugegriffen werden darf", + "A microphone and webcam are plugged in and set up correctly": "Mikrofon und Webcam eingesteckt und richtig eingerichtet sind", + "Call failed because no microphone could not be accessed. Check that a microphone is plugged in and set up correctly.": "Der Anruf ist fehlgeschlagen weil nicht auf das Mikrofon zugegriffen werden konnte. Stelle sicher, dass das Mikrofon richtig eingesteckt und eingerichtet ist.", + "Call failed because no webcam or microphone could not be accessed. Check that:": "Der Anruf ist fehlgeschlagen weil nicht auf das Mikrofon oder die Webcam zugegriffen werden konnte. Stelle sicher, dass:", + "Unable to access webcam / microphone": "Auf Webcam / Mikrofon konnte nicht zugegriffen werden", + "Unable to access microphone": "Es konnte nicht auf das Mikrofon zugegriffen werden" } From 88cd776926f218689969bc5150da5d0659d7d509 Mon Sep 17 00:00:00 2001 From: Marcelo Filho Date: Sat, 5 Dec 2020 20:40:02 +0000 Subject: [PATCH 190/319] Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (2702 of 2702 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/pt_BR/ --- src/i18n/strings/pt_BR.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/pt_BR.json b/src/i18n/strings/pt_BR.json index fd8ef04b22..55f35e638e 100644 --- a/src/i18n/strings/pt_BR.json +++ b/src/i18n/strings/pt_BR.json @@ -2886,5 +2886,6 @@ "Continue with %(provider)s": "Continuar com %(provider)s", "Homeserver": "Servidor local", "You can use the custom server options to sign into other Matrix servers by specifying a different homeserver URL. This allows you to use Element with an existing Matrix account on a different homeserver.": "Você pode usar as opções personalizadas de servidor para entrar em outros servidores Matrix, especificando um URL de servidor local diferente. Isso permite que você use o Element com uma conta Matrix em um servidor local diferente.", - "Server Options": "Opções do servidor" + "Server Options": "Opções do servidor", + "Reason (optional)": "Motivo (opcional)" } From 1d1cef97b254d37e38f4679aeb52af0b6878ab72 Mon Sep 17 00:00:00 2001 From: LinAGKar Date: Mon, 7 Dec 2020 07:49:29 +0000 Subject: [PATCH 191/319] Translated using Weblate (Swedish) Currently translated at 98.6% (2666 of 2702 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/sv/ --- src/i18n/strings/sv.json | 50 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 46 insertions(+), 4 deletions(-) diff --git a/src/i18n/strings/sv.json b/src/i18n/strings/sv.json index 4cdf1faffe..9a42a046cd 100644 --- a/src/i18n/strings/sv.json +++ b/src/i18n/strings/sv.json @@ -87,7 +87,7 @@ "Failed to set display name": "Misslyckades att ange visningsnamn", "Failed to unban": "Misslyckades att avbanna", "Failed to verify email address: make sure you clicked the link in the email": "Misslyckades att bekräfta e-postadressen: set till att du klickade på länken i e-postmeddelandet", - "Favourite": "Favorit", + "Favourite": "Favoritmarkera", "Accept": "Godkänn", "Access Token:": "Åtkomsttoken:", "Active call (%(roomName)s)": "Aktiv samtal (%(roomName)s)", @@ -2506,7 +2506,7 @@ "Brazil": "Brasilien", "Bouvet Island": "Bouvetön", "Botswana": "Botswana", - "Bosnia": "Bosnien", + "Bosnia": "Bosnien och Hercegovina", "Bolivia": "Bolivia", "Bhutan": "Bhutan", "Bermuda": "Bermuda", @@ -2601,7 +2601,7 @@ "Syria": "Syrien", "Switzerland": "Schweiz", "Sweden": "Sverige", - "Swaziland": "Swaziland", + "Swaziland": "Eswatini", "Svalbard & Jan Mayen": "Svalbard och Jan Mayen", "Suriname": "Surinam", "Sudan": "Sudan", @@ -2810,5 +2810,47 @@ "See when a sticker is posted in this room": "Se när en dekal skickas i det här rummet", "See when anyone posts a sticker to your active room": "Se när någon skickar en dekal till ditt aktiva rum", "Send stickers to your active room as you": "Skicka dekaler till ditt aktiva rum som dig", - "Send stickers to this room as you": "Skicka dekaler till det här rummet som dig" + "Send stickers to this room as you": "Skicka dekaler till det här rummet som dig", + "Reason (optional)": "Orsak (valfritt)", + "Continue with %(provider)s": "Fortsätt med %(provider)s", + "Homeserver": "Hemserver", + "You can use the custom server options to sign into other Matrix servers by specifying a different homeserver URL. This allows you to use Element with an existing Matrix account on a different homeserver.": "Du kan använda anpassade serveralternativ för att logga in på andra Matrixservrar genom att specificera en annan hemserver-URL. Detta låter dig använda Element med ett existerande Matrix-konto på en annan hemserver.", + "Server Options": "Serveralternativ", + "Start a new chat": "Starta en ny chatt", + "Securely cache encrypted messages locally for them to appear in search results, using %(size)s to store messages from %(rooms)s rooms.|one": "Cacha på ett säkert sätt krypterade meddelanden lokalt för att de ska visas i sökresultat, och använd %(size)s för att lagra meddelanden från %(rooms)s rum.", + "Securely cache encrypted messages locally for them to appear in search results, using %(size)s to store messages from %(rooms)s rooms.|other": "Cacha på ett säkert sätt krypterade meddelanden lokalt för att de ska visas i sökresultat, och använd %(size)s för att lagra meddelanden från %(rooms)s rum.", + "Return to call": "Återgå till samtal", + "Fill Screen": "Fyll skärmen", + "Voice Call": "Röstsamtal", + "Video Call": "Videosamtal", + "Use Ctrl + Enter to send a message": "Använd Ctrl + Enter för att skicka ett meddelande", + "Use Command + Enter to send a message": "Använd Kommando + Enter för att skicka ett meddelande", + "Render LaTeX maths in messages": "Rendera LaTeX-matte i meddelanden", + "No other application is using the webcam": "Inget annat program använder webbkameran", + "Permission is granted to use the webcam": "Åtkomst till webbkameran har beviljats", + "A microphone and webcam are plugged in and set up correctly": "En webbkamera och en mikrofon är inkopplad och korrekt inställd", + "Call failed because no webcam or microphone could not be accessed. Check that:": "Samtal misslyckades eftersom ingen webbkamera eller mikrofon kunde kommas åt. Kolla att:", + "Unable to access webcam / microphone": "Kan inte komma åt webbkamera eller mikrofon", + "Call failed because no microphone could not be accessed. Check that a microphone is plugged in and set up correctly.": "Samtal misslyckades eftersom ingen mikrofon kunde kommas åt. Kolla att en mikrofon är inkopplad och korrekt inställd.", + "Unable to access microphone": "Kan inte komma åt mikrofonen", + "See %(msgtype)s messages posted to your active room": "Se %(msgtype)s-meddelanden som skickas i ditt aktiva rum", + "See %(msgtype)s messages posted to this room": "Se %(msgtype)s-meddelanden som skickas i det här rummet", + "Send %(msgtype)s messages as you in your active room": "Skicka %(msgtype)s-meddelanden som dig i ditt aktiva rum", + "Send %(msgtype)s messages as you in this room": "Skicka %(msgtype)s-meddelanden som dig i det här rummet", + "See general files posted to your active room": "Se generella filer som skickas i ditt aktiva rum", + "See general files posted to this room": "Se generella filer som skickas i det här rummet", + "Send general files as you in your active room": "Skicka generella filer som dig i ditt aktiva rum", + "Send general files as you in this room": "Skicka generella filer som dig i det här rummet", + "See videos posted to your active room": "Se videor som skickas i ditt aktiva rum", + "See videos posted to this room": "Se videor som skickas i det här rummet", + "Send videos as you in your active room": "Skicka videor som dig i ditt aktiva rum", + "Send videos as you in this room": "Skicka videor som dig i det här rummet", + "See images posted to your active room": "Se bilder som skickas i ditt aktiva rum", + "See images posted to this room": "Se bilder som skickas i det här rummet", + "Send images as you in your active room": "Skicka bilder som dig i ditt aktiva rum", + "Send images as you in this room": "Skicka bilder som dig i det här rummet", + "See emotes posted to your active room": "Se emotes som skickas i ditt aktiva rum", + "See emotes posted to this room": "Se emotes som skickas i det här rummet", + "Send emotes as you in your active room": "Skicka emotes som dig i ditt aktiva rum", + "Send emotes as you in this room": "Skicka emotes som dig i det här rummet" } From df3fd6baa98851b4f1d9f6fbea38197eeaaa73d5 Mon Sep 17 00:00:00 2001 From: Jeff Huang Date: Sun, 6 Dec 2020 11:56:17 +0000 Subject: [PATCH 192/319] Translated using Weblate (Chinese (Traditional)) Currently translated at 100.0% (2702 of 2702 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/zh_Hant/ --- src/i18n/strings/zh_Hant.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/zh_Hant.json b/src/i18n/strings/zh_Hant.json index 8d7d44d61a..ffb82d05a2 100644 --- a/src/i18n/strings/zh_Hant.json +++ b/src/i18n/strings/zh_Hant.json @@ -2957,5 +2957,6 @@ "Continue with %(provider)s": "使用 %(provider)s 繼續", "Homeserver": "家伺服器", "You can use the custom server options to sign into other Matrix servers by specifying a different homeserver URL. This allows you to use Element with an existing Matrix account on a different homeserver.": "您可以透過指定不同的家伺服器 URL 使用自訂伺服器選項來登入其他 Matrix 伺服器。這讓您可以使用在不同家伺服器上的既有 Matrix 帳號。", - "Server Options": "伺服器選項" + "Server Options": "伺服器選項", + "Reason (optional)": "理由(選擇性)" } From ed10693feda2a921287eb3276cb2257269341fb9 Mon Sep 17 00:00:00 2001 From: strix aluco Date: Mon, 7 Dec 2020 04:42:26 +0000 Subject: [PATCH 193/319] Translated using Weblate (Ukrainian) Currently translated at 53.3% (1442 of 2702 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/uk/ --- src/i18n/strings/uk.json | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/i18n/strings/uk.json b/src/i18n/strings/uk.json index eaf8fdbe88..ad3bf634e2 100644 --- a/src/i18n/strings/uk.json +++ b/src/i18n/strings/uk.json @@ -124,7 +124,7 @@ "Explore Room State": "Перегляд статуса кімнати", "Source URL": "Джерельне посилання", "Messages sent by bot": "Повідомлення, надіслані ботом", - "Filter results": "Відцідити результати", + "Filter results": "Відфільтрувати результати", "Members": "Учасники", "No update available.": "Оновлення відсутні.", "Resend": "Перенадіслати", @@ -794,7 +794,7 @@ "%(senderName)s: %(reaction)s": "%(senderName)s: %(reaction)s", "%(senderName)s: %(stickerName)s": "%(senderName)s: %(stickerName)s", "Custom user status messages": "користувацький статус", - "Group & filter rooms by custom tags (refresh to apply changes)": "Групувати та проціджувати кімнати за нетиповими наличками (оновіть щоб застосувати зміни)", + "Group & filter rooms by custom tags (refresh to apply changes)": "Групувати та фільтрувати кімнати за нетиповими наличками (оновіть, щоб застосувати зміни)", "Multiple integration managers": "Декілька менджерів інтеграції", "Try out new ways to ignore people (experimental)": "Спробуйте нові способи ігнорувати людей (експериментальні)", "Support adding custom themes": "Підтримка користувацьких тем", @@ -1017,7 +1017,7 @@ "Unable to revoke sharing for email address": "Не вдалось відкликати оприлюднювання адреси е-пошти", "Revoke": "Відкликати", "Unable to revoke sharing for phone number": "Не вдалось відкликати оприлюднювання телефонного номеру", - "Filter room members": "Відцідити учасників кімнати", + "Filter room members": "Відфільтрувати учасників кімнати", "Voice call": "Голосовий виклик", "Video call": "Відеовиклик", "Not now": "Не зараз", @@ -1186,7 +1186,7 @@ "%(senderName)s changed a rule that was banning rooms matching %(oldGlob)s to matching %(newGlob)s for %(reason)s": "%(senderName)s змінив(-ла) правило блокування кімнат зі збігу з %(oldGlob)s на збіг з %(newGlob)s через %(reason)s", "%(senderName)s changed a rule that was banning servers matching %(oldGlob)s to matching %(newGlob)s for %(reason)s": "%(senderName)s змінив(-ла) правило блокування серверів зі збігу з %(oldGlob)s на збіг з %(newGlob)s через %(reason)s", "%(senderName)s updated a ban rule that was matching %(oldGlob)s to matching %(newGlob)s for %(reason)s": "%(senderName)s змінив(-ла) правило блокування зі збігу з %(oldGlob)s на збіг з %(newGlob)s через %(reason)s", - "Enable Community Filter Panel": "Увімкнути панель спільнот", + "Enable Community Filter Panel": "Увімкнути фільтр панелі спільнот", "Messages containing my username": "Повідомлення, що містять моє користувацьке ім'я", "Messages containing @room": "Повідомлення, що містять @room", "When rooms are upgraded": "Коли кімнати поліпшено", @@ -1204,8 +1204,8 @@ "You have ignored this user, so their message is hidden. Show anyways.": "Ви ігноруєте цього користувача, тож його повідомлення приховано. Все одно показати.", "Show all": "Показати все", "Add an Integration": "Додати інтеграцію", - "Filter community members": "Відцідити учасників спільноти", - "Filter community rooms": "Відцідити кімнати спільноти", + "Filter community members": "Відфільтрувати учасників спільноти", + "Filter community rooms": "Відфільтрувати кімнати спільноти", "Display your community flair in rooms configured to show it.": "Відбивати ваш спільнотний значок у кімнатах, що налаштовані показувати його.", "Using this widget may share data with %(widgetDomain)s & your Integration Manager.": "Користування цим знадобом може призвести до поширення ваших даних з %(widgetDomain)s та вашим менеджером інтеграцій.", "Show advanced": "Показати розширені", @@ -1219,13 +1219,13 @@ "Did you know: you can use communities to filter your %(brand)s experience!": "Чи знаєте ви, що спільноти можна використовувати для припасування %(brand)s під ваші потреби?", "Communities": "Спільноти", "Create a new community": "Створити нову спільноту", - "Clear filter": "Очистити цідило", + "Clear filter": "Очистити фільтр", "Syncing...": "Синхронізування…", "Signing In...": "Входження…", "If you've joined lots of rooms, this might take a while": "Якщо ви приєднались до багатьох кімнат, це може зайняти деякий час", "Create account": "Створити обліковий запис", "Failed to fetch avatar URL": "Не вдалось вибрати URL личини", - "Clear room list filter field": "Очистити поле цідила списку кімнат", + "Clear room list filter field": "Очистити поле фільтра списку кімнат", "Cancel autocomplete": "Скасувати самодоповнення", "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.": "Журнали зневадження містять дані використання застосунку, включно з вашим користувацьким ім’ям, ідентифікаторами або псевдонімами відвіданих вами кімнат або груп, а також іменами інших користувачів. Вони не містять повідомлень.", "Confirm your account deactivation by using Single Sign On to prove your identity.": "Підтвердьте знедіяння вашого облікового запису через Single Sign On щоб підтвердити вашу особу.", @@ -1523,5 +1523,6 @@ "Finland": "Фінляндія", "Fiji": "Фіджі", "Faroe Islands": "Фарерські Острови", - "Unable to access microphone": "Неможливо доступитись до мікрофона" + "Unable to access microphone": "Неможливо доступитись до мікрофона", + "Filter rooms and people": "Відфільтрувати кімнати та людей" } From c491ac6e29d44b9ad37135cb42c1794e13c20240 Mon Sep 17 00:00:00 2001 From: Kaede Date: Sun, 6 Dec 2020 16:37:52 +0000 Subject: [PATCH 194/319] Translated using Weblate (Japanese) Currently translated at 50.0% (1352 of 2702 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/ja/ --- src/i18n/strings/ja.json | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/i18n/strings/ja.json b/src/i18n/strings/ja.json index 4ab5bc0de2..1b107e0da4 100644 --- a/src/i18n/strings/ja.json +++ b/src/i18n/strings/ja.json @@ -1007,7 +1007,7 @@ "Block users on other matrix homeservers from joining this room (This setting cannot be changed later!)": "他の Matrix ホームサーバーからの参加を禁止する (この設定はあとから変更できません!)", "Room Settings - %(roomName)s": "部屋の設定 - %(roomName)s", "Explore": "探索", - "Filter": "フィルター", + "Filter": "検索", "Find a room… (e.g. %(exampleRoom)s)": "部屋を探す… (例: %(exampleRoom)s)", "If you can't find the room you're looking for, ask for an invite or Create a new room.": "もしお探しの部屋が見つからない場合、招待してもらうか部屋を作成しましょう。", "Enable room encryption": "部屋の暗号化を有効化", @@ -1466,5 +1466,16 @@ "Recently Direct Messaged": "最近ダイレクトメッセージで会話したユーザー", "Invite someone using their name, username (like ) or share this room.": "この部屋に誰かを招待したい場合は、招待したいユーザーの名前、( の様な)ユーザー名、またはメールアドレスを指定するか、この部屋を共有してください。", "Invite someone using their name, email address, username (like ) or share this room.": "この部屋に誰かを招待したい場合は、招待したいユーザーの名前、メールアドレス、または( の様な)ユーザー名を指定するか、この部屋を共有してください。", - "Upgrade your encryption": "暗号化をアップグレード" + "Upgrade your encryption": "暗号化をアップグレード", + "Role": "役割", + "Send a reply…": "返信を送信する…", + "Send a message…": "メッセージを送信する…", + "This is the beginning of your direct message history with .": "ここがあなたと のダイレクトメッセージの履歴の先頭です。", + "This is the start of .": "ここが の先頭です。", + "Add a topic to help people know what it is about.": "トピックを追加すると参加者がこの部屋の目的を理解しやすくなります。", + "Topic: %(topic)s (edit)": "トピック: %(topic)s (編集)", + "Topic: %(topic)s ": "トピック: %(topic)s ", + "%(displayName)s created this room.": "%(displayName)s がこの部屋を作成しました。", + "You created this room.": "あなたがこの部屋を作成しました。", + "%(creator)s created this DM.": "%(creator)s がこの DM を作成しました。" } From 5cee82f9d5f7cf6afdfe39b79f6e7d29195477d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stanislav=20Luke=C5=A1?= Date: Sun, 6 Dec 2020 21:11:37 +0000 Subject: [PATCH 195/319] Translated using Weblate (Czech) Currently translated at 77.1% (2084 of 2702 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/cs/ --- src/i18n/strings/cs.json | 43 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/cs.json b/src/i18n/strings/cs.json index 4d9d27363f..e3c19b2676 100644 --- a/src/i18n/strings/cs.json +++ b/src/i18n/strings/cs.json @@ -2213,5 +2213,46 @@ "Upload completed": "Nahrávání dokončeno", "Cancelled signature upload": "Nahrávání podpisu zrušeno", "Unable to upload": "Nelze nahrát", - "Server isn't responding": "Server neodpovídá" + "Server isn't responding": "Server neodpovídá", + "End": "End", + "Space": "Mezerník", + "Enter": "Enter", + "Esc": "Esc", + "Page Down": "Page Down", + "Page Up": "Page Up", + "Cancel autocomplete": "Zrušit automatické doplňování", + "Move autocomplete selection up/down": "Posun nahoru/dolu v automatickém doplňování", + "Toggle this dialog": "Zobrazit/skrýt tento dialog", + "Activate selected button": "Aktivovat označené tlačítko", + "Close dialog or context menu": "Zavřít dialog nebo kontextové menu", + "Toggle the top left menu": "Zobrazit/skrýt menu vlevo nahoře", + "Scroll up/down in the timeline": "Posunous se nahoru/dolů v historii", + "Clear room list filter field": "Smazat filtr místností", + "Expand room list section": "Rozbalit seznam místností", + "Collapse room list section": "Sbalit seznam místností", + "Select room from the room list": "Vybrat místnost v seznamu", + "Navigate up/down in the room list": "Posouvat se nahoru/dolů v seznamu místností", + "Jump to room search": "Filtrovat místnosti", + "Toggle video on/off": "Zapnout nebo vypnout video", + "Toggle microphone mute": "Ztlumit nebo zapnout mikrofon", + "Jump to start/end of the composer": "Skočit na konec/začátek textového pole", + "New line": "Nový řádek", + "Toggle Quote": "Citace", + "Toggle Italics": "Kurzíva", + "Toggle Bold": "Tučné písmo", + "Ctrl": "Ctrl", + "Shift": "Shift", + "Alt Gr": "Alt Gr", + "Autocomplete": "Automatické doplňování", + "Room List": "Seznam místností", + "Calls": "Hovory", + "To set up a filter, drag a community avatar over to the filter panel on the far left hand side of the screen. You can click on an avatar in the filter panel at any time to see only the rooms and people associated with that community.": "Pro nastavení filtru přetáhněte avatar skupiny do panelu filtrování na levé straně obrazovky. Pak v tomto panelu můžete kdykoliv klepnout na avatar skupiny a uvidíte jen místnosti a lidi z dané skupiny.", + "Send feedback": "Odeslat zpětnou vazbu", + "Feedback": "Zpětná vazba", + "Feedback sent": "Zpětná vazba byla odeslána", + "Security & privacy": "Zabezpečení", + "All settings": "Nastavení", + "Start a conversation with someone using their name, email address or username (like ).": "Napište jméno nebo emailovou adresu uživatele se kterým chcete začít konverzaci (např. ).", + "Start a new chat": "Založit nový chat", + "Which officially provided instance you are using, if any": "Kterou oficiální instanci Riot.im používáte (a jestli vůbec)" } From fdeeb26cbe124b20deabd4055787f69c20316ece Mon Sep 17 00:00:00 2001 From: waclaw66 Date: Sun, 6 Dec 2020 21:03:16 +0000 Subject: [PATCH 196/319] Translated using Weblate (Czech) Currently translated at 77.1% (2084 of 2702 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/cs/ --- src/i18n/strings/cs.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/i18n/strings/cs.json b/src/i18n/strings/cs.json index e3c19b2676..123b1f4327 100644 --- a/src/i18n/strings/cs.json +++ b/src/i18n/strings/cs.json @@ -131,14 +131,14 @@ "Failed to send request.": "Odeslání žádosti se nezdařilo.", "Failed to set display name": "Nepodařilo se nastavit zobrazované jméno", "Failed to unban": "Přijetí zpět se nezdařilo", - "Failed to upload profile picture!": "Nahrání profilového obrázku se nezdařilo", + "Failed to upload profile picture!": "Nahrání profilového obrázku se nezdařilo!", "Failure to create room": "Vytvoření místnosti se nezdařilo", "Forget room": "Zapomenout místnost", "For security, this session has been signed out. Please sign in again.": "Z bezpečnostních důvodů bylo toto přihlášení ukončeno. Přihlašte se prosím znovu.", "and %(count)s others...|other": "a %(count)s další...", "%(widgetName)s widget modified by %(senderName)s": "Uživatel %(senderName)s upravil widget %(widgetName)s", "%(widgetName)s widget removed by %(senderName)s": "Uživatel %(senderName)s odstranil widget %(widgetName)s", - "%(widgetName)s widget added by %(senderName)s": "Uživatel %(senderName)s přidal widget %(widgetName)s", + "%(widgetName)s widget added by %(senderName)s": "Uživatel %(senderName)s přidal widget %(widgetName)s", "Automatically replace plain text Emoji": "Automaticky nahrazovat textové emoji", "Failed to upload image": "Obrázek se nepodařilo nahrát", "%(senderName)s answered the call.": "Uživatel %(senderName)s přijal hovor.", @@ -438,7 +438,7 @@ "URL previews are enabled by default for participants in this room.": "Ve výchozím nastavení jsou náhledy URL adres povolené pro členy této místnosti.", "URL previews are disabled by default for participants in this room.": "Ve výchozím nastavení jsou náhledy URL adres zakázané pro členy této místnosti.", "Invalid file%(extra)s": "Neplatný soubor%(extra)s", - "You are about to be taken to a third-party site so you can authenticate your account for use with %(integrationsUrl)s. Do you wish to continue?": "Budete přesměrováni na stránku třetí strany k ověření svého účtu pro používání s %(integrationsUrl)s. Chcete pokračovat?", + "You are about to be taken to a third-party site so you can authenticate your account for use with %(integrationsUrl)s. Do you wish to continue?": "Budete přesměrováni na stránku třetí strany k ověření svého účtu pro používání s %(integrationsUrl)s. Chcete pokračovat?", "Please check your email to continue registration.": "Pro pokračování v registraci prosím zkontrolujte své e-maily.", "Token incorrect": "Neplatný token", "A text message has been sent to %(msisdn)s": "Na číslo %(msisdn)s byla odeslána textová zpráva", @@ -557,7 +557,7 @@ "Failed to add the following users to the summary of %(groupId)s:": "Do souhrnného seznamu skupiny %(groupId)s se nepodařilo přidat následující uživatele:", "Add a User": "Přidat uživatele", "Failed to remove a user from the summary of %(groupId)s": "Ze souhrnného seznamu skupiny %(groupId)s se nepodařilo odstranit uživatele", - "The user '%(displayName)s' could not be removed from the summary.": "Nelze odstranit uživatele '%(displayName)s' ze souhrnného seznamu.", + "The user '%(displayName)s' could not be removed from the summary.": "Nelze odstranit uživatele '%(displayName)s' ze souhrnného seznamu.", "Unable to accept invite": "Nelze přijmout pozvání", "Unable to reject invite": "Nelze odmítnout pozvání", "Community Settings": "Nastavení skupiny", From 5178d335ecc468ec58a4293ae1f67b14ea394998 Mon Sep 17 00:00:00 2001 From: Tirifto Date: Sun, 6 Dec 2020 20:45:09 +0000 Subject: [PATCH 197/319] Translated using Weblate (Czech) Currently translated at 77.1% (2084 of 2702 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/cs/ --- src/i18n/strings/cs.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/i18n/strings/cs.json b/src/i18n/strings/cs.json index 123b1f4327..c1d07e1f47 100644 --- a/src/i18n/strings/cs.json +++ b/src/i18n/strings/cs.json @@ -219,7 +219,7 @@ "Submit": "Odeslat", "Success": "Úspěch", "The phone number entered looks invalid": "Zadané telefonní číslo se zdá být neplatné", - "This email address is already in use": "Tato e-mailová adresa je již požívána", + "This email address is already in use": "Tato e-mailová adresa je již používána", "This email address was not found": "Tato e-mailová adresa nebyla nalezena", "This room has no local addresses": "Tato místnost nemá žádné místní adresy", "This room is not recognised.": "Tato místnost nebyla rozpoznána.", From 81c16555f63381a8e0a2294d51a94ab1abfbd514 Mon Sep 17 00:00:00 2001 From: XoseM Date: Sat, 5 Dec 2020 05:49:10 +0000 Subject: [PATCH 198/319] Translated using Weblate (Galician) Currently translated at 100.0% (2702 of 2702 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/gl/ --- src/i18n/strings/gl.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/gl.json b/src/i18n/strings/gl.json index f59b05cc7a..9bc6c2961b 100644 --- a/src/i18n/strings/gl.json +++ b/src/i18n/strings/gl.json @@ -2954,5 +2954,6 @@ "Continue with %(provider)s": "Continuar con %(provider)s", "Homeserver": "Servidor de inicio", "You can use the custom server options to sign into other Matrix servers by specifying a different homeserver URL. This allows you to use Element with an existing Matrix account on a different homeserver.": "Podes usar as opcións do servidor para poder conectarte a outros servidores Matrix indicando o URL dese servidor. Esto permíteche usar Element cunha conta Matrix existente noutro servidor.", - "Server Options": "Opcións do servidor" + "Server Options": "Opcións do servidor", + "Reason (optional)": "Razón (optativa)" } From 51ededb94d026918e84038a71da539736ffc61af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Priit=20J=C3=B5er=C3=BC=C3=BCt?= Date: Fri, 4 Dec 2020 20:47:10 +0000 Subject: [PATCH 199/319] Translated using Weblate (Estonian) Currently translated at 100.0% (2702 of 2702 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/et/ --- src/i18n/strings/et.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/et.json b/src/i18n/strings/et.json index b7532bdd1b..07cc44c85b 100644 --- a/src/i18n/strings/et.json +++ b/src/i18n/strings/et.json @@ -2955,5 +2955,6 @@ "Sign into your homeserver": "Logi sisse oma koduserverisse", "Matrix.org is the biggest public homeserver in the world, so it’s a good place for many.": "Matrix.org on maailma suurim avalik koduserver ja see sobib paljude jaoks.", "Specify a homeserver": "Sisesta koduserver", - "Just a heads up, if you don't add an email and forget your password, you could permanently lose access to your account.": "Lihtsalt hoiatame, et kui sa ei lisa e-posti aadressi ning unustad oma konto salasõna, siis sa võid püsivalt kaotada ligipääsu oma kontole." + "Just a heads up, if you don't add an email and forget your password, you could permanently lose access to your account.": "Lihtsalt hoiatame, et kui sa ei lisa e-posti aadressi ning unustad oma konto salasõna, siis sa võid püsivalt kaotada ligipääsu oma kontole.", + "Reason (optional)": "Põhjus (kui soovid lisada)" } From 1241b7c335e52361a5f34b346993ccb512ba4925 Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Mon, 7 Dec 2020 12:13:04 +0000 Subject: [PATCH 200/319] Upgrade matrix-js-sdk to 9.3.0 --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 7eff8cf388..084fdfa289 100644 --- a/package.json +++ b/package.json @@ -80,7 +80,7 @@ "katex": "^0.12.0", "linkifyjs": "^2.1.9", "lodash": "^4.17.19", - "matrix-js-sdk": "9.3.0-rc.1", + "matrix-js-sdk": "9.3.0", "matrix-widget-api": "^0.1.0-beta.10", "minimist": "^1.2.5", "pako": "^1.0.11", diff --git a/yarn.lock b/yarn.lock index 2a49110d58..7cc852cdf7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6512,10 +6512,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@9.3.0-rc.1: - version "9.3.0-rc.1" - resolved "https://registry.yarnpkg.com/matrix-js-sdk/-/matrix-js-sdk-9.3.0-rc.1.tgz#d6ad2d9a5e0c539c6aec9e587a6dd2b5aa8bf2f6" - integrity sha512-H20QLwsgzBIO0Lp75CYBlw4QTOHT98vCESNZrnjIsu8FlFqsXIhdTa5C8BIYsNLex5luufxdp2an5BQtJEuAUQ== +matrix-js-sdk@9.3.0: + version "9.3.0" + resolved "https://registry.yarnpkg.com/matrix-js-sdk/-/matrix-js-sdk-9.3.0.tgz#e5fa3f6cb5a56e5c5386ecf3110dc35072170dbb" + integrity sha512-rzvYJS5mMP42iQVfGokX8DgmJpTUH+k15vATyB5JyBq/3r/kP22tN78RgoNxYzrIP/R4rB4OHUFNtgGzBH2u8g== dependencies: "@babel/runtime" "^7.12.5" another-json "^0.2.0" From ae835fb8a9585326f718d5494f288cb0f597256f Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Mon, 7 Dec 2020 12:31:07 +0000 Subject: [PATCH 201/319] Prepare changelog for v3.10.0 --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6fa0612695..151888a17e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +Changes in [3.10.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.10.0) (2020-12-07) +===================================================================================================== +[Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v3.10.0-rc.1...v3.10.0) + + * Upgrade to JS SDK 9.3.0 + Changes in [3.10.0-rc.1](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.10.0-rc.1) (2020-12-02) =============================================================================================================== [Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v3.9.0...v3.10.0-rc.1) From fefe84d1015a8a6713165f627024590f6e34163f Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Mon, 7 Dec 2020 12:31:08 +0000 Subject: [PATCH 202/319] v3.10.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 084fdfa289..a318618ae8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "matrix-react-sdk", - "version": "3.10.0-rc.1", + "version": "3.10.0", "description": "SDK for matrix.org using React", "author": "matrix.org", "repository": { From 7d416045694ff85813ffc5d032edf7fcf6a64b13 Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Mon, 7 Dec 2020 12:33:18 +0000 Subject: [PATCH 203/319] 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 8621dd2535..d4a2c568d5 100644 --- a/package.json +++ b/package.json @@ -80,7 +80,7 @@ "katex": "^0.12.0", "linkifyjs": "^2.1.9", "lodash": "^4.17.19", - "matrix-js-sdk": "9.3.0", + "matrix-js-sdk": "github:matrix-org/matrix-js-sdk#develop", "matrix-widget-api": "^0.1.0-beta.10", "minimist": "^1.2.5", "pako": "^1.0.11", diff --git a/yarn.lock b/yarn.lock index 7cc852cdf7..73ba9563d0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6512,10 +6512,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@9.3.0: +"matrix-js-sdk@github:matrix-org/matrix-js-sdk#develop": version "9.3.0" - resolved "https://registry.yarnpkg.com/matrix-js-sdk/-/matrix-js-sdk-9.3.0.tgz#e5fa3f6cb5a56e5c5386ecf3110dc35072170dbb" - integrity sha512-rzvYJS5mMP42iQVfGokX8DgmJpTUH+k15vATyB5JyBq/3r/kP22tN78RgoNxYzrIP/R4rB4OHUFNtgGzBH2u8g== + resolved "https://codeload.github.com/matrix-org/matrix-js-sdk/tar.gz/ff6612f9d0aa1a7c08b65a0b41c5ab997506016f" dependencies: "@babel/runtime" "^7.12.5" another-json "^0.2.0" From 9bb04a857b6c963c2d55af44cd0183dd165d78a2 Mon Sep 17 00:00:00 2001 From: Lukas Date: Mon, 7 Dec 2020 15:21:31 +0100 Subject: [PATCH 204/319] Add generated i18n json --- src/i18n/strings/en_EN.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index a42bd5708f..8ddda3eff6 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -47,9 +47,9 @@ "Try using turn.matrix.org": "Try using turn.matrix.org", "OK": "OK", "Unable to access microphone": "Unable to access microphone", - "Call failed because no microphone could not be accessed. Check that a microphone is plugged in and set up correctly.": "Call failed because no microphone could not be accessed. Check that a microphone is plugged in and set up correctly.", + "Call failed because microphone could not be accessed. Check that a microphone is plugged in and set up correctly.": "Call failed because microphone could not be accessed. Check that a microphone is plugged in and set up correctly.", "Unable to access webcam / microphone": "Unable to access webcam / microphone", - "Call failed because no webcam or microphone could not be accessed. Check that:": "Call failed because no webcam or microphone could not be accessed. Check that:", + "Call failed because webcam or microphone could not be accessed. Check that:": "Call failed because webcam or microphone could not be accessed. Check that:", "A microphone and webcam are plugged in and set up correctly": "A microphone and webcam are plugged in and set up correctly", "Permission is granted to use the webcam": "Permission is granted to use the webcam", "No other application is using the webcam": "No other application is using the webcam", @@ -2160,7 +2160,7 @@ "Specify a homeserver": "Specify a homeserver", "Matrix.org is the biggest public homeserver in the world, so it’s a good place for many.": "Matrix.org is the biggest public homeserver in the world, so it’s a good place for many.", "Sign into your homeserver": "Sign into your homeserver", - "We call the places you where you can host your account ‘homeservers’.": "We call the places you where you can host your account ‘homeservers’.", + "We call the places where you can host your account ‘homeservers’.": "We call the places where you can host your account ‘homeservers’.", "Other homeserver": "Other homeserver", "Use your preferred Matrix homeserver if you have one, or host your own.": "Use your preferred Matrix homeserver if you have one, or host your own.", "Learn more": "Learn more", From c7f1d97b1afe9b5c72a9d84e3a40b1d078ee892e Mon Sep 17 00:00:00 2001 From: David Baker Date: Mon, 7 Dec 2020 15:38:55 +0000 Subject: [PATCH 205/319] Round off the sharp corners Before you have someone's eye out --- res/css/views/voip/_CallView.scss | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/res/css/views/voip/_CallView.scss b/res/css/views/voip/_CallView.scss index 72c25ef4b3..37f583c437 100644 --- a/res/css/views/voip/_CallView.scss +++ b/res/css/views/voip/_CallView.scss @@ -16,7 +16,7 @@ limitations under the License. */ .mx_CallView { - border-radius: 10px; + border-radius: 8px; background-color: $voipcall-plinth-color; padding-left: 8px; padding-right: 8px; @@ -47,6 +47,7 @@ limitations under the License. align-items: center; justify-content: center; background-color: $inverted-bg-color; + border-radius: 8px; } .mx_CallView_voice_hold { @@ -92,6 +93,8 @@ limitations under the License. width: 100%; position: relative; z-index: 30; + border-radius: 8px; + overflow: hidden; } .mx_CallView_video_hold { From 3b25a3be98c7ecb73d481b34573b235ff35e6b7b Mon Sep 17 00:00:00 2001 From: David Baker Date: Mon, 7 Dec 2020 15:42:35 +0000 Subject: [PATCH 206/319] Smaller avatar, more padding on text --- res/css/views/voip/_CallView.scss | 2 +- src/components/views/voip/CallView.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/res/css/views/voip/_CallView.scss b/res/css/views/voip/_CallView.scss index 37f583c437..d3fc11b63c 100644 --- a/res/css/views/voip/_CallView.scss +++ b/res/css/views/voip/_CallView.scss @@ -81,7 +81,7 @@ limitations under the License. .mx_CallView_voice_holdText { height: 20px; - padding-top: 10px; + padding-top: 20px; color: $accent-fg-color; font-weight: bold; .mx_AccessibleButton_hasKind { diff --git a/src/components/views/voip/CallView.tsx b/src/components/views/voip/CallView.tsx index c9f5db77e6..cfc4a2a16c 100644 --- a/src/components/views/voip/CallView.tsx +++ b/src/components/views/voip/CallView.tsx @@ -489,7 +489,7 @@ export default class CallView extends React.Component { {callControls}
; } else { - const avatarSize = this.props.room ? 200 : 75; + const avatarSize = this.props.room ? 160 : 75; const classes = classNames({ mx_CallView_voice: true, mx_CallView_voice_hold: isOnHold, From d06a00bcce4e5b045e6fd905e01661f14c3e21be Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Mon, 7 Dec 2020 16:05:41 +0000 Subject: [PATCH 207/319] Improve usability of the Server Picker Dialog --- .../views/dialogs/ServerPickerDialog.tsx | 48 ++++++++++++++----- src/i18n/strings/en_EN.json | 3 +- 2 files changed, 37 insertions(+), 14 deletions(-) diff --git a/src/components/views/dialogs/ServerPickerDialog.tsx b/src/components/views/dialogs/ServerPickerDialog.tsx index 9eb819c98e..c96da1b28e 100644 --- a/src/components/views/dialogs/ServerPickerDialog.tsx +++ b/src/components/views/dialogs/ServerPickerDialog.tsx @@ -14,7 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React, {createRef} from 'react'; +import React, {createRef} from "react"; +import {AutoDiscovery} from "matrix-js-sdk/src/autodiscovery"; import AutoDiscoveryUtils, {ValidatedServerConfig} from "../../../utils/AutoDiscoveryUtils"; import BaseDialog from './BaseDialog'; @@ -47,9 +48,10 @@ export default class ServerPickerDialog extends React.PureComponent({ - deriveData: async ({ value: hsUrl }) => { - // Always try and use the defaults first - const defaultConfig: ValidatedServerConfig = SdkConfig.get()["validated_server_config"]; - if (defaultConfig.hsUrl === hsUrl) return {}; + deriveData: async ({ value }) => { + let hsUrl = value.trim(); // trim to account for random whitespace + + // if the URL has no protocol, try validate it as a serverName via well-known + if (!hsUrl.includes("://")) { + try { + const discoveryResult = await AutoDiscovery.findClientConfig(hsUrl); + this.validatedConf = AutoDiscoveryUtils.buildValidatedConfigFromDiscovery(hsUrl, discoveryResult); + return {}; // we have a validated config, we don't need to try the other paths + } catch (e) { + console.error(`Attempted ${hsUrl} as a server_name but it failed`, e); + } + } + + // if we got to this stage then either the well-known failed or the URL had a protocol specified, + // so validate statically only. If the URL has no protocol, default to https. + if (!hsUrl.includes("://")) { + hsUrl = "https://" + hsUrl; + } try { this.validatedConf = await AutoDiscoveryUtils.validateServerConfigWithStaticUrls(hsUrl); @@ -81,17 +98,22 @@ export default class ServerPickerDialog extends React.PureComponent Date: Mon, 7 Dec 2020 16:22:57 +0000 Subject: [PATCH 208/319] Add 60% opacity black over the avatars when on hold --- res/css/views/voip/_CallView.scss | 21 ++++++++++++++++----- src/components/views/voip/CallView.tsx | 2 +- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/res/css/views/voip/_CallView.scss b/res/css/views/voip/_CallView.scss index d3fc11b63c..898318f71d 100644 --- a/res/css/views/voip/_CallView.scss +++ b/res/css/views/voip/_CallView.scss @@ -59,18 +59,19 @@ limitations under the License. &::after { position: absolute; content: ''; - width: 40px; - height: 40px; + width: 100%; + height: 100%; top: 50%; left: 50%; transform: translate(-50%, -50%); + background-color: rgba(0, 0, 0, 0.6); background-image: url('$(res)/img/voip/paused.svg'); background-position: center; - background-size: cover; + background-size: 40px; + background-repeat: no-repeat; } .mx_CallView_pip &::after { - width: 30px; - height: 30px; + background-size: 30px; } } .mx_BaseAvatar { @@ -117,6 +118,16 @@ limitations under the License. background-size: cover; background-position: center; filter: blur(20px); + &::after { + content: ''; + display: block; + position: absolute; + width: 100%; + height: 100%; + left: 0; + right: 0; + background-color: rgba(0, 0, 0, 0.6); + } } .mx_CallView_video_holdContent { diff --git a/src/components/views/voip/CallView.tsx b/src/components/views/voip/CallView.tsx index cfc4a2a16c..078ba18d02 100644 --- a/src/components/views/voip/CallView.tsx +++ b/src/components/views/voip/CallView.tsx @@ -489,7 +489,7 @@ export default class CallView extends React.Component { {callControls}
; } else { - const avatarSize = this.props.room ? 160 : 75; + const avatarSize = this.props.room ? 160 : 76; const classes = classNames({ mx_CallView_voice: true, mx_CallView_voice_hold: isOnHold, From 365d6982ce6a5bc6aae888f7e6fee37502254b81 Mon Sep 17 00:00:00 2001 From: David Baker Date: Mon, 7 Dec 2020 18:28:43 +0000 Subject: [PATCH 209/319] Add secondary call avatar to main voice content view --- res/css/views/voip/_CallView.scss | 34 ++++++++++++++++++++++++++ src/components/views/voip/CallView.tsx | 32 ++++++++++++++++++------ 2 files changed, 59 insertions(+), 7 deletions(-) diff --git a/res/css/views/voip/_CallView.scss b/res/css/views/voip/_CallView.scss index 1692b71242..fb19f5339c 100644 --- a/res/css/views/voip/_CallView.scss +++ b/res/css/views/voip/_CallView.scss @@ -66,6 +66,17 @@ limitations under the License. border-radius: 8px; } +.mx_CallView_voice_avatarsContainer { + display: flex; + flex-direction: row; + align-items: center; + justify-content: center; + div { + margin-left: 12px; + margin-right: 12px; + } +} + .mx_CallView_voice_hold { // This masks the avatar image so when it's blurred, the edge is still crisp .mx_CallView_voice_avatarContainer { @@ -96,6 +107,29 @@ limitations under the License. } } +.mx_CallView_voice_secondaryAvatarContainer { + border-radius: 2000px; + overflow: hidden; + position: relative; + &::after { + position: absolute; + content: ''; + width: 100%; + height: 100%; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + background-color: rgba(0, 0, 0, 0.6); + background-image: url('$(res)/img/voip/paused.svg'); + background-position: center; + background-size: 40px; + background-repeat: no-repeat; + } + .mx_CallView_pip &::after { + background-size: 24px; + } +} + .mx_CallView_voice_holdText { height: 20px; padding-top: 20px; diff --git a/src/components/views/voip/CallView.tsx b/src/components/views/voip/CallView.tsx index 6402598913..b450d082d2 100644 --- a/src/components/views/voip/CallView.tsx +++ b/src/components/views/voip/CallView.tsx @@ -15,7 +15,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React, { createRef, CSSProperties } from 'react'; +import React, { createRef, CSSProperties, ReactNode } from 'react'; import dis from '../../../dispatcher/dispatcher'; import CallHandler from '../../../CallHandler'; import {MatrixClientPeg} from '../../../MatrixClientPeg'; @@ -328,6 +328,7 @@ export default class CallView extends React.Component { public render() { const client = MatrixClientPeg.get(); const callRoom = client.getRoom(this.props.call.roomId); + const secCallRoom = this.props.secondaryCall ? client.getRoom(this.props.secondaryCall.roomId) : null; let contextMenu; @@ -468,13 +469,31 @@ export default class CallView extends React.Component { mx_CallView_voice: true, mx_CallView_voice_hold: isOnHold, }); - contentView =
-
+ let secondaryCallAvatar: ReactNode; + + if (this.props.secondaryCall) { + const secAvatarSize = this.props.pipMode ? 40 : 100; + secondaryCallAvatar =
+
; + } + + contentView =
+
+
+ +
+ {secondaryCallAvatar}
{onHoldText}
{callControls} @@ -514,7 +533,6 @@ export default class CallView extends React.Component { } else { let secondaryCallInfo; if (this.props.secondaryCall) { - const secCallRoom = client.getRoom(this.props.secondaryCall.roomId); secondaryCallInfo = From b9d70cb1a3fa759088cdc13e0906b4dbea88ce94 Mon Sep 17 00:00:00 2001 From: David Baker Date: Mon, 7 Dec 2020 18:40:29 +0000 Subject: [PATCH 210/319] Fix indentation --- res/css/views/voip/_CallView.scss | 40 +++++++++++++++---------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/res/css/views/voip/_CallView.scss b/res/css/views/voip/_CallView.scss index fb19f5339c..5447f32f5d 100644 --- a/res/css/views/voip/_CallView.scss +++ b/res/css/views/voip/_CallView.scss @@ -108,26 +108,26 @@ limitations under the License. } .mx_CallView_voice_secondaryAvatarContainer { - border-radius: 2000px; - overflow: hidden; - position: relative; - &::after { - position: absolute; - content: ''; - width: 100%; - height: 100%; - top: 50%; - left: 50%; - transform: translate(-50%, -50%); - background-color: rgba(0, 0, 0, 0.6); - background-image: url('$(res)/img/voip/paused.svg'); - background-position: center; - background-size: 40px; - background-repeat: no-repeat; - } - .mx_CallView_pip &::after { - background-size: 24px; - } + border-radius: 2000px; + overflow: hidden; + position: relative; + &::after { + position: absolute; + content: ''; + width: 100%; + height: 100%; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + background-color: rgba(0, 0, 0, 0.6); + background-image: url('$(res)/img/voip/paused.svg'); + background-position: center; + background-size: 40px; + background-repeat: no-repeat; + } + .mx_CallView_pip &::after { + background-size: 24px; + } } .mx_CallView_voice_holdText { From 89d5d88ca43c37b26af2ec70bebac6ba7d03ea8b Mon Sep 17 00:00:00 2001 From: Marcelo Filho Date: Mon, 7 Dec 2020 18:46:01 +0000 Subject: [PATCH 211/319] Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (2702 of 2702 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/pt_BR/ --- src/i18n/strings/pt_BR.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/pt_BR.json b/src/i18n/strings/pt_BR.json index 55f35e638e..4794981b01 100644 --- a/src/i18n/strings/pt_BR.json +++ b/src/i18n/strings/pt_BR.json @@ -2887,5 +2887,8 @@ "Homeserver": "Servidor local", "You can use the custom server options to sign into other Matrix servers by specifying a different homeserver URL. This allows you to use Element with an existing Matrix account on a different homeserver.": "Você pode usar as opções personalizadas de servidor para entrar em outros servidores Matrix, especificando um URL de servidor local diferente. Isso permite que você use o Element com uma conta Matrix em um servidor local diferente.", "Server Options": "Opções do servidor", - "Reason (optional)": "Motivo (opcional)" + "Reason (optional)": "Motivo (opcional)", + "We call the places where you can host your account ‘homeservers’.": "Os locais onde você pode hospedar sua conta são chamados de \"servidores locais\".", + "Call failed because webcam or microphone could not be accessed. Check that:": "A chamada falhou porque a câmera ou o microfone não puderam ser acessados. Verifique se:", + "Call failed because microphone could not be accessed. Check that a microphone is plugged in and set up correctly.": "A chamada falhou porque não foi possível acessar o microfone. Verifique se o microfone está conectado e configurado corretamente." } From 47e31ab06ff4ca49b539d58964637a211db9a8ed Mon Sep 17 00:00:00 2001 From: LinAGKar Date: Mon, 7 Dec 2020 19:36:18 +0000 Subject: [PATCH 212/319] Translated using Weblate (Swedish) Currently translated at 98.6% (2666 of 2702 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/sv/ --- src/i18n/strings/sv.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/sv.json b/src/i18n/strings/sv.json index 9a42a046cd..598b8ae2d0 100644 --- a/src/i18n/strings/sv.json +++ b/src/i18n/strings/sv.json @@ -2852,5 +2852,7 @@ "See emotes posted to your active room": "Se emotes som skickas i ditt aktiva rum", "See emotes posted to this room": "Se emotes som skickas i det här rummet", "Send emotes as you in your active room": "Skicka emotes som dig i ditt aktiva rum", - "Send emotes as you in this room": "Skicka emotes som dig i det här rummet" + "Send emotes as you in this room": "Skicka emotes som dig i det här rummet", + "Just a heads up, if you don't add an email and forget your password, you could permanently lose access to your account.": "En förvarning, om du inte lägger till en e-postadress och glömmer ditt lösenord, så kan du permanent förlora åtkomst till ditt konto.", + "Continuing without email": "Fortsätter utan e-post" } From d90e2db68c01e5c92749ade58e1f6bebaf3ecace Mon Sep 17 00:00:00 2001 From: random Date: Mon, 7 Dec 2020 16:00:51 +0000 Subject: [PATCH 213/319] Translated using Weblate (Italian) Currently translated at 97.6% (2639 of 2702 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/it/ --- src/i18n/strings/it.json | 45 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/it.json b/src/i18n/strings/it.json index 4ad806f55e..18ca54dc60 100644 --- a/src/i18n/strings/it.json +++ b/src/i18n/strings/it.json @@ -2852,5 +2852,48 @@ "Go to Home View": "Vai alla vista home", "

HTML for your community's page

\n

\n Use the long description to introduce new members to the community, or distribute\n some important links\n

\n

\n You can even add images with Matrix URLs \n

\n": "

HTML per la pagina della tua comunità

\n

\n Usa la descrizione estesa per introdurre i nuovi membri alla comunità, o distribuisci\n alcuni link importanti\n

\n

\n Puoi anche aggiungere immagini con gli URL Matrix \n

\n", "Securely cache encrypted messages locally for them to appear in search results, using %(size)s to store messages from %(rooms)s rooms.|one": "Salva in cache i messaggi cifrati localmente in modo che appaiano nei risultati di ricerca, usando %(size)s per salvarli da %(rooms)s stanza.", - "Securely cache encrypted messages locally for them to appear in search results, using %(size)s to store messages from %(rooms)s rooms.|other": "Salva in cache i messaggi cifrati localmente in modo che appaiano nei risultati di ricerca, usando %(size)s per salvarli da %(rooms)s stanze." + "Securely cache encrypted messages locally for them to appear in search results, using %(size)s to store messages from %(rooms)s rooms.|other": "Salva in cache i messaggi cifrati localmente in modo che appaiano nei risultati di ricerca, usando %(size)s per salvarli da %(rooms)s stanze.", + "See text messages posted to your active room": "Vedi messaggi di testo inviati alla tua stanza attiva", + "See text messages posted to this room": "Vedi messaggi di testo inviati a questa stanza", + "Send text messages as you in your active room": "Invia messaggi di testo a tuo nome nella tua stanza attiva", + "Send text messages as you in this room": "Invia messaggi di testo a tuo nome in questa stanza", + "See messages posted to your active room": "Vedi messaggi inviati alla tua stanza attiva", + "See messages posted to this room": "Vedi messaggi inviati a questa stanza", + "Send messages as you in your active room": "Invia messaggi a tuo nome nella tua stanza attiva", + "Send messages as you in this room": "Invia messaggi a tuo nome in questa stanza", + "The %(capability)s capability": "La capacità %(capability)s", + "See %(eventType)s events posted to your active room": "Vedi eventi %(eventType)s inviati alla tua stanza attiva", + "Send %(eventType)s events as you in your active room": "Invia eventi %(eventType)s a tuo nome nella tua stanza attiva", + "See %(eventType)s events posted to this room": "Vedi eventi %(eventType)s inviati a questa stanza", + "Send %(eventType)s events as you in this room": "Invia eventi %(eventType)s a tuo nome in questa stanza", + "with state key %(stateKey)s": "con la chiave di stato %(stateKey)s", + "with an empty state key": "con una chiave di stato vuota", + "See when anyone posts a sticker to your active room": "Vedi quando qualcuno invia un adesivo alla tua stanza attiva", + "Send stickers to this room as you": "Invia adesivi a questa stanza a tuo nome", + "Send stickers to your active room as you": "Invia adesivi alla tua stanza attiva a tuo nome", + "See when a sticker is posted in this room": "Vedi quando viene inviato un adesivo in questa stanza", + "See when the avatar changes in your active room": "Vedi quando l'avatar cambia nella tua stanza attiva", + "Change the avatar of your active room": "Cambia l'avatar della tua stanza attiva", + "See when the avatar changes in this room": "Vedi quando l'avatar cambia in questa stanza", + "Change the avatar of this room": "Cambia l'avatar di questa stanza", + "See when the name changes in your active room": "Vedi quando il nome cambia nella tua stanza attiva", + "Change the name of your active room": "Cambia il nome della tua stanza attiva", + "See when the name changes in this room": "Vedi quando il nome cambia in questa stanza", + "Change the name of this room": "Cambia il nome di questa stanza", + "See when the topic changes in your active room": "Vedi quando l'argomento cambia nella tua stanza attiva", + "Change the topic of your active room": "Cambia l'argomento della tua stanza attiva", + "See when the topic changes in this room": "Vedi quando l'argomento cambia in questa stanza", + "Change the topic of this room": "Cambia l'argomento di questa stanza", + "Change which room you're viewing": "Cambia quale stanza stai vedendo", + "Send stickers into your active room": "Invia adesivi nella tua stanza attiva", + "Send stickers into this room": "Invia adesivi in questa stanza", + "Remain on your screen while running": "Resta sul tuo schermo mentre in esecuzione", + "Remain on your screen when viewing another room, when running": "Resta sul tuo schermo quando vedi un'altra stanza, quando in esecuzione", + "No other application is using the webcam": "Nessun'altra applicazione sta usando la webcam", + "Permission is granted to use the webcam": "Permesso concesso per usare la webcam", + "A microphone and webcam are plugged in and set up correctly": "Un microfono e una webcam siano collegati e configurati correttamente", + "Unable to access webcam / microphone": "Impossibile accedere alla webcam / microfono", + "Call failed because webcam or microphone could not be accessed. Check that:": "Chiamata fallita perchè la webcam o il microfono non sono accessibili. Controlla che:", + "Call failed because microphone could not be accessed. Check that a microphone is plugged in and set up correctly.": "Chiamata fallita perchè il microfono non è accessibile. Controlla che ci sia un microfono collegato e configurato correttamente.", + "Unable to access microphone": "Impossibile accedere al microfono" } From 1da90ea5dc15f3fa3a2444df724f504a7c5ab315 Mon Sep 17 00:00:00 2001 From: Marcelo Filho Date: Mon, 7 Dec 2020 21:17:00 +0000 Subject: [PATCH 214/319] Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (2703 of 2703 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/pt_BR/ --- src/i18n/strings/pt_BR.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/pt_BR.json b/src/i18n/strings/pt_BR.json index 4794981b01..251f121088 100644 --- a/src/i18n/strings/pt_BR.json +++ b/src/i18n/strings/pt_BR.json @@ -2890,5 +2890,7 @@ "Reason (optional)": "Motivo (opcional)", "We call the places where you can host your account ‘homeservers’.": "Os locais onde você pode hospedar sua conta são chamados de \"servidores locais\".", "Call failed because webcam or microphone could not be accessed. Check that:": "A chamada falhou porque a câmera ou o microfone não puderam ser acessados. Verifique se:", - "Call failed because microphone could not be accessed. Check that a microphone is plugged in and set up correctly.": "A chamada falhou porque não foi possível acessar o microfone. Verifique se o microfone está conectado e configurado corretamente." + "Call failed because microphone could not be accessed. Check that a microphone is plugged in and set up correctly.": "A chamada falhou porque não foi possível acessar o microfone. Verifique se o microfone está conectado e configurado corretamente.", + "Invalid URL": "URL inválido", + "Unable to validate homeserver": "Não foi possível validar o servidor local" } From cffeb940a5d5d34952de1ca3479ed32660343b5c Mon Sep 17 00:00:00 2001 From: Kaede Date: Mon, 7 Dec 2020 20:39:02 +0000 Subject: [PATCH 215/319] Translated using Weblate (Japanese) Currently translated at 50.3% (1362 of 2703 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/ja/ --- src/i18n/strings/ja.json | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/i18n/strings/ja.json b/src/i18n/strings/ja.json index 1b107e0da4..3fa0a502ca 100644 --- a/src/i18n/strings/ja.json +++ b/src/i18n/strings/ja.json @@ -497,7 +497,7 @@ "'%(groupId)s' is not a valid community ID": "'%(groupId)s' は有効なコミュニティIDではありません", "Showing flair for these communities:": "次のコミュニティのバッジを表示:", "This room is not showing flair for any communities": "この部屋はどんなコミュニティに対してもバッジを表示していません", - "New community ID (e.g. +foo:%(localDomain)s)": "新しいコミュニティID (例 +foo:%(localDomain)s)", + "New community ID (e.g. +foo:%(localDomain)s)": "新しいコミュニティ ID (例: +foo:%(localDomain)s)", "You have enabled URL previews by default.": "デフォルトで URL プレビューが有効です。", "You have disabled URL previews by default.": "デフォルトで URL プレビューが無効です。", "URL previews are enabled by default for participants in this room.": "この部屋の参加者は、デフォルトで URL プレビューが有効です。", @@ -981,7 +981,7 @@ "Preferences": "環境設定", "Security & Privacy": "セキュリティとプライバシー", "Room information": "部屋の情報", - "Internal room ID:": "内部 部屋ID:", + "Internal room ID:": "内部部屋 ID:", "Room version": "部屋のバージョン", "Room version:": "部屋のバージョン:", "Developer options": "開発者オプション", @@ -1477,5 +1477,15 @@ "Topic: %(topic)s ": "トピック: %(topic)s ", "%(displayName)s created this room.": "%(displayName)s がこの部屋を作成しました。", "You created this room.": "あなたがこの部屋を作成しました。", - "%(creator)s created this DM.": "%(creator)s がこの DM を作成しました。" + "%(creator)s created this DM.": "%(creator)s がこの DM を作成しました。", + "Messages here are end-to-end encrypted. Verify %(displayName)s in their profile - tap on their avatar.": "ここでのメッセージはエンドツーエンド暗号化されています。%(displayName)s のアバターをタップして、プロフィールから検証を行うことができます。", + "Messages in this room are end-to-end encrypted. When people join, you can verify them in their profile, just tap on their avatar.": "この部屋内でのメッセージの送受信はエンドツーエンド暗号化されています。参加者のアバターをタップして、プロフィールから検証を行うことができます。", + "Use default": "既定の設定を使用", + "e.g. my-room": "例: my-room", + "Room address": "ルームアドレス", + "New published address (e.g. #alias:server)": "新しい公開アドレス (例: #alias:server)", + "No other published addresses yet, add one below": "現在、公開アドレスがありません。以下から追加可能です。", + "Securely cache encrypted messages locally for them to appear in search results, using %(size)s to store messages from %(rooms)s rooms.|one": "検索結果を表示させるために、暗号化されたメッセージをローカルに安全にキャッシュしています。現在、%(rooms)s 件の部屋のメッセージの保存に %(size)s を使用中です。", + "Securely cache encrypted messages locally for them to appear in search results, using %(size)s to store messages from %(rooms)s rooms.|other": "検索結果を表示させるために、暗号化されたメッセージをローカルに安全にキャッシュしています。現在、%(rooms)s 件の部屋のメッセージの保存に %(size)s を使用中です。", + "Mentions & Keywords": "メンションとキーワード" } From ad0ab079fd623112eddd8b3bc2bd1aed5fcff09b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Priit=20J=C3=B5er=C3=BC=C3=BCt?= Date: Mon, 7 Dec 2020 21:06:15 +0000 Subject: [PATCH 216/319] Translated using Weblate (Estonian) Currently translated at 100.0% (2703 of 2703 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/et/ --- src/i18n/strings/et.json | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/i18n/strings/et.json b/src/i18n/strings/et.json index 07cc44c85b..40c5f5675c 100644 --- a/src/i18n/strings/et.json +++ b/src/i18n/strings/et.json @@ -1016,7 +1016,7 @@ "Community %(groupId)s not found": "%(groupId)s kogukonda ei leidunud", "This homeserver does not support communities": "See koduserver ei toeta kogukondade funktsionaalsust", "Failed to load %(groupId)s": "%(groupId)s kogukonna laadimine ei õnnestunud", - "Welcome to %(appName)s": "Tere tulemast %(appName)s kasutajaks", + "Welcome to %(appName)s": "Tere tulemast suhtlusrakenduse %(appName)s kasutajaks", "Liberate your communication": "Vabasta oma suhtlus", "Send a Direct Message": "Saada otsesõnum", "Are you sure you want to leave the room '%(roomName)s'?": "Kas oled kindel, et soovid lahkuda jututoast '%(roomName)s'?", @@ -2956,5 +2956,10 @@ "Matrix.org is the biggest public homeserver in the world, so it’s a good place for many.": "Matrix.org on maailma suurim avalik koduserver ja see sobib paljude jaoks.", "Specify a homeserver": "Sisesta koduserver", "Just a heads up, if you don't add an email and forget your password, you could permanently lose access to your account.": "Lihtsalt hoiatame, et kui sa ei lisa e-posti aadressi ning unustad oma konto salasõna, siis sa võid püsivalt kaotada ligipääsu oma kontole.", - "Reason (optional)": "Põhjus (kui soovid lisada)" + "Reason (optional)": "Põhjus (kui soovid lisada)", + "We call the places where you can host your account ‘homeservers’.": "Me nimetame „koduserveriks“ sellist serverit, mis haldab sinu kasutajakontot.", + "Invalid URL": "Vigane aadress", + "Unable to validate homeserver": "Koduserveri õigsust ei õnnestunud kontrollida", + "Call failed because webcam or microphone could not be accessed. Check that:": "Kuna veebikaamerat või mikrofoni kasutada ei saanud, siis kõne ei õnnestunud. Palun kontrolli, et:", + "Call failed because microphone could not be accessed. Check that a microphone is plugged in and set up correctly.": "Kuna mikrofoni kasutada ei saanud, siis kõne ei õnnestunud. Palun kontrolli, et mikrofon oleks ühendatud ja seadistatud." } From 550a5220d9e9958e1838a3b2aa2f2b81eb879c0b Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Mon, 7 Dec 2020 15:12:26 -0700 Subject: [PATCH 217/319] Undocumented linter cleanup --- src/components/structures/RoomView.tsx | 4 ++-- .../views/elements/EffectsOverlay.tsx | 12 +++++------- .../views/rooms/SendMessageComposer.js | 2 +- src/effects/ICanvasEffect.ts | 17 +++++++++-------- src/effects/confetti/index.ts | 2 -- src/effects/index.ts | 1 - src/effects/{effectUtilities.ts => utils.ts} | 1 - 7 files changed, 17 insertions(+), 22 deletions(-) rename src/effects/{effectUtilities.ts => utils.ts} (99%) diff --git a/src/components/structures/RoomView.tsx b/src/components/structures/RoomView.tsx index 0dec6d30df..d2d473fd3d 100644 --- a/src/components/structures/RoomView.tsx +++ b/src/components/structures/RoomView.tsx @@ -70,8 +70,8 @@ import RoomHeader from "../views/rooms/RoomHeader"; import {XOR} from "../../@types/common"; import { IThreepidInvite } from "../../stores/ThreepidInviteStore"; import EffectsOverlay from "../views/elements/EffectsOverlay"; -import {containsEmoji} from '../../effects/effectUtilities'; -import {CHAT_EFFECTS} from '../../effects' +import {containsEmoji} from '../../effects/utils'; +import {CHAT_EFFECTS} from '../../effects'; import { CallState, MatrixCall } from "matrix-js-sdk/src/webrtc/call"; import WidgetStore from "../../stores/WidgetStore"; import {UPDATE_EVENT} from "../../stores/AsyncStore"; diff --git a/src/components/views/elements/EffectsOverlay.tsx b/src/components/views/elements/EffectsOverlay.tsx index 684b647365..6297d80768 100644 --- a/src/components/views/elements/EffectsOverlay.tsx +++ b/src/components/views/elements/EffectsOverlay.tsx @@ -2,7 +2,6 @@ Copyright 2020 Nurjin Jafar Copyright 2020 Nordeck IT + Consulting GmbH. - 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 @@ -17,14 +16,14 @@ */ import React, { FunctionComponent, useEffect, useRef } from 'react'; import dis from '../../../dispatcher/dispatcher'; -import ICanvasEffect, { ICanvasEffectConstructable } from '../../../effects/ICanvasEffect.js'; +import ICanvasEffect from '../../../effects/ICanvasEffect'; import {CHAT_EFFECTS} from '../../../effects' -export type EffectsOverlayProps = { +interface IProps { roomWidth: number; } -const EffectsOverlay: FunctionComponent = ({ roomWidth }) => { +const EffectsOverlay: FunctionComponent = ({ roomWidth }) => { const canvasRef = useRef(null); const effectsRef = useRef>(new Map()); @@ -34,12 +33,11 @@ const EffectsOverlay: FunctionComponent = ({ roomWidth }) = if (effect === null) { const options = CHAT_EFFECTS.find((e) => e.command === name)?.options try { - const { default: Effect }: { default: ICanvasEffectConstructable } - = await import(`../../../effects/${name}`); + const { default: Effect } = await import(`../../../effects/${name}`); effect = new Effect(options); effectsRef.current[name] = effect; } catch (err) { - console.warn('Unable to load effect module at \'../../../effects/${name}\'.', err) + console.warn('Unable to load effect module at \'../../../effects/${name}\'.', err); } } return effect; diff --git a/src/components/views/rooms/SendMessageComposer.js b/src/components/views/rooms/SendMessageComposer.js index 6a7270c3d6..8171da7eca 100644 --- a/src/components/views/rooms/SendMessageComposer.js +++ b/src/components/views/rooms/SendMessageComposer.js @@ -42,7 +42,7 @@ import {Key, isOnlyCtrlOrCmdKeyEvent} from "../../../Keyboard"; import MatrixClientContext from "../../../contexts/MatrixClientContext"; import RateLimitedFunc from '../../../ratelimitedfunc'; import {Action} from "../../../dispatcher/actions"; -import {containsEmoji} from "../../../effects/effectUtilities"; +import {containsEmoji} from "../../../effects/utils"; import {CHAT_EFFECTS} from '../../../effects'; import SettingsStore from "../../../settings/SettingsStore"; import CountlyAnalytics from "../../../CountlyAnalytics"; diff --git a/src/effects/ICanvasEffect.ts b/src/effects/ICanvasEffect.ts index dbbde3dbe7..9bf3e9293d 100644 --- a/src/effects/ICanvasEffect.ts +++ b/src/effects/ICanvasEffect.ts @@ -2,7 +2,6 @@ Copyright 2020 Nurjin Jafar Copyright 2020 Nordeck IT + Consulting GmbH. - 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 @@ -20,10 +19,10 @@ */ export interface ICanvasEffectConstructable { /** - * @param {{[key:string]:any}} options? Optional animation options + * @param {{[key:string]:any}} options? Optional animation options * @returns ICanvasEffect Returns a new instance of the canvas effect */ - new(options?: { [key: string]: any }): ICanvasEffect + new(options?: { [key: string]: any }): ICanvasEffect; } /** @@ -31,16 +30,18 @@ export interface ICanvasEffectConstructable { */ export default interface ICanvasEffect { /** - * @param {HTMLCanvasElement} canvas The canvas instance as the render target of the animation - * @param {number} timeout? A timeout that defines the runtime of the animation (defaults to false) + * @param {HTMLCanvasElement} canvas The canvas instance as the render target of the animation + * @param {number} timeout? A timeout that defines the runtime of the animation (defaults to false) */ - start: (canvas: HTMLCanvasElement, timeout?: number) => Promise, + start: (canvas: HTMLCanvasElement, timeout?: number) => Promise; + /** * Stops the current animation */ - stop: () => Promise, + stop: () => Promise; + /** * Returns a value that defines if the animation is currently running */ - isRunning: boolean + isRunning: boolean; } diff --git a/src/effects/confetti/index.ts b/src/effects/confetti/index.ts index 646ac30524..8c4b2d2616 100644 --- a/src/effects/confetti/index.ts +++ b/src/effects/confetti/index.ts @@ -2,7 +2,6 @@ Copyright 2020 Nurjin Jafar Copyright 2020 Nordeck IT + Consulting GmbH. - 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 @@ -17,7 +16,6 @@ */ import ICanvasEffect from '../ICanvasEffect'; - export type ConfettiOptions = { /** * max confetti count diff --git a/src/effects/index.ts b/src/effects/index.ts index 067bd6848c..16a0851070 100644 --- a/src/effects/index.ts +++ b/src/effects/index.ts @@ -2,7 +2,6 @@ Copyright 2020 Nurjin Jafar Copyright 2020 Nordeck IT + Consulting GmbH. - 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 diff --git a/src/effects/effectUtilities.ts b/src/effects/utils.ts similarity index 99% rename from src/effects/effectUtilities.ts rename to src/effects/utils.ts index e708f4864e..c2b499b154 100644 --- a/src/effects/effectUtilities.ts +++ b/src/effects/utils.ts @@ -2,7 +2,6 @@ Copyright 2020 Nurjin Jafar Copyright 2020 Nordeck IT + Consulting GmbH. - 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 From 603a1c8ffb90881b163461d4992331d8df9fe3a7 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Mon, 7 Dec 2020 15:37:26 -0700 Subject: [PATCH 218/319] Fix linter --- src/components/views/elements/EffectsOverlay.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/views/elements/EffectsOverlay.tsx b/src/components/views/elements/EffectsOverlay.tsx index 6297d80768..38be8da9a8 100644 --- a/src/components/views/elements/EffectsOverlay.tsx +++ b/src/components/views/elements/EffectsOverlay.tsx @@ -16,7 +16,7 @@ */ import React, { FunctionComponent, useEffect, useRef } from 'react'; import dis from '../../../dispatcher/dispatcher'; -import ICanvasEffect from '../../../effects/ICanvasEffect'; +import ICanvasEffect from '../../../effects/ICanvasEffect'; import {CHAT_EFFECTS} from '../../../effects' interface IProps { From f30d2ff1c5347b774f0e39a9856a2c8cc246d678 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Mon, 7 Dec 2020 16:54:09 -0700 Subject: [PATCH 219/319] Fix confetti room unread state check Turns out that if you want confetti from other people you would need to have rooms on "All Messages" or higher - this isn't as fun for those of us who have most of our rooms as Mentions Only. --- src/components/structures/RoomView.tsx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/components/structures/RoomView.tsx b/src/components/structures/RoomView.tsx index d2d473fd3d..b64d2e876b 100644 --- a/src/components/structures/RoomView.tsx +++ b/src/components/structures/RoomView.tsx @@ -77,6 +77,7 @@ import WidgetStore from "../../stores/WidgetStore"; import {UPDATE_EVENT} from "../../stores/AsyncStore"; import Notifier from "../../Notifier"; import {showToast as showNotificationsToast} from "../../toasts/DesktopNotificationsToast"; +import { RoomNotificationStateStore } from "../../stores/notifications/RoomNotificationStateStore"; const DEBUG = false; let debuglog = function(msg: string) {}; @@ -799,14 +800,16 @@ export default class RoomView extends React.Component { }; private handleEffects = (ev) => { - if (!this.state.room || - !this.state.matrixClientIsReady || - this.state.room.getUnreadNotificationCount() === 0) return; + if (!this.state.room || !this.state.matrixClientIsReady) return; // not ready at all + + const notifState = RoomNotificationStateStore.instance.getRoomState(this.state.room); + if (!notifState.isUnread) return; + CHAT_EFFECTS.forEach(effect => { if (containsEmoji(ev.getContent(), effect.emojis) || ev.getContent().msgtype === effect.msgType) { dis.dispatch({action: `effects.${effect.command}`}); } - }) + }); }; private onRoomName = (room: Room) => { From 9f9699bf75a5b37b485e99e8ff768b9e1744e9b8 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Tue, 8 Dec 2020 10:31:40 +0000 Subject: [PATCH 220/319] Hide Invite to this room CTA if no permission --- src/components/views/rooms/NewRoomIntro.tsx | 31 +++++++++++++++------ 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/src/components/views/rooms/NewRoomIntro.tsx b/src/components/views/rooms/NewRoomIntro.tsx index be4ecaffb3..9be3d6be18 100644 --- a/src/components/views/rooms/NewRoomIntro.tsx +++ b/src/components/views/rooms/NewRoomIntro.tsx @@ -60,8 +60,9 @@ const NewRoomIntro = () => { { caption &&

{ caption }

} ; } else { + const inRoom = room && room.getMyMembership() === "join"; const topic = room.currentState.getStateEvents(EventType.RoomTopic, "")?.getContent()?.topic; - const canAddTopic = room.currentState.maySendStateEvent(EventType.RoomTopic, cli.getUserId()); + const canAddTopic = inRoom && room.currentState.maySendStateEvent(EventType.RoomTopic, cli.getUserId()); const onTopicClick = () => { dis.dispatch({ @@ -99,9 +100,25 @@ const NewRoomIntro = () => { }); } - const onInviteClick = () => { - dis.dispatch({ action: "view_invite", roomId }); - }; + let canInvite = inRoom; + const powerLevels = room.currentState.getStateEvents(EventType.RoomPowerLevels, "")?.getContent(); + const me = room.getMember(cli.getUserId()); + if (powerLevels && me && powerLevels.invite > me.powerLevel) { + canInvite = false; + } + + let buttons; + if (canInvite) { + const onInviteClick = () => { + dis.dispatch({ action: "view_invite", roomId }); + }; + + buttons =
+ + {_t("Invite to this room")} + +
+ } const avatarUrl = room.currentState.getStateEvents(EventType.RoomAvatar, "")?.getContent()?.url; body = @@ -119,11 +136,7 @@ const NewRoomIntro = () => { roomName: () => { room.name }, })}

{topicText}

-
- - {_t("Invite to this room")} - -
+ { buttons }
; } From e896b009f10fa2f40d453ba5fdbc9a83f28c0699 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Tue, 8 Dec 2020 10:58:16 +0000 Subject: [PATCH 221/319] Handle manual hs urls better --- src/components/views/dialogs/ServerPickerDialog.tsx | 3 ++- src/components/views/elements/ServerPicker.tsx | 2 +- src/utils/AutoDiscoveryUtils.js | 11 +++++++---- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/components/views/dialogs/ServerPickerDialog.tsx b/src/components/views/dialogs/ServerPickerDialog.tsx index 4d967220e0..e8a5fdcd1c 100644 --- a/src/components/views/dialogs/ServerPickerDialog.tsx +++ b/src/components/views/dialogs/ServerPickerDialog.tsx @@ -51,7 +51,8 @@ export default class ServerPickerDialog extends React.PureComponent; } - let serverName = serverConfig.hsName; + let serverName = serverConfig.static ? serverConfig.hsUrl : serverConfig.hsName; if (serverConfig.hsNameIsDifferent) { serverName =
; - const memberCount = useMemberCount(room); + const members = useRoomMembers(room); return
; - const members = useRoomMembers(room); + const memberCount = useRoomMemberCount(room); return
diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index 1b5d4b6ec4..f5484202e8 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -820,7 +820,6 @@ "Show hidden events in timeline": "Show hidden events in timeline", "Low bandwidth mode": "Low bandwidth mode", "Allow fallback call assist server turn.matrix.org when your homeserver does not offer one (your IP address would be shared during a call)": "Allow fallback call assist server turn.matrix.org when your homeserver does not offer one (your IP address would be shared during a call)", - "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", "How fast should messages be downloaded.": "How fast should messages be downloaded.", diff --git a/src/settings/Settings.ts b/src/settings/Settings.ts index 6bec31a1cb..b239b809fe 100644 --- a/src/settings/Settings.ts +++ b/src/settings/Settings.ts @@ -564,13 +564,6 @@ export const SETTINGS: {[setting: string]: ISetting} = { // This is a tri-state value, where `null` means "prompt the user". default: null, }, - "sendReadReceipts": { - supportedLevels: LEVELS_ROOM_SETTINGS, - displayName: _td( - "Send read receipts for messages (requires compatible homeserver to disable)", - ), - default: true, - }, "showImages": { supportedLevels: LEVELS_ACCOUNT_SETTINGS, displayName: _td("Show previews/thumbnails for images"), From 80d6629c3ea2ef11eb303932a822ac6c2926f3b7 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Wed, 9 Dec 2020 18:50:16 -0700 Subject: [PATCH 243/319] delete the rest too --- src/components/structures/TimelinePanel.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/components/structures/TimelinePanel.js b/src/components/structures/TimelinePanel.js index cc5c2a9844..27a384ddb2 100644 --- a/src/components/structures/TimelinePanel.js +++ b/src/components/structures/TimelinePanel.js @@ -715,8 +715,6 @@ class TimelinePanel extends React.Component { } this.lastRMSentEventId = this.state.readMarkerEventId; - const roomId = this.props.timelineSet.room.roomId; - debuglog('TimelinePanel: Sending Read Markers for ', this.props.timelineSet.room.roomId, 'rm', this.state.readMarkerEventId, @@ -732,7 +730,7 @@ class TimelinePanel extends React.Component { if (e.errcode === 'M_UNRECOGNIZED' && lastReadEvent) { return MatrixClientPeg.get().sendReadReceipt( lastReadEvent, - {hidden: hiddenRR}, + {}, ).catch((e) => { console.error(e); this.lastRRSentEventId = undefined; From 25033eb982bd53aa820d5aa5f89cbc4cf7f22067 Mon Sep 17 00:00:00 2001 From: Nikita Epifanov Date: Thu, 10 Dec 2020 09:57:19 +0000 Subject: [PATCH 244/319] Translated using Weblate (Russian) Currently translated at 97.5% (2642 of 2707 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/ru/ --- src/i18n/strings/ru.json | 302 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 294 insertions(+), 8 deletions(-) diff --git a/src/i18n/strings/ru.json b/src/i18n/strings/ru.json index 3c5ead3aa1..64bbfec40a 100644 --- a/src/i18n/strings/ru.json +++ b/src/i18n/strings/ru.json @@ -1084,8 +1084,8 @@ "Headphones": "Наушники", "Folder": "Папка", "Pin": "Кнопка", - "Your keys are being backed up (the first backup could take a few minutes).": "Выполняется резервная копия ключей (первый раз это может занять несколько минут).", - "The file '%(fileName)s' exceeds this homeserver's size limit for uploads": "Размер файла '%(fileName)s' превышает ограничения сервера для загрузки.", + "Your keys are being backed up (the first backup could take a few minutes).": "Выполняется резервная копия ключей (первый раз это может занять несколько минут).", + "The file '%(fileName)s' exceeds this homeserver's size limit for uploads": "Размер файла '%(fileName)s' превышает ограничения сервера для загрузки", "Prepends ¯\\_(ツ)_/¯ to a plain-text message": "Добавляет смайл ¯\\_(ツ)_/¯ в начало сообщения", "Changes your display nickname in the current room only": "Изменяет ваш псевдоним только для текущей комнаты", "Gets or sets the room topic": "Читает или устанавливает тему комнаты", @@ -1507,7 +1507,7 @@ "Italics": "Курсив", "Strikethrough": "Перечёркнутый", "Code block": "Блок кода", - "%(count)s unread messages.|other": "%(count)s непрочитанные сообщения.", + "%(count)s unread messages.|other": "%(count)s непрочитанных сообщений.", "Unread mentions.": "Непрочитанные упоминания.", "Show image": "Показать изображение", "e.g. my-room": "например, моя-комната", @@ -1535,7 +1535,7 @@ "This client does not support end-to-end encryption.": "Этот клиент не поддерживает сквозное шифрование.", "Messages in this room are not end-to-end encrypted.": "Сообщения в этой комнате не шифруются сквозным шифрованием.", "Please create a new issue on GitHub so that we can investigate this bug.": "Пожалуйста, создайте новую проблему/вопрос на GitHub, чтобы мы могли расследовать эту ошибку.", - "Use an identity server to invite by email. Use the default (%(defaultIdentityServerName)s) or manage in Settings.": "Используйте идентификационный сервер для приглашения по электронной почте. Используйте значение по умолчанию (%(defaultIdentityServerName)s) или управляйте в Настройках.", + "Use an identity server to invite by email. Use the default (%(defaultIdentityServerName)s) or manage in Settings.": "Используйте идентификационный сервер для приглашения по электронной почте. Используйте значение по умолчанию (%(defaultIdentityServerName)s) или управляйте в Настройках.", "Use an identity server to invite by email. Manage in Settings.": "Используйте идентификационный сервер для приглашения по электронной почте. Управление в Настройки.", "Block users on other matrix homeservers from joining this room (This setting cannot be changed later!)": "Запретить пользователям других Matrix-Серверов присоединяться к этой комнате (этот параметр нельзя изменить позже!)", "Reporting this message will send its unique 'event ID' to the administrator of your homeserver. If messages in this room are encrypted, your homeserver administrator will not be able to read the message text or view any files or images.": "Отчет о данном сообщении отправит свой уникальный 'event ID' администратору вашего домашнего сервера. Если сообщения в этой комнате зашифрованы, администратор вашего домашнего сервера не сможет прочитать текст сообщения или просмотреть какие-либо файлы или изображения.", @@ -2191,8 +2191,8 @@ "There was an error updating the room's alternative addresses. It may not be allowed by the server or a temporary failure occurred.": "Произошла ошибка при обновлении альтернативных адресов комнаты. Это может быть запрещено сервером или произошел временный сбой.", "There was an error creating that address. It may not be allowed by the server or a temporary failure occurred.": "При создании этого адреса произошла ошибка. Это может быть запрещено сервером или произошел временный сбой.", "There was an error removing that address. It may no longer exist or a temporary error occurred.": "Произошла ошибка при удалении этого адреса. Возможно, он больше не существует или произошла временная ошибка.", - "Using this widget may share data with %(widgetDomain)s & your Integration Manager.": "Используя этот виджет, вы можете делиться данными с %(widgetDomain)s и вашим Менеджером Интеграции.", - "Using this widget may share data with %(widgetDomain)s.": "Используя этот виджет, вы можете делиться данными с %(widgetDomain)s.", + "Using this widget may share data with %(widgetDomain)s & your Integration Manager.": "Используя этот виджет, вы можете делиться данными с %(widgetDomain)s и вашим Менеджером Интеграции.", + "Using this widget may share data with %(widgetDomain)s.": "Используя этот виджет, вы можете делиться данными с %(widgetDomain)s.", "Can't find this server or its room list": "Не можем найти этот сервер или его список комнат", "Deleting cross-signing keys is permanent. Anyone you have verified with will see security alerts. You almost certainly don't want to do this, unless you've lost every device you can cross-sign from.": "Удаление ключей кросс-подписи является мгновенным и необратимым действием. Любой, с кем вы прошли проверку, увидит предупреждения безопасности. Вы почти наверняка не захотите этого делать, если только не потеряете все устройства, с которых можно совершать кросс-подпись.", "Clearing all data from this session is permanent. Encrypted messages will be lost unless their keys have been backed up.": "Очистка всех данных этой сессии является необратимым действием. Зашифрованные сообщения будут потеряны, если их ключи не были сохранены.", @@ -2524,7 +2524,7 @@ "Starting microphone...": "Запуск микрофона…", "🎉 All servers are banned from participating! This room can no longer be used.": "🎉 Все серверы запрещены к участию! Эта комната больше не может быть использована.", "Remove messages sent by others": "Удалить сообщения, отправленные другими", - "Offline encrypted messaging using dehydrated devices": "Автономный обмен зашифрованными сообщениями с сохраненными устройствами", + "Offline encrypted messaging using dehydrated devices": "Автономный обмен зашифрованными сообщениями с сохранёнными устройствами", "Move right": "Сдвинуть вправо", "Move left": "Сдвинуть влево", "Revoke permissions": "Отозвать разрешения", @@ -2605,5 +2605,291 @@ "Return to call": "Вернуться к звонку", "Got an account? Sign in": "Есть учётная запись? Войти", "New here? Create an account": "Впервые здесь? Создать учётную запись", - "Render LaTeX maths in messages": "Отображать математику LaTeX в сообщениях" + "Render LaTeX maths in messages": "Отображать математику LaTeX в сообщениях", + "

HTML for your community's page

\n

\n Use the long description to introduce new members to the community, or distribute\n some important links\n

\n

\n You can even add images with Matrix URLs \n

\n": "

HTML для страницы вашего сообщества

\n

\n Используйте подробное описание, чтобы представить новых участников сообществу или распространить\n некоторые важные ссылки\n

\n

\n Вы даже можете добавлять изображения с URL-адресами Matrix \n

\n", + "Securely cache encrypted messages locally for them to appear in search results, using %(size)s to store messages from %(rooms)s rooms.|one": "Надежно кэшируйте зашифрованные сообщения локально, чтобы они отображались в результатах поиска, используется %(size)s для хранения сообщений из %(rooms)s комнаты.", + "Securely cache encrypted messages locally for them to appear in search results, using %(size)s to store messages from %(rooms)s rooms.|other": "Надежно кэшируйте зашифрованные сообщения локально, чтобы они отображались в результатах поиска, используется %(size)s для хранения сообщений из %(rooms)s комнат.", + "Messages here are end-to-end encrypted. Verify %(displayName)s in their profile - tap on their avatar.": "Сообщения в этом чате полностью зашифрованы. Вы можете проверить профиль %(displayName)s, нажав на аватар.", + "Unable to validate homeserver": "Невозможно проверить домашний сервер", + "Sign into your homeserver": "Войдите на свой домашний сервер", + "with state key %(stateKey)s": "с ключом состояния %(stateKey)s", + "%(creator)s created this DM.": "%(creator)s начал этот чат.", + "Show chat effects": "Показать эффекты чата", + "Host account on": "Ваша учётная запись обслуживается", + "%(ssoButtons)s Or %(usernamePassword)s": "%(ssoButtons)s или %(usernamePassword)s", + "Continuing without email": "Продолжить без электронной почты", + "Continue with %(ssoButtons)s": "Продолжить с %(ssoButtons)s", + "New? Create account": "Впервые тут? Создать учётную запись", + "Specify a homeserver": "Укажите домашний сервер", + "Continue with %(provider)s": "Продолжить с %(provider)s", + "Enter phone number": "Введите номер телефона", + "Enter email address": "Введите адрес электронной почты", + "The %(capability)s capability": "%(capability)s возможности", + "sends confetti": "отправить конфетти", + "Invalid URL": "Неправильный URL-адрес", + "Reason (optional)": "Причина (необязательно)", + "Forgot password?": "Забыли пароль?", + "About homeservers": "О домашних серверах", + "Learn more": "Узнать больше", + "Other homeserver": "Другой домашний сервер", + "Server Options": "Параметры сервера", + "Decline All": "Отклонить все", + "Homeserver": "Домашний сервер", + "Approve": "Одобрить", + "Approve widget permissions": "Одобрить разрешения виджета", + "Send stickers into your active room": "Отправить стикеры в активную комнату", + "Remain on your screen while running": "Оставаться на экране во время работы", + "Remain on your screen when viewing another room, when running": "Оставаться на экране, при отображании другой комнаты, во время работы", + "Effects": "Эффекты", + "Zimbabwe": "Зимбабве", + "Zambia": "Замбия", + "Yemen": "Йемен", + "Western Sahara": "Западная Сахара", + "Wallis & Futuna": "Уоллис и Футуна", + "Vietnam": "Вьетнам", + "Venezuela": "Венесуэла", + "Vatican City": "Ватикан", + "Vanuatu": "Вануату", + "Uzbekistan": "Узбекистан", + "Uruguay": "Уругвай", + "United Arab Emirates": "Объединенные Арабские Эмираты", + "Ukraine": "Украина", + "Uganda": "Уганда", + "U.S. Virgin Islands": "Виргинские острова (США)", + "Tuvalu": "Тувалу", + "Turks & Caicos Islands": "Острова Теркс и Кайкос", + "Turkmenistan": "Туркменистан", + "Turkey": "Турция", + "Tunisia": "Тунис", + "Trinidad & Tobago": "Тринидад и Тобаго", + "Tonga": "Тонга", + "Tokelau": "Токелау", + "Togo": "Того", + "Timor-Leste": "Тимор-Лешти", + "Thailand": "Таиланд", + "Tanzania": "Танзания", + "Tajikistan": "Таджикистан", + "Taiwan": "Тайвань", + "São Tomé & Príncipe": "Сан-Томе и Принсипи", + "Syria": "Сирия", + "Switzerland": "Швейцария", + "Sweden": "Швеция", + "Swaziland": "Эсватини", + "Svalbard & Jan Mayen": "Шпицберген и Ян-Майен", + "Suriname": "Суринам", + "Sudan": "Судан", + "St. Vincent & Grenadines": "Сент-Винсент и Гренадины", + "St. Pierre & Miquelon": "Сен-Пьер и Микелон", + "St. Martin": "Сен-Мартен", + "St. Lucia": "Сент-Люсия", + "St. Kitts & Nevis": "Сент-Китс и Невис", + "St. Helena": "Остров Святой Елены", + "St. Barthélemy": "Сен-Бартелеми", + "Sri Lanka": "Шри-Ланка", + "Spain": "Испания", + "South Sudan": "Южный Судан", + "South Korea": "Южная Корея", + "South Georgia & South Sandwich Islands": "Южная Георгия и Южные Сандвичевы острова", + "South Africa": "Южная Африка", + "Somalia": "Сомали", + "Solomon Islands": "Соломоновы острова", + "Slovenia": "Словения", + "Slovakia": "Словакия", + "Sint Maarten": "Синт-Мартен", + "Singapore": "Сингапур", + "Sierra Leone": "Сьерра-Леоне", + "Seychelles": "Сейшельские острова", + "Serbia": "Сербия", + "Senegal": "Сенегал", + "Saudi Arabia": "Саудовская Аравия", + "San Marino": "Сан-Марино", + "Samoa": "Самоа", + "Réunion": "Реюньон", + "Rwanda": "Руанда", + "Russia": "Российская Федерация", + "Romania": "Румыния", + "Qatar": "Катар", + "Puerto Rico": "Пуэрто-Рико", + "Portugal": "Португалия", + "Poland": "Польша", + "Pitcairn Islands": "Питкэрн", + "Philippines": "Филиппины", + "Peru": "Перу", + "Paraguay": "Парагвай", + "Papua New Guinea": "Папуа - Новая Гвинея", + "Panama": "Панама", + "Palestine": "Палестина", + "Palau": "Палау", + "Pakistan": "Пакистан", + "Oman": "Оман", + "Norway": "Норвегия", + "Northern Mariana Islands": "Северные Марианские острова", + "North Korea": "Северная Корея", + "Norfolk Island": "Остров Норфолк", + "Niue": "Ниуэ", + "Nigeria": "Нигерия", + "Niger": "Нигер", + "Nicaragua": "Никарагуа", + "New Zealand": "Новая Зеландия", + "New Caledonia": "Новая Каледония", + "Netherlands": "Нидерланды", + "Nepal": "Непал", + "Nauru": "Науру", + "Namibia": "Намибия", + "Myanmar": "Мьянма", + "Mozambique": "Мозамбик", + "Morocco": "Марокко", + "Montserrat": "Монсеррат", + "Montenegro": "Черногория", + "Mongolia": "Монголия", + "Monaco": "Монако", + "Moldova": "Молдова", + "Micronesia": "Микронезия", + "Mexico": "Мексика", + "Mayotte": "Майотта", + "Mauritius": "Маврикий", + "Mauritania": "Мавритания", + "Martinique": "Мартиника", + "Marshall Islands": "Маршалловы острова", + "Malta": "Мальта", + "Mali": "Мали", + "Maldives": "Мальдивы", + "Malaysia": "Малайзия", + "Malawi": "Малави", + "Madagascar": "Мадагаскар", + "Macedonia": "Северная Македония", + "Macau": "Макао", + "Luxembourg": "Люксембург", + "Lithuania": "Литва", + "Liechtenstein": "Лихтенштейн", + "Libya": "Ливия", + "Liberia": "Либерия", + "Lesotho": "Лесото", + "Lebanon": "Ливан", + "Latvia": "Латвия", + "Laos": "Лаосская Народно-Демократическая Республика", + "Kyrgyzstan": "Кыргызстан", + "Kuwait": "Кувейт", + "Kosovo": "Косово", + "Kiribati": "Кирибати", + "Kenya": "Кения", + "Kazakhstan": "Казахстан", + "Jordan": "Иордания", + "Jersey": "Джерси", + "Japan": "Япония", + "Jamaica": "Ямайка", + "Italy": "Италия", + "Israel": "Израиль", + "Isle of Man": "Остров Мэн", + "Ireland": "Ирландия", + "Iraq": "Ирак", + "Iran": "Иран", + "Indonesia": "Индонезия", + "India": "Индия", + "Iceland": "Исландия", + "Hungary": "Венгрия", + "Hong Kong": "Гонконг", + "Honduras": "Гондурас", + "Heard & McDonald Islands": "Остров Херд и Острова Макдоналд", + "Haiti": "Гаити", + "Guyana": "Гайана", + "Guinea-Bissau": "Гвинея-Бисау", + "Guinea": "Гвинея", + "Guernsey": "Гернси", + "Guatemala": "Гватемала", + "Guam": "Гуам", + "Guadeloupe": "Гваделупа", + "Grenada": "Гренада", + "Greenland": "Гренландия", + "Greece": "Греция", + "Gibraltar": "Гибралтар", + "Ghana": "Гана", + "Germany": "Германия", + "Georgia": "Грузия", + "Gambia": "Гамбия", + "Gabon": "Габон", + "French Southern Territories": "Южные Французские Территории", + "French Polynesia": "Французская Полинезия", + "French Guiana": "Французская Гвиана", + "France": "Франция", + "Finland": "Финляндия", + "Fiji": "Фиджи", + "Faroe Islands": "Фарерские острова", + "Falkland Islands": "Фолклендские острова", + "Ethiopia": "Эфиопия", + "Estonia": "Эстония", + "Eritrea": "Еритрея", + "Equatorial Guinea": "Экваториальная Гвинея", + "El Salvador": "Сальвадор", + "Egypt": "Египет", + "Ecuador": "Эквадор", + "Dominican Republic": "Доминиканская Республика", + "Dominica": "Доминика", + "Djibouti": "Джибути", + "Denmark": "Дания", + "Côte d’Ivoire": "Кот-д'Ивуар", + "Czech Republic": "Чехия", + "Cyprus": "Кипр", + "Curaçao": "Кюрасао", + "Cuba": "Куба", + "Croatia": "Хорватия", + "Costa Rica": "Коста-Рика", + "Cook Islands": "Острова Кука", + "Congo - Kinshasa": "Демократическая Республика Конго", + "Congo - Brazzaville": "Конго", + "Comoros": "Коморские острова", + "Colombia": "Колумбия", + "Cocos (Keeling) Islands": "Кокосовые (Килинг) острова", + "Christmas Island": "Остров Рождества", + "China": "Китай", + "Chile": "Чили", + "Chad": "Чад", + "Central African Republic": "Центрально-Африканская Республика", + "Cayman Islands": "Каймановы острова", + "Caribbean Netherlands": "Бонайре, Синт-Эстатиус и Саба", + "Cape Verde": "Кабо-Верде", + "Canada": "Канада", + "Cameroon": "Камерун", + "Cambodia": "Камбоджа", + "Burundi": "Бурунди", + "Burkina Faso": "Буркина-Фасо", + "Bulgaria": "Болгария", + "Brunei": "Бруней", + "British Virgin Islands": "Британские Виргинские острова", + "British Indian Ocean Territory": "Британская территория Индийского океана", + "Brazil": "Бразилия", + "Bouvet Island": "Остров Буве", + "Botswana": "Ботсвана", + "Bosnia": "Босния и Герцеговина", + "Bolivia": "Боливия", + "Bhutan": "Бутан", + "Bermuda": "Бермудские острова", + "Benin": "Бенин", + "Belize": "Белиз", + "Belgium": "Бельгия", + "Belarus": "Беларусь", + "Barbados": "Барбадос", + "Bangladesh": "Бангладеш", + "Bahrain": "Бахрейн", + "Bahamas": "Багамские острова", + "Azerbaijan": "Азербайджан", + "Austria": "Австрия", + "Australia": "Австралия", + "Aruba": "Аруба", + "Armenia": "Армения", + "Argentina": "Аргентина", + "Antigua & Barbuda": "Антигуа и Барбуда", + "Antarctica": "Антарктика", + "Anguilla": "Ангилья", + "Angola": "Ангола", + "Andorra": "Андорра", + "American Samoa": "Американское Самоа", + "Algeria": "Алжир", + "Albania": "Албания", + "Åland Islands": "Аландские острова", + "Afghanistan": "Афганистан", + "United States": "Соединенные Штаты Америки", + "United Kingdom": "Великобритания", + "Call failed because webcam or microphone could not be accessed. Check that:": "Вызов не удался, потому что не удалось получить доступ к веб-камере или микрофону. Проверь это:", + "Call failed because microphone could not be accessed. Check that a microphone is plugged in and set up correctly.": "Вызов не удался из-за отсутствия доступа к микрофону. Убедитесь, что микрофон подключен и правильно настроен." } From aed89c7053ef21c540e3ebdec51ca99821cc7ea3 Mon Sep 17 00:00:00 2001 From: Nikita Epifanov Date: Thu, 10 Dec 2020 12:17:31 +0000 Subject: [PATCH 245/319] Translated using Weblate (Russian) Currently translated at 100.0% (2707 of 2707 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/ru/ --- src/i18n/strings/ru.json | 67 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 66 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/ru.json b/src/i18n/strings/ru.json index 64bbfec40a..22abf3b929 100644 --- a/src/i18n/strings/ru.json +++ b/src/i18n/strings/ru.json @@ -2891,5 +2891,70 @@ "United States": "Соединенные Штаты Америки", "United Kingdom": "Великобритания", "Call failed because webcam or microphone could not be accessed. Check that:": "Вызов не удался, потому что не удалось получить доступ к веб-камере или микрофону. Проверь это:", - "Call failed because microphone could not be accessed. Check that a microphone is plugged in and set up correctly.": "Вызов не удался из-за отсутствия доступа к микрофону. Убедитесь, что микрофон подключен и правильно настроен." + "Call failed because microphone could not be accessed. Check that a microphone is plugged in and set up correctly.": "Вызов не удался из-за отсутствия доступа к микрофону. Убедитесь, что микрофон подключен и правильно настроен.", + "See %(msgtype)s messages posted to your active room": "Посмотрите %(msgtype)s сообщения, размещённые в вашей активной комнате", + "Send general files as you in your active room": "Отправьте файлы от своего имени в активной комнате", + "Change the topic of your active room": "Измените тему вашей активной комнаты", + "See when the topic changes in this room": "Посмотрите, изменится ли тема этого чата", + "Change the topic of this room": "Измените тему этой комнаты", + "Change which room you're viewing": "Измените комнату, которую вы просматриваете", + "See %(msgtype)s messages posted to this room": "Посмотрите %(msgtype)s сообщения размещённые в этой комнате", + "Send %(msgtype)s messages as you in your active room": "Отправьте %(msgtype)s сообщения от своего имени в вашу активную комнату", + "Send %(msgtype)s messages as you in this room": "Отправьте %(msgtype)s сообщения от своего имени в эту комнату", + "See general files posted to your active room": "Посмотрите файлы, размещённые в вашей активной комнате", + "See general files posted to this room": "Посмотрите файлы, размещённые в этой комнате", + "Send general files as you in this room": "Отправьте файлы от своего имени в этой комнате", + "See videos posted to your active room": "Посмотрите видео размещённые в вашей активной комнате", + "See videos posted to this room": "Посмотрите видео размещённые в этой комнате", + "Send videos as you in your active room": "Отправьте видео от своего имени в вашей активной комнате", + "Send videos as you in this room": "Отправьте видео от своего имени в этой комнате", + "See images posted to this room": "Посмотрите изображения, размещённые в этой комнате", + "See emotes posted to your active room": "Посмотрите эмоции, размещённые в вашей активной комнате", + "See emotes posted to this room": "Посмотрите эмоции, размещённые в этой комнате", + "See text messages posted to your active room": "Посмотрите текстовые сообщения, размещённые в вашей активной комнате", + "See text messages posted to this room": "Посмотрите текстовые сообщения, размещённые в этой комнате", + "See messages posted to your active room": "Посмотрите сообщения, размещённые в вашей активной комнате", + "See messages posted to this room": "Посмотрите сообщения, размещённые в этой комнате", + "See %(eventType)s events posted to your active room": "Посмотрите %(eventType)s события, размещённые в вашей активной комнате", + "See %(eventType)s events posted to this room": "Посмотрите %(eventType)s события, размещённые в этой комнате", + "See when anyone posts a sticker to your active room": "Посмотрите, когда кто-нибудь размещает стикер в вашей активной комнате", + "See when a sticker is posted in this room": "Посмотрите, когда в этой комнате размещается стикер", + "See images posted to your active room": "Посмотрите изображения, размещённые в вашей активной комнате", + "Send images as you in your active room": "Отправьте изображения от своего имени в свою активную комнату", + "Send images as you in this room": "Отправьте изображения от своего имени в эту комнату", + "Send emotes as you in your active room": "Отправляйте эмоции от своего имени в активную комнату", + "Send emotes as you in this room": "Отправляйте эмоции от своего имени в эту комнату", + "Send text messages as you in your active room": "Отправляйте текстовые сообщения от своего имени в активную комнату", + "Send text messages as you in this room": "Отправляйте текстовые сообщения от своего имени в этой комнате", + "Send messages as you in your active room": "Отправляйте сообщения от своего имени в вашу активную комнату", + "Send messages as you in this room": "Отправляйте сообщения от своего имени в этой комнате", + "Send %(eventType)s events as you in your active room": "Отправляйте %(eventType)s события от своего имени в вашей активной комнате", + "Send %(eventType)s events as you in this room": "Отправляйте события %(eventType)s от своего имени в этой комнате", + "Send stickers to your active room as you": "Отправьте стикер от своего имени в активную комнату", + "Send stickers to this room as you": "Отправьте стикеры от своего имени в эту комнату", + "with an empty state key": "с пустым ключом состояния", + "See when the avatar changes in your active room": "Посмотрите, когда изменится аватар в вашей активной комнате", + "See when the avatar changes in this room": "Посмотрите, когда изменится аватар в этой комнате", + "See when the name changes in your active room": "Посмотрите, когда изменится название в вашей активной комнате", + "See when the name changes in this room": "Посмотрите, когда изменится название этой комнаты", + "Change the avatar of your active room": "Измените аватар вашей активной комнаты", + "Change the avatar of this room": "Смените аватар этой комнаты", + "Change the name of this room": "Измените название этой комнаты", + "Change the name of your active room": "Измените название вашей активной комнаты", + "See when the topic changes in your active room": "Посмотрите, изменится ли тема текущего активного чата", + "This widget would like to:": "Этому виджету хотелось бы:", + "You can use the custom server options to sign into other Matrix servers by specifying a different homeserver URL. This allows you to use Element with an existing Matrix account on a different homeserver.": "Вы можете использовать настраиваемые параметры сервера для входа на другие серверы Matrix, указав другой URL-адрес домашнего сервера. Это позволяет вам использовать Element с существующей учётной записью Matrix на другом домашнем сервере.", + "Just a heads up, if you don't add an email and forget your password, you could permanently lose access to your account.": "Предупреждаем: если вы не добавите адрес электронной почты и забудете пароль, вы можете навсегда потерять доступ к своей учётной записи.", + "Matrix.org is the biggest public homeserver in the world, so it’s a good place for many.": "Matrix.org - крупнейший в мире домашний публичный сервер, который подходит многим.", + "Use your preferred Matrix homeserver if you have one, or host your own.": "Если вы предпочитаете домашний сервер Matrix, используйте его. Вы также можете настроить свой собственный домашний сервер, если хотите.", + "That phone number doesn't look quite right, please check and try again": "Этот номер телефона неправильный, проверьте его и повторите попытку", + "Add an email to be able to reset your password.": "Чтобы иметь возможность изменить свой пароль в случае необходимости, добавьте свой адрес электронной почты.", + "Use email or phone to optionally be discoverable by existing contacts.": "Если вы хотите, чтобы другие пользователи могли вас найти, укажите свой адрес электронной почты или номер телефона.", + "Use email to optionally be discoverable by existing contacts.": "Если вы хотите, чтобы другие пользователи могли вас найти, укажите свой адрес электронной почты.", + "There was a problem communicating with the homeserver, please try again later.": "Возникла проблема при обмене данными с домашним сервером. Повторите попытку позже.", + "That username already exists, please try another.": "Это имя пользователя уже существует, попробуйте другое.", + "Already have an account? Sign in here": "Уже есть учётная запись? Войдите здесь", + "Decide where your account is hosted": "Выберите, кто обслуживает вашу учётную запись", + "We call the places where you can host your account ‘homeservers’.": "Мы называем места, где вы можете разместить свою учётную запись, 'домашними серверами'.", + "Sends the given message with confetti": "Отправляет данное сообщение с конфетти" } From 5770472c7088c1e4f842765e5e999efdc10e2380 Mon Sep 17 00:00:00 2001 From: Jadran Prodan Date: Thu, 10 Dec 2020 10:47:31 +0000 Subject: [PATCH 246/319] Translated using Weblate (Slovenian) Currently translated at 1.0% (28 of 2707 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/sl/ --- src/i18n/strings/sl.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/sl.json b/src/i18n/strings/sl.json index 2024821bb2..0e9bdb3d3e 100644 --- a/src/i18n/strings/sl.json +++ b/src/i18n/strings/sl.json @@ -25,5 +25,7 @@ "Call Declined": "Klic zavrnjen", "Call Failed": "Klic ni uspel", "Your homeserver's URL": "URL domačega strežnika", - "End": "Konec" + "End": "Konec", + "Use default": "Uporabi privzeto", + "Change": "Sprememba" } From 80be46bc32ff80f13f8865462898caafefa70076 Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 10 Dec 2020 15:18:22 +0000 Subject: [PATCH 247/319] Fix vertical scrolling in videoview Fixes https://github.com/vector-im/element-web/issues/15886 --- src/components/views/voip/CallView.tsx | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/components/views/voip/CallView.tsx b/src/components/views/voip/CallView.tsx index b450d082d2..65ba693b58 100644 --- a/src/components/views/voip/CallView.tsx +++ b/src/components/views/voip/CallView.tsx @@ -94,6 +94,8 @@ const CONTROLS_HIDE_DELAY = 1000; // Height of the header duplicated from CSS because we need to subtract it from our max // height to get the max height of the video const HEADER_HEIGHT = 44; +const BOTTOM_PADDING = 10; +const BOTTOM_MARGIN_TOP_BOTTOM = 10; // top margin plus bottom margin const CONTEXT_MENU_VPADDING = 8; // How far the context menu sits above the button (px) export default class CallView extends React.Component { @@ -453,8 +455,15 @@ export default class CallView extends React.Component { } // if we're fullscreen, we don't want to set a maxHeight on the video element. - const maxVideoHeight = getFullScreenElement() ? null : this.props.maxVideoHeight - HEADER_HEIGHT; - contentView =
+ const maxVideoHeight = getFullScreenElement() ? null : ( + this.props.maxVideoHeight - (HEADER_HEIGHT + BOTTOM_PADDING + BOTTOM_MARGIN_TOP_BOTTOM) + ); + contentView =
{onHoldBackground} Date: Thu, 10 Dec 2020 15:52:03 +0000 Subject: [PATCH 248/319] Only want margins on the large view --- res/css/views/voip/_CallView.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/res/css/views/voip/_CallView.scss b/res/css/views/voip/_CallView.scss index 236880a531..dbe2c27e41 100644 --- a/res/css/views/voip/_CallView.scss +++ b/res/css/views/voip/_CallView.scss @@ -20,13 +20,13 @@ limitations under the License. background-color: $voipcall-plinth-color; padding-left: 8px; padding-right: 8px; - margin: 5px 5px 5px 18px; // XXX: CallContainer sets pointer-events: none - should probably be set back in a better place pointer-events: initial; } .mx_CallView_large { padding-bottom: 10px; + margin: 5px 5px 5px 18px; .mx_CallView_voice { height: 360px; From 649ea0d148ee17eb2d1fefc550582146530d6953 Mon Sep 17 00:00:00 2001 From: Hubert Chathi Date: Thu, 10 Dec 2020 21:52:18 -0500 Subject: [PATCH 249/319] apply changes from review, and other fixes/improvements --- src/BasePlatform.ts | 8 ++- src/IndexedDB.ts | 92 ----------------------------- src/Lifecycle.ts | 115 ++++++++++++++++++++++++++---------- src/utils/StorageManager.js | 76 ++++++++++++++++++++++++ 4 files changed, 166 insertions(+), 125 deletions(-) delete mode 100644 src/IndexedDB.ts diff --git a/src/BasePlatform.ts b/src/BasePlatform.ts index 46fa998f15..c301aa6a10 100644 --- a/src/BasePlatform.ts +++ b/src/BasePlatform.ts @@ -26,7 +26,7 @@ import {CheckUpdatesPayload} from "./dispatcher/payloads/CheckUpdatesPayload"; import {Action} from "./dispatcher/actions"; import {hideToast as hideUpdateToast} from "./toasts/UpdateToast"; import {MatrixClientPeg} from "./MatrixClientPeg"; -import {idbLoad, idbSave, idbDelete} from "./IndexedDB"; +import {idbLoad, idbSave, idbDelete} from "./utils/StorageManager"; export const SSO_HOMESERVER_URL_KEY = "mx_sso_hs_url"; export const SSO_ID_SERVER_URL_KEY = "mx_sso_is_url"; @@ -344,7 +344,11 @@ export default abstract class BasePlatform { {name: "AES-GCM", iv, additionalData}, cryptoKey, randomArray, ); - await idbSave("pickleKey", [userId, deviceId], {encrypted, iv, cryptoKey}); + try { + await idbSave("pickleKey", [userId, deviceId], {encrypted, iv, cryptoKey}); + } catch (e) { + return null; + } return encodeUnpaddedBase64(randomArray); } diff --git a/src/IndexedDB.ts b/src/IndexedDB.ts deleted file mode 100644 index bf03ffccb7..0000000000 --- a/src/IndexedDB.ts +++ /dev/null @@ -1,92 +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. -*/ - -/* Simple wrapper around IndexedDB. - */ - -let idb = null; - -async function idbInit(): Promise { - idb = await new Promise((resolve, reject) => { - const request = window.indexedDB.open("element", 1); - request.onerror = reject; - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore: TS thinks target.result doesn't exist - request.onsuccess = (event) => { resolve(event.target.result); }; - request.onupgradeneeded = (event) => { - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore: TS thinks target.result doesn't exist - const db = event.target.result; - db.createObjectStore("pickleKey"); - db.createObjectStore("account"); - }; - }); -} - -export async function idbLoad( - table: string, - key: string | string[], -): Promise { - if (!idb) { - await idbInit(); - } - return new Promise((resolve, reject) => { - const txn = idb.transaction([table], "readonly"); - txn.onerror = reject; - - const objectStore = txn.objectStore(table); - const request = objectStore.get(key); - request.onerror = reject; - request.onsuccess = (event) => { resolve(request.result); }; - }); -} - -export async function idbSave( - table: string, - key: string | string[], - data: any, -): Promise { - if (!idb) { - await idbInit(); - } - return new Promise((resolve, reject) => { - const txn = idb.transaction([table], "readwrite"); - txn.onerror = reject; - - const objectStore = txn.objectStore(table); - const request = objectStore.put(data, key); - request.onerror = reject; - request.onsuccess = (event) => { resolve(); }; - }); -} - -export async function idbDelete( - table: string, - key: string | string[], -): Promise { - if (!idb) { - await idbInit(); - } - return new Promise((resolve, reject) => { - const txn = idb.transaction([table], "readwrite"); - txn.onerror = reject; - - const objectStore = txn.objectStore(table); - const request = objectStore.delete(key); - request.onerror = reject; - request.onsuccess = (event) => { resolve(); }; - }); -} diff --git a/src/Lifecycle.ts b/src/Lifecycle.ts index 2f6309415f..f87af1a791 100644 --- a/src/Lifecycle.ts +++ b/src/Lifecycle.ts @@ -51,7 +51,6 @@ import ThreepidInviteStore from "./stores/ThreepidInviteStore"; import CountlyAnalytics from "./CountlyAnalytics"; import CallHandler from './CallHandler'; import LifecycleCustomisations from "./customisations/Lifecycle"; -import {idbLoad, idbSave, idbDelete} from "./IndexedDB"; const HOMESERVER_URL_KEY = "mx_hs_url"; const ID_SERVER_URL_KEY = "mx_is_url"; @@ -154,8 +153,8 @@ export async function loadSession(opts: ILoadSessionOpts = {}): Promise * return [null, null]. */ export async function getStoredSessionOwner(): Promise<[string, boolean]> { - const {hsUrl, userId, accessToken, isGuest} = await getLocalStorageSessionVars(); - return hsUrl && userId && accessToken ? [userId, isGuest] : [null, null]; + const {hsUrl, userId, hasAccessToken, isGuest} = await getStoredSessionVars(); + return hsUrl && userId && hasAccessToken ? [userId, isGuest] : [null, null]; } /** @@ -193,7 +192,7 @@ export function attemptTokenLogin( ).then(function(creds) { console.log("Logged in with token"); return clearStorage().then(async () => { - await persistCredentialsToLocalStorage(creds); + await persistCredentials(creds); // remember that we just logged in sessionStorage.setItem("mx_fresh_login", String(true)); return true; @@ -271,31 +270,42 @@ function registerAsGuest( }); } -export interface ILocalStorageSession { +export interface IStoredSession { hsUrl: string; isUrl: string; - accessToken: string; + hasAccessToken: boolean; + accessToken: string | object; userId: string; deviceId: string; isGuest: boolean; } /** - * Retrieves information about the stored session in localstorage. The session + * Retrieves information about the stored session from the browser's storage. The session * may not be valid, as it is not tested for consistency here. * @returns {Object} Information about the session - see implementation for variables. */ -export async function getLocalStorageSessionVars(): Promise { +export async function getStoredSessionVars(): Promise { const hsUrl = localStorage.getItem(HOMESERVER_URL_KEY); const isUrl = localStorage.getItem(ID_SERVER_URL_KEY); - let accessToken = await idbLoad("account", "mx_access_token"); + let accessToken; + try { + accessToken = await StorageManager.idbLoad("account", "mx_access_token"); + } catch (e) {} if (!accessToken) { accessToken = localStorage.getItem("mx_access_token"); if (accessToken) { - await idbSave("account", "mx_access_token", accessToken); - localStorage.removeItem("mx_access_token"); + try { + // try to migrate access token to IndexedDB if we can + await StorageManager.idbSave("account", "mx_access_token", accessToken); + localStorage.removeItem("mx_access_token"); + } catch (e) {} } } + // if we pre-date storing "mx_has_access_token", but we retrieved an access + // token, then we should say we have an access token + const hasAccessToken = + (localStorage.getItem("mx_has_access_token") === "true") || !!accessToken; const userId = localStorage.getItem("mx_user_id"); const deviceId = localStorage.getItem("mx_device_id"); @@ -307,7 +317,7 @@ export async function getLocalStorageSessionVars(): Promise { )); } +async function abortLogin() { + const signOut = await showStorageEvictedDialog(); + if (signOut) { + await clearStorage(); + // This error feels a bit clunky, but we want to make sure we don't go any + // further and instead head back to sign in. + throw new AbortLoginAndRebuildStorage( + "Aborting login in progress because of storage inconsistency", + ); + } +} + // returns a promise which resolves to true if a session is found in // localstorage // @@ -351,7 +373,11 @@ async function restoreFromLocalStorage(opts?: { ignoreGuest?: boolean }): Promis return false; } - const {hsUrl, isUrl, accessToken, userId, deviceId, isGuest} = await getLocalStorageSessionVars(); + const {hsUrl, isUrl, hasAccessToken, accessToken, userId, deviceId, isGuest} = await getStoredSessionVars(); + + if (hasAccessToken && !accessToken) { + abortLogin(); + } if (accessToken && userId && hsUrl) { if (ignoreGuest && isGuest) { @@ -379,7 +405,7 @@ async function restoreFromLocalStorage(opts?: { ignoreGuest?: boolean }): Promis await doSetLoggedIn({ userId: userId, deviceId: deviceId, - accessToken: decryptedAccessToken, + accessToken: decryptedAccessToken as string, homeserverUrl: hsUrl, identityServerUrl: isUrl, guest: isGuest, @@ -518,15 +544,7 @@ async function doSetLoggedIn( // crypto store, we'll be generally confused when handling encrypted data. // Show a modal recommending a full reset of storage. if (results.dataInLocalStorage && results.cryptoInited && !results.dataInCryptoStore) { - const signOut = await showStorageEvictedDialog(); - if (signOut) { - await clearStorage(); - // This error feels a bit clunky, but we want to make sure we don't go any - // further and instead head back to sign in. - throw new AbortLoginAndRebuildStorage( - "Aborting login in progress because of storage inconsistency", - ); - } + await abortLogin(); } Analytics.setLoggedIn(credentials.guest, credentials.homeserverUrl); @@ -548,7 +566,7 @@ async function doSetLoggedIn( if (localStorage) { try { - await persistCredentialsToLocalStorage(credentials); + await persistCredentials(credentials); // make sure we don't think that it's a fresh login any more sessionStorage.removeItem("mx_fresh_login"); } catch (e) { @@ -577,7 +595,7 @@ function showStorageEvictedDialog(): Promise { // `instanceof`. Babel 7 supports this natively in their class handling. class AbortLoginAndRebuildStorage extends Error { } -async function persistCredentialsToLocalStorage(credentials: IMatrixClientCreds): Promise { +async function persistCredentials(credentials: IMatrixClientCreds): Promise { localStorage.setItem(HOMESERVER_URL_KEY, credentials.homeserverUrl); if (credentials.identityServerUrl) { localStorage.setItem(ID_SERVER_URL_KEY, credentials.identityServerUrl); @@ -585,14 +603,47 @@ async function persistCredentialsToLocalStorage(credentials: IMatrixClientCreds) localStorage.setItem("mx_user_id", credentials.userId); localStorage.setItem("mx_is_guest", JSON.stringify(credentials.guest)); + // store whether we expect to find an access token, to detect the case + // where IndexedDB is blown away + if (credentials.accessToken) { + localStorage.setItem("mx_has_access_token", "true"); + } else { + localStorage.deleteItem("mx_has_access_token"); + } + if (credentials.pickleKey) { - const encrKey = await pickleKeyToAesKey(credentials.pickleKey); - const encryptedAccessToken = await encryptAES(credentials.accessToken, encrKey, "access_token"); - encrKey.fill(0); - await idbSave("account", "mx_access_token", encryptedAccessToken); + let encryptedAccessToken; + try { + // try to encrypt the access token using the pickle key + const encrKey = await pickleKeyToAesKey(credentials.pickleKey); + encryptedAccessToken = await encryptAES(credentials.accessToken, encrKey, "access_token"); + encrKey.fill(0); + } catch (e) { + console.warn("Could not encrypt access token", e); + } + try { + // save either the encrypted access token, or the plain access + // token if we were unable to encrypt (e.g. if the browser doesn't + // have WebCrypto). + await StorageManager.idbSave( + "account", "mx_access_token", + encryptedAccessToken || credentials.accessToken, + ); + } catch (e) { + // if we couldn't save to indexedDB, fall back to localStorage. We + // store the access token unencrypted since localStorage only saves + // strings. + localStorage.setItem("mx_access_token", credentials.accessToken); + } localStorage.setItem("mx_has_pickle_key", String(true)); } else { - await idbSave("account", "mx_access_token", credentials.accessToken); + try { + await StorageManager.idbSave( + "account", "mx_access_token", credentials.accessToken, + ); + } catch (e) { + localStorage.setItem("mx_access_token", credentials.accessToken); + } if (localStorage.getItem("mx_has_pickle_key")) { console.error("Expected a pickle key, but none provided. Encryption may not work."); } @@ -769,7 +820,9 @@ async function clearStorage(opts?: { deleteEverything?: boolean }): Promise { + if (!indexedDB) { + throw new Error("IndexedDB not available"); + } + idb = await new Promise((resolve, reject) => { + const request = indexedDB.open("matrix-react-sdk", 1); + request.onerror = reject; + request.onsuccess = (event) => { resolve(request.result); }; + request.onupgradeneeded = (event) => { + const db = request.result; + db.createObjectStore("pickleKey"); + db.createObjectStore("account"); + }; + }); +} + +export async function idbLoad( + table: string, + key: string | string[], +): Promise { + if (!idb) { + await idbInit(); + } + return new Promise((resolve, reject) => { + const txn = idb.transaction([table], "readonly"); + txn.onerror = reject; + + const objectStore = txn.objectStore(table); + const request = objectStore.get(key); + request.onerror = reject; + request.onsuccess = (event) => { resolve(request.result); }; + }); +} + +export async function idbSave( + table: string, + key: string | string[], + data: any, +): Promise { + if (!idb) { + await idbInit(); + } + return new Promise((resolve, reject) => { + const txn = idb.transaction([table], "readwrite"); + txn.onerror = reject; + + const objectStore = txn.objectStore(table); + const request = objectStore.put(data, key); + request.onerror = reject; + request.onsuccess = (event) => { resolve(); }; + }); +} + +export async function idbDelete( + table: string, + key: string | string[], +): Promise { + if (!idb) { + await idbInit(); + } + return new Promise((resolve, reject) => { + const txn = idb.transaction([table], "readwrite"); + txn.onerror = reject; + + const objectStore = txn.objectStore(table); + const request = objectStore.delete(key); + request.onerror = reject; + request.onsuccess = (event) => { resolve(); }; + }); +} From 10930b84046c4cf15d6ab46fdf31e9476e248ebd Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Thu, 10 Dec 2020 20:57:20 -0700 Subject: [PATCH 250/319] Fix being unable to pin widgets Turns out that we were obliterating the entire store of widgets each time we loaded a widget, which is less than helpful. This commit fixes that. This commit also improves the cleanup of the pinned event object to remove unpinned widgets, reducing accumulation over time. Fixes https://github.com/vector-im/element-web/issues/15948 --- src/stores/WidgetStore.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/stores/WidgetStore.ts b/src/stores/WidgetStore.ts index f1b5ea9be0..c9cf0a1c70 100644 --- a/src/stores/WidgetStore.ts +++ b/src/stores/WidgetStore.ts @@ -134,6 +134,7 @@ export default class WidgetStore extends AsyncStoreWithClient { // first clean out old widgets from the map which originate from this room // otherwise we are out of sync with the rest of the app with stale widget events during removal Array.from(this.widgetMap.values()).forEach(app => { + if (app.roomId !== room.roomId) return; // skip - wrong room this.widgetMap.delete(widgetUid(app)); }); @@ -233,7 +234,7 @@ export default class WidgetStore extends AsyncStoreWithClient { // Clean up the pinned record Object.keys(roomInfo).forEach(wId => { - if (!roomInfo.widgets.some(w => w.id === wId)) { + if (!roomInfo.widgets.some(w => w.id === wId) || !roomInfo.pinned[wId]) { delete roomInfo.pinned[wId]; } }); From b6123506d43c88f7d1f8fe50ab25ced5c3fd65dc Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Thu, 10 Dec 2020 21:00:37 -0700 Subject: [PATCH 251/319] Run chat effects on events sent by widgets too --- src/stores/widgets/StopGapWidgetDriver.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/stores/widgets/StopGapWidgetDriver.ts b/src/stores/widgets/StopGapWidgetDriver.ts index 60988040d3..f0746f2f58 100644 --- a/src/stores/widgets/StopGapWidgetDriver.ts +++ b/src/stores/widgets/StopGapWidgetDriver.ts @@ -39,7 +39,10 @@ import WidgetCapabilitiesPromptDialog, { import { WidgetPermissionCustomisations } from "../../customisations/WidgetPermissions"; import { OIDCState, WidgetPermissionStore } from "./WidgetPermissionStore"; import { WidgetType } from "../../widgets/WidgetType"; -import { EventType } from "matrix-js-sdk/src/@types/event"; +import { EventType, MsgType } from "matrix-js-sdk/src/@types/event"; +import { CHAT_EFFECTS } from "../../effects"; +import { containsEmoji } from "../../effects/utils"; +import dis from "../../dispatcher/dispatcher"; // TODO: Purge this from the universe @@ -123,6 +126,14 @@ export class StopGapWidgetDriver extends WidgetDriver { } else { // message event r = await client.sendEvent(roomId, eventType, content); + + if (eventType === EventType.RoomMessage) { + CHAT_EFFECTS.forEach((effect) => { + if (containsEmoji(content, effect.emojis)) { + dis.dispatch({action: `effects.${effect.command}`}); + } + }); + } } return {roomId, eventId: r.event_id}; From b15ac77d6c640f3b8ac7e021f0f1c174e4305f3e Mon Sep 17 00:00:00 2001 From: Marcelo Filho Date: Thu, 10 Dec 2020 23:07:57 +0000 Subject: [PATCH 252/319] Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (2710 of 2710 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/pt_BR/ --- src/i18n/strings/pt_BR.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/pt_BR.json b/src/i18n/strings/pt_BR.json index 397c02deec..05c6db5c0c 100644 --- a/src/i18n/strings/pt_BR.json +++ b/src/i18n/strings/pt_BR.json @@ -2896,5 +2896,9 @@ "sends confetti": "envia confetes", "Sends the given message with confetti": "Envia a mensagem com confetes", "Show chat effects": "Mostrar efeitos em conversas", - "Effects": "Efeitos" + "Effects": "Efeitos", + "Hold": "Pausar", + "Resume": "Retomar", + "%(peerName)s held the call": "%(peerName)s pausou a chamada", + "You held the call Resume": "Você pausou a chamada Retomar" } From 44d68130689f58ea7adad903f256bc5d2c91c91d Mon Sep 17 00:00:00 2001 From: Nikita Epifanov Date: Fri, 11 Dec 2020 08:33:35 +0000 Subject: [PATCH 253/319] Translated using Weblate (Russian) Currently translated at 100.0% (2710 of 2710 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/ru/ --- src/i18n/strings/ru.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/ru.json b/src/i18n/strings/ru.json index 22abf3b929..d2e674c3ed 100644 --- a/src/i18n/strings/ru.json +++ b/src/i18n/strings/ru.json @@ -2956,5 +2956,9 @@ "Already have an account? Sign in here": "Уже есть учётная запись? Войдите здесь", "Decide where your account is hosted": "Выберите, кто обслуживает вашу учётную запись", "We call the places where you can host your account ‘homeservers’.": "Мы называем места, где вы можете разместить свою учётную запись, 'домашними серверами'.", - "Sends the given message with confetti": "Отправляет данное сообщение с конфетти" + "Sends the given message with confetti": "Отправляет данное сообщение с конфетти", + "Hold": "Удерживать", + "Resume": "Возобновить", + "%(peerName)s held the call": "%(peerName)s удерживает звонок", + "You held the call Resume": "Вы удерживаете звонок Возобновить" } From 3d9e7d25f9d53534d7a8b3fe7dc7d9e4d19a25a3 Mon Sep 17 00:00:00 2001 From: Jeff Huang Date: Fri, 11 Dec 2020 02:47:05 +0000 Subject: [PATCH 254/319] Translated using Weblate (Chinese (Traditional)) Currently translated at 100.0% (2711 of 2711 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/zh_Hant/ --- src/i18n/strings/zh_Hant.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/zh_Hant.json b/src/i18n/strings/zh_Hant.json index d8cc146e7f..1b73d78286 100644 --- a/src/i18n/strings/zh_Hant.json +++ b/src/i18n/strings/zh_Hant.json @@ -2967,5 +2967,9 @@ "Show chat effects": "顯示聊天特效", "Effects": "影響", "Call failed because webcam or microphone could not be accessed. Check that:": "通話失敗,因為無法存取網路攝影機或麥克風。請檢查:", - "Call failed because microphone could not be accessed. Check that a microphone is plugged in and set up correctly.": "通話失敗,因為無法存取麥克風。請檢查是否已插入麥克風並正確設定。" + "Call failed because microphone could not be accessed. Check that a microphone is plugged in and set up correctly.": "通話失敗,因為無法存取麥克風。請檢查是否已插入麥克風並正確設定。", + "Hold": "保留", + "Resume": "繼續", + "%(peerName)s held the call": "%(peerName)s 保留通話", + "You held the call Resume": "您已保留通話 繼續" } From 3f5fae014d4abc09e0547420f91109628c90f081 Mon Sep 17 00:00:00 2001 From: Mitja Sorsa Date: Thu, 10 Dec 2020 20:05:32 +0000 Subject: [PATCH 255/319] Translated using Weblate (Finnish) Currently translated at 82.8% (2245 of 2710 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/fi/ --- src/i18n/strings/fi.json | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/fi.json b/src/i18n/strings/fi.json index a78c5b0448..297cd69790 100644 --- a/src/i18n/strings/fi.json +++ b/src/i18n/strings/fi.json @@ -2436,5 +2436,22 @@ "Call failed because webcam or microphone could not be accessed. Check that:": "Puhelu epäonnistui, koska kameraa tai mikrofonia ei voitu käyttää. Tarkista että:", "Unable to access webcam / microphone": "Kameraa / mikrofonia ei voi käyttää", "Call failed because microphone could not be accessed. Check that a microphone is plugged in and set up correctly.": "Puhelu epäonnistui, koska mikrofonia ei voitu käyttää. Tarkista, että mikrofoni on kytketty ja asennettu oikein.", - "Unable to access microphone": "Mikrofonia ei voi käyttää" + "Unable to access microphone": "Mikrofonia ei voi käyttää", + "El Salvador": "El Salvador", + "Egypt": "Egypti", + "Ecuador": "Ecuador", + "Dominican Republic": "Dominikaaninen tasavalta", + "Dominica": "Dominica", + "Djibouti": "Djibouti", + "Denmark": "Tanska", + "Côte d’Ivoire": "Norsunluurannikko", + "Czech Republic": "Tšekki", + "Cyprus": "Kypros", + "Curaçao": "Curaçao", + "Cuba": "Kuuba", + "Croatia": "Kroatia", + "Costa Rica": "Costa Rica", + "Cook Islands": "Cookinsaaret", + "Congo - Kinshasa": "Kongo-Kinshasa", + "Congo - Brazzaville": "Kongo-Brazzavile" } From fd26954e196868d97af06c16dd02bfa019ae98c8 Mon Sep 17 00:00:00 2001 From: XoseM Date: Fri, 11 Dec 2020 05:51:53 +0000 Subject: [PATCH 256/319] Translated using Weblate (Galician) Currently translated at 100.0% (2710 of 2710 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/gl/ --- src/i18n/strings/gl.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/gl.json b/src/i18n/strings/gl.json index 5f9eced4f7..dc58d97f79 100644 --- a/src/i18n/strings/gl.json +++ b/src/i18n/strings/gl.json @@ -2964,5 +2964,9 @@ "Show chat effects": "Mostrar efectos do chat", "Effects": "Efectos", "Call failed because webcam or microphone could not be accessed. Check that:": "A chamada fallou porque non tiñas acceso á cámara ou ó micrófono. Comproba:", - "Call failed because microphone could not be accessed. Check that a microphone is plugged in and set up correctly.": "A chamada fallou porque non tiñas acceso ó micrófono. Comproba que o micrófono está conectado e correctamente configurado." + "Call failed because microphone could not be accessed. Check that a microphone is plugged in and set up correctly.": "A chamada fallou porque non tiñas acceso ó micrófono. Comproba que o micrófono está conectado e correctamente configurado.", + "Hold": "Colgar", + "Resume": "Retomar", + "%(peerName)s held the call": "%(peerName)s finalizou a chamada", + "You held the call Resume": "Colgaches a chamada, Retomar" } From 7a33b92884882f32f7a0af7b59c306b7b4cf1c87 Mon Sep 17 00:00:00 2001 From: MamasLT Date: Thu, 10 Dec 2020 21:56:58 +0000 Subject: [PATCH 257/319] Translated using Weblate (Lithuanian) Currently translated at 70.0% (1898 of 2710 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/lt/ --- src/i18n/strings/lt.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/lt.json b/src/i18n/strings/lt.json index 516fcc977b..0e00436d27 100644 --- a/src/i18n/strings/lt.json +++ b/src/i18n/strings/lt.json @@ -2039,5 +2039,6 @@ "Update status": "Atnaujinti statusą", "Update community": "Atnaujinti bendruomenę", "The visibility of '%(roomName)s' in %(groupId)s could not be updated.": "Kambario %(roomName)s matomumas bendruomenėje %(groupId)s negalėjo būti atnaujintas.", - "Update %(brand)s": "Atnaujinti %(brand)s" + "Update %(brand)s": "Atnaujinti %(brand)s", + "Someone is using an unknown session": "Kažkas naudoja nežinomą seansą" } From 1e23345deff5066f1d14ef69a207eeca2d86bad3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Priit=20J=C3=B5er=C3=BC=C3=BCt?= Date: Thu, 10 Dec 2020 18:27:10 +0000 Subject: [PATCH 258/319] Translated using Weblate (Estonian) Currently translated at 100.0% (2710 of 2710 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/et/ --- src/i18n/strings/et.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/et.json b/src/i18n/strings/et.json index d3d7011bd2..f369c44db7 100644 --- a/src/i18n/strings/et.json +++ b/src/i18n/strings/et.json @@ -2965,5 +2965,9 @@ "sends confetti": "saatis serpentiine", "Sends the given message with confetti": "Lisab sellele sõnumile serpentiine", "Show chat effects": "Näita vestlustes efekte", - "Effects": "Vahvad täiendused" + "Effects": "Vahvad täiendused", + "Hold": "Pane ootele", + "Resume": "Jätka", + "%(peerName)s held the call": "%(peerName)s pani kõne ootele", + "You held the call Resume": "Sa panid kõne ootele. Jätka kõnet" } From c80ccf63860fd5b465594ceb9d6910f11842bfab Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Fri, 11 Dec 2020 08:27:46 -0700 Subject: [PATCH 259/319] Remove unused import --- src/stores/widgets/StopGapWidgetDriver.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stores/widgets/StopGapWidgetDriver.ts b/src/stores/widgets/StopGapWidgetDriver.ts index f0746f2f58..2d2d1fcbdb 100644 --- a/src/stores/widgets/StopGapWidgetDriver.ts +++ b/src/stores/widgets/StopGapWidgetDriver.ts @@ -39,7 +39,7 @@ import WidgetCapabilitiesPromptDialog, { import { WidgetPermissionCustomisations } from "../../customisations/WidgetPermissions"; import { OIDCState, WidgetPermissionStore } from "./WidgetPermissionStore"; import { WidgetType } from "../../widgets/WidgetType"; -import { EventType, MsgType } from "matrix-js-sdk/src/@types/event"; +import { EventType } from "matrix-js-sdk/src/@types/event"; import { CHAT_EFFECTS } from "../../effects"; import { containsEmoji } from "../../effects/utils"; import dis from "../../dispatcher/dispatcher"; From a14d858802da2b8a90869aed1fb8498621450b0e Mon Sep 17 00:00:00 2001 From: Nikita Epifanov Date: Fri, 11 Dec 2020 12:06:52 +0000 Subject: [PATCH 260/319] Translated using Weblate (Russian) Currently translated at 100.0% (2711 of 2711 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/ru/ --- src/i18n/strings/ru.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/ru.json b/src/i18n/strings/ru.json index d2e674c3ed..bb6dbdf308 100644 --- a/src/i18n/strings/ru.json +++ b/src/i18n/strings/ru.json @@ -2960,5 +2960,8 @@ "Hold": "Удерживать", "Resume": "Возобновить", "%(peerName)s held the call": "%(peerName)s удерживает звонок", - "You held the call Resume": "Вы удерживаете звонок Возобновить" + "You held the call Resume": "Вы удерживаете звонок Возобновить", + "%(name)s paused": "%(name)s приостановлен", + "You've reached the maximum number of simultaneous calls.": "Вы достигли максимального количества одновременных звонков.", + "Too Many Calls": "Слишком много звонков" } From 822b8c799d3277720094e8408d142459ec13c87f Mon Sep 17 00:00:00 2001 From: MamasLT Date: Fri, 11 Dec 2020 15:58:23 +0000 Subject: [PATCH 261/319] Translated using Weblate (Lithuanian) Currently translated at 70.1% (1903 of 2711 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/lt/ --- src/i18n/strings/lt.json | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/i18n/strings/lt.json b/src/i18n/strings/lt.json index 0e00436d27..62b34104a6 100644 --- a/src/i18n/strings/lt.json +++ b/src/i18n/strings/lt.json @@ -1686,7 +1686,7 @@ "%(senderName)s removed the alternative addresses %(addresses)s for this room.|other": "%(senderName)s pašalino alternatyvius šio kambario adresus %(addresses)s.", "Room settings": "Kambario nustatymai", "Link to most recent message": "Nuoroda į naujausią žinutę", - "Invite someone using their name, username (like ) or share this room.": "Pakviesti ką nors naudojant jų vardą, vartotojo vardą (pavyzdžiui ) arba bendrinti šį kambarį.", + "Invite someone using their name, username (like ) or share this room.": "Pakviesti ką nors naudojant jų vardą, vartotojo vardą (pvz.: ) arba bendrinti šį kambarį.", "Share Room Message": "Bendrinti Kambario Žinutę", "Share Room": "Bendrinti Kambarį", "Use bots, bridges, widgets and sticker packs": "Naudoti botus, tiltus, valdiklius ir lipdukų pakuotes", @@ -2040,5 +2040,12 @@ "Update community": "Atnaujinti bendruomenę", "The visibility of '%(roomName)s' in %(groupId)s could not be updated.": "Kambario %(roomName)s matomumas bendruomenėje %(groupId)s negalėjo būti atnaujintas.", "Update %(brand)s": "Atnaujinti %(brand)s", - "Someone is using an unknown session": "Kažkas naudoja nežinomą seansą" + "Someone is using an unknown session": "Kažkas naudoja nežinomą seansą", + "PRO TIP: If you start a bug, please submit debug logs to help us track down the problem.": "PRO PATARIMAS: Jei pradėjote klaidos pranešimą, pateikite derinimo žurnalus, kad padėtumėte mums išsiaiškinti problemą.", + "Please review and accept the policies of this homeserver:": "Peržiūrėkite ir sutikite su šio serverio politika:", + "Please review and accept all of the homeserver's policies": "Peržiūrėkite ir sutikite su visa serverio politika", + "Please view existing bugs on Github first. No match? Start a new one.": "Pirmiausia peržiūrėkite Github'e esančius pranešimus apie klaidas. Jokio atitikmens? Pradėkite naują pranešimą.", + "This usually only affects how the room is processed on the server. If you're having problems with your %(brand)s, please report a bug.": "Paprastai tai turi įtakos tik kambario apdorojimui serveryje. Jei jūs turite problemų su savo %(brand)s, praneškite apie klaidą.", + "Report a bug": "Pranešti apie klaidą", + "Invite someone using their name, email address, username (like ) or share this room.": "Pakviesti ką nors, naudojant jų vardą, el. pašto adresą, vartotojo vardą (pvz.: ) arba bendrinti šį kambarį." } From e99060e951376caa6696e09c9b043c694ae6bd34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Priit=20J=C3=B5er=C3=BC=C3=BCt?= Date: Fri, 11 Dec 2020 17:55:43 +0000 Subject: [PATCH 262/319] Translated using Weblate (Estonian) Currently translated at 100.0% (2711 of 2711 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/et/ --- src/i18n/strings/et.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/et.json b/src/i18n/strings/et.json index f369c44db7..738f0c6e08 100644 --- a/src/i18n/strings/et.json +++ b/src/i18n/strings/et.json @@ -2969,5 +2969,8 @@ "Hold": "Pane ootele", "Resume": "Jätka", "%(peerName)s held the call": "%(peerName)s pani kõne ootele", - "You held the call Resume": "Sa panid kõne ootele. Jätka kõnet" + "You held the call Resume": "Sa panid kõne ootele. Jätka kõnet", + "You've reached the maximum number of simultaneous calls.": "Oled jõudnud suurima lubatud samaaegsete kõnede arvuni.", + "%(name)s paused": "%(name)s peatas ajutiselt kõne", + "Too Many Calls": "Liiga palju kõnesid" } From 9ffabfa5caad24b07677635bae802195529944aa Mon Sep 17 00:00:00 2001 From: strix aluco Date: Sun, 13 Dec 2020 00:50:21 +0000 Subject: [PATCH 263/319] Translated using Weblate (Ukrainian) Currently translated at 53.3% (1445 of 2711 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/uk/ --- src/i18n/strings/uk.json | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/i18n/strings/uk.json b/src/i18n/strings/uk.json index ad3bf634e2..d8123dd7b6 100644 --- a/src/i18n/strings/uk.json +++ b/src/i18n/strings/uk.json @@ -177,7 +177,7 @@ "Can't update user notification settings": "Неможливо оновити налаштування користувацьких сповіщень", "Notify for all other messages/rooms": "Сповіщати щодо всіх повідомлень/кімнат", "Unable to look up room ID from server": "Неможливо знайти ID кімнати на сервері", - "Couldn't find a matching Matrix room": "Неможливо знайти відповідну кімнату", + "Couldn't find a matching Matrix room": "Не вдалось знайти відповідну кімнату", "Invite to this room": "Запросити до цієї кімнати", "Thursday": "Четвер", "Search…": "Пошук…", @@ -1524,5 +1524,9 @@ "Fiji": "Фіджі", "Faroe Islands": "Фарерські Острови", "Unable to access microphone": "Неможливо доступитись до мікрофона", - "Filter rooms and people": "Відфільтрувати кімнати та людей" + "Filter rooms and people": "Відфільтрувати кімнати та людей", + "Find a room… (e.g. %(exampleRoom)s)": "Знайти кімнату… (напр. %(exampleRoom)s)", + "Find a room…": "Знайти кімнату…", + "Can't find this server or its room list": "Не вдалось знайти цей сервер у переліку кімнат", + "If you can't find the room you're looking for, ask for an invite or Create a new room.": "Якщо ви не можете знайти потрібну кімнату, попросіть запрошення або Створіть нову кімнату власноруч." } From 78fa9203c3b9709fb4b16ca7cfa4b3ca3bdb287d Mon Sep 17 00:00:00 2001 From: Ihor Hordiichuk Date: Sat, 12 Dec 2020 13:51:38 +0000 Subject: [PATCH 264/319] Translated using Weblate (Ukrainian) Currently translated at 53.3% (1445 of 2711 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/uk/ --- src/i18n/strings/uk.json | 50 ++++++++++++++++++++-------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/src/i18n/strings/uk.json b/src/i18n/strings/uk.json index d8123dd7b6..bebe718976 100644 --- a/src/i18n/strings/uk.json +++ b/src/i18n/strings/uk.json @@ -66,14 +66,14 @@ "Can't connect to homeserver - please check your connectivity, ensure your homeserver's SSL certificate is trusted, and that a browser extension is not blocking requests.": "Не вдається підключитись до домашнього серверу - перевірте підключення, переконайтесь, що ваш SSL-сертифікат домашнього сервера є довіреним і що розширення браузера не блокує запити.", "Cannot add any more widgets": "Неможливо додати більше віджетів", "Change Password": "Змінити пароль", - "%(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.", + "%(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 removed the room name.": "%(senderDisplayName)s видалив ім'я кімнати.", - "%(senderDisplayName)s changed the topic to \"%(topic)s\".": "%(senderDisplayName)s змінив тему на %(topic)s.", + "%(senderDisplayName)s changed the topic to \"%(topic)s\".": "%(senderDisplayName)s змінює тему на %(topic)s.", "Email": "е-пошта", "Email address": "Адреса е-пошти", - "Failed to send email": "Помилка відправки е-почти", + "Failed to send email": "Помилка надсилання електронного листа", "Edit": "Відредагувати", "Unpin Message": "Відкріпити повідомлення", "Register": "Зареєструватися", @@ -326,13 +326,13 @@ "Reason": "Причина", "%(senderName)s requested a VoIP conference.": "%(senderName)s бажає розпочати дзвінок-конференцію.", "%(senderName)s invited %(targetName)s.": "%(senderName)s запросив/ла %(targetName)s.", - "%(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.", "%(senderName)s set their display name to %(displayName)s.": "%(senderName)s зазначив(-ла) своє видиме ім'я: %(displayName)s.", "%(senderName)s removed their display name (%(oldDisplayName)s).": "%(senderName)s видалив(-ла) своє видиме ім'я (%(oldDisplayName)s).", "%(senderName)s removed their profile picture.": "%(senderName)s вилучав/ла свою світлину профілю.", - "%(senderName)s set a profile picture.": "%(senderName)s встановив/ла світлину профілю.", + "%(senderName)s set a profile picture.": "%(senderName)s встановлює світлину профілю.", "VoIP conference started.": "Розпочато дзвінок-конференцію.", - "%(targetName)s joined the room.": "%(targetName)s приєднав/лася до кімнати.", + "%(targetName)s joined the room.": "%(targetName)s приєднується до кімнати.", "VoIP conference finished.": "Дзвінок-конференцію завершено.", "%(targetName)s rejected the invitation.": "%(targetName)s відкинув/ла запрошення.", "%(targetName)s left the room.": "%(targetName)s залишив/ла кімнату.", @@ -347,7 +347,7 @@ "(could not connect media)": "(не можливо під'єднати медіа)", "(no answer)": "(немає відповіді)", "(unknown failure: %(reason)s)": "(невідома помилка: %(reason)s)", - "%(senderName)s ended the call.": "%(senderName)s завершив/ла дзвінок.", + "%(senderName)s ended the call.": "%(senderName)s завершує дзвінок.", "%(senderName)s sent an invitation to %(targetDisplayName)s to join the room.": "%(senderName)s надіслав(-ла) запрошення %(targetDisplayName)s приєднатися до кімнати.", "Show developer tools": "Показувати розробницькі засоби", "Default": "Типово", @@ -357,8 +357,8 @@ "%(senderName)s made future room history visible to anyone.": "%(senderName)s зробив(-ла) майбутню історію кімнати видимою для всіх.", "%(senderName)s made future room history visible to unknown (%(visibility)s).": "%(senderName)s зробив(-ла) майбутню історію видимою для невідомого значення (%(visibility)s).", "%(userId)s from %(fromPowerLevel)s to %(toPowerLevel)s": "%(userId)s з %(fromPowerLevel)s до %(toPowerLevel)s", - "%(senderName)s changed the pinned messages for the room.": "%(senderName)s змінив(-ла) приколоті повідомлення у кімнаті.", - "%(widgetName)s widget modified by %(senderName)s": "%(senderName)s змінив(-ла) знадіб %(widgetName)s", + "%(senderName)s changed the pinned messages for the room.": "%(senderName)s змінює приколоті повідомлення у кімнаті.", + "%(widgetName)s widget modified by %(senderName)s": "%(senderName)s змінює знадіб %(widgetName)s", "%(widgetName)s widget added by %(senderName)s": "%(senderName)s додав(-ла) знадіб %(widgetName)s", "%(widgetName)s widget removed by %(senderName)s": "%(senderName)s вилучив(-ла) знадіб %(widgetName)s", "Failure to create room": "Не вдалося створити кімнату", @@ -658,23 +658,23 @@ "Opens chat with the given user": "Відкриває балачку з вказаним користувачем", "Sends a message to the given user": "Надсилає повідомлення вказаному користувачеві", "%(senderName)s made no change.": "%(senderName)s не запровадив(-ла) жодних змін.", - "%(senderDisplayName)s changed the room name from %(oldRoomName)s to %(newRoomName)s.": "%(senderDisplayName)s змінив(ла) назву кімнати з %(oldRoomName)s на %(newRoomName)s.", + "%(senderDisplayName)s changed the room name from %(oldRoomName)s to %(newRoomName)s.": "%(senderDisplayName)s змінює назву кімнати з %(oldRoomName)s на %(newRoomName)s.", "%(senderDisplayName)s upgraded this room.": "%(senderDisplayName)s поліпшив(-ла) цю кімнату.", "%(senderDisplayName)s made the room public to whoever knows the link.": "%(senderDisplayName)s зробив(-ла) кімнату відкритою для всіх, хто знає посилання.", "%(senderDisplayName)s made the room invite only.": "%(senderDisplayName)s зробив(-ла) кімнату доступною лише за запрошеннями.", - "%(senderDisplayName)s changed the join rule to %(rule)s": "%(senderDisplayName)s змінив(-ла) правило приєднування на \"%(rule)s\"", + "%(senderDisplayName)s changed the join rule to %(rule)s": "%(senderDisplayName)s змінює правило приєднування на \"%(rule)s\"", "%(senderDisplayName)s has allowed guests to join the room.": "%(senderDisplayName)s дозволив(-ла) гостям приєднуватися до кімнати.", "%(senderDisplayName)s has prevented guests from joining the room.": "%(senderDisplayName)s заборонив(-ла) гостям приєднуватися до кімнати.", - "%(senderDisplayName)s changed guest access to %(rule)s": "%(senderDisplayName)s змінив(-ла) гостьовий доступ на \"%(rule)s\"", + "%(senderDisplayName)s changed guest access to %(rule)s": "%(senderDisplayName)s змінює гостьовий доступ на \"%(rule)s\"", "%(senderDisplayName)s enabled flair for %(groups)s in this room.": "%(senderDisplayName)s увімкнув(-ла) значок для %(groups)s у цій кімнаті.", "%(senderDisplayName)s disabled flair for %(groups)s in this room.": "%(senderDisplayName)s вимкнув(-ла) значок для %(groups)s в цій кімнаті.", "%(senderName)s added the alternative addresses %(addresses)s for this room.|other": "%(senderName)s додав(-ла) альтернативні адреси %(addresses)s для цієї кімнати.", "%(senderName)s added the alternative addresses %(addresses)s for this room.|one": "%(senderName)s додав(-ла) альтернативні адреси %(addresses)s для цієї кімнати.", "%(senderName)s removed the alternative addresses %(addresses)s for this room.|other": "%(senderName)s прибрав(-ла) альтернативні адреси %(addresses)s для цієї кімнати.", "%(senderName)s removed the alternative addresses %(addresses)s for this room.|one": "%(senderName)s прибрав(-ла) альтернативні адреси %(addresses)s для цієї кімнати.", - "%(senderName)s changed the alternative addresses for this room.": "%(senderName)s змінив(-ла) альтернативні адреси для цієї кімнати.", - "%(senderName)s changed the main and alternative addresses for this room.": "%(senderName)s змінив(-ла) головні та альтернативні адреси для цієї кімнати.", - "%(senderName)s changed the addresses for this room.": "%(senderName)s змінив(-ла) адреси для цієї кімнати.", + "%(senderName)s changed the alternative addresses for this room.": "%(senderName)s змінює альтернативні адреси для цієї кімнати.", + "%(senderName)s changed the main and alternative addresses for this room.": "%(senderName)s змінює головні та альтернативні адреси для цієї кімнати.", + "%(senderName)s changed the addresses for this room.": "%(senderName)s змінює адреси для цієї кімнати.", "%(senderName)s placed a voice call.": "%(senderName)s розпочав(-ла) голосовий виклик.", "%(senderName)s placed a voice call. (not supported by this browser)": "%(senderName)s розпочав(-ла) голосовий виклик. (не підтримується цим переглядачем)", "%(senderName)s placed a video call.": "%(senderName)s розпочав(-ла) відеовиклик.", @@ -780,7 +780,7 @@ "Guest": "Гість", "There was an error joining the room": "Помилка при вході в кімнату", "You joined the call": "Ви приєднались до дзвінку", - "%(senderName)s joined the call": "%(senderName)s приєднався(лась) до дзвінку", + "%(senderName)s joined the call": "%(senderName)s приєднується до розмови", "Call in progress": "Дзвінок у процесі", "You left the call": "Ви припинили розмову", "%(senderName)s left the call": "%(senderName)s покинув(ла) дзвінок", @@ -998,7 +998,7 @@ "Disconnect": "Відключити", "You should:": "Вам варто:", "Disconnect anyway": "Відключити в будь-якому випадку", - "Identity Server (%(server)s)": "Сервер ідентифікації (%(server)s)", + "Identity Server (%(server)s)": "Сервер ідентифікації (%(server)s)", "Identity Server": "Сервер ідентифікації", "Do not use an identity server": "Не використовувати сервер ідентифікації", "Enter a new identity server": "Введіть новий сервер ідентифікації", @@ -1182,10 +1182,10 @@ "Emoji": "Емодзі", "Emoji Autocomplete": "Самодоповнення емодзі", "%(senderName)s created a ban rule matching %(glob)s for %(reason)s": "%(senderName)s створив(-ла) правило блокування зі збігом з %(glob)s через %(reason)s", - "%(senderName)s changed a rule that was banning users matching %(oldGlob)s to matching %(newGlob)s for %(reason)s": "%(senderName)s змінив(-ла) правило блокування користувачів зі збігу з %(oldGlob)s на збіг з %(newGlob)s через %(reason)s", - "%(senderName)s changed a rule that was banning rooms matching %(oldGlob)s to matching %(newGlob)s for %(reason)s": "%(senderName)s змінив(-ла) правило блокування кімнат зі збігу з %(oldGlob)s на збіг з %(newGlob)s через %(reason)s", - "%(senderName)s changed a rule that was banning servers matching %(oldGlob)s to matching %(newGlob)s for %(reason)s": "%(senderName)s змінив(-ла) правило блокування серверів зі збігу з %(oldGlob)s на збіг з %(newGlob)s через %(reason)s", - "%(senderName)s updated a ban rule that was matching %(oldGlob)s to matching %(newGlob)s for %(reason)s": "%(senderName)s змінив(-ла) правило блокування зі збігу з %(oldGlob)s на збіг з %(newGlob)s через %(reason)s", + "%(senderName)s changed a rule that was banning users matching %(oldGlob)s to matching %(newGlob)s for %(reason)s": "%(senderName)s змінює правило блокування користувачів зі збігу з %(oldGlob)s на збіг з %(newGlob)s через %(reason)s", + "%(senderName)s changed a rule that was banning rooms matching %(oldGlob)s to matching %(newGlob)s for %(reason)s": "%(senderName)s змінює правило блокування кімнат зі збігу з %(oldGlob)s на збіг з %(newGlob)s через %(reason)s", + "%(senderName)s changed a rule that was banning servers matching %(oldGlob)s to matching %(newGlob)s for %(reason)s": "%(senderName)s змінює правило блокування серверів зі збігу з %(oldGlob)s на збіг з %(newGlob)s через %(reason)s", + "%(senderName)s updated a ban rule that was matching %(oldGlob)s to matching %(newGlob)s for %(reason)s": "%(senderName)s змінєю правило блокування зі збігу з %(oldGlob)s на збіг з %(newGlob)s через %(reason)s", "Enable Community Filter Panel": "Увімкнути фільтр панелі спільнот", "Messages containing my username": "Повідомлення, що містять моє користувацьке ім'я", "Messages containing @room": "Повідомлення, що містять @room", @@ -1345,8 +1345,8 @@ "Cook Islands": "Острови Кука", "Congo - Kinshasa": "Демократична Республіка Конго", "Congo - Brazzaville": "Конго", - "%(senderDisplayName)s changed the server ACLs for this room.": "%(senderDisplayName)s змінив серверні права доступу для цієї кімнати.", - "%(senderDisplayName)s set the server ACLs for this room.": "%(senderDisplayName)s встановив серверні права доступу для цієї кімнати", + "%(senderDisplayName)s changed the server ACLs for this room.": "%(senderDisplayName)s змінює серверні права доступу для цієї кімнати.", + "%(senderDisplayName)s set the server ACLs for this room.": "%(senderDisplayName)s встановлює серверні права доступу для цієї кімнати.", "Takes the call in the current room off hold": "Зніміть дзвінок у поточній кімнаті з утримання", "Places the call in the current room on hold": "Переведіть дзвінок у поточній кімнаті на утримання", "Zimbabwe": "Зімбабве", From 586d2df9a6de8cb4a7bb4bdd0214792a06d3981e Mon Sep 17 00:00:00 2001 From: waclaw66 Date: Sat, 12 Dec 2020 17:44:24 +0000 Subject: [PATCH 265/319] Translated using Weblate (Czech) Currently translated at 79.3% (2151 of 2711 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/cs/ --- src/i18n/strings/cs.json | 47 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 45 insertions(+), 2 deletions(-) diff --git a/src/i18n/strings/cs.json b/src/i18n/strings/cs.json index a50dff9123..9c60938728 100644 --- a/src/i18n/strings/cs.json +++ b/src/i18n/strings/cs.json @@ -1332,7 +1332,7 @@ "The homeserver may be unavailable or overloaded.": "Domovský server je nedostupný nebo přetížený.", "Add room": "Přidat místnost", "You have %(count)s unread notifications in a prior version of this room.|other": "Máte %(count)s nepřečtených oznámení v předchozí verzi této místnosti.", - "You have %(count)s unread notifications in a prior version of this room.|one": "Máte jedno nepřečtené oznámení v předchozí verzi této místnosti.", + "You have %(count)s unread notifications in a prior version of this room.|one": "Máte %(count)s nepřečtených oznámení v předchozí verzi této místnosti.", "Your profile": "Váš profil", "Your Matrix account on ": "Váš účet Matrix na serveru ", "Failed to get autodiscovery configuration from server": "Nepovedlo se automaticky načíst konfiguraci ze serveru", @@ -2282,5 +2282,48 @@ "Answered Elsewhere": "Zodpovězeno jinde", "The call could not be established": "Hovor se nepovedlo navázat", "The other party declined the call.": "Druhá strana hovor odmítla.", - "Call Declined": "Hovor odmítnut" + "Call Declined": "Hovor odmítnut", + "PRO TIP: If you start a bug, please submit debug logs to help us track down the problem.": "TIP pro profíky: Pokud nahlásíte chybu, odešlete prosím ladicí protokoly, které nám pomohou problém vypátrat.", + "Please view existing bugs on Github first. No match? Start a new one.": "Nejříve si prosím prohlédněte existující chyby na Githubu. Žádná shoda? Nahlašte novou chybu.", + "Report a bug": "Nahlásit chybu", + "Add widgets, bridges & bots": "Přidat widgety, bridge a boty", + "Widgets": "Widgety", + "Show Widgets": "Zobrazit widgety", + "Hide Widgets": "Skrýt widgety", + "Room settings": "Nastavení místnosti", + "Use the Desktop app to see all encrypted files": "Pomocí desktopové aplikace zobrazíte všechny šifrované soubory", + "Attach files from chat or just drag and drop them anywhere in a room.": "Připojte soubory z chatu nebo je jednoduše přetáhněte kamkoli do místnosti.", + "No files visible in this room": "V této místnosti nejsou viditelné žádné soubory", + "Show files": "Zobrazit soubory", + "%(count)s people|other": "%(count)s lidé", + "About": "O", + "You’re all caught up": "Vše vyřízeno", + "You have no visible notifications in this room.": "V této místnosti nemáte žádná viditelná oznámení.", + "Hey you. You're the best!": "Hej ty. Jsi nejlepší!", + "Secret storage:": "Bezpečné úložiště:", + "Backup key cached:": "Klíč zálohy cachován:", + "Backup key stored:": "Klíč zálohy uložen:", + "Backup version:": "Verze zálohy:", + "Algorithm:": "Algoritmus:", + "You might enable this if the room will only be used for collaborating with internal teams on your homeserver. This cannot be changed later.": "Tuto možnost můžete povolit, pokud bude místnost použita pouze pro spolupráci s interními týmy na vašem domovském serveru. Toto nelze později změnit.", + "Block anyone not part of %(serverName)s from ever joining this room.": "Blokovat komukoli, kdo není součástí serveru %(serverName)s, aby se nikdy nepřipojil do této místnosti.", + "Back up your encryption keys with your account data in case you lose access to your sessions. Your keys will be secured with a unique Recovery Key.": "Zálohujte šifrovací klíče s daty vašeho účtu pro případ, že ztratíte přístup k relacím. Vaše klíče budou zabezpečeny jedinečným klíčem pro obnovení.", + "Manage the names of and sign out of your sessions below or verify them in your User Profile.": "Níže můžete spravovat jména a odhlásit se ze svých relací nebo je ověřtit v uživatelském profilu.", + "or another cross-signing capable Matrix client": "nebo jiný Matrix klient schopný cross-signing", + "Cross-signing is not set up.": "Cross-signing není nastaveno.", + "Cross-signing is ready for use.": "Cross-signing je připraveno k použití.", + "Create a Group Chat": "Vytvořit skupinový chat", + "Send a Direct Message": "Poslat přímou zprávu", + "This requires the latest %(brand)s on your other devices:": "To vyžaduje nejnovější %(brand)s na vašich ostatních zařízeních:", + "Confirm your identity by verifying this login from one of your other sessions, granting it access to encrypted messages.": "Potvrďte svou identitu ověřením tohoto přihlášení z jedné z vašich dalších relací a udělte mu přístup k šifrovaným zprávám.", + "Verify this login": "Ověřte toto přihlášení", + "Welcome to %(appName)s": "Vítá vás %(appName)s", + "Liberate your communication": "Osvoboďte svou komunikaci", + "Navigation": "Navigace", + "Use the + to make a new room or explore existing ones below": "Pomocí + vytvořte novou místnost nebo prozkoumejte stávající místnosti", + "Secure Backup": "Zabezpečená záloha", + "Jump to oldest unread message": "Jít na nejstarší nepřečtenou zprávu", + "Upload a file": "Nahrát soubor", + "You've reached the maximum number of simultaneous calls.": "Dosáhli jste maximálního počtu souběžných hovorů.", + "Too Many Calls": "Přiliš mnoho hovorů" } From 2a97dcd74ab0509a09fc20e5cc0147db3d05d3da Mon Sep 17 00:00:00 2001 From: Mitja Sorsa Date: Sat, 12 Dec 2020 20:07:21 +0000 Subject: [PATCH 266/319] Translated using Weblate (Finnish) Currently translated at 85.5% (2320 of 2711 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/fi/ --- src/i18n/strings/fi.json | 80 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 79 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/fi.json b/src/i18n/strings/fi.json index 297cd69790..324eb20a17 100644 --- a/src/i18n/strings/fi.json +++ b/src/i18n/strings/fi.json @@ -2453,5 +2453,83 @@ "Costa Rica": "Costa Rica", "Cook Islands": "Cookinsaaret", "Congo - Kinshasa": "Kongo-Kinshasa", - "Congo - Brazzaville": "Kongo-Brazzavile" + "Congo - Brazzaville": "Kongo-Brazzavile", + "Micronesia": "Mikronesia", + "Mexico": "Meksiko", + "Mayotte": "Mayotte", + "Mauritius": "Mauritius", + "Mauritania": "Mauritania", + "Martinique": "Martinique", + "Marshall Islands": "Marshallinsaaret", + "Malta": "Malta", + "Mali": "Mali", + "Maldives": "Malediivit", + "Malaysia": "Malesia", + "Malawi": "Malawi", + "Madagascar": "Madagaskar", + "Macedonia": "Pohjois-Makedonia", + "Macau": "Macao", + "Luxembourg": "Luxemburg", + "Lithuania": "Liettua", + "Liechtenstein": "Liechtenstein", + "Libya": "Libya", + "Liberia": "Liberia", + "Lesotho": "Lesotho", + "Lebanon": "Libanon", + "Latvia": "Latvia", + "Laos": "Laos", + "Kyrgyzstan": "Kirgisia", + "Kuwait": "Kuwait", + "Kosovo": "Kosovo", + "Kiribati": "Kiribati", + "Kenya": "Kenia", + "Kazakhstan": "Kazakstan", + "Jordan": "Jordania", + "Jersey": "Jersey", + "Japan": "Japani", + "Jamaica": "Jamaika", + "Italy": "Italia", + "Israel": "Israel", + "Isle of Man": "Mansaari", + "Ireland": "Irlanti", + "Iraq": "Irak", + "Iran": "Iran", + "Indonesia": "Indonesia", + "India": "Intia", + "Iceland": "Islanti", + "Hungary": "Unkari", + "Hong Kong": "Hongkong", + "Honduras": "Honduras", + "Heard & McDonald Islands": "Heard ja McDonaldinsaaret", + "Haiti": "Haiti", + "Guyana": "Guyana", + "Guinea-Bissau": "Guinea-Bissau", + "Guinea": "Guinea", + "Guernsey": "Guernsey", + "Guatemala": "Guatemala", + "Guam": "Guam", + "Guadeloupe": "Guadeloupe", + "Grenada": "Grenada", + "Greenland": "Grönlanti", + "Greece": "Kreikka", + "Gibraltar": "Gibraltar", + "Ghana": "Ghana", + "Germany": "Saksa", + "Georgia": "Georgia", + "Gambia": "Gambia", + "Gabon": "Gabon", + "French Southern Territories": "Ranskan eteläiset ja antarktiset alueet", + "French Polynesia": "Ranskan Polynesia", + "French Guiana": "Ranskan Guayana", + "France": "Ranska", + "Finland": "Suomi", + "Fiji": "Fidži", + "Faroe Islands": "Färsaaret", + "Falkland Islands": "Falklandinsaaret", + "Ethiopia": "Etiopia", + "Estonia": "Viro", + "Eritrea": "Eritrea", + "Equatorial Guinea": "Päiväntasaajan Guinea", + "You've reached the maximum number of simultaneous calls.": "Saavutit samanaikaisten puheluiden enimmäismäärän.", + "Too Many Calls": "Liian monta puhelua" } From 48cb63baf34096d4675afd9433cba7ea6a7eaaaf Mon Sep 17 00:00:00 2001 From: XoseM Date: Sat, 12 Dec 2020 05:41:16 +0000 Subject: [PATCH 267/319] Translated using Weblate (Galician) Currently translated at 99.9% (2710 of 2711 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/gl/ --- src/i18n/strings/gl.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/gl.json b/src/i18n/strings/gl.json index dc58d97f79..05ef098860 100644 --- a/src/i18n/strings/gl.json +++ b/src/i18n/strings/gl.json @@ -2968,5 +2968,7 @@ "Hold": "Colgar", "Resume": "Retomar", "%(peerName)s held the call": "%(peerName)s finalizou a chamada", - "You held the call Resume": "Colgaches a chamada, Retomar" + "You held the call Resume": "Colgaches a chamada, Retomar", + "You've reached the maximum number of simultaneous calls.": "Acadaches o número máximo de chamadas simultáneas.", + "Too Many Calls": "Demasiadas chamadas" } From 26257b07f05a2069b0395638189f8718eb55415b Mon Sep 17 00:00:00 2001 From: waclaw66 Date: Sun, 13 Dec 2020 16:16:14 +0000 Subject: [PATCH 268/319] Translated using Weblate (Czech) Currently translated at 80.8% (2191 of 2711 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/cs/ --- src/i18n/strings/cs.json | 42 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/cs.json b/src/i18n/strings/cs.json index 9c60938728..3f518f6a32 100644 --- a/src/i18n/strings/cs.json +++ b/src/i18n/strings/cs.json @@ -2325,5 +2325,45 @@ "Jump to oldest unread message": "Jít na nejstarší nepřečtenou zprávu", "Upload a file": "Nahrát soubor", "You've reached the maximum number of simultaneous calls.": "Dosáhli jste maximálního počtu souběžných hovorů.", - "Too Many Calls": "Přiliš mnoho hovorů" + "Too Many Calls": "Přiliš mnoho hovorů", + "Community and user menu": "Nabídka komunity a uživatele", + "User menu": "Uživatelská nabídka", + "Switch theme": "Přepnout téma", + "Switch to dark mode": "Přepnout do tmavého režimu", + "Switch to light mode": "Přepnout do světlého režimu", + "User settings": "Uživatelská nastavení", + "Community settings": "Nastavení komunity", + "Confirm your recovery passphrase": "Potvrďte vaši frázi pro obnovení", + "Repeat your recovery passphrase...": "Opakujte přístupovou frázi pro obnovení...", + "Please enter your recovery passphrase a second time to confirm.": "Potvrďte prosím podruhé svou frázi pro obnovení.", + "Use a different passphrase?": "Použít jinou frázi?", + "Great! This recovery passphrase looks strong enough.": "Skvělé! Tato fráze pro obnovení vypadá dostatečně silně.", + "Enter a recovery passphrase": "Zadejte frázi pro obnovení", + "%(ssoButtons)s Or %(usernamePassword)s": "%(ssoButtons)s nebo %(usernamePassword)s", + "If you've joined lots of rooms, this might take a while": "Pokud jste se připojili ke spoustě místností, může to chvíli trvat", + "There was a problem communicating with the homeserver, please try again later.": "Při komunikaci s domovským serverem došlo k potížím, zkuste to prosím později.", + "Continue with %(ssoButtons)s": "Pokračovat s %(ssoButtons)s", + "Use Recovery Key": "Použít klíč pro obnovu", + "Use Recovery Key or Passphrase": "Použít klíč pro obnovu nebo frázi", + "Already have an account? Sign in here": "Máte již účet? Přihlašte se zde", + "Host account on": "Hostovat účet na", + "Signing In...": "Přihlašování...", + "Syncing...": "Synchronizuji...", + "That username already exists, please try another.": "Toto uživatelské jméno již existuje, zkuste prosím jiné.", + "Verify other session": "Ověření jiné relace", + "Filter rooms and people": "Filtrovat místnosti a lidi", + "Explore rooms in %(communityName)s": "Prozkoumejte místnosti v %(communityName)s", + "delete the address.": "smazat adresu.", + "Delete the room address %(alias)s and remove %(name)s from the directory?": "Smazat adresu místnosti %(alias)s a odebrat %(name)s z adresáře?", + "Self-verification request": "Požadavek na sebeověření", + "%(creator)s created this DM.": "%(creator)s vytvořil tuto přímou zprávu.", + "You do not have permission to create rooms in this community.": "Nemáte oprávnění k vytváření místností v této komunitě.", + "Cannot create rooms in this community": "V této komunitě nelze vytvořit místnosti", + "Great, that'll help people know it's you": "Skvělé, to pomůže lidem zjistit, že jste to vy", + "Add a photo so people know it's you.": "Přidejte fotku, aby lidé věděli, že jste to vy.", + "Explore Public Rooms": "Prozkoumat veřejné místnosti", + "Welcome %(name)s": "Vítejte %(name)s", + "Now, let's help you get started": "Nyní vám pomůžeme začít", + "Effects": "Efekty", + "Alt": "Alt" } From 3389cb1d9130380b3cbee67d4e9e6ac8edad5db4 Mon Sep 17 00:00:00 2001 From: Kaede Date: Sun, 13 Dec 2020 11:41:37 +0000 Subject: [PATCH 269/319] Translated using Weblate (Japanese) Currently translated at 50.2% (1361 of 2711 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/ja/ --- src/i18n/strings/ja.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/ja.json b/src/i18n/strings/ja.json index 3fa0a502ca..c8c356bdcd 100644 --- a/src/i18n/strings/ja.json +++ b/src/i18n/strings/ja.json @@ -1487,5 +1487,6 @@ "No other published addresses yet, add one below": "現在、公開アドレスがありません。以下から追加可能です。", "Securely cache encrypted messages locally for them to appear in search results, using %(size)s to store messages from %(rooms)s rooms.|one": "検索結果を表示させるために、暗号化されたメッセージをローカルに安全にキャッシュしています。現在、%(rooms)s 件の部屋のメッセージの保存に %(size)s を使用中です。", "Securely cache encrypted messages locally for them to appear in search results, using %(size)s to store messages from %(rooms)s rooms.|other": "検索結果を表示させるために、暗号化されたメッセージをローカルに安全にキャッシュしています。現在、%(rooms)s 件の部屋のメッセージの保存に %(size)s を使用中です。", - "Mentions & Keywords": "メンションとキーワード" + "Mentions & Keywords": "メンションとキーワード", + "Security Key": "セキュリティキー" } From 83ed6f0d685eb4bdec3ee2dc0afc3e29b7cf5a31 Mon Sep 17 00:00:00 2001 From: Mitja Sorsa Date: Sun, 13 Dec 2020 18:44:32 +0000 Subject: [PATCH 270/319] Translated using Weblate (Finnish) Currently translated at 85.6% (2321 of 2711 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/fi/ --- src/i18n/strings/fi.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/fi.json b/src/i18n/strings/fi.json index 324eb20a17..0dfb946936 100644 --- a/src/i18n/strings/fi.json +++ b/src/i18n/strings/fi.json @@ -2531,5 +2531,6 @@ "Eritrea": "Eritrea", "Equatorial Guinea": "Päiväntasaajan Guinea", "You've reached the maximum number of simultaneous calls.": "Saavutit samanaikaisten puheluiden enimmäismäärän.", - "Too Many Calls": "Liian monta puhelua" + "Too Many Calls": "Liian monta puhelua", + "Moldova": "Moldova" } From a4b4a9ce2e812a704b6e7a7a53cd8f28902057d7 Mon Sep 17 00:00:00 2001 From: Besnik Bleta Date: Sun, 13 Dec 2020 15:11:22 +0000 Subject: [PATCH 271/319] Translated using Weblate (Albanian) Currently translated at 99.7% (2703 of 2711 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/sq/ --- src/i18n/strings/sq.json | 31 ++++++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-) diff --git a/src/i18n/strings/sq.json b/src/i18n/strings/sq.json index 6082bcf65b..de80ab4a36 100644 --- a/src/i18n/strings/sq.json +++ b/src/i18n/strings/sq.json @@ -874,7 +874,7 @@ "Incompatible Database": "Bazë të dhënash e Papërputhshme", "Continue With Encryption Disabled": "Vazhdo Me Fshehtëzimin të Çaktivizuar", "Unable to load! Check your network connectivity and try again.": "S’arrihet të ngarkohet! Kontrolloni lidhjen tuaj në rrjet dhe riprovoni.", - "Forces the current outbound group session in an encrypted room to be discarded": "Forces the current outbound group session in an encrypted room to be discarded", + "Forces the current outbound group session in an encrypted room to be discarded": "", "Delete Backup": "Fshije Kopjeruajtjen", "Unable to load key backup status": "S’arrihet të ngarkohet gjendje kopjeruajtjeje kyçesh", "Backup version: ": "Version kopjeruajtjeje: ", @@ -1351,7 +1351,7 @@ "Ensure you have a stable internet connection, or get in touch with the server admin": "Sigurohuni se keni një lidhje të qëndrueshme internet, ose lidhuni me përgjegjësin e shërbyesit", "Your %(brand)s is misconfigured": "%(brand)s-i juaj është i keqformësuar", "Ask your %(brand)s admin to check your config for incorrect or duplicate entries.": "Kërkojini përgjegjësit të %(brand)s-it tuaj të kontrollojë formësimin tuaj për zëra të pasaktë ose të përsëdytur.", - "Unexpected error resolving identity server configuration": "Gabim i papritur teksa ftillohej formësimi i shërbyesit të identiteteve", + "Unexpected error resolving identity server configuration": "Gabim i papritur teksa ftillohej formësimi i shërbyesit të identiteteve", "Use lowercase letters, numbers, dashes and underscores only": "Përdorni vetëm shkronja të vogla, numra, vija ndarëse dhe nënvija", "Cannot reach identity server": "S’kapet dot shërbyesi i identiteteve", "You can register, but some features will be unavailable until the identity server is back online. If you keep seeing this warning, check your configuration or contact a server admin.": "Mund të regjistroheni, por disa veçori do të jenë të papërdorshme, derisa shërbyesi i identiteteve të jetë sërish në linjë. Nëse vazhdoni ta shihni këtë sinjalizim, kontrolloni formësimin tuaj ose lidhuni me një përgjegjës të shërbyesit.", @@ -1400,7 +1400,7 @@ "Command Help": "Ndihmë Urdhri", "Identity Server": "Shërbyes Identitetesh", "Find others by phone or email": "Gjeni të tjerë përmes telefoni ose email-i", - "Be found by phone or email": "Bëhuni i gjetshëm përmes telefoni ose email-i", + "Be found by phone or email": "Bëhuni i gjetshëm përmes telefoni ose email-i", "Use bots, bridges, widgets and sticker packs": "Përdorni robotë, ura, widget-e dhe paketa ngjitësish", "Terms of Service": "Kushte Shërbimi", "Service": "Shërbim", @@ -1636,7 +1636,7 @@ "%(brand)s URL": "URL %(brand)s-i", "Room ID": "ID dhome", "Widget ID": "ID widget-i", - "Using this widget may share data with %(widgetDomain)s & your Integration Manager.": "Përdorimi i këtij widget-i mund të sjellë ndarje të dhënash me %(widgetDomain)s & Përgjegjësin tuaj të Integrimeve.", + "Using this widget may share data with %(widgetDomain)s & your Integration Manager.": "Përdorimi i këtij widget-i mund të sjellë ndarje të dhënash me %(widgetDomain)s & Përgjegjësin tuaj të Integrimeve.", "Using this widget may share data with %(widgetDomain)s.": "Përdorimi i këtij widget-i mund të sjellë ndarje të dhënash me %(widgetDomain)s.", "Widget added by": "Widget i shtuar nga", "This widget may use cookies.": "Ky widget mund të përdorë cookies.", @@ -2139,7 +2139,7 @@ "Enter a recovery passphrase": "Jepni një frazëkalim rimarrjesh", "Enter your recovery passphrase a second time to confirm it.": "Për ta ripohuar, jepeni edhe një herë frazëkalimin tuaj të rimarrjeve.", "Confirm your recovery passphrase": "Ripohoni frazëkalimin tuaj të rimarrjeve", - "Your recovery key is a safety net - you can use it to restore access to your encrypted messages if you forget your recovery passphrase.": "Kyçi juaj i rimarrjeve është një rrjet sigurie - mund ta përdorni të të rifituar hyrje te mesazhet tuaj të fshehtëzuar, nëse harroni frazëkalimin tuaj të rimarrjeve.", + "Your recovery key is a safety net - you can use it to restore access to your encrypted messages if you forget your recovery passphrase.": "Kyçi juaj i rimarrjeve është një rrjet sigurie - mund ta përdorni për të rifituar hyrje te mesazhet tuaj të fshehtëzuar, nëse harroni frazëkalimin tuaj të rimarrjeve.", "We'll store an encrypted copy of your keys on our server. Secure your backup with a recovery passphrase.": "Do të ruajmë një kopje të fshehtëzuar të kyçeve tuaj në shërbyesin tonë. Siguroni kopjeruajtjen tuaj me një frazëkalim rimarrjesh.", "Please enter your recovery passphrase a second time to confirm.": "Ju lutemi, jepeni frazëkalimin tuaj të rimarrjeve edhe një herë, për ta ripohuar.", "Repeat your recovery passphrase...": "Përsëritni frazëkalimin tuaj të rimarrjeve…", @@ -2768,7 +2768,7 @@ "Honduras": "Honduras", "Japan": "Japoni", "American Samoa": "Samoa Amerikane", - "South Georgia & South Sandwich Islands": "Xhorxhia Jugore dhe Ishujt Snduiç të Jugut", + "South Georgia & South Sandwich Islands": "Xhorxhia Jugore dhe Ishujt Sanduiç të Jugut", "Palestine": "Palestinë", "Austria": "Austri", "Suriname": "Surinam", @@ -2946,5 +2946,22 @@ "Continue with %(provider)s": "Vazhdo me %(provider)s", "Homeserver": "Shërbyes Home", "You can use the custom server options to sign into other Matrix servers by specifying a different homeserver URL. This allows you to use Element with an existing Matrix account on a different homeserver.": "Mund të përdorni mundësi vetjake shërbyesi që të bëni hyrjen në shërbyes të tjerë Matrix duke dhënë një tjetër URL shërbyesi Home. Kjo ju lejon të përdorni Element-in me një llogari Matrix ekzistuese në një tjetër shërbyes Home.", - "Server Options": "Mundësi Shërbyesi" + "Server Options": "Mundësi Shërbyesi", + "Hold": "Mbaje", + "Resume": "Rimerre", + "We call the places where you can host your account ‘homeservers’.": "Vendet ku mund të strehoni llogarinë tuaj i quajmë ‘shërbyes Home’.", + "Invalid URL": "URL e pavlefshme", + "Unable to validate homeserver": "S’arrihet të vlerësohet shërbyesi Home", + "Reason (optional)": "Arsye (opsionale)", + "%(name)s paused": "%(name)s pushoi", + "%(peerName)s held the call": "%(peerName)s mbajti thirrjen", + "You held the call Resume": "E mbajtët thirrjen Rimerreni", + "sends confetti": "dërgon bonbone", + "Sends the given message with confetti": "E dërgon mesazhin e dhënë me bonbone", + "Show chat effects": "Shfaq efekte fjalosjeje", + "Effects": "Efekte", + "You've reached the maximum number of simultaneous calls.": "Keni mbërritur në numrin maksimum të thirrjeve të njëkohshme.", + "Too Many Calls": "Shumë Thirrje", + "Call failed because webcam or microphone could not be accessed. Check that:": "Thirrja dështoi, ngaqë s’u hy dot kamera ose mikrofoni. Kontrolloni që:", + "Call failed because microphone could not be accessed. Check that a microphone is plugged in and set up correctly.": "Thirrja dështoi, ngaqë s’u hy dot te mikrofoni. Kontrolloni që të jetë futur një mikrofon dhe të jetë ujdisur saktësisht." } From a0c69996b8401cf311ddfb2d997bf3973b192fa7 Mon Sep 17 00:00:00 2001 From: Jeff Huang Date: Mon, 14 Dec 2020 01:34:53 +0000 Subject: [PATCH 272/319] Translated using Weblate (Chinese (Traditional)) Currently translated at 100.0% (2711 of 2711 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/zh_Hant/ --- src/i18n/strings/zh_Hant.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/zh_Hant.json b/src/i18n/strings/zh_Hant.json index 1b73d78286..c820d9b1cf 100644 --- a/src/i18n/strings/zh_Hant.json +++ b/src/i18n/strings/zh_Hant.json @@ -2971,5 +2971,8 @@ "Hold": "保留", "Resume": "繼續", "%(peerName)s held the call": "%(peerName)s 保留通話", - "You held the call Resume": "您已保留通話 繼續" + "You held the call Resume": "您已保留通話 繼續", + "%(name)s paused": "%(name)s 已暫停", + "You've reached the maximum number of simultaneous calls.": "您已達到同時通話的最大數量。", + "Too Many Calls": "太多通話" } From 299d48533ff284f07ccb1614abd9512bfe98a43d Mon Sep 17 00:00:00 2001 From: waclaw66 Date: Mon, 14 Dec 2020 11:11:09 +0000 Subject: [PATCH 273/319] Translated using Weblate (Czech) Currently translated at 82.5% (2237 of 2711 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/cs/ --- src/i18n/strings/cs.json | 48 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/cs.json b/src/i18n/strings/cs.json index 3f518f6a32..3d448ca071 100644 --- a/src/i18n/strings/cs.json +++ b/src/i18n/strings/cs.json @@ -2365,5 +2365,51 @@ "Welcome %(name)s": "Vítejte %(name)s", "Now, let's help you get started": "Nyní vám pomůžeme začít", "Effects": "Efekty", - "Alt": "Alt" + "Alt": "Alt", + "Approve": "Schválit", + "Looks good!": "To vypadá dobře!", + "Wrong file type": "Špatný typ souboru", + "The server has denied your request.": "Server odmítl váš požadavek.", + "The server is offline.": "Server je offline.", + "not ready": "nepřipraveno", + "Remove messages sent by others": "Odstranit zprávy odeslané ostatními", + "Decline All": "Odmítnout vše", + "Use the Desktop app to search encrypted messages": "K prohledávání šifrovaných zpráv použijte aplikaci pro stolní počítače", + "Invite someone using their name, email address, username (like ) or share this room.": "Pozvěte někoho pomocí jeho jména, e-mailové adresy, uživatelského jména (například ) nebo sdílejte tuto místnost.", + "Super": "Super", + "Toggle right panel": "Zobrazit/skrýt pravý panel", + "Add a photo, so people can easily spot your room.": "Přidejte fotografii, aby lidé mohli snadno najít váši místnost.", + "%(displayName)s created this room.": "%(displayName)s vytvořil tuto místnost.", + "This is the start of .": "Toto je začátek místnosti .", + "Topic: %(topic)s ": "Téma: %(topic)s ", + "Topic: %(topic)s (edit)": "Téma: %(topic)s (upravit)", + "Messages here are end-to-end encrypted. Verify %(displayName)s in their profile - tap on their avatar.": "Zprávy zde jsou šifrovány end-to-end. Ověřte %(displayName)s v jeho profilu - klepněte na jeho avatar.", + "Enter a security phrase only you know, as it’s used to safeguard your data. To be secure, you shouldn’t re-use your account password.": "Zadejte frázi zabezpečení, kterou znáte jen vy, k ochraně vašich dat. Z důvodu bezpečnosti byste neměli znovu používat heslo k účtu.", + "Use a secret phrase only you know, and optionally save a Security Key to use for backup.": "Použijte tajnou frázi, kterou znáte pouze vy, a volitelně uložte bezpečnostní klíč, který použijete pro zálohování.", + "Enter a Security Phrase": "Zadání bezpečnostní fráze", + "We’ll generate a Security Key for you to store somewhere safe, like a password manager or a safe.": "Vygenerujeme bezpečnostní klíč, který můžete uložit někde v bezpečí, například ve správci hesel nebo trezoru.", + "Generate a Security Key": "Vygenerovat bezpečnostní klíč", + "Set up Secure Backup": "Nastavení zabezpečené zálohy", + "Safeguard against losing access to encrypted messages & data by backing up encryption keys on your server.": "Chraňte se před ztrátou přístupu k šifrovaným zprávám a datům zálohováním šifrovacích klíčů na serveru.", + "Safeguard against losing access to encrypted messages & data": "Zabezpečení proti ztrátě přístupu k šifrovaným zprávám a datům", + "This is the beginning of your direct message history with .": "Toto je začátek historie vašich přímých zpráv s .", + "Only the two of you are in this conversation, unless either of you invites anyone to join.": "V této konverzaci jste pouze vy dva, pokud nikdo z vás nikoho nepozve, aby se připojil.", + "You created this room.": "Vytvořili jste tuto místnost.", + "Add a topic to help people know what it is about.": "Přidejte téma, aby lidé věděli, o co jde.", + "Invite by email": "Pozvat emailem", + "Comment": "Komentář", + "Add comment": "Přidat komentář", + "Update community": "Aktualizovat komunitu", + "Create a room in %(communityName)s": "Vytvořit místnost v %(communityName)s", + "Your server requires encryption to be enabled in private rooms.": "Váš server vyžaduje povolení šifrování v soukromých místnostech.", + "An image will help people identify your community.": "Obrázek pomůže lidem identifikovat vaši komunitu.", + "Invite people to join %(communityName)s": "Pozvat lidi do %(communityName)s", + "Send %(count)s invites|one": "Poslat %(count)s pozvánku", + "Send %(count)s invites|other": "Poslat %(count)s pozvánek", + "People you know on %(brand)s": "Lidé, které znáte z %(brand)s", + "Add another email": "Přidat další emailovou adresu", + "Show": "Zobrazit", + "Reason (optional)": "Důvod (volitelné)", + "Add image (optional)": "Přidat obrázek (volitelné)", + "Private rooms can be found and joined by invitation only. Public rooms can be found and joined by anyone.": "Do soukromé místnosti se lze připojit pouze s pozvánkou. Veřejné místnosti lze najít a může se do nich připojit kdokoli." } From b012490d270288736820dedfb28c77a828ba0311 Mon Sep 17 00:00:00 2001 From: Mitja Sorsa Date: Mon, 14 Dec 2020 13:01:22 +0000 Subject: [PATCH 274/319] Translated using Weblate (Finnish) Currently translated at 90.4% (2453 of 2711 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/fi/ --- src/i18n/strings/fi.json | 155 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 143 insertions(+), 12 deletions(-) diff --git a/src/i18n/strings/fi.json b/src/i18n/strings/fi.json index 0dfb946936..7fe6e0f5db 100644 --- a/src/i18n/strings/fi.json +++ b/src/i18n/strings/fi.json @@ -626,7 +626,7 @@ "Send Custom Event": "Lähetä mukautettu tapahtuma", "Advanced notification settings": "Lisäasetukset ilmoituksille", "Forget": "Unohda", - "You cannot delete this image. (%(code)s)": "Et voi poistaa tätä kuvaa. (%(code)s)", + "You cannot delete this image. (%(code)s)": "Et voi poistaa tätä kuvaa. (%(code)s)", "Cancel Sending": "Peruuta lähetys", "This Room": "Tämä huone", "Noisy": "Äänekäs", @@ -798,7 +798,7 @@ "Apple": "Omena", "Strawberry": "Mansikka", "Corn": "Maissi", - "Pizza": "Pizza", + "Pizza": "Pitsa", "Cake": "Kakku", "Heart": "Sydän", "Smiley": "Hymiö", @@ -834,7 +834,7 @@ "Pin": "Nuppineula", "Call in Progress": "Puhelu meneillään", "General": "Yleiset", - "Security & Privacy": "Tietoturva ja -suoja", + "Security & Privacy": "Tietoturva ja yksityisyys", "Roles & Permissions": "Roolit ja oikeudet", "Room Name": "Huoneen nimi", "Room Topic": "Huoneen aihe", @@ -1135,7 +1135,7 @@ "This will make your account permanently unusable. You will not be able to log in, and no one will be able to re-register the same user ID. This will cause your account to leave all rooms it is participating in, and it will remove your account details from your identity server. This action is irreversible.": "Tämä tekee tilistäsi lopullisesti käyttökelvottoman. Et voi kirjautua sisään, eikä kukaan voi rekisteröidä samaa käyttäjätunnusta. Tilisi poistuu kaikista huoneista, joihin se on liittynyt, ja tilisi tiedot poistetaan identiteettipalvelimeltasi. Tämä toimenpidettä ei voi kumota.", "Deactivating your account does not by default cause us to forget messages you have sent. If you would like us to forget your messages, please tick the box below.": "Tilisi poistaminen käytöstä ei oletuksena saa meitä unohtamaan lähettämiäsi viestejä. Jos haluaisit meidän unohtavan viestisi, rastita alla oleva ruutu.", "Message visibility in Matrix is similar to email. Our forgetting your messages means that messages you have sent will not be shared with any new or unregistered users, but registered users who already have access to these messages will still have access to their copy.": "Viestien näkyvyys Matrixissa on samantapainen kuin sähköpostissa. Vaikka se, että unohdamme viestisi, tarkoittaa, ettei viestejäsi jaeta enää uusille tai rekisteröitymättömille käyttäjille, käyttäjät, jotka ovat jo saaneet viestisi pystyvät lukemaan jatkossakin omaa kopiotaan viesteistäsi.", - "Please forget all messages I have sent when my account is deactivated (Warning: this will cause future users to see an incomplete view of conversations)": "Unohda kaikki viestit, jotka olen lähettänyt, kun tilini on poistettu käytöstä (b>Varoitus: tästä seuraa, että tulevat käyttäjät näkevät epätäydellisen version keskusteluista)", + "Please forget all messages I have sent when my account is deactivated (Warning: this will cause future users to see an incomplete view of conversations)": "Unohda kaikki viestit, jotka olen lähettänyt, kun tilini poistetaan käytöstä (Varoitus: tämä saa tulevat käyttäjät näkemään epätäydellisen version keskusteluista)", "Verify this user to mark them as trusted. Trusting users gives you extra peace of mind when using end-to-end encrypted messages.": "Varmenna tämä käyttäjä merkitäksesi hänet luotetuksi. Käyttäjiin luottaminen antaa sinulle ylimääräistä mielenrauhaa käyttäessäsi osapuolten välistä salausta.", "Waiting for partner to confirm...": "Odotetaan, että toinen osapuoli varmistaa...", "Incoming Verification Request": "Saapuva varmennuspyyntö", @@ -1692,14 +1692,14 @@ "Cross-signing and secret storage are enabled.": "Ristivarmennus ja salavarasto on käytössä.", "Cross-signing and secret storage are not yet set up.": "Ristivarmennusta ja salavarastoa ei ole vielä otettu käyttöön.", "Bootstrap cross-signing and secret storage": "Ota käyttöön ristivarmennus ja salavarasto", - "Cross-signing public keys:": "Ristivarmennuksen julkiset avaimet:", + "Cross-signing public keys:": "Ristiinvarmennuksen julkiset avaimet:", "not found": "ei löydetty", - "Cross-signing private keys:": "Ristivarmennuksen salaiset avaimet:", + "Cross-signing private keys:": "Ristiinvarmennuksen salaiset avaimet:", "in secret storage": "salavarastossa", "Secret storage public key:": "Salavaraston julkinen avain:", "in account data": "tunnuksen tiedoissa", "not stored": "ei tallennettu", - "Cross-signing": "Ristivarmennus", + "Cross-signing": "Ristiinvarmennus", "Backup has a valid signature from this user": "Varmuuskopiossa on kelvollinen allekirjoitus tältä käyttäjältä", "Backup has a invalid signature from this user": "Varmuuskopiossa on epäkelpo allekirjoitus tältä käyttäjältä", "Backup has a signature from unknown user with ID %(deviceId)s": "Varmuuskopiossa on tuntematon allekirjoitus käyttäjältä, jonka ID on %(deviceId)s", @@ -2019,10 +2019,10 @@ "Verify all your sessions to ensure your account & messages are safe": "Varmenna kaikki istuntosi varmistaaksesi, että tunnuksesi ja viestisi ovat turvassa", "Verify the new login accessing your account: %(name)s": "Varmenna uusi tunnuksellesi sisäänkirjautunut taho: %(name)s", "Changing password will currently reset any end-to-end encryption keys on all sessions, making encrypted chat history unreadable, unless you first export your room keys and re-import them afterwards. In future this will be improved.": "Tällä hetkellä salasanan vaihtaminen nollaa kaikki osapuolten välisen salauksen avaimet kaikissa istunnoissa, tehden salatusta keskusteluhistoriasta lukukelvotonta, ellet ensin vie kaikkia huoneavaimiasi ja tuo niitä salasanan vaihtamisen jäkeen takaisin. Tulevaisuudessa tämä tulee toimimaan paremmin.", - "Your homeserver does not support cross-signing.": "Kotipalvelimesi ei tue ristivarmennusta.", - "Your account has a cross-signing identity in secret storage, but it is not yet trusted by this session.": "Tunnuksellasi on ristivarmennuksen identiteetti salavarastossa, mutta tämä istunto ei luota siihen.", + "Your homeserver does not support cross-signing.": "Kotipalvelimesi ei tue ristiinvarmennusta.", + "Your account has a cross-signing identity in secret storage, but it is not yet trusted by this session.": "Tunnuksellasi on ristiinvarmennuksen identiteetti salaisessa tallennustilassa, mutta tämä istunto ei vielä luota siihen.", "Reset cross-signing and secret storage": "Nollaa ristivarmennus ja salavarasto", - "Individually verify each session used by a user to mark it as trusted, not trusting cross-signed devices.": "Varmenna jokainen käyttäjän istunto erikseen, äläkä luota ristivarmennettuihin laitteisiin.", + "Individually verify each session used by a user to mark it as trusted, not trusting cross-signed devices.": "Varmenna jokainen istunto erikseen, äläkä luota ristiinvarmennettuihin laitteisiin.", "Securely cache encrypted messages locally for them to appear in search results.": "Pidä salatut viestit turvallisessa välimuistissa, jotta ne näkyvät hakutuloksissa.", "%(brand)s is missing some components required for securely caching encrypted messages locally. If you'd like to experiment with this feature, build a custom %(brand)s Desktop with search components added.": "%(brand)sissa ei ole joitain komponentteja, joita tarvitaan viestien turvalliseen välimuistitallennukseen. Jos haluat kokeilla tätä ominaisuutta, käännä mukautettu %(brand)s Desktop, jossa on mukana hakukomponentit.", "This session is backing up your keys. ": "Tämä istunto varmuuskopioi avaimesi. ", @@ -2095,7 +2095,7 @@ "%(networkName)s rooms": "Verkon %(networkName)s huoneet", "Destroy cross-signing keys?": "Tuhoa ristivarmennuksen avaimet?", "Deleting cross-signing keys is permanent. Anyone you have verified with will see security alerts. You almost certainly don't want to do this, unless you've lost every device you can cross-sign from.": "Ristivarmennuksen avainten tuhoamista ei voi kumota. Jokainen, jonka olet varmentanut, tulee näkemään turvallisuushälytyksiä. Et todennäköisesti halua tehdä tätä, ellet ole hukannut kaikkia laitteitasi, joista pystyt ristivarmentamaan.", - "Clear cross-signing keys": "Tyhjennä ristivarmennuksen avaimet", + "Clear cross-signing keys": "Tyhjennä ristiinvarmennuksen avaimet", "Enable end-to-end encryption": "Ota osapuolten välinen salaus käyttöön", "Session key": "Istunnon tunnus", "Verification Requests": "Varmennuspyynnöt", @@ -2532,5 +2532,136 @@ "Equatorial Guinea": "Päiväntasaajan Guinea", "You've reached the maximum number of simultaneous calls.": "Saavutit samanaikaisten puheluiden enimmäismäärän.", "Too Many Calls": "Liian monta puhelua", - "Moldova": "Moldova" + "Moldova": "Moldova", + "You’re all caught up": "Olet ajan tasalla", + "Room settings": "Huoneen asetukset", + "or another cross-signing capable Matrix client": "tai muu ristiinvarmentava Matrix-asiakas", + "a device cross-signing signature": "laitteen ristiinvarmennuksen allekirjoitus", + "a new cross-signing key signature": "Uusi ristiinvarmennuksen allekirjoitus", + "Cross-signing is not set up.": "Ristiinvarmennusta ei ole asennettu.", + "Cross-signing is ready for use.": "Ristiinvarmennus on käyttövalmis.", + "Back up your encryption keys with your account data in case you lose access to your sessions. Your keys will be secured with a unique Recovery Key.": "Varmuuskopioi tilitietojesi salausavaimet, istuntojen menettämisen varalta. Avaimet varmistetaan ainutlaatuisella Palatusavaimella.", + "well formed": "hyvin muotoiltu", + "Backup version:": "Varmuuskopiointiversio:", + "Backup key stored:": "Varmuuskopioavain tallennettu:", + "Backup key cached:": "Välimuistissa oleva varmuuskopioavain:", + "Secret storage:": "Salainen tallennus:", + "Hey you. You're the best!": "Hei siellä, olet paras!", + "Room ID or address of ban list": "Huonetunnus tai -osoite on estolistalla", + "Secure Backup": "Turvallinen varmuuskopio", + "Add a photo, so people can easily spot your room.": "Lisää kuva, jotta ihmiset voivat helpommin huomata huoneesi.", + "Hide Widgets": "Piilota sovelmat", + "Show Widgets": "Näytä sovelmat", + "Explore community rooms": "Selaa yhteisön huoneita", + "Explore public rooms": "Selaa julkisia huoneita", + "Custom Tag": "Mukautettu tunniste", + "Explore all public rooms": "Selaa julkisia huoneita", + "List options": "Lajittele", + "Activity": "Aktiivisuus", + "A-Z": "A-Ö", + "Server Options": "Palvelimen asetukset", + "Information": "Tiedot", + "Effects": "Tehosteet", + "Zimbabwe": "Zimbabwe", + "Zambia": "Sambia", + "Yemen": "Jemen", + "Western Sahara": "Länsi-Sahara", + "Wallis & Futuna": "Wallis ja Futuna", + "Vietnam": "Vietnam", + "Venezuela": "Venezuela", + "Vatican City": "Vatikaani", + "Vanuatu": "Vanuatu", + "Uzbekistan": "Uzbekistan", + "Uruguay": "Uruguay", + "United Arab Emirates": "Yhdistyneet arabiemiirikunnat", + "Ukraine": "Ukraina", + "Uganda": "Uganda", + "U.S. Virgin Islands": "Yhdysvaltain Neitsytsaaret", + "Tuvalu": "Tuvalu", + "Turks & Caicos Islands": "Turks- ja Caicossaaret", + "Turkmenistan": "Turkmenistan", + "Turkey": "Turkki", + "Tunisia": "Tunisia", + "Trinidad & Tobago": "Trinidad ja Tobago", + "Tonga": "Tonga", + "Tokelau": "Tokelau", + "Togo": "Togo", + "Timor-Leste": "Itä-Timor", + "Thailand": "Thaimaa", + "Tanzania": "Tansania", + "Tajikistan": "Tadžikistan", + "Taiwan": "Taiwan", + "São Tomé & Príncipe": "São Tomé ja Príncipe", + "Syria": "Syyria", + "Switzerland": "Sveitsi", + "Sweden": "Ruotsi", + "Swaziland": "Swazimaa", + "Svalbard & Jan Mayen": "Huippuvuoret ja Jan Mayen", + "Suriname": "Suriname", + "Sudan": "Sudan", + "St. Vincent & Grenadines": "Saint Vincent ja Grenadiinit", + "St. Pierre & Miquelon": "Saint-Pierre ja Miquelon", + "St. Martin": "Saint-Martin", + "St. Lucia": "Saint Lucia", + "St. Kitts & Nevis": "Saint Kitts ja Nevis", + "St. Helena": "Saint Helena", + "St. Barthélemy": "Saint-Barthélemy", + "Sri Lanka": "Sri Lanka", + "Spain": "Espanja", + "South Sudan": "Etelä-Sudan", + "South Korea": "Etelä-Korea", + "South Georgia & South Sandwich Islands": "Etelä-Georgia ja Eteläiset Sandwichsaaret", + "South Africa": "Etelä-Afrikka", + "Somalia": "Somalia", + "Solomon Islands": "Salomonsaaret", + "Slovenia": "Slovenia", + "Slovakia": "Slovakia", + "Sint Maarten": "Sint Maarten", + "Singapore": "Singapore", + "Sierra Leone": "Sierra Leone", + "Seychelles": "Seychellit", + "Serbia": "Serbia", + "Senegal": "Senegal", + "Saudi Arabia": "Saudi-Arabia", + "San Marino": "San Marino", + "Samoa": "Samoa", + "Réunion": "Réunion", + "Rwanda": "Ruanda", + "Russia": "Venäjä", + "Romania": "Romania", + "Qatar": "Qatar", + "Puerto Rico": "Puerto Rico", + "Portugal": "Portugali", + "Poland": "Puola", + "Pitcairn Islands": "Pitcairnsaaret", + "Philippines": "Filippiinit", + "Peru": "Peru", + "Paraguay": "Paraguay", + "Papua New Guinea": "Papua-Uusi-Guinea", + "Panama": "Panama", + "Palestine": "Palestiina", + "Palau": "Palau", + "Pakistan": "Pakistan", + "Oman": "Oman", + "Norway": "Norja", + "Northern Mariana Islands": "Pohjois-Mariaanit", + "North Korea": "Pohjois-Korea", + "Norfolk Island": "Norfolkinsaari", + "Niue": "Niue", + "Nigeria": "Nigeria", + "Niger": "Niger", + "Nicaragua": "Nicaragua", + "New Zealand": "Uusi-Seelanti", + "New Caledonia": "Uusi-Kaledonia", + "Netherlands": "Alankomaat", + "Nepal": "Nepal", + "Nauru": "Nauru", + "Namibia": "Namibia", + "Myanmar": "Myanmar", + "Mozambique": "Mosambik", + "Morocco": "Marokko", + "Montserrat": "Montserrat", + "Montenegro": "Montenegro", + "Mongolia": "Mongolia", + "Monaco": "Monaco" } From 2e2c5a045e2a89c60657720db7c4ebb2429d065a Mon Sep 17 00:00:00 2001 From: aethralis Date: Mon, 14 Dec 2020 09:19:59 +0000 Subject: [PATCH 275/319] Translated using Weblate (Estonian) Currently translated at 100.0% (2711 of 2711 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/et/ --- src/i18n/strings/et.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/i18n/strings/et.json b/src/i18n/strings/et.json index 738f0c6e08..e9f8d729ef 100644 --- a/src/i18n/strings/et.json +++ b/src/i18n/strings/et.json @@ -1594,11 +1594,11 @@ "All settings": "Kõik seadistused", "Feedback": "Tagasiside", "Use Single Sign On to continue": "Jätkamiseks kasuta ühekordset sisselogimist", - "Confirm adding this email address by using Single Sign On to prove your identity.": "Kinnita selle e-posti aadressi lisamine kasutades ühekordset sisselogimist oma isiku tuvastamiseks.", + "Confirm adding this email address by using Single Sign On to prove your identity.": "Kinnita selle e-posti aadress kasutades oma isiku tuvastamiseks ühekordset sisselogimist (Single Sign On).", "Single Sign On": "SSO Ühekordne sisselogimine", "Confirm adding email": "Kinnita e-posti aadressi lisamine", "Click the button below to confirm adding this email address.": "Klõpsi järgnevat nuppu e-posti aadressi lisamise kinnitamiseks.", - "Confirm adding this phone number by using Single Sign On to prove your identity.": "Kinnita selle telefoninumbri lisamine kasutades ühekordset sisselogimist oma isiku tuvastamiseks.", + "Confirm adding this phone number by using Single Sign On to prove your identity.": "Kinnita selle telefoninumbri lisamine kasutades oma isiku tuvastamiseks ühekordset sisselogimist (Single Sign On).", "Confirm adding phone number": "Kinnita telefoninumbri lisamine", "Click the button below to confirm adding this phone number.": "Klõpsi järgnevat nuppu telefoninumbri lisamise kinnitamiseks.", "Add Phone Number": "Lisa telefoninumber", @@ -2399,7 +2399,7 @@ "A connection error occurred while trying to contact the server.": "Serveriga ühenduse algatamisel tekkis viga.", "The server is not configured to indicate what the problem is (CORS).": "Server on seadistatud varjama tegelikke veapõhjuseid (CORS).", "No files visible in this room": "Selles jututoas pole nähtavaid faile", - "Attach files from chat or just drag and drop them anywhere in a room.": "Faile saad manueks lisada kas vastava nupu alt vestlusest või sikutades neid jututoa aknasse.", + "Attach files from chat or just drag and drop them anywhere in a room.": "Faile saad manuseks lisada kas vastava nupu alt vestlusest või sikutades neid jututoa aknasse.", "You have no visible notifications in this room.": "Jututoas pole nähtavaid teavitusi.", "You're all caught up.": "Ei tea... kõik vist on nüüd tehtud.", "You’re all caught up": "Ei tea... kõik vist on nüüd tehtud", From 32f693e3b0dcb36c263ec268701826c2bd4b62ce Mon Sep 17 00:00:00 2001 From: David Baker Date: Mon, 14 Dec 2020 22:28:21 +0000 Subject: [PATCH 276/319] Convert InviteDialog to TypeScript Before I start using it to select VoIP transfer targets --- .../{InviteDialog.js => InviteDialog.tsx} | 104 +++++++++++------- 1 file changed, 64 insertions(+), 40 deletions(-) rename src/components/views/dialogs/{InviteDialog.js => InviteDialog.tsx} (94%) diff --git a/src/components/views/dialogs/InviteDialog.js b/src/components/views/dialogs/InviteDialog.tsx similarity index 94% rename from src/components/views/dialogs/InviteDialog.js rename to src/components/views/dialogs/InviteDialog.tsx index c039c191c5..cacf0be5c9 100644 --- a/src/components/views/dialogs/InviteDialog.js +++ b/src/components/views/dialogs/InviteDialog.tsx @@ -15,13 +15,12 @@ limitations under the License. */ import React, {createRef} from 'react'; -import PropTypes from 'prop-types'; import {_t} from "../../../languageHandler"; import * as sdk from "../../../index"; import {MatrixClientPeg} from "../../../MatrixClientPeg"; import {makeRoomPermalink, makeUserPermalink} from "../../../utils/permalinks/Permalinks"; import DMRoomMap from "../../../utils/DMRoomMap"; -import {RoomMember} from "matrix-js-sdk/src/matrix"; +import {RoomMember} from "matrix-js-sdk/src/models/room-member"; import SdkConfig from "../../../SdkConfig"; import {getHttpUriForMxc} from "matrix-js-sdk/src/content-repo"; import * as Email from "../../../email"; @@ -132,12 +131,12 @@ class ThreepidMember extends Member { } } -class DMUserTile extends React.PureComponent { - static propTypes = { - member: PropTypes.object.isRequired, // Should be a Member (see interface above) - onRemove: PropTypes.func, // takes 1 argument, the member being removed - }; +interface IDMUserTileProps { + member: RoomMember; + onRemove: (RoomMember) => any; +} +class DMUserTile extends React.PureComponent { _onRemove = (e) => { // Stop the browser from highlighting text e.preventDefault(); @@ -173,7 +172,9 @@ class DMUserTile extends React.PureComponent { className='mx_InviteDialog_userTile_remove' onClick={this._onRemove} > - {_t('Remove')} + {_t('Remove')} ); } @@ -190,15 +191,15 @@ class DMUserTile extends React.PureComponent { } } -class DMRoomTile extends React.PureComponent { - static propTypes = { - member: PropTypes.object.isRequired, // Should be a Member (see interface above) - lastActiveTs: PropTypes.number, - onToggle: PropTypes.func.isRequired, // takes 1 argument, the member being toggled - highlightWord: PropTypes.string, - isSelected: PropTypes.bool, - }; +interface IDMRoomTileProps { + member: RoomMember; + lastActiveTs: number; + onToggle: (RoomMember) => any; + highlightWord: string; + isSelected: boolean; +} +class DMRoomTile extends React.PureComponent { _onClick = (e) => { // Stop the browser from highlighting text e.preventDefault(); @@ -298,28 +299,45 @@ class DMRoomTile extends React.PureComponent { } } -export default class InviteDialog extends React.PureComponent { - static propTypes = { - // Takes an array of user IDs/emails to invite. - onFinished: PropTypes.func.isRequired, +interface IInviteDialogProps { + // Takes an array of user IDs/emails to invite. + onFinished: (toInvite?: string[]) => any; - // The kind of invite being performed. Assumed to be KIND_DM if - // not provided. - kind: PropTypes.string, + // The kind of invite being performed. Assumed to be KIND_DM if + // not provided. + kind: string, - // The room ID this dialog is for. Only required for KIND_INVITE. - roomId: PropTypes.string, + // The room ID this dialog is for. Only required for KIND_INVITE. + roomId: string, - // Initial value to populate the filter with - initialText: PropTypes.string, - }; + // Initial value to populate the filter with + initialText: string, +} +interface IInviteDialogState { + targets: RoomMember[]; // array of Member objects (see interface above) + filterText: string; + recents: { user: DirectoryMember, userId: string }[]; + numRecentsShown: number; + suggestions: { user: DirectoryMember, userId: string }[]; + numSuggestionsShown: number; + serverResultsMixin: { user: DirectoryMember, userId: string }[]; + threepidResultsMixin: ({ user: ThreepidMember, userId: string} | { user: DirectoryMember, userId: string})[]; + canUseIdentityServer: boolean; + tryingIdentityServer: boolean; + + // These two flags are used for the 'Go' button to communicate what is going on. + busy: boolean, + errorText: string, +} + +export default class InviteDialog extends React.PureComponent { static defaultProps = { kind: KIND_DM, initialText: "", }; - _debounceTimer: number = null; + _debounceTimer: NodeJS.Timeout = null; // actually number because we're in the browser _editorRef: any = null; constructor(props) { @@ -348,8 +366,8 @@ export default class InviteDialog extends React.PureComponent { numRecentsShown: INITIAL_ROOMS_SHOWN, suggestions: this._buildSuggestions(alreadyInvited), numSuggestionsShown: INITIAL_ROOMS_SHOWN, - serverResultsMixin: [], // { user: DirectoryMember, userId: string }[], like recents and suggestions - threepidResultsMixin: [], // { user: ThreepidMember, userId: string}[], like recents and suggestions + serverResultsMixin: [], + threepidResultsMixin: [], canUseIdentityServer: !!MatrixClientPeg.get().getIdentityServerUrl(), tryingIdentityServer: false, @@ -367,7 +385,7 @@ export default class InviteDialog extends React.PureComponent { } } - static buildRecents(excludedTargetIds: Set): {userId: string, user: RoomMember, lastActive: number} { + static buildRecents(excludedTargetIds: Set): {userId: string, user: RoomMember, lastActive: number}[] { const rooms = DMRoomMap.shared().getUniqueRoomsWithIndividuals(); // map of userId => js-sdk Room // Also pull in all the rooms tagged as DefaultTagID.DM so we don't miss anything. Sometimes the @@ -430,7 +448,7 @@ export default class InviteDialog extends React.PureComponent { return recents; } - _buildSuggestions(excludedTargetIds: Set): {userId: string, user: RoomMember} { + _buildSuggestions(excludedTargetIds: Set): {userId: string, user: RoomMember}[] { const maxConsideredMembers = 200; const joinedRooms = MatrixClientPeg.get().getRooms() .filter(r => r.getMyMembership() === 'join' && r.getJoinedMemberCount() <= maxConsideredMembers); @@ -470,7 +488,7 @@ export default class InviteDialog extends React.PureComponent { }, {}); // Generates { userId: {member, numRooms, score} } - const memberScores = Object.values(memberRooms).reduce((scores, entry) => { + const memberScores = Object.values(memberRooms).reduce((scores, entry: {member: RoomMember, rooms: Room[]}) => { const numMembersTotal = entry.rooms.reduce((c, r) => c + r.getJoinedMemberCount(), 0); const maxRange = maxConsideredMembers * entry.rooms.length; scores[entry.member.userId] = { @@ -603,7 +621,7 @@ export default class InviteDialog extends React.PureComponent { return; } - const createRoomOptions = {inlineErrors: true}; + const createRoomOptions = {inlineErrors: true} as any; if (privateShouldBeEncrypted()) { // Check whether all users have uploaded device keys before. @@ -620,7 +638,7 @@ export default class InviteDialog extends React.PureComponent { // Check if it's a traditional DM and create the room if required. // TODO: [Canonical DMs] Remove this check and instead just create the multi-person DM - let createRoomPromise = Promise.resolve(); + let createRoomPromise = Promise.resolve(null) as Promise; const isSelf = targetIds.length === 1 && targetIds[0] === MatrixClientPeg.get().getUserId(); if (targetIds.length === 1 && !isSelf) { createRoomOptions.dmUserId = targetIds[0]; @@ -990,7 +1008,8 @@ export default class InviteDialog extends React.PureComponent { const hasMixins = this.state.serverResultsMixin || this.state.threepidResultsMixin; if (this.state.filterText && hasMixins && kind === 'suggestions') { // We don't want to duplicate members though, so just exclude anyone we've already seen. - const notAlreadyExists = (u: Member): boolean => { + // The type of u is a pain to define but members of both mixins have the 'userId' property + const notAlreadyExists = (u: any): boolean => { return !sourceMembers.some(m => m.userId === u.userId) && !priorityAdditionalMembers.some(m => m.userId === u.userId) && !otherAdditionalMembers.some(m => m.userId === u.userId); @@ -1169,7 +1188,8 @@ export default class InviteDialog extends React.PureComponent { if (CommunityPrototypeStore.instance.getSelectedCommunityId()) { const communityName = CommunityPrototypeStore.instance.getSelectedCommunityName(); - const inviteText = _t("This won't invite them to %(communityName)s. " + + const inviteText = _t( + "This won't invite them to %(communityName)s. " + "To invite someone to %(communityName)s, click here", {communityName}, { userId: () => { @@ -1209,7 +1229,9 @@ export default class InviteDialog extends React.PureComponent { userId: () => {userId}, a: (sub) => - {sub}, + + {sub} + , }, ); } else { @@ -1220,7 +1242,9 @@ export default class InviteDialog extends React.PureComponent { userId: () => {userId}, a: (sub) => - {sub}, + + {sub} + , }, ); } From df825792bcec2b91005f53ad58ad21ec991ae697 Mon Sep 17 00:00:00 2001 From: David Baker Date: Mon, 14 Dec 2020 22:51:40 +0000 Subject: [PATCH 277/319] These can just all be Members --- src/components/views/dialogs/InviteDialog.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/views/dialogs/InviteDialog.tsx b/src/components/views/dialogs/InviteDialog.tsx index cacf0be5c9..dd6d343846 100644 --- a/src/components/views/dialogs/InviteDialog.tsx +++ b/src/components/views/dialogs/InviteDialog.tsx @@ -317,12 +317,12 @@ interface IInviteDialogProps { interface IInviteDialogState { targets: RoomMember[]; // array of Member objects (see interface above) filterText: string; - recents: { user: DirectoryMember, userId: string }[]; + recents: { user: Member, userId: string }[]; numRecentsShown: number; - suggestions: { user: DirectoryMember, userId: string }[]; + suggestions: { user: Member, userId: string }[]; numSuggestionsShown: number; - serverResultsMixin: { user: DirectoryMember, userId: string }[]; - threepidResultsMixin: ({ user: ThreepidMember, userId: string} | { user: DirectoryMember, userId: string})[]; + serverResultsMixin: { user: Member, userId: string }[]; + threepidResultsMixin: { user: Member, userId: string}[]; canUseIdentityServer: boolean; tryingIdentityServer: boolean; From 2d369105773fb4243eb384e3f158423268d3193a Mon Sep 17 00:00:00 2001 From: David Baker Date: Mon, 14 Dec 2020 22:52:30 +0000 Subject: [PATCH 278/319] Add comment Co-authored-by: Travis Ralston --- src/components/views/dialogs/InviteDialog.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/views/dialogs/InviteDialog.tsx b/src/components/views/dialogs/InviteDialog.tsx index dd6d343846..8ccbbe473c 100644 --- a/src/components/views/dialogs/InviteDialog.tsx +++ b/src/components/views/dialogs/InviteDialog.tsx @@ -621,7 +621,7 @@ export default class InviteDialog extends React.PureComponent Date: Mon, 14 Dec 2020 17:41:10 +0000 Subject: [PATCH 279/319] Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (2711 of 2711 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/pt_BR/ --- src/i18n/strings/pt_BR.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/pt_BR.json b/src/i18n/strings/pt_BR.json index 05c6db5c0c..b456c98aed 100644 --- a/src/i18n/strings/pt_BR.json +++ b/src/i18n/strings/pt_BR.json @@ -2900,5 +2900,8 @@ "Hold": "Pausar", "Resume": "Retomar", "%(peerName)s held the call": "%(peerName)s pausou a chamada", - "You held the call Resume": "Você pausou a chamada Retomar" + "You held the call Resume": "Você pausou a chamada Retomar", + "You've reached the maximum number of simultaneous calls.": "Você atingiu o número máximo de chamadas simultâneas.", + "Too Many Calls": "Muitas chamadas", + "%(name)s paused": "%(name)s pausou" } From 73602dace379e89032ac7b37493c54ac8933bd06 Mon Sep 17 00:00:00 2001 From: Mitja Sorsa Date: Mon, 14 Dec 2020 22:01:06 +0000 Subject: [PATCH 280/319] Translated using Weblate (Finnish) Currently translated at 90.7% (2459 of 2711 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/fi/ --- src/i18n/strings/fi.json | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/i18n/strings/fi.json b/src/i18n/strings/fi.json index 7fe6e0f5db..70431c6294 100644 --- a/src/i18n/strings/fi.json +++ b/src/i18n/strings/fi.json @@ -304,7 +304,7 @@ "Unable to enable Notifications": "Ilmoitusten käyttöönotto epäonnistui", "Uploading %(filename)s and %(count)s others|other": "Ladataan %(filename)s ja %(count)s muuta", "Upload Failed": "Lataus epäonnistui", - "Upload file": "Lataa tiedosto", + "Upload file": "Lataa tiedostoja", "Upload new:": "Lataa uusi:", "Usage": "Käyttö", "%(senderDisplayName)s changed the topic to \"%(topic)s\".": "%(senderDisplayName)s vaihtoi aiheeksi \"%(topic)s\".", @@ -863,7 +863,7 @@ "You don't currently have any stickerpacks enabled": "Sinulla ei ole tarrapaketteja käytössä", "Stickerpack": "Tarrapaketti", "Hide Stickers": "Piilota tarrat", - "Show Stickers": "Näytä tarrat", + "Show Stickers": "Tarrat", "Profile picture": "Profiilikuva", "Set a new account password...": "Aseta uusi salasana tilille...", "Set a new status...": "Aseta uusi tila...", @@ -2144,7 +2144,7 @@ "Address (optional)": "Osoite (valinnainen)", "Light": "Vaalea", "Dark": "Tumma", - "Emoji picker": "Emojivalitsin", + "Emoji picker": "Emojit", "No recently visited rooms": "Ei hiljattain vierailtuja huoneita", "People": "Ihmiset", "Sort by": "Lajittelutapa", @@ -2663,5 +2663,11 @@ "Montserrat": "Montserrat", "Montenegro": "Montenegro", "Mongolia": "Mongolia", - "Monaco": "Monaco" + "Monaco": "Monaco", + "Room Info": "Huoneen tiedot", + "not found in storage": "ei löytynyt muistista", + "Sign into your homeserver": "Kirjaudu sisään kotipalvelimellesi", + "About homeservers": "Tietoa kotipalvelimista", + "Not encrypted": "Ei salattu", + "You have no visible notifications in this room.": "Olet nähnyt tämän huoneen kaikki ilmoitukset." } From 4cf3be824ff359c3f9439a3baf55a81cd55427fa Mon Sep 17 00:00:00 2001 From: Besnik Bleta Date: Mon, 14 Dec 2020 17:42:47 +0000 Subject: [PATCH 281/319] Translated using Weblate (Albanian) Currently translated at 99.7% (2703 of 2711 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/sq/ --- src/i18n/strings/sq.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/i18n/strings/sq.json b/src/i18n/strings/sq.json index de80ab4a36..827df3fb70 100644 --- a/src/i18n/strings/sq.json +++ b/src/i18n/strings/sq.json @@ -2881,7 +2881,7 @@ "Send stickers into your active room": "Dërgoni ngjitës në dhomën tuaj aktive", "Send stickers into this room": "Dërgoni ngjitës në këtë dhomë", "Go to Home View": "Kaloni te Pamja Kreu", - "

HTML for your community's page

\n

\n Use the long description to introduce new members to the community, or distribute\n some important links\n

\n

\n You can even add images with Matrix URLs \n

\n": "

HTML për faqen e bashkësisë tuaj

\n

\n Përdoreni përshkrimin e gjatë që t’i prezantoni bashkësisë anëtarë të rinj, ose për t’u dhënë lidhje të rëndësishme\n

\n

\n Mundeni madje të shtoni figura me URL-ra Matrix \n

\n", + "

HTML for your community's page

\n

\n Use the long description to introduce new members to the community, or distribute\n some important links\n

\n

\n You can even add images with Matrix URLs \n

\n": "

HTML për faqen e bashkësisë tuaj

\n

\n Përdoreni përshkrimin e gjatë që t’i prezantoni bashkësisë anëtarë të rinj, ose për t’u dhënë lidhje të rëndësishme\n

\n

\n Mundeni madje të shtoni figura me URL-ra Matrix \n

\n", "Enter phone number": "Jepni numër telefoni", "Enter email address": "Jepni adresë email-i", "Decline All": "Hidhi Krejt Poshtë", From 3fc1a8ff78e85a69b988e2b04de91bdc105375af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Priit=20J=C3=B5er=C3=BC=C3=BCt?= Date: Mon, 14 Dec 2020 19:55:37 +0000 Subject: [PATCH 282/319] Translated using Weblate (Estonian) Currently translated at 100.0% (2711 of 2711 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/et/ --- src/i18n/strings/et.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/i18n/strings/et.json b/src/i18n/strings/et.json index e9f8d729ef..10f4b6f4a0 100644 --- a/src/i18n/strings/et.json +++ b/src/i18n/strings/et.json @@ -526,7 +526,7 @@ "%(senderName)s removed the alternative addresses %(addresses)s for this room.|one": "%(senderName)s eemaldas täiendava aadressi %(addresses)s sellelt jututoalt.", "%(senderName)s changed the alternative addresses for this room.": "%(senderName)s muutis selle jututoa täiendavat aadressi.", "%(senderName)s changed the main and alternative addresses for this room.": "%(senderName)s muutis selle jututoa põhiaadressi ja täiendavat aadressi.", - "%(senderName)s changed the addresses for this room.": "%(senderName)s muutis selle jututoa aadressid.", + "%(senderName)s changed the addresses for this room.": "%(senderName)s muutis selle jututoa aadresse.", "Someone": "Keegi", "(not supported by this browser)": "(ei ole toetatud selles brauseris)", "(could not connect media)": "(ühendus teise osapoolega ei õnnestunud)", From 018743a6399c8d7ab681260e5f7326c4df245ce9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20=C5=A0ediv=C3=BD?= Date: Tue, 15 Dec 2020 11:45:15 +0100 Subject: [PATCH 283/319] Update _MemberList.scss --- res/css/views/rooms/_MemberList.scss | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/res/css/views/rooms/_MemberList.scss b/res/css/views/rooms/_MemberList.scss index 9753d3afb5..1e3506e371 100644 --- a/res/css/views/rooms/_MemberList.scss +++ b/res/css/views/rooms/_MemberList.scss @@ -112,10 +112,10 @@ limitations under the License. } } -.mx_MemberList_inviteCommunity span { - background-image: url('$(res)/img/icon-invite-people.svg'); +.mx_MemberList_inviteCommunity span::before { + mask-image: url('$(res)/img/icon-invite-people.svg'); } -.mx_MemberList_addRoomToCommunity span { - background-image: url('$(res)/img/icons-room-add.svg'); +.mx_MemberList_addRoomToCommunity span::before { + mask-image: url('$(res)/img/icons-room-add.svg'); } From 237b942e46c79b39e76bb2fa747427546ec96ebc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9E=D0=BB=D0=B5=D0=B3=20=D0=9A=D0=BE=D1=80=D0=B0=D0=BF?= =?UTF-8?q?=D0=B0=D1=80=D0=B0=D1=80=D0=B0?= Date: Tue, 15 Dec 2020 15:08:47 +0000 Subject: [PATCH 284/319] Translated using Weblate (Ukrainian) Currently translated at 53.3% (1446 of 2711 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/uk/ --- src/i18n/strings/uk.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/uk.json b/src/i18n/strings/uk.json index bebe718976..d2e18083f4 100644 --- a/src/i18n/strings/uk.json +++ b/src/i18n/strings/uk.json @@ -1528,5 +1528,6 @@ "Find a room… (e.g. %(exampleRoom)s)": "Знайти кімнату… (напр. %(exampleRoom)s)", "Find a room…": "Знайти кімнату…", "Can't find this server or its room list": "Не вдалось знайти цей сервер у переліку кімнат", - "If you can't find the room you're looking for, ask for an invite or Create a new room.": "Якщо ви не можете знайти потрібну кімнату, попросіть запрошення або Створіть нову кімнату власноруч." + "If you can't find the room you're looking for, ask for an invite or Create a new room.": "Якщо ви не можете знайти потрібну кімнату, попросіть запрошення або Створіть нову кімнату власноруч.", + "Cannot reach homeserver": "Не вдається зв`язатися з домашнім сервером" } From e183fcf169066054661196dc81f9c89f0a45dd1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9E=D0=BB=D0=B5=D0=B3=20=D0=9A=D0=BE=D1=80=D0=B0=D0=BF?= =?UTF-8?q?=D0=B0=D1=80=D0=B0=D1=80=D0=B0?= Date: Tue, 15 Dec 2020 15:09:33 +0000 Subject: [PATCH 285/319] Translated using Weblate (Ukrainian) Currently translated at 53.3% (1447 of 2711 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/uk/ --- src/i18n/strings/uk.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/uk.json b/src/i18n/strings/uk.json index d2e18083f4..a6f443f673 100644 --- a/src/i18n/strings/uk.json +++ b/src/i18n/strings/uk.json @@ -1529,5 +1529,6 @@ "Find a room…": "Знайти кімнату…", "Can't find this server or its room list": "Не вдалось знайти цей сервер у переліку кімнат", "If you can't find the room you're looking for, ask for an invite or Create a new room.": "Якщо ви не можете знайти потрібну кімнату, попросіть запрошення або Створіть нову кімнату власноруч.", - "Cannot reach homeserver": "Не вдається зв`язатися з домашнім сервером" + "Cannot reach homeserver": "Не вдається зв`язатися з домашнім сервером", + "Ensure you have a stable internet connection, or get in touch with the server admin": "Переконайтеся, що у вас є стабільне підключення до інтернету, або зв’яжіться з сис-адміном" } From 239c0e7b23184958c7c45e6c467af29701aa6db9 Mon Sep 17 00:00:00 2001 From: Ihor Hordiichuk Date: Tue, 15 Dec 2020 15:09:05 +0000 Subject: [PATCH 286/319] Translated using Weblate (Ukrainian) Currently translated at 53.3% (1447 of 2711 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/uk/ --- src/i18n/strings/uk.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/i18n/strings/uk.json b/src/i18n/strings/uk.json index a6f443f673..23da3d9a82 100644 --- a/src/i18n/strings/uk.json +++ b/src/i18n/strings/uk.json @@ -1529,6 +1529,6 @@ "Find a room…": "Знайти кімнату…", "Can't find this server or its room list": "Не вдалось знайти цей сервер у переліку кімнат", "If you can't find the room you're looking for, ask for an invite or Create a new room.": "Якщо ви не можете знайти потрібну кімнату, попросіть запрошення або Створіть нову кімнату власноруч.", - "Cannot reach homeserver": "Не вдається зв`язатися з домашнім сервером", + "Cannot reach homeserver": "Не вдається зв'язатися з домашнім сервером", "Ensure you have a stable internet connection, or get in touch with the server admin": "Переконайтеся, що у вас є стабільне підключення до інтернету, або зв’яжіться з сис-адміном" } From b3aa6659a3f5c630fbd210feecf734321f5741b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9E=D0=BB=D0=B5=D0=B3=20=D0=9A=D0=BE=D1=80=D0=B0=D0=BF?= =?UTF-8?q?=D0=B0=D1=80=D0=B0=D1=80=D0=B0?= Date: Tue, 15 Dec 2020 15:10:53 +0000 Subject: [PATCH 287/319] Translated using Weblate (Ukrainian) Currently translated at 53.4% (1448 of 2711 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/uk/ --- src/i18n/strings/uk.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/uk.json b/src/i18n/strings/uk.json index 23da3d9a82..23dc13e8fa 100644 --- a/src/i18n/strings/uk.json +++ b/src/i18n/strings/uk.json @@ -1530,5 +1530,6 @@ "Can't find this server or its room list": "Не вдалось знайти цей сервер у переліку кімнат", "If you can't find the room you're looking for, ask for an invite or Create a new room.": "Якщо ви не можете знайти потрібну кімнату, попросіть запрошення або Створіть нову кімнату власноруч.", "Cannot reach homeserver": "Не вдається зв'язатися з домашнім сервером", - "Ensure you have a stable internet connection, or get in touch with the server admin": "Переконайтеся, що у вас є стабільне підключення до інтернету, або зв’яжіться з сис-адміном" + "Ensure you have a stable internet connection, or get in touch with the server admin": "Переконайтеся, що у вас є стабільне підключення до інтернету, або зв’яжіться з сис-адміном", + "User %(user_id)s may or may not exist": "Користувач %(user_id)s може існувати, а може й не існувати" } From 902a74b175008731479ee48ba0be0b89bb302a15 Mon Sep 17 00:00:00 2001 From: Ihor Hordiichuk Date: Tue, 15 Dec 2020 15:10:30 +0000 Subject: [PATCH 288/319] Translated using Weblate (Ukrainian) Currently translated at 53.4% (1448 of 2711 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/uk/ --- src/i18n/strings/uk.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/i18n/strings/uk.json b/src/i18n/strings/uk.json index 23dc13e8fa..7cb0c2ddb8 100644 --- a/src/i18n/strings/uk.json +++ b/src/i18n/strings/uk.json @@ -1530,6 +1530,6 @@ "Can't find this server or its room list": "Не вдалось знайти цей сервер у переліку кімнат", "If you can't find the room you're looking for, ask for an invite or Create a new room.": "Якщо ви не можете знайти потрібну кімнату, попросіть запрошення або Створіть нову кімнату власноруч.", "Cannot reach homeserver": "Не вдається зв'язатися з домашнім сервером", - "Ensure you have a stable internet connection, or get in touch with the server admin": "Переконайтеся, що у вас є стабільне підключення до інтернету, або зв’яжіться з сис-адміном", + "Ensure you have a stable internet connection, or get in touch with the server admin": "Переконайтеся, що у ваше з'єднання з Інтернетом стабільне або зв’яжіться з системним адміністратором", "User %(user_id)s may or may not exist": "Користувач %(user_id)s може існувати, а може й не існувати" } From d78993992c685f233c89fd0562f27820e823ca4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9E=D0=BB=D0=B5=D0=B3=20=D0=9A=D0=BE=D1=80=D0=B0=D0=BF?= =?UTF-8?q?=D0=B0=D1=80=D0=B0=D1=80=D0=B0?= Date: Tue, 15 Dec 2020 15:11:34 +0000 Subject: [PATCH 289/319] Translated using Weblate (Ukrainian) Currently translated at 53.4% (1449 of 2711 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/uk/ --- src/i18n/strings/uk.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/uk.json b/src/i18n/strings/uk.json index 7cb0c2ddb8..20cfebfe02 100644 --- a/src/i18n/strings/uk.json +++ b/src/i18n/strings/uk.json @@ -1531,5 +1531,6 @@ "If you can't find the room you're looking for, ask for an invite or Create a new room.": "Якщо ви не можете знайти потрібну кімнату, попросіть запрошення або Створіть нову кімнату власноруч.", "Cannot reach homeserver": "Не вдається зв'язатися з домашнім сервером", "Ensure you have a stable internet connection, or get in touch with the server admin": "Переконайтеся, що у ваше з'єднання з Інтернетом стабільне або зв’яжіться з системним адміністратором", - "User %(user_id)s may or may not exist": "Користувач %(user_id)s може існувати, а може й не існувати" + "User %(user_id)s may or may not exist": "Користувач %(user_id)s може існувати, а може й не існувати", + "No need for symbols, digits, or uppercase letters": "Нема необхідності в символах, цифрах, або заголовних(?) літер" } From 77ccce7335858f3bd564c5f4df4df82af60870e0 Mon Sep 17 00:00:00 2001 From: Ihor Hordiichuk Date: Tue, 15 Dec 2020 15:11:22 +0000 Subject: [PATCH 290/319] Translated using Weblate (Ukrainian) Currently translated at 53.4% (1449 of 2711 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/uk/ --- src/i18n/strings/uk.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/i18n/strings/uk.json b/src/i18n/strings/uk.json index 20cfebfe02..1d65943586 100644 --- a/src/i18n/strings/uk.json +++ b/src/i18n/strings/uk.json @@ -1531,6 +1531,6 @@ "If you can't find the room you're looking for, ask for an invite or Create a new room.": "Якщо ви не можете знайти потрібну кімнату, попросіть запрошення або Створіть нову кімнату власноруч.", "Cannot reach homeserver": "Не вдається зв'язатися з домашнім сервером", "Ensure you have a stable internet connection, or get in touch with the server admin": "Переконайтеся, що у ваше з'єднання з Інтернетом стабільне або зв’яжіться з системним адміністратором", - "User %(user_id)s may or may not exist": "Користувач %(user_id)s може існувати, а може й не існувати", + "User %(user_id)s may or may not exist": "Користувач %(user_id)s можливо існує, а можливо й ні", "No need for symbols, digits, or uppercase letters": "Нема необхідності в символах, цифрах, або заголовних(?) літер" } From 2dd822816d566b396b4decdb4464d6bcfa066152 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9E=D0=BB=D0=B5=D0=B3=20=D0=9A=D0=BE=D1=80=D0=B0=D0=BF?= =?UTF-8?q?=D0=B0=D1=80=D0=B0=D1=80=D0=B0?= Date: Tue, 15 Dec 2020 15:12:28 +0000 Subject: [PATCH 291/319] Translated using Weblate (Ukrainian) Currently translated at 53.4% (1450 of 2711 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/uk/ --- src/i18n/strings/uk.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/uk.json b/src/i18n/strings/uk.json index 1d65943586..95b507c886 100644 --- a/src/i18n/strings/uk.json +++ b/src/i18n/strings/uk.json @@ -1532,5 +1532,6 @@ "Cannot reach homeserver": "Не вдається зв'язатися з домашнім сервером", "Ensure you have a stable internet connection, or get in touch with the server admin": "Переконайтеся, що у ваше з'єднання з Інтернетом стабільне або зв’яжіться з системним адміністратором", "User %(user_id)s may or may not exist": "Користувач %(user_id)s можливо існує, а можливо й ні", - "No need for symbols, digits, or uppercase letters": "Нема необхідності в символах, цифрах, або заголовних(?) літер" + "No need for symbols, digits, or uppercase letters": "Нема необхідності в символах, цифрах, або заголовних(?) літер", + "Capitalization doesn't help very much": "Заголовні букви не дуже допомагають" } From 82450826a6e5a0eb38ba9d72dc2cb47d55565ff6 Mon Sep 17 00:00:00 2001 From: Ihor Hordiichuk Date: Tue, 15 Dec 2020 15:12:22 +0000 Subject: [PATCH 292/319] Translated using Weblate (Ukrainian) Currently translated at 53.4% (1450 of 2711 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/uk/ --- src/i18n/strings/uk.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/i18n/strings/uk.json b/src/i18n/strings/uk.json index 95b507c886..0c14a581b4 100644 --- a/src/i18n/strings/uk.json +++ b/src/i18n/strings/uk.json @@ -1532,6 +1532,6 @@ "Cannot reach homeserver": "Не вдається зв'язатися з домашнім сервером", "Ensure you have a stable internet connection, or get in touch with the server admin": "Переконайтеся, що у ваше з'єднання з Інтернетом стабільне або зв’яжіться з системним адміністратором", "User %(user_id)s may or may not exist": "Користувач %(user_id)s можливо існує, а можливо й ні", - "No need for symbols, digits, or uppercase letters": "Нема необхідності в символах, цифрах, або заголовних(?) літер", + "No need for symbols, digits, or uppercase letters": "Цифри або великі літери не вимагаються", "Capitalization doesn't help very much": "Заголовні букви не дуже допомагають" } From 7c4cfb7855c015a5d40d0a028d8ca10437182024 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9E=D0=BB=D0=B5=D0=B3=20=D0=9A=D0=BE=D1=80=D0=B0=D0=BF?= =?UTF-8?q?=D0=B0=D1=80=D0=B0=D1=80=D0=B0?= Date: Tue, 15 Dec 2020 15:14:29 +0000 Subject: [PATCH 293/319] Translated using Weblate (Ukrainian) Currently translated at 53.4% (1450 of 2711 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/uk/ --- src/i18n/strings/uk.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/i18n/strings/uk.json b/src/i18n/strings/uk.json index 0c14a581b4..4e505bbc7b 100644 --- a/src/i18n/strings/uk.json +++ b/src/i18n/strings/uk.json @@ -1101,7 +1101,7 @@ "You'll need to authenticate with the server to confirm the upgrade.": "Ви матимете пройти розпізнання на сервері щоб підтвердити поліпшування.", "Upgrade this session to allow it to verify other sessions, granting them access to encrypted messages and marking them as trusted for other users.": "Поліпште цей сеанс щоб уможливити звіряння інших сеансів, надаючи їм доступ до зашифрованих повідомлень та позначуючи їх довіреними для інших користувачів.", "Upgrade your encryption": "Поліпшити ваше шифрування", - "Show a placeholder for removed messages": "Показувати позначку-заповнювач для видалених повідомлень", + "Show a placeholder for removed messages": "Показувати плашки замість видалених повідомлень", "Show join/leave messages (invites/kicks/bans unaffected)": "Показувати повідомлення про приєднання/залишення (не впливає на запрошення/викидання/заборону)", "Show avatar changes": "Показувати зміни личини", "Show display name changes": "Показувати зміни видимого імені", From d8843b48eef4630ac1b185ffd8bb86f3d2c23bb2 Mon Sep 17 00:00:00 2001 From: Ihor Hordiichuk Date: Tue, 15 Dec 2020 15:13:11 +0000 Subject: [PATCH 294/319] Translated using Weblate (Ukrainian) Currently translated at 53.4% (1450 of 2711 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/uk/ --- src/i18n/strings/uk.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/i18n/strings/uk.json b/src/i18n/strings/uk.json index 4e505bbc7b..1b835b73fd 100644 --- a/src/i18n/strings/uk.json +++ b/src/i18n/strings/uk.json @@ -1532,6 +1532,6 @@ "Cannot reach homeserver": "Не вдається зв'язатися з домашнім сервером", "Ensure you have a stable internet connection, or get in touch with the server admin": "Переконайтеся, що у ваше з'єднання з Інтернетом стабільне або зв’яжіться з системним адміністратором", "User %(user_id)s may or may not exist": "Користувач %(user_id)s можливо існує, а можливо й ні", - "No need for symbols, digits, or uppercase letters": "Цифри або великі літери не вимагаються", - "Capitalization doesn't help very much": "Заголовні букви не дуже допомагають" + "No need for symbols, digits, or uppercase letters": "Цифри або великі букви не вимагаються", + "Capitalization doesn't help very much": "Великі букви не дуже допомагають" } From 77d53bfd673e5b66e8077d663f26380545e7f314 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9E=D0=BB=D0=B5=D0=B3=20=D0=9A=D0=BE=D1=80=D0=B0=D0=BF?= =?UTF-8?q?=D0=B0=D1=80=D0=B0=D1=80=D0=B0?= Date: Tue, 15 Dec 2020 15:16:15 +0000 Subject: [PATCH 295/319] Translated using Weblate (Ukrainian) Currently translated at 53.4% (1450 of 2711 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/uk/ --- src/i18n/strings/uk.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/i18n/strings/uk.json b/src/i18n/strings/uk.json index 1b835b73fd..6310175449 100644 --- a/src/i18n/strings/uk.json +++ b/src/i18n/strings/uk.json @@ -960,7 +960,7 @@ "Show less": "Згорнути", "Show more": "Розгорнути", "Changing password will currently reset any end-to-end encryption keys on all sessions, making encrypted chat history unreadable, unless you first export your room keys and re-import them afterwards. In future this will be improved.": "Змінення пароля призведе до скидання всіх ключів наскрізного шифрування та унеможливить читання історії листування, якщо тільки ви не експортуєте ваші ключі кімнати та не імпортуєте їх згодом. Це буде вдосконалено у майбутньому.", - "Santa": "Санта Клаус", + "Santa": "Микола", "Gift": "Подарунок", "Lock": "Замок", "Cross-signing and secret storage are not yet set up.": "Перехресне підписування та таємне сховище ще не налагоджені.", From 3f2eff5675a5afd3924e827ef5f14de3b49afcdb Mon Sep 17 00:00:00 2001 From: Ihor Hordiichuk Date: Tue, 15 Dec 2020 15:14:38 +0000 Subject: [PATCH 296/319] Translated using Weblate (Ukrainian) Currently translated at 53.4% (1450 of 2711 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/uk/ --- src/i18n/strings/uk.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/i18n/strings/uk.json b/src/i18n/strings/uk.json index 6310175449..8f562aa474 100644 --- a/src/i18n/strings/uk.json +++ b/src/i18n/strings/uk.json @@ -1101,7 +1101,7 @@ "You'll need to authenticate with the server to confirm the upgrade.": "Ви матимете пройти розпізнання на сервері щоб підтвердити поліпшування.", "Upgrade this session to allow it to verify other sessions, granting them access to encrypted messages and marking them as trusted for other users.": "Поліпште цей сеанс щоб уможливити звіряння інших сеансів, надаючи їм доступ до зашифрованих повідомлень та позначуючи їх довіреними для інших користувачів.", "Upgrade your encryption": "Поліпшити ваше шифрування", - "Show a placeholder for removed messages": "Показувати плашки замість видалених повідомлень", + "Show a placeholder for removed messages": "Показувати замісну позначку замість видалених повідомлень", "Show join/leave messages (invites/kicks/bans unaffected)": "Показувати повідомлення про приєднання/залишення (не впливає на запрошення/викидання/заборону)", "Show avatar changes": "Показувати зміни личини", "Show display name changes": "Показувати зміни видимого імені", From d3000b0e0d258b787761c80a769d8903635c73ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9E=D0=BB=D0=B5=D0=B3=20=D0=9A=D0=BE=D1=80=D0=B0=D0=BF?= =?UTF-8?q?=D0=B0=D1=80=D0=B0=D1=80=D0=B0?= Date: Tue, 15 Dec 2020 15:17:52 +0000 Subject: [PATCH 297/319] Translated using Weblate (Ukrainian) Currently translated at 53.4% (1450 of 2711 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/uk/ --- src/i18n/strings/uk.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/i18n/strings/uk.json b/src/i18n/strings/uk.json index 8f562aa474..e19307a5ca 100644 --- a/src/i18n/strings/uk.json +++ b/src/i18n/strings/uk.json @@ -1121,7 +1121,7 @@ "Are you sure? You will lose your encrypted messages if your keys are not backed up properly.": "Ви впевнені? Ви загубите ваші зашифровані повідомлення якщо копія ключів не була зроблена коректно.", "Encrypted messages are secured with end-to-end encryption. Only you and the recipient(s) have the keys to read these messages.": "Зашифровані повідомлення захищені наскрізним шифруванням. Лише ви та отримувачі повідомлень мають ключі для їх читання.", "Display Name": "Видиме ім'я", - "wait and try again later": "почекайте та спробуйте пізніше", + "wait and try again later": "Зачекайте та попробуйте ще раз пізніше", "Once enabled, encryption for a room cannot be disabled. Messages sent in an encrypted room cannot be seen by the server, only by the participants of the room. Enabling encryption may prevent many bots and bridges from working correctly. Learn more about encryption.": "Якщо ви увімкнете шифрування для кімнати, його неможливо буде вимкнути. Надіслані у зашифровану кімнату повідомлення будуть прочитними тільки для учасників кімнати, натомість для сервера вони будуть непрочитними. Увімкнення шифрування може унеможливити роботу ботів та мостів. Дізнатись більше про шифрування.", "Encrypted": "Зашифроване", "This room is end-to-end encrypted": "Ця кімната є наскрізно зашифрованою", From ad2245134a0f7b0b51d852ba5974c2a3ba9b6cc4 Mon Sep 17 00:00:00 2001 From: Ihor Hordiichuk Date: Tue, 15 Dec 2020 15:16:32 +0000 Subject: [PATCH 298/319] Translated using Weblate (Ukrainian) Currently translated at 53.4% (1450 of 2711 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/uk/ --- src/i18n/strings/uk.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/i18n/strings/uk.json b/src/i18n/strings/uk.json index e19307a5ca..85b89a35ca 100644 --- a/src/i18n/strings/uk.json +++ b/src/i18n/strings/uk.json @@ -960,7 +960,7 @@ "Show less": "Згорнути", "Show more": "Розгорнути", "Changing password will currently reset any end-to-end encryption keys on all sessions, making encrypted chat history unreadable, unless you first export your room keys and re-import them afterwards. In future this will be improved.": "Змінення пароля призведе до скидання всіх ключів наскрізного шифрування та унеможливить читання історії листування, якщо тільки ви не експортуєте ваші ключі кімнати та не імпортуєте їх згодом. Це буде вдосконалено у майбутньому.", - "Santa": "Микола", + "Santa": "Св. Миколай", "Gift": "Подарунок", "Lock": "Замок", "Cross-signing and secret storage are not yet set up.": "Перехресне підписування та таємне сховище ще не налагоджені.", From 0460b4681fece0bbb7d244ab00349018d4aebe5f Mon Sep 17 00:00:00 2001 From: strix aluco Date: Tue, 15 Dec 2020 15:19:41 +0000 Subject: [PATCH 299/319] Translated using Weblate (Ukrainian) Currently translated at 53.5% (1452 of 2711 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/uk/ --- src/i18n/strings/uk.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/uk.json b/src/i18n/strings/uk.json index 85b89a35ca..0226930146 100644 --- a/src/i18n/strings/uk.json +++ b/src/i18n/strings/uk.json @@ -1533,5 +1533,6 @@ "Ensure you have a stable internet connection, or get in touch with the server admin": "Переконайтеся, що у ваше з'єднання з Інтернетом стабільне або зв’яжіться з системним адміністратором", "User %(user_id)s may or may not exist": "Користувач %(user_id)s можливо існує, а можливо й ні", "No need for symbols, digits, or uppercase letters": "Цифри або великі букви не вимагаються", - "Capitalization doesn't help very much": "Великі букви не дуже допомагають" + "Capitalization doesn't help very much": "Великі букви не дуже допомагають", + "You're all caught up.": "Готово" } From 7cec20a565a98f249904155506ea8b055fe90414 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9E=D0=BB=D0=B5=D0=B3=20=D0=9A=D0=BE=D1=80=D0=B0=D0=BF?= =?UTF-8?q?=D0=B0=D1=80=D0=B0=D1=80=D0=B0?= Date: Tue, 15 Dec 2020 15:18:37 +0000 Subject: [PATCH 300/319] Translated using Weblate (Ukrainian) Currently translated at 53.5% (1452 of 2711 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/uk/ --- src/i18n/strings/uk.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/uk.json b/src/i18n/strings/uk.json index 0226930146..51839a3236 100644 --- a/src/i18n/strings/uk.json +++ b/src/i18n/strings/uk.json @@ -1534,5 +1534,6 @@ "User %(user_id)s may or may not exist": "Користувач %(user_id)s можливо існує, а можливо й ні", "No need for symbols, digits, or uppercase letters": "Цифри або великі букви не вимагаються", "Capitalization doesn't help very much": "Великі букви не дуже допомагають", - "You're all caught up.": "Готово" + "You're all caught up.": "Готово", + "Hey you. You're the best!": "Гей, ти, так, ти. Ти найкращий!" } From b9d40fb9c2afd52bbb45c2242fdb4f1ff5b4e7f8 Mon Sep 17 00:00:00 2001 From: Ihor Hordiichuk Date: Tue, 15 Dec 2020 15:18:09 +0000 Subject: [PATCH 301/319] Translated using Weblate (Ukrainian) Currently translated at 53.5% (1452 of 2711 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/uk/ --- src/i18n/strings/uk.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/i18n/strings/uk.json b/src/i18n/strings/uk.json index 51839a3236..0db7179b5b 100644 --- a/src/i18n/strings/uk.json +++ b/src/i18n/strings/uk.json @@ -1121,7 +1121,7 @@ "Are you sure? You will lose your encrypted messages if your keys are not backed up properly.": "Ви впевнені? Ви загубите ваші зашифровані повідомлення якщо копія ключів не була зроблена коректно.", "Encrypted messages are secured with end-to-end encryption. Only you and the recipient(s) have the keys to read these messages.": "Зашифровані повідомлення захищені наскрізним шифруванням. Лише ви та отримувачі повідомлень мають ключі для їх читання.", "Display Name": "Видиме ім'я", - "wait and try again later": "Зачекайте та попробуйте ще раз пізніше", + "wait and try again later": "зачекайте та спопробуйте ще раз пізніше", "Once enabled, encryption for a room cannot be disabled. Messages sent in an encrypted room cannot be seen by the server, only by the participants of the room. Enabling encryption may prevent many bots and bridges from working correctly. Learn more about encryption.": "Якщо ви увімкнете шифрування для кімнати, його неможливо буде вимкнути. Надіслані у зашифровану кімнату повідомлення будуть прочитними тільки для учасників кімнати, натомість для сервера вони будуть непрочитними. Увімкнення шифрування може унеможливити роботу ботів та мостів. Дізнатись більше про шифрування.", "Encrypted": "Зашифроване", "This room is end-to-end encrypted": "Ця кімната є наскрізно зашифрованою", From 8d16136e4f36746d156a4fdb7686ed0989c5f0ea Mon Sep 17 00:00:00 2001 From: strix aluco Date: Tue, 15 Dec 2020 15:20:40 +0000 Subject: [PATCH 302/319] Translated using Weblate (Ukrainian) Currently translated at 53.5% (1453 of 2711 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/uk/ --- src/i18n/strings/uk.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/uk.json b/src/i18n/strings/uk.json index 0db7179b5b..bcabdde2b3 100644 --- a/src/i18n/strings/uk.json +++ b/src/i18n/strings/uk.json @@ -1535,5 +1535,6 @@ "No need for symbols, digits, or uppercase letters": "Цифри або великі букви не вимагаються", "Capitalization doesn't help very much": "Великі букви не дуже допомагають", "You're all caught up.": "Готово", - "Hey you. You're the best!": "Гей, ти, так, ти. Ти найкращий!" + "Hey you. You're the best!": "Гей, ти, так, ти. Ти найкращий!", + "You’re all caught up": "Готово" } From 03ee5ae9db06a209c1a21e7a54d10ba9b131c873 Mon Sep 17 00:00:00 2001 From: Ihor Hordiichuk Date: Tue, 15 Dec 2020 15:20:07 +0000 Subject: [PATCH 303/319] Translated using Weblate (Ukrainian) Currently translated at 53.5% (1453 of 2711 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/uk/ --- src/i18n/strings/uk.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/i18n/strings/uk.json b/src/i18n/strings/uk.json index bcabdde2b3..5ad9b29e62 100644 --- a/src/i18n/strings/uk.json +++ b/src/i18n/strings/uk.json @@ -1534,7 +1534,7 @@ "User %(user_id)s may or may not exist": "Користувач %(user_id)s можливо існує, а можливо й ні", "No need for symbols, digits, or uppercase letters": "Цифри або великі букви не вимагаються", "Capitalization doesn't help very much": "Великі букви не дуже допомагають", - "You're all caught up.": "Готово", + "You're all caught up.": "Все готово.", "Hey you. You're the best!": "Гей, ти, так, ти. Ти найкращий!", "You’re all caught up": "Готово" } From a798772e802621375149e68a66347284f0df68b9 Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 15 Dec 2020 16:53:11 +0000 Subject: [PATCH 304/319] Unregister from the dispatcher in CallHandler otherwise you end up getting multiple place_call dispatches if you place a call after logging in --- src/CallHandler.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/CallHandler.tsx b/src/CallHandler.tsx index 41dc031b06..8bfd798f16 100644 --- a/src/CallHandler.tsx +++ b/src/CallHandler.tsx @@ -118,6 +118,7 @@ function getRemoteAudioElement(): HTMLAudioElement { export default class CallHandler { private calls = new Map(); // roomId -> call private audioPromises = new Map>(); + private dispatcherRef: string; static sharedInstance() { if (!window.mxCallHandler) { @@ -128,7 +129,7 @@ export default class CallHandler { } start() { - dis.register(this.onAction); + this.dispatcherRef = dis.register(this.onAction); // add empty handlers for media actions, otherwise the media keys // end up causing the audio elements with our ring/ringback etc // audio clips in to play. @@ -151,6 +152,7 @@ export default class CallHandler { if (cli) { cli.removeListener('Call.incoming', this.onCallIncoming); } + if (this.dispatcherRef) dis.unregister(this.dispatcherRef); } private onCallIncoming = (call) => { From 14afafdc4dd6ee9b162f6377ca5c54743171b053 Mon Sep 17 00:00:00 2001 From: Ihor Hordiichuk Date: Tue, 15 Dec 2020 15:20:54 +0000 Subject: [PATCH 305/319] Translated using Weblate (Ukrainian) Currently translated at 53.5% (1453 of 2711 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/uk/ --- src/i18n/strings/uk.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/i18n/strings/uk.json b/src/i18n/strings/uk.json index 5ad9b29e62..061c0799ac 100644 --- a/src/i18n/strings/uk.json +++ b/src/i18n/strings/uk.json @@ -1536,5 +1536,5 @@ "Capitalization doesn't help very much": "Великі букви не дуже допомагають", "You're all caught up.": "Все готово.", "Hey you. You're the best!": "Гей, ти, так, ти. Ти найкращий!", - "You’re all caught up": "Готово" + "You’re all caught up": "Все готово" } From dad1fdf974a8ad8888a6e3db192b0c0bd78221ba Mon Sep 17 00:00:00 2001 From: random Date: Tue, 15 Dec 2020 10:11:02 +0000 Subject: [PATCH 306/319] Translated using Weblate (Italian) Currently translated at 100.0% (2711 of 2711 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/it/ --- src/i18n/strings/it.json | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/it.json b/src/i18n/strings/it.json index dd3641981a..74255a6d2a 100644 --- a/src/i18n/strings/it.json +++ b/src/i18n/strings/it.json @@ -2964,5 +2964,12 @@ "See emotes posted to this room": "Vedi emoticon inviate a questa stanza", "Send emotes as you in your active room": "Invia emoticon a tuo nome nella tua stanza attiva", "Send emotes as you in this room": "Invia emoticon a tuo nome in questa stanza", - "Effects": "Effetti" + "Effects": "Effetti", + "Hold": "Sospendi", + "Resume": "Riprendi", + "%(name)s paused": "%(name)s ha messo in pausa", + "%(peerName)s held the call": "%(peerName)s ha sospeso la chiamata", + "You held the call Resume": "Hai sospeso la chiamata Riprendi", + "You've reached the maximum number of simultaneous calls.": "Hai raggiungo il numero massimo di chiamate simultanee.", + "Too Many Calls": "Troppe chiamate" } From 3c66695627557a658c127964fa1f6d48b0f9cad0 Mon Sep 17 00:00:00 2001 From: waclaw66 Date: Tue, 15 Dec 2020 16:29:59 +0000 Subject: [PATCH 307/319] Translated using Weblate (Czech) Currently translated at 83.8% (2272 of 2711 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/cs/ --- src/i18n/strings/cs.json | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/cs.json b/src/i18n/strings/cs.json index 3d448ca071..71d6e4ee86 100644 --- a/src/i18n/strings/cs.json +++ b/src/i18n/strings/cs.json @@ -2411,5 +2411,40 @@ "Show": "Zobrazit", "Reason (optional)": "Důvod (volitelné)", "Add image (optional)": "Přidat obrázek (volitelné)", - "Private rooms can be found and joined by invitation only. Public rooms can be found and joined by anyone.": "Do soukromé místnosti se lze připojit pouze s pozvánkou. Veřejné místnosti lze najít a může se do nich připojit kdokoli." + "Private rooms can be found and joined by invitation only. Public rooms can be found and joined by anyone.": "Do soukromé místnosti se lze připojit pouze s pozvánkou. Veřejné místnosti lze najít a může se do nich připojit kdokoli.", + "Currently indexing: %(currentRoom)s": "Aktuálně se indexuje: %(currentRoom)s", + "Secure your backup with a recovery passphrase": "Zabezpečte zálohu pomocí fráze pro obnovení", + "%(brand)s Android": "%(brand)s Android", + "%(brand)s iOS": "%(brand)s iOS", + "%(brand)s Desktop": "%(brand)s Desktop", + "%(brand)s Web": "%(brand)s Web", + "Use email to optionally be discoverable by existing contacts.": "Pomocí e-mailu můžete být volitelně viditelní pro existující kontakty.", + "Use email or phone to optionally be discoverable by existing contacts.": "Použijte e-mail nebo telefon, abyste byli volitelně viditelní pro stávající kontakty.", + "Sign in with SSO": "Přihlásit pomocí SSO", + "Create community": "Vytvořit komunitu", + "Add an email to be able to reset your password.": "Přidejte email, abyste mohli obnovit své heslo.", + "That phone number doesn't look quite right, please check and try again": "Toto telefonní číslo nevypadá úplně správně, zkontrolujte ho a zkuste to znovu", + "Forgot password?": "Zapomenuté heslo?", + "Enter phone number": "Zadejte telefonní číslo", + "Enter email address": "Zadejte emailovou adresu", + "Open the link in the email to continue registration.": "Pro pokračování v registraci, otevřete odkaz v e-mailu.", + "A confirmation email has been sent to %(emailAddress)s": "Na adresu %(emailAddress)s byl zaslán potvrzovací e-mail", + "Take a picture": "Vyfotit", + "Hold": "Podržet", + "Resume": "Pokračovat", + "Successfully restored %(sessionCount)s keys": "Úspěšně obnoveno %(sessionCount)s klíčů", + "Keys restored": "Klíče byly obnoveny", + "You're all caught up.": "Vše vyřízeno.", + "There was an error updating your community. The server is unable to process your request.": "Při aktualizaci komunity došlo k chybě. Server nemůže zpracovat váš požadavek.", + "There are two ways you can provide feedback and help us improve %(brand)s.": "Jsou dva způsoby, jak můžete poskytnout zpětnou vazbu a pomoci nám vylepšit %(brand)s.", + "Rate %(brand)s": "Ohodnotit %(brand)s", + "You've previously used a newer version of %(brand)s with this session. To use this version again with end to end encryption, you will need to sign out and back in again.": "V této relaci jste již dříve používali novější verzi %(brand)s. Chcete-li tuto verzi znovu použít s šifrováním, budete se muset odhlásit a znovu přihlásit.", + "Homeserver": "Homeserver", + "Continue with %(provider)s": "Pokračovat s %(provider)s", + "Server Options": "Možnosti serveru", + "This version of %(brand)s does not support viewing some encrypted files": "Tato verze %(brand)s nepodporuje zobrazení některých šifrovaných souborů", + "This version of %(brand)s does not support searching encrypted messages": "Tato verze %(brand)s nepodporuje hledání v šifrovaných zprávách", + "Information": "Informace", + "%(count)s results|one": "%(count)s výsledek", + "Explore community rooms": "Prozkoumat místnosti komunity" } From e51b59c8b5e6ad0262280f6ac52fd318846e57a2 Mon Sep 17 00:00:00 2001 From: XoseM Date: Tue, 15 Dec 2020 04:39:48 +0000 Subject: [PATCH 308/319] Translated using Weblate (Galician) Currently translated at 100.0% (2711 of 2711 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/gl/ --- src/i18n/strings/gl.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/gl.json b/src/i18n/strings/gl.json index 05ef098860..cc3575dbb3 100644 --- a/src/i18n/strings/gl.json +++ b/src/i18n/strings/gl.json @@ -2970,5 +2970,6 @@ "%(peerName)s held the call": "%(peerName)s finalizou a chamada", "You held the call Resume": "Colgaches a chamada, Retomar", "You've reached the maximum number of simultaneous calls.": "Acadaches o número máximo de chamadas simultáneas.", - "Too Many Calls": "Demasiadas chamadas" + "Too Many Calls": "Demasiadas chamadas", + "%(name)s paused": "detido por %(name)s" } From a77d675664f86df5bd32ee3eda088de81b36ad70 Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 15 Dec 2020 18:01:42 +0000 Subject: [PATCH 309/319] Better null check to make tests happy --- src/CallHandler.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/CallHandler.tsx b/src/CallHandler.tsx index 8bfd798f16..eaf56b935a 100644 --- a/src/CallHandler.tsx +++ b/src/CallHandler.tsx @@ -118,7 +118,7 @@ function getRemoteAudioElement(): HTMLAudioElement { export default class CallHandler { private calls = new Map(); // roomId -> call private audioPromises = new Map>(); - private dispatcherRef: string; + private dispatcherRef: string = null; static sharedInstance() { if (!window.mxCallHandler) { @@ -152,7 +152,7 @@ export default class CallHandler { if (cli) { cli.removeListener('Call.incoming', this.onCallIncoming); } - if (this.dispatcherRef) dis.unregister(this.dispatcherRef); + if (this.dispatcherRef !== null) dis.unregister(this.dispatcherRef); } private onCallIncoming = (call) => { From 1a60d3ddd5d4107e76681ddd2e0e617b7392249f Mon Sep 17 00:00:00 2001 From: waclaw66 Date: Tue, 15 Dec 2020 19:11:02 +0000 Subject: [PATCH 310/319] Translated using Weblate (Czech) Currently translated at 89.2% (2420 of 2711 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/cs/ --- src/i18n/strings/cs.json | 150 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 149 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/cs.json b/src/i18n/strings/cs.json index 71d6e4ee86..1a460e9fa5 100644 --- a/src/i18n/strings/cs.json +++ b/src/i18n/strings/cs.json @@ -2446,5 +2446,153 @@ "This version of %(brand)s does not support searching encrypted messages": "Tato verze %(brand)s nepodporuje hledání v šifrovaných zprávách", "Information": "Informace", "%(count)s results|one": "%(count)s výsledek", - "Explore community rooms": "Prozkoumat místnosti komunity" + "Explore community rooms": "Prozkoumat místnosti komunity", + "Role": "Role", + "Madagascar": "Madagaskar", + "Macedonia": "Makedonie", + "Macau": "Macao", + "Luxembourg": "Lucembursko", + "Lithuania": "Litva", + "Liechtenstein": "Lichtenštejnsko", + "Libya": "Libye", + "Liberia": "Libérie", + "Lesotho": "Lesotho", + "Lebanon": "Libanon", + "Latvia": "Lotyšsko", + "Laos": "Laos", + "Kyrgyzstan": "Kyrgyzstán", + "Myanmar": "Myanmar", + "Mozambique": "Mosambik", + "Morocco": "Maroko", + "Montserrat": "Montserrat", + "Montenegro": "Černá Hora", + "Mongolia": "Mongolsko", + "Monaco": "Monako", + "Moldova": "Moldavsko", + "Micronesia": "Mikronésie", + "Mexico": "Mexiko", + "Mayotte": "Mayotte", + "Mauritius": "Mauricius", + "Mauritania": "Mauretánie", + "Martinique": "Martinik", + "Marshall Islands": "Marshallovy ostrovy", + "Malta": "Malta", + "Mali": "Mali", + "Maldives": "Maledivy", + "Malaysia": "Malajsie", + "Malawi": "Malawi", + "Kuwait": "Kuwait", + "Kosovo": "Kosovo", + "Kiribati": "Kiribati", + "Kenya": "Keňa", + "Kazakhstan": "Kazachstán", + "Congo - Brazzaville": "Kongo - Brazzaville", + "Cambodia": "Kambodža", + "Burundi": "Burundi", + "Burkina Faso": "Burkina Faso", + "Bulgaria": "Bulharsko", + "Brunei": "Brunej", + "British Virgin Islands": "Britské indickooceánské území", + "British Indian Ocean Territory": "Britské indickooceánské území", + "Brazil": "Brazílie", + "Bouvet Island": "Bouvetův ostrov", + "Botswana": "Botswana", + "Bosnia": "Bosna", + "Bolivia": "Bolívie", + "Bhutan": "Bhútán", + "Bermuda": "Bermudy", + "Jordan": "Jordánsko", + "Jersey": "Jersey", + "Japan": "Japonsko", + "Jamaica": "Jamajka", + "Italy": "Itálie", + "Israel": "Izrael", + "Isle of Man": "Ostrov Man", + "Ireland": "Irsko", + "Iraq": "Irák", + "Iran": "Írán", + "Indonesia": "Indonésie", + "India": "Indie", + "Iceland": "Island", + "Hungary": "Maďarsko", + "Hong Kong": "Hong Kong", + "Honduras": "Honduras", + "Heard & McDonald Islands": "Heardovy a McDonaldovy ostrovy", + "Haiti": "Haiti", + "Guyana": "Guyana", + "Guinea-Bissau": "Guinea-Bissau", + "Guinea": "Guinea", + "Guernsey": "Guernsey", + "Guatemala": "Guatemala", + "Guam": "Guam", + "Guadeloupe": "Guadeloupe", + "Grenada": "Grenada", + "Greenland": "Grónsko", + "Greece": "Řecko", + "Gibraltar": "Gibraltar", + "Ghana": "Ghana", + "Germany": "Německo", + "Georgia": "Gruzie", + "Gambia": "Gambie", + "Gabon": "Gabon", + "French Southern Territories": "Francouzská jižní území", + "French Polynesia": "Francouzská Polynésie", + "French Guiana": "Francouzská Guyana", + "France": "Francie", + "Finland": "Finsko", + "Fiji": "Fiji", + "Faroe Islands": "Faerské ostrovy", + "Falkland Islands": "Falklandy", + "Ethiopia": "Etiopie", + "Estonia": "Estonsko", + "Eritrea": "Eritrea", + "Equatorial Guinea": "Rovníková Guinea", + "El Salvador": "El Salvador", + "Egypt": "Egypt", + "Ecuador": "Ekvádor", + "Dominican Republic": "Dominikánská republika", + "Dominica": "Dominika", + "Djibouti": "Džibuti", + "Denmark": "Dánsko", + "Côte d’Ivoire": "Pobřeží slonoviny", + "Cyprus": "Kypr", + "Curaçao": "Curaçao", + "Cuba": "Kuba", + "Croatia": "Chorvatsko", + "Costa Rica": "Kostarika", + "Cook Islands": "Cookovy ostrovy", + "Congo - Kinshasa": "Kongo - Brazzaville", + "Comoros": "Komory", + "Colombia": "Kolumbie", + "Cocos (Keeling) Islands": "Kokosové (Keelingovy) ostrovy", + "Christmas Island": "Vánoční ostrov", + "China": "Čína", + "Chile": "Chile", + "Chad": "Čad", + "Central African Republic": "Středoafrická republika", + "Cayman Islands": "Kajmanské ostrovy", + "Caribbean Netherlands": "Karibské Nizozemsko", + "Cape Verde": "Kapverdy", + "Canada": "Kanada", + "Cameroon": "Kamerun", + "Benin": "Benin", + "Belize": "Belize", + "Belgium": "Belgie", + "Belarus": "Bělorusko", + "Bangladesh": "Bangladéš", + "Barbados": "Barbados", + "Bahrain": "Bahrain", + "Bahamas": "Bahamy", + "Azerbaijan": "Ázerbajdžán", + "Austria": "Rakousko", + "Australia": "Austrálie", + "Aruba": "Aruba", + "Armenia": "Arménie", + "Argentina": "Argentina", + "Antigua & Barbuda": "Antigua a Barbuda", + "Antarctica": "Antarktida", + "Anguilla": "Anguilla", + "Angola": "Angola", + "Andorra": "Andorra", + "American Samoa": "Americká Samoa" } From 9987e4783881d9631d6bb2daa45ae19c078b5bff Mon Sep 17 00:00:00 2001 From: waclaw66 Date: Tue, 15 Dec 2020 20:02:49 +0000 Subject: [PATCH 311/319] Translated using Weblate (Czech) Currently translated at 89.4% (2425 of 2711 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/cs/ --- src/i18n/strings/cs.json | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/i18n/strings/cs.json b/src/i18n/strings/cs.json index 1a460e9fa5..41acc6575e 100644 --- a/src/i18n/strings/cs.json +++ b/src/i18n/strings/cs.json @@ -2383,7 +2383,7 @@ "This is the start of .": "Toto je začátek místnosti .", "Topic: %(topic)s ": "Téma: %(topic)s ", "Topic: %(topic)s (edit)": "Téma: %(topic)s (upravit)", - "Messages here are end-to-end encrypted. Verify %(displayName)s in their profile - tap on their avatar.": "Zprávy zde jsou šifrovány end-to-end. Ověřte %(displayName)s v jeho profilu - klepněte na jeho avatar.", + "Messages here are end-to-end encrypted. Verify %(displayName)s in their profile - tap on their avatar.": "Zprávy zde jsou šifrovány end-to-end. Ověřte uživatele %(displayName)s v jeho profilu - klepněte na jeho avatar.", "Enter a security phrase only you know, as it’s used to safeguard your data. To be secure, you shouldn’t re-use your account password.": "Zadejte frázi zabezpečení, kterou znáte jen vy, k ochraně vašich dat. Z důvodu bezpečnosti byste neměli znovu používat heslo k účtu.", "Use a secret phrase only you know, and optionally save a Security Key to use for backup.": "Použijte tajnou frázi, kterou znáte pouze vy, a volitelně uložte bezpečnostní klíč, který použijete pro zálohování.", "Enter a Security Phrase": "Zadání bezpečnostní fráze", @@ -2392,8 +2392,8 @@ "Set up Secure Backup": "Nastavení zabezpečené zálohy", "Safeguard against losing access to encrypted messages & data by backing up encryption keys on your server.": "Chraňte se před ztrátou přístupu k šifrovaným zprávám a datům zálohováním šifrovacích klíčů na serveru.", "Safeguard against losing access to encrypted messages & data": "Zabezpečení proti ztrátě přístupu k šifrovaným zprávám a datům", - "This is the beginning of your direct message history with .": "Toto je začátek historie vašich přímých zpráv s .", - "Only the two of you are in this conversation, unless either of you invites anyone to join.": "V této konverzaci jste pouze vy dva, pokud nikdo z vás nikoho nepozve, aby se připojil.", + "This is the beginning of your direct message history with .": "Toto je začátek historie vašich přímých zpráv s uživatelem .", + "Only the two of you are in this conversation, unless either of you invites anyone to join.": "V této konverzaci jste pouze vy dva, dokud někdo z vás nepozve někoho dalšího.", "You created this room.": "Vytvořili jste tuto místnost.", "Add a topic to help people know what it is about.": "Přidejte téma, aby lidé věděli, o co jde.", "Invite by email": "Pozvat emailem", @@ -2594,5 +2594,10 @@ "Anguilla": "Anguilla", "Angola": "Angola", "Andorra": "Andorra", - "American Samoa": "Americká Samoa" + "American Samoa": "Americká Samoa", + "Room Info": "Informace o místnosti", + "Enable desktop notifications": "Povolit oznámení na ploše", + "Invalid Recovery Key": "Neplatný klíč pro obnovení", + "Security Key": "Bezpečnostní klíč", + "Use your Security Key to continue.": "Pokračujte pomocí bezpečnostního klíče." } From d1285427aee302ac517ebcabf56703bc300c46e2 Mon Sep 17 00:00:00 2001 From: waclaw66 Date: Tue, 15 Dec 2020 20:12:37 +0000 Subject: [PATCH 312/319] Translated using Weblate (Czech) Currently translated at 89.5% (2427 of 2711 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/cs/ --- src/i18n/strings/cs.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/cs.json b/src/i18n/strings/cs.json index 41acc6575e..0de2ee3a9c 100644 --- a/src/i18n/strings/cs.json +++ b/src/i18n/strings/cs.json @@ -2599,5 +2599,7 @@ "Enable desktop notifications": "Povolit oznámení na ploše", "Invalid Recovery Key": "Neplatný klíč pro obnovení", "Security Key": "Bezpečnostní klíč", - "Use your Security Key to continue.": "Pokračujte pomocí bezpečnostního klíče." + "Use your Security Key to continue.": "Pokračujte pomocí bezpečnostního klíče.", + "If they don't match, the security of your communication may be compromised.": "Pokud se neshodují, bezpečnost vaší komunikace může být kompromitována.", + "Confirm this user's session by comparing the following with their User Settings:": "Potvrďte relaci tohoto uživatele porovnáním následujícího s jeho uživatelským nastavením:" } From 940fdb8e2f0ee906a779f4d54dc47754634e519b Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Wed, 16 Dec 2020 10:07:07 +0000 Subject: [PATCH 313/319] Better adhere to MSC process --- src/Login.ts | 2 -- src/components/views/elements/SSOButtons.tsx | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Login.ts b/src/Login.ts index 281906d861..6493b244e0 100644 --- a/src/Login.ts +++ b/src/Login.ts @@ -41,8 +41,6 @@ export interface IIdentityProvider { export interface ISSOFlow { type: "m.login.sso" | "m.login.cas"; - // eslint-disable-next-line camelcase - identity_providers: IIdentityProvider[]; "org.matrix.msc2858.identity_providers": IIdentityProvider[]; // Unstable prefix for MSC2858 } diff --git a/src/components/views/elements/SSOButtons.tsx b/src/components/views/elements/SSOButtons.tsx index f819b48cf6..57dd31f9d6 100644 --- a/src/components/views/elements/SSOButtons.tsx +++ b/src/components/views/elements/SSOButtons.tsx @@ -79,7 +79,7 @@ interface IProps { } const SSOButtons: React.FC = ({matrixClient, flow, loginType, fragmentAfterLogin, primary}) => { - const providers = flow.identity_providers || flow["org.matrix.msc2858.identity_providers"] || []; + const providers = flow["org.matrix.msc2858.identity_providers"] || []; if (providers.length < 2) { return
Date: Wed, 16 Dec 2020 10:21:05 +0000 Subject: [PATCH 314/319] Translated using Weblate (Czech) Currently translated at 94.7% (2570 of 2711 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/cs/ --- src/i18n/strings/cs.json | 151 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 147 insertions(+), 4 deletions(-) diff --git a/src/i18n/strings/cs.json b/src/i18n/strings/cs.json index 0de2ee3a9c..dc53febf8f 100644 --- a/src/i18n/strings/cs.json +++ b/src/i18n/strings/cs.json @@ -119,7 +119,7 @@ "Error: Problem communicating with the given homeserver.": "Chyba: problém v komunikaci s daným domovským serverem.", "Existing Call": "Probíhající hovor", "Export": "Exportovat", - "Export E2E room keys": "Exportovat end-to-end klíče místnosti", + "Export E2E room keys": "Exportovat end-to-end klíče místností", "Failed to ban user": "Nepodařilo se vykázat uživatele", "Failed to join room": "Vstup do místnosti se nezdařil", "Failed to kick": "Vykopnutí se nezdařilo", @@ -1753,7 +1753,7 @@ "Review": "Prohlédnout", "This bridge was provisioned by .": "Toto propojení poskytuje .", "This bridge is managed by .": "Toto propojení spravuje .", - "Workspace: %(networkName)s": "Workspace: %(networkName)s", + "Workspace: %(networkName)s": "Pracovní oblast: %(networkName)s", "Channel: %(channelName)s": "Kanál: %(channelName)s", "Show less": "Skrýt detaily", "Show more": "Více", @@ -2308,7 +2308,7 @@ "You might enable this if the room will only be used for collaborating with internal teams on your homeserver. This cannot be changed later.": "Tuto možnost můžete povolit, pokud bude místnost použita pouze pro spolupráci s interními týmy na vašem domovském serveru. Toto nelze později změnit.", "Block anyone not part of %(serverName)s from ever joining this room.": "Blokovat komukoli, kdo není součástí serveru %(serverName)s, aby se nikdy nepřipojil do této místnosti.", "Back up your encryption keys with your account data in case you lose access to your sessions. Your keys will be secured with a unique Recovery Key.": "Zálohujte šifrovací klíče s daty vašeho účtu pro případ, že ztratíte přístup k relacím. Vaše klíče budou zabezpečeny jedinečným klíčem pro obnovení.", - "Manage the names of and sign out of your sessions below or verify them in your User Profile.": "Níže můžete spravovat jména a odhlásit se ze svých relací nebo je ověřtit v uživatelském profilu.", + "Manage the names of and sign out of your sessions below or verify them in your User Profile.": "Níže můžete spravovat názvy a odhlásit se ze svých relací nebo je ověřit v uživatelském profilu.", "or another cross-signing capable Matrix client": "nebo jiný Matrix klient schopný cross-signing", "Cross-signing is not set up.": "Cross-signing není nastaveno.", "Cross-signing is ready for use.": "Cross-signing je připraveno k použití.", @@ -2601,5 +2601,148 @@ "Security Key": "Bezpečnostní klíč", "Use your Security Key to continue.": "Pokračujte pomocí bezpečnostního klíče.", "If they don't match, the security of your communication may be compromised.": "Pokud se neshodují, bezpečnost vaší komunikace může být kompromitována.", - "Confirm this user's session by comparing the following with their User Settings:": "Potvrďte relaci tohoto uživatele porovnáním následujícího s jeho uživatelským nastavením:" + "Confirm this user's session by comparing the following with their User Settings:": "Potvrďte relaci tohoto uživatele porovnáním následujícího s jeho uživatelským nastavením:", + "Confirm Security Phrase": "Potvrďte bezpečnostní frázi", + "Privacy": "Soukromí", + "Click the button below to confirm setting up encryption.": "Kliknutím na tlačítko níže potvrďte nastavení šifrování.", + "Confirm encryption setup": "Potvrďte nastavení šifrování", + "Return to call": "Návrat do hovoru", + "Unable to set up keys": "Nepovedlo se nastavit klíče", + "Save your Security Key": "Uložte svůj bezpečnostní klíč", + "We call the places where you can host your account ‘homeservers’.": "Místům, kde můžete hostovat svůj účet, říkáme ‘domovské servery’.", + "About homeservers": "O domovských serverech", + "Learn more": "Zjistit více", + "Use your preferred Matrix homeserver if you have one, or host your own.": "Použijte svůj preferovaný domovský server Matrix, pokud ho máte, nebo hostujte svůj vlastní.", + "Other homeserver": "Jiný domovský server", + "Sign into your homeserver": "Přihlaste se do svého domovského serveru", + "Matrix.org is the biggest public homeserver in the world, so it’s a good place for many.": "Matrix.org je největší veřejný domovský server na světě, pro mnoho lidí je dobrým místem.", + "not found in storage": "nebylo nalezeno v úložišti", + "ready": "připraven", + "May include members not in %(communityName)s": "Může zahrnovat členy, kteří nejsou v %(communityName)s", + "Specify a homeserver": "Zadejte domovský server", + "Invalid URL": "Neplatné URL", + "Unable to validate homeserver": "Nelze ověřit domovský server", + "New? Create account": "Jste zde nový? Vytvořte si účet", + "Navigate recent messages to edit": "Procházet poslední zprávy k úpravám", + "Navigate composer history": "Procházet historii editoru", + "Cancel replying to a message": "Zrušení odpovědi na zprávu", + "Don't miss a reply": "Nezmeškejte odpovědět", + "Unknown App": "Neznámá aplikace", + "%(name)s paused": "%(name)s pozastaven", + "Backup could not be decrypted with this recovery key: please verify that you entered the correct recovery key.": "Zálohu nebylo možné dešifrovat pomocí tohoto klíče pro obnovení: ověřte, zda jste zadali správný klíč pro obnovení.", + "Move right": "Posunout doprava", + "Move left": "Posunout doleva", + "Go to Home View": "Přejít na domovské zobrazení", + "Dismiss read marker and jump to bottom": "Zavřít značku přečtených zpráv a skočit dolů", + "Previous/next room or DM": "Předchozí/další místnost nebo přímá zpráva", + "Previous/next unread room or DM": "Předchozí/další nepřečtená místnost nebo přímá zpráva", + "Not encrypted": "Není šifrováno", + "New here? Create an account": "Jste zde nový? Vytvořte si účet", + "Got an account? Sign in": "Máte již účet? Přihlásit se", + "This won't invite them to %(communityName)s. To invite someone to %(communityName)s, click here": "Toto je nepozve do %(communityName)s. Chcete-li někoho pozvat na %(communityName)s, klikněte sem", + "Approve widget permissions": "Schválit oprávnění widgetu", + "Enter name": "Zadejte jméno", + "Ignored attempt to disable encryption": "Ignorovaný pokus o deaktivaci šifrování", + "Show chat effects": "Zobrazit efekty chatu", + "%(count)s people|one": "%(count)s člověk", + "Takes the call in the current room off hold": "Zruší podržení hovoru v aktuální místnosti", + "Places the call in the current room on hold": "Podrží hovor v aktuální místnosti", + "Zimbabwe": "Zimbabwe", + "Zambia": "Zambie", + "Yemen": "Jemen", + "Western Sahara": "Západní Sahara", + "Wallis & Futuna": "Wallis a Futuna", + "Vietnam": "Vietnam", + "Venezuela": "Venezuela", + "Vatican City": "Vatikán", + "Vanuatu": "Vanuatu", + "Uzbekistan": "Uzbekistán", + "Uruguay": "Uruguay", + "United Arab Emirates": "Spojené arabské emiráty", + "Ukraine": "Ukrajina", + "Uganda": "Uganda", + "U.S. Virgin Islands": "Panenské ostrovy", + "Tuvalu": "Tuvalu", + "Turks & Caicos Islands": "Ostrovy Turks a Caicos", + "Turkmenistan": "Turkmenistán", + "Turkey": "Turecko", + "Tunisia": "Tunisko", + "Trinidad & Tobago": "Trinidad a Tobago", + "Tonga": "Tonga", + "Tokelau": "Tokelau", + "Togo": "Togo", + "Timor-Leste": "Východní Timor", + "Thailand": "Thajsko", + "Tanzania": "Tanzánie", + "Tajikistan": "Tádžikistán", + "Taiwan": "Taiwan", + "São Tomé & Príncipe": "Svatý Tomáš a Princův ostrov", + "Syria": "Sýrie", + "Switzerland": "Švýcarsko", + "Sweden": "Švédsko", + "Swaziland": "Svazijsko", + "Svalbard & Jan Mayen": "Špicberky a Jan Mayen", + "Suriname": "Surinam", + "Sudan": "Súdán", + "St. Vincent & Grenadines": "Svatý Vincenc a Grenadiny", + "St. Pierre & Miquelon": "Saint Pierre a Miquelon", + "St. Martin": "Svatý Martin", + "St. Lucia": "Svatá Lucie", + "St. Kitts & Nevis": "Svatý Kryštof a Nevis", + "St. Helena": "Svatá Helena", + "St. Barthélemy": "Svatý Bartoloměj", + "Sri Lanka": "Srí Lanka", + "Spain": "Španělsko", + "South Sudan": "Jižní Súdán", + "South Korea": "Jižní Korea", + "South Georgia & South Sandwich Islands": "Jižní Georgie a Jižní Sandwichovy ostrovy", + "South Africa": "Jižní Afrika", + "Somalia": "Somálsko", + "Solomon Islands": "Šalomounovy ostrovy", + "Slovenia": "Slovinsko", + "Slovakia": "Slovensko", + "Sint Maarten": "Sint Maarten", + "Singapore": "Singapur", + "Sierra Leone": "Sierra Leone", + "Seychelles": "Seychely", + "Serbia": "Srbsko", + "Senegal": "Senegal", + "Saudi Arabia": "Saudská arábie", + "San Marino": "San Marino", + "Samoa": "Samoa", + "Réunion": "Réunion", + "Rwanda": "Rwanda", + "Russia": "Rusko", + "Romania": "Rumunsko", + "Qatar": "Katar", + "Puerto Rico": "Portoriko", + "Portugal": "Portugalsko", + "Poland": "Polsko", + "Pitcairn Islands": "Pitcairnovy ostrovy", + "Philippines": "Filipíny", + "Peru": "Peru", + "Paraguay": "Paraguay", + "Papua New Guinea": "Papua-Nová Guinea", + "Panama": "Panama", + "Palestine": "Palestina", + "Palau": "Palau", + "Pakistan": "Pákistán", + "Oman": "Omán", + "Norway": "Norsko", + "Northern Mariana Islands": "Severní Mariany", + "North Korea": "Severní Korea", + "Norfolk Island": "Ostrov Norfolk", + "Niue": "Niue", + "Nigeria": "Nigérie", + "Niger": "Niger", + "Nicaragua": "Nikaragua", + "New Zealand": "Nový Zéland", + "New Caledonia": "Nová Kaledonie", + "Netherlands": "Holandsko", + "Nepal": "Nepál", + "Nauru": "Nauru", + "Namibia": "Namibie", + "Security Phrase": "Bezpečnostní fráze", + "Wrong Recovery Key": "Nesprávný klíč pro obnovení", + "Fetching keys from server...": "Načítání klíčů ze serveru ..." } From 4c2b6f410b9e5d2ace16ad44ae3e8fd0637ffe52 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Wed, 16 Dec 2020 10:41:56 +0000 Subject: [PATCH 315/319] fix tests --- src/components/structures/auth/Registration.tsx | 3 +-- test/components/structures/auth/Login-test.js | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/components/structures/auth/Registration.tsx b/src/components/structures/auth/Registration.tsx index d1dfa5ea50..095f3d3433 100644 --- a/src/components/structures/auth/Registration.tsx +++ b/src/components/structures/auth/Registration.tsx @@ -462,8 +462,7 @@ export default class Registration extends React.Component { let ssoSection; if (this.state.ssoFlow) { let continueWithSection; - const providers = this.state.ssoFlow["org.matrix.msc2858.identity_providers"] - || this.state.ssoFlow["identity_providers"] || []; + const providers = this.state.ssoFlow["org.matrix.msc2858.identity_providers"] || []; // when there is only a single (or 0) providers we show a wide button with `Continue with X` text if (providers.length > 1) { // i18n: ssoButtons is a placeholder to help translators understand context diff --git a/test/components/structures/auth/Login-test.js b/test/components/structures/auth/Login-test.js index 0631e26cbd..99faeb4b67 100644 --- a/test/components/structures/auth/Login-test.js +++ b/test/components/structures/auth/Login-test.js @@ -133,7 +133,7 @@ describe('Login', function() { root.setState({ flows: [{ type: "m.login.sso", - identity_providers: [{ + "org.matrix.msc2858.identity_providers": [{ id: "a", name: "Provider 1", }, { From 2142a65a9b1f5757d4db168accfc23fc08de0b5e Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Wed, 16 Dec 2020 10:46:39 +0000 Subject: [PATCH 316/319] delint --- test/components/structures/auth/Login-test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/components/structures/auth/Login-test.js b/test/components/structures/auth/Login-test.js index 99faeb4b67..9b73137936 100644 --- a/test/components/structures/auth/Login-test.js +++ b/test/components/structures/auth/Login-test.js @@ -132,7 +132,7 @@ describe('Login', function() { // Set non-empty flows & matrixClient to get past the loading spinner root.setState({ flows: [{ - type: "m.login.sso", + "type": "m.login.sso", "org.matrix.msc2858.identity_providers": [{ id: "a", name: "Provider 1", From 973a0b7b8a07d69fe221471de9b793750a042a42 Mon Sep 17 00:00:00 2001 From: David Baker Date: Wed, 16 Dec 2020 10:53:59 +0000 Subject: [PATCH 317/319] set dispatcher ref to null so we don't double-unregister --- src/CallHandler.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/CallHandler.tsx b/src/CallHandler.tsx index eaf56b935a..fac4d6fc4e 100644 --- a/src/CallHandler.tsx +++ b/src/CallHandler.tsx @@ -152,7 +152,10 @@ export default class CallHandler { if (cli) { cli.removeListener('Call.incoming', this.onCallIncoming); } - if (this.dispatcherRef !== null) dis.unregister(this.dispatcherRef); + if (this.dispatcherRef !== null) { + dis.unregister(this.dispatcherRef); + this.dispatcherRef = null; + } } private onCallIncoming = (call) => { From 6878e23cb8afb0577066406970d345482f9d7182 Mon Sep 17 00:00:00 2001 From: Mitja Sorsa Date: Tue, 15 Dec 2020 21:18:00 +0000 Subject: [PATCH 318/319] Translated using Weblate (Finnish) Currently translated at 91.9% (2493 of 2711 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/fi/ --- src/i18n/strings/fi.json | 49 +++++++++++++++++++++++++++++++++++----- 1 file changed, 43 insertions(+), 6 deletions(-) diff --git a/src/i18n/strings/fi.json b/src/i18n/strings/fi.json index 70431c6294..842ee436b6 100644 --- a/src/i18n/strings/fi.json +++ b/src/i18n/strings/fi.json @@ -702,7 +702,7 @@ "Unable to join network": "Verkkoon liittyminen epäonnistui", "Sorry, your browser is not able to run %(brand)s.": "Valitettavasti %(brand)s ei toimi selaimessasi.", "Uploaded on %(date)s by %(user)s": "Ladattu %(date)s käyttäjän %(user)s toimesta", - "Messages in group chats": "Viestit ryhmäkeskusteluissa", + "Messages in group chats": "Viestit ryhmissä", "Yesterday": "Eilen", "Error encountered (%(errorDetail)s).": "Virhe: %(errorDetail)s.", "Low Priority": "Matala prioriteetti", @@ -765,7 +765,7 @@ "Show join/leave messages (invites/kicks/bans unaffected)": "Näytä liittymisten ja poistumisten viestit (ei vaikuta kutsuihin, huoneesta poistamisiin ja porttikieltoihin)", "Show developer tools": "Näytä kehitystyökalut", "Encrypted messages in one-to-one chats": "Salatut viestit kahdenkeskisissä keskusteluissa", - "Encrypted messages in group chats": "Salatut viestit ryhmäkeskusteluissa", + "Encrypted messages in group chats": "Salatut viestit ryhmissä", "The other party cancelled the verification.": "Toinen osapuoli perui varmennuksen.", "Verified!": "Varmennettu!", "You've successfully verified this user.": "Olet varmentanut tämän käyttäjän.", @@ -1956,7 +1956,7 @@ "Liberate your communication": "Vapauta viestintäsi", "Send a Direct Message": "Lähetä yksityisviesti", "Explore Public Rooms": "Selaa julkisia huoneita", - "Create a Group Chat": "Luo ryhmäkeskustelu", + "Create a Group Chat": "Luo ryhmä", "Super": "Super", "Cancel replying to a message": "Peruuta viestiin vastaaminen", "Jump to room search": "Siirry huonehakuun", @@ -2093,8 +2093,8 @@ "Messages in this room are end-to-end encrypted. Learn more & verify this user in their user profile.": "Tämän huoneen viestit ovat salattuja osapuolten välisellä salauksella. Lue lisää ja varmenna tämä käyttäjä hänen profiilistaan.", "Enter the name of a new server you want to explore.": "Syötä sen uuden palvelimen nimi, jota hauat tutkia.", "%(networkName)s rooms": "Verkon %(networkName)s huoneet", - "Destroy cross-signing keys?": "Tuhoa ristivarmennuksen avaimet?", - "Deleting cross-signing keys is permanent. Anyone you have verified with will see security alerts. You almost certainly don't want to do this, unless you've lost every device you can cross-sign from.": "Ristivarmennuksen avainten tuhoamista ei voi kumota. Jokainen, jonka olet varmentanut, tulee näkemään turvallisuushälytyksiä. Et todennäköisesti halua tehdä tätä, ellet ole hukannut kaikkia laitteitasi, joista pystyt ristivarmentamaan.", + "Destroy cross-signing keys?": "Tuhoa ristiinvarmennuksen avaimet?", + "Deleting cross-signing keys is permanent. Anyone you have verified with will see security alerts. You almost certainly don't want to do this, unless you've lost every device you can cross-sign from.": "Ristiinvarmennuksen avainten tuhoamista ei voi kumota. Jokainen, jonka olet varmentanut, tulee näkemään turvallisuushälytyksiä. Et todennäköisesti halua tehdä tätä, ellet ole hukannut kaikkia laitteitasi, joista pystyit ristiinvarmentamaan.", "Clear cross-signing keys": "Tyhjennä ristiinvarmennuksen avaimet", "Enable end-to-end encryption": "Ota osapuolten välinen salaus käyttöön", "Session key": "Istunnon tunnus", @@ -2669,5 +2669,42 @@ "Sign into your homeserver": "Kirjaudu sisään kotipalvelimellesi", "About homeservers": "Tietoa kotipalvelimista", "Not encrypted": "Ei salattu", - "You have no visible notifications in this room.": "Olet nähnyt tämän huoneen kaikki ilmoitukset." + "You have no visible notifications in this room.": "Olet nähnyt tämän huoneen kaikki ilmoitukset.", + "Session verified": "Istunto vahvistettu", + "Verify this login": "Vahvista tämä sisäänkirjautuminen", + "User settings": "Käyttäjäasetukset", + "Community settings": "Yhteisön asetukset", + "Got an account? Sign in": "Sinulla on jo tili? Kirjaudu sisään", + "New here? Create an account": "Uusi täällä? Luo tili", + "Failed to find the general chat for this community": "Tämän yhteisön yleisen keskustelun löytäminen epäonnistui", + "Explore rooms in %(communityName)s": "Tutki %(communityName)s -yhteisön huoneita", + "Delete the room address %(alias)s and remove %(name)s from the directory?": "Poistetaanko huoneosoite %(alias)s ja %(name)s hakemisto?", + "Self-verification request": "Itsevarmennuspyyntö", + "Add a photo so people know it's you.": "Lisää kuva, jotta ihmiset tietävät, että se olet sinä.", + "Great, that'll help people know it's you": "Hienoa, tämä auttaa ihmisiä tietämään, että se olet sinä", + "Attach files from chat or just drag and drop them anywhere in a room.": "Liitä tiedostot keskustelusta tai vedä ja pudota ne mihin tahansa huoneeseen.", + "Use email or phone to optionally be discoverable by existing contacts.": "Käytä sähköpostiosoitetta tai puhelinnumeroa, jos haluat olla löydettävissä nykyisille yhteystiedoille.", + "Use email to optionally be discoverable by existing contacts.": "Käytä sähköpostiosoitetta, jos haluat olla löydettävissä nykyisille yhteystiedoille.", + "Add an email to be able to reset your password.": "Lisää sähköpostiosoite, jotta voit nollata salasanasi.", + "Forgot password?": "Unohtuiko salasana?", + "That phone number doesn't look quite right, please check and try again": "Tämä puhelinnumero ei näytä oikealta, tarkista se ja yritä uudelleen", + "Move right": "Siirry oikealle", + "Move left": "Siirry vasemmalle", + "Revoke permissions": "Peruuta käyttöoikeudet", + "Warning: Your personal data (including encryption keys) is still stored in this session. Clear it if you're finished using this session, or want to sign in to another account.": "Varoitus: Henkilökohtaiset tietosi (mukaan lukien salausavaimet) tallennetaan edelleen tähän istuntoon. Poista ne jos lopetat istunnon käytön, tai haluat kirjautua toiselle tilille.", + "You're all caught up.": "Olet ajan tasalla.", + "Unable to validate homeserver": "Kotipalvelimen vahvistus epäonnistui", + "This version of %(brand)s does not support searching encrypted messages": "Tämä %(brand)s-versio ei tue salattujen viestien hakua", + "This version of %(brand)s does not support viewing some encrypted files": "Tämä %(brand)s-versio ei tue joidenkin salattujen tiedostojen katselua", + "Use the Desktop app to see all encrypted files": "Voit tarkastella kaikkia salattuja tiedostoja työpöytäsovelluksella", + "Use the Desktop app to search encrypted messages": "Käytä salattuja viestejä työpöytäsovelluksella", + "Ignored attempt to disable encryption": "Ohitettu yritys poistaa salaus käytöstä", + "Messages here are end-to-end encrypted. Verify %(displayName)s in their profile - tap on their avatar.": "Tässä olevat viestit on päästä-päähän -salattu. Vahvista %(displayName)s heidät - napauta heidän profiilikuvia.", + "Messages in this room are end-to-end encrypted. When people join, you can verify them in their profile, just tap on their avatar.": "Tämän huoneen viestit on päästä-päähän -salattu. Kun ihmisiä liittyy, voit vahvistaa heidät heidän profiilista, napauta vain heidän profiilikuvaa.", + "Unpin a widget to view it in this panel": "Irrota sovelma, jotta voit tarkastella sitä tässä paneelissa", + "You can only pin up to %(count)s widgets|other": "Voit kiinnittää enintään %(count)s sovelmaa", + "Favourited": "Suositut", + "Use the + to make a new room or explore existing ones below": "Luo uusi huone tai tutustu alla oleviin + -painikeella", + "%(senderDisplayName)s set the server ACLs for this room.": "%(senderDisplayName)s asetti palvelimen pääsyhallintaluetteloon tämän huoneen.", + "%(senderDisplayName)s changed the server ACLs for this room.": "%(senderDisplayName)s muutti palvelimen pääsyhallintaluetteloa tälle huoneelle." } From 66b682fa99f7441a0ed023f102c078700058c8d8 Mon Sep 17 00:00:00 2001 From: waclaw66 Date: Wed, 16 Dec 2020 11:42:34 +0000 Subject: [PATCH 319/319] Translated using Weblate (Czech) Currently translated at 95.0% (2577 of 2711 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/cs/ --- src/i18n/strings/cs.json | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/cs.json b/src/i18n/strings/cs.json index dc53febf8f..3f9d231317 100644 --- a/src/i18n/strings/cs.json +++ b/src/i18n/strings/cs.json @@ -2744,5 +2744,12 @@ "Namibia": "Namibie", "Security Phrase": "Bezpečnostní fráze", "Wrong Recovery Key": "Nesprávný klíč pro obnovení", - "Fetching keys from server...": "Načítání klíčů ze serveru ..." + "Fetching keys from server...": "Načítání klíčů ze serveru ...", + "Use Command + Enter to send a message": "K odeslání zprávy použijte Command + Enter", + "Use Ctrl + Enter to send a message": "K odeslání zprávy použijte Ctrl + Enter", + "Decide where your account is hosted": "Rozhodněte, kde je váš účet hostován", + "Unable to query secret storage status": "Nelze zjistit stav úložiště klíčů", + "Update %(brand)s": "Aktualizovat %(brand)s", + "You can also set up Secure Backup & manage your keys in Settings.": "Zabezpečené zálohování a správu klíčů můžete také nastavit v Nastavení.", + "Set a Security Phrase": "Nastavit bezpečnostní frázi" }