From 1c2e05e925529afe71910fa43cc6257c15f6cd03 Mon Sep 17 00:00:00 2001 From: Hubert Chathi Date: Mon, 31 Aug 2020 14:40:16 -0400 Subject: [PATCH 001/331] initial version of device rehydration support --- src/CrossSigningManager.js | 2 +- src/Login.js | 60 +++++++++++++++++++++++++++++++++++++- src/MatrixClientPeg.ts | 28 ++++++++++++++++-- 3 files changed, 85 insertions(+), 5 deletions(-) diff --git a/src/CrossSigningManager.js b/src/CrossSigningManager.js index 676c41d7d7..43d089010c 100644 --- a/src/CrossSigningManager.js +++ b/src/CrossSigningManager.js @@ -40,7 +40,7 @@ export class AccessCancelledError extends Error { } } -async function confirmToDismiss() { +export async function confirmToDismiss() { const QuestionDialog = sdk.getComponent("dialogs.QuestionDialog"); const [sure] = await Modal.createDialog(QuestionDialog, { title: _t("Cancel entering passphrase?"), diff --git a/src/Login.js b/src/Login.js index 04805b4af9..4e46fc3665 100644 --- a/src/Login.js +++ b/src/Login.js @@ -18,7 +18,12 @@ See the License for the specific language governing permissions and limitations under the License. */ +import Modal from './Modal'; +import * as sdk from './index'; +import { AccessCancelledError, confirmToDismiss } from "./CrossSigningManager"; import Matrix from "matrix-js-sdk"; +import { deriveKey } from 'matrix-js-sdk/src/crypto/key_passphrase'; +import { decodeRecoveryKey } from 'matrix-js-sdk/src/crypto/recoverykey'; export default class Login { constructor(hsUrl, isUrl, fallbackHsUrl, opts) { @@ -159,12 +164,18 @@ export default class Login { * @returns {MatrixClientCreds} */ export async function sendLoginRequest(hsUrl, isUrl, loginType, loginParams) { + let rehydrationKeyInfo; + let rehydrationKey; + const client = Matrix.createClient({ baseUrl: hsUrl, idBaseUrl: isUrl, + cryptoCallbacks: { + getDehydrationKey + } }); - const data = await client.login(loginType, loginParams); + const data = await client.loginWithRehydration(null, loginType, loginParams); const wellknown = data.well_known; if (wellknown) { @@ -185,5 +196,52 @@ export async function sendLoginRequest(hsUrl, isUrl, loginType, loginParams) { userId: data.user_id, deviceId: data.device_id, accessToken: data.access_token, + rehydrationKeyInfo, + rehydrationKey, + olmAccount: data._olm_account, }; } + +async function getDehydrationKey(keyInfo) { + const inputToKey = async ({ passphrase, recoveryKey }) => { + if (passphrase) { + return deriveKey( + passphrase, + keyInfo.passphrase.salt, + keyInfo.passphrase.iterations, + ); + } else { + return decodeRecoveryKey(recoveryKey); + } + }; + const AccessSecretStorageDialog = + sdk.getComponent("dialogs.secretstorage.AccessSecretStorageDialog"); + const { finished } = Modal.createTrackedDialog("Access Secret Storage dialog", "", + AccessSecretStorageDialog, + /* props= */ + { + keyInfo, + checkPrivateKey: async (input) => { + // FIXME: + return true; + }, + }, + /* className= */ null, + /* isPriorityModal= */ false, + /* isStaticModal= */ false, + /* options= */ { + onBeforeClose: async (reason) => { + if (reason === "backgroundClick") { + return confirmToDismiss(); + } + return true; + }, + }, + ); + const [input] = await finished; + if (!input) { + throw new AccessCancelledError(); + } + const key = await inputToKey(input); + return key; +} diff --git a/src/MatrixClientPeg.ts b/src/MatrixClientPeg.ts index be16f5fe10..61b7a04069 100644 --- a/src/MatrixClientPeg.ts +++ b/src/MatrixClientPeg.ts @@ -42,6 +42,9 @@ export interface IMatrixClientCreds { accessToken: string; guest: boolean; pickleKey?: string; + rehydrationKey?: Uint8Array; + rehydrationKeyInfo?: {[props: string]: any}; + olmAccount?: any; } // TODO: Move this to the js-sdk @@ -248,12 +251,10 @@ class _MatrixClientPeg implements IMatrixClientPeg { private createClient(creds: IMatrixClientCreds): void { // TODO: Make these opts typesafe with the js-sdk - const opts = { + const opts: any = { baseUrl: creds.homeserverUrl, idBaseUrl: creds.identityServerUrl, accessToken: creds.accessToken, - userId: creds.userId, - deviceId: creds.deviceId, pickleKey: creds.pickleKey, timelineSupport: true, forceTURN: !SettingsStore.getValue('webRtcAllowPeerToPeer'), @@ -268,6 +269,23 @@ class _MatrixClientPeg implements IMatrixClientPeg { cryptoCallbacks: {}, }; + if (creds.olmAccount) { + opts.deviceToImport = { + olmDevice: { + pickledAccount: creds.olmAccount.pickle("DEFAULT_KEY"), + sessions: [], + pickleKey: "DEFAULT_KEY", + }, + userId: creds.userId, + deviceId: creds.deviceId, + }; + } else { + opts.userId = creds.userId; + opts.deviceId = creds.deviceId; + } + + // FIXME: modify crossSigningCallbacks.getSecretStorageKey so that it tries using rehydrationkey and/or saves the passphrase info + // These are always installed regardless of the labs flag so that // cross-signing features can toggle on without reloading and also be // accessed immediately after login. @@ -275,6 +293,10 @@ class _MatrixClientPeg implements IMatrixClientPeg { this.matrixClient = createMatrixClient(opts); + if (creds.rehydrationKey) { + this.matrixClient.cacheDehydrationKey(creds.rehydrationKey, creds.rehydrationKeyInfo || {}); + } + // we're going to add eventlisteners for each matrix event tile, so the // potential number of event listeners is quite high. this.matrixClient.setMaxListeners(500); From 4398f1eb949c8f4b5b3e61c51c756bec3c9c97d8 Mon Sep 17 00:00:00 2001 From: Hubert Chathi Date: Thu, 3 Sep 2020 16:28:42 -0400 Subject: [PATCH 002/331] support setting up dehydration from blank account, SSO support, and other fixes --- src/CrossSigningManager.js | 26 +++++++++++ src/Lifecycle.js | 44 ++++++++++++++++++- src/Login.js | 18 +++++--- src/MatrixClientPeg.ts | 24 +++++++--- .../CreateSecretStorageDialog.js | 5 +++ 5 files changed, 103 insertions(+), 14 deletions(-) diff --git a/src/CrossSigningManager.js b/src/CrossSigningManager.js index 43d089010c..111fc26889 100644 --- a/src/CrossSigningManager.js +++ b/src/CrossSigningManager.js @@ -30,6 +30,16 @@ import {encodeBase64} from "matrix-js-sdk/src/crypto/olmlib"; let secretStorageKeys = {}; let secretStorageBeingAccessed = false; +let dehydrationInfo = {}; + +export function cacheDehydrationKey(key, keyInfo = {}) { + dehydrationInfo = {key, keyInfo}; +} + +export function getDehydrationKeyCache() { + return dehydrationInfo; +} + function isCachingAllowed() { return secretStorageBeingAccessed; } @@ -64,6 +74,22 @@ async function getSecretStorageKey({ keys: keyInfos }, ssssItemName) { return [name, secretStorageKeys[name]]; } + // if we dehydrated a device, see if that key works for SSSS + if (dehydrationInfo.key) { + try { + if (await MatrixClientPeg.get().checkSecretStorageKey(dehydrationInfo.key, info)) { + const key = dehydrationInfo.key; + // Save to cache to avoid future prompts in the current session + if (isCachingAllowed()) { + secretStorageKeys[name] = key; + } + dehydrationInfo = {}; + return [name, key]; + } + } catch {} + dehydrationInfo = {}; + } + const inputToKey = async ({ passphrase, recoveryKey }) => { if (passphrase) { return deriveKey( diff --git a/src/Lifecycle.js b/src/Lifecycle.js index d2de31eb80..9a84d4e1f4 100644 --- a/src/Lifecycle.js +++ b/src/Lifecycle.js @@ -42,6 +42,7 @@ import {Mjolnir} from "./mjolnir/Mjolnir"; import DeviceListener from "./DeviceListener"; import {Jitsi} from "./widgets/Jitsi"; import {SSO_HOMESERVER_URL_KEY, SSO_ID_SERVER_URL_KEY} from "./BasePlatform"; +import {decodeBase64, encodeBase64} from "matrix-js-sdk/src/crypto/olmlib"; const HOMESERVER_URL_KEY = "mx_hs_url"; const ID_SERVER_URL_KEY = "mx_is_url"; @@ -311,6 +312,25 @@ async function _restoreFromLocalStorage(opts) { console.log("No pickle key available"); } + const rehydrationKeyInfoJSON = sessionStorage.getItem("mx_rehydration_key_info"); + const rehydrationKeyInfo = rehydrationKeyInfoJSON && JSON.parse(rehydrationKeyInfoJSON); + const rehydrationKeyB64 = sessionStorage.getItem("mx_rehydration_key"); + const rehydrationKey = rehydrationKeyB64 && decodeBase64(rehydrationKeyB64); + const rehydrationOlmPickle = sessionStorage.getItem("mx_rehydration_account"); + let olmAccount; + if (rehydrationOlmPickle) { + olmAccount = new global.Olm.Account(); + try { + olmAccount.unpickle("DEFAULT_KEY", rehydrationOlmPickle); + } catch { + olmAccount.free(); + olmAccount = undefined; + } + } + sessionStorage.removeItem("mx_rehydration_key_info"); + sessionStorage.removeItem("mx_rehydration_key"); + sessionStorage.removeItem("mx_rehydration_account"); + console.log(`Restoring session for ${userId}`); await _doSetLoggedIn({ userId: userId, @@ -320,6 +340,9 @@ async function _restoreFromLocalStorage(opts) { identityServerUrl: isUrl, guest: isGuest, pickleKey: pickleKey, + rehydrationKey: rehydrationKey, + rehydrationKeyInfo: rehydrationKeyInfo, + olmAccount: olmAccount, }, false); return true; } else { @@ -463,7 +486,13 @@ async function _doSetLoggedIn(credentials, clearStorage) { if (localStorage) { try { - _persistCredentialsToLocalStorage(credentials); + // drop dehydration key and olm account before persisting. (Those + // get persisted for token login, but aren't needed at this point.) + const strippedCredentials = Object.assign({}, credentials); + delete strippedCredentials.rehydrationKeyInfo; + delete strippedCredentials.rehydrationKey; + delete strippedCredentials.olmAcconut; + _persistCredentialsToLocalStorage(strippedCredentials); // The user registered as a PWLU (PassWord-Less User), the generated password // is cached here such that the user can change it at a later time. @@ -528,6 +557,19 @@ function _persistCredentialsToLocalStorage(credentials) { localStorage.setItem("mx_device_id", credentials.deviceId); } + // Temporarily save dehydration information if it's provided. This is + // needed for token logins, because the page reloads after the login, so we + // can't keep it in memory. + if (credentials.rehydrationKeyInfo) { + sessionStorage.setItem("mx_rehydration_key_info", JSON.stringify(credentials.rehydrationKeyInfo)); + } + if (credentials.rehydrationKey) { + sessionStorage.setItem("mx_rehydration_key", encodeBase64(credentials.rehydrationKey)); + } + if (credentials.olmAccount) { + sessionStorage.setItem("mx_rehydration_account", credentials.olmAccount.pickle("DEFAULT_KEY")); + } + console.log(`Session persisted for ${credentials.userId}`); } diff --git a/src/Login.js b/src/Login.js index 4e46fc3665..0563952c5d 100644 --- a/src/Login.js +++ b/src/Login.js @@ -20,7 +20,12 @@ limitations under the License. import Modal from './Modal'; import * as sdk from './index'; -import { AccessCancelledError, confirmToDismiss } from "./CrossSigningManager"; +import { + AccessCancelledError, + cacheDehydrationKey, + confirmToDismiss, + getDehydrationKeyCache, +} from "./CrossSigningManager"; import Matrix from "matrix-js-sdk"; import { deriveKey } from 'matrix-js-sdk/src/crypto/key_passphrase'; import { decodeRecoveryKey } from 'matrix-js-sdk/src/crypto/recoverykey'; @@ -164,9 +169,6 @@ export default class Login { * @returns {MatrixClientCreds} */ export async function sendLoginRequest(hsUrl, isUrl, loginType, loginParams) { - let rehydrationKeyInfo; - let rehydrationKey; - const client = Matrix.createClient({ baseUrl: hsUrl, idBaseUrl: isUrl, @@ -190,14 +192,16 @@ export async function sendLoginRequest(hsUrl, isUrl, loginType, loginParams) { } } + const dehydrationKeyCache = getDehydrationKeyCache(); + return { homeserverUrl: hsUrl, identityServerUrl: isUrl, userId: data.user_id, deviceId: data.device_id, accessToken: data.access_token, - rehydrationKeyInfo, - rehydrationKey, + rehydrationKeyInfo: dehydrationKeyCache.keyInfo, + rehydrationKey: dehydrationKeyCache.key, olmAccount: data._olm_account, }; } @@ -243,5 +247,7 @@ async function getDehydrationKey(keyInfo) { throw new AccessCancelledError(); } const key = await inputToKey(input); + // need to copy the key because rehydration (unpickling) will clobber it + cacheDehydrationKey(new Uint8Array(key), keyInfo); return key; } diff --git a/src/MatrixClientPeg.ts b/src/MatrixClientPeg.ts index 61b7a04069..18af378fac 100644 --- a/src/MatrixClientPeg.ts +++ b/src/MatrixClientPeg.ts @@ -31,7 +31,7 @@ import {verificationMethods} from 'matrix-js-sdk/src/crypto'; import MatrixClientBackedSettingsHandler from "./settings/handlers/MatrixClientBackedSettingsHandler"; import * as StorageManager from './utils/StorageManager'; import IdentityAuthClient from './IdentityAuthClient'; -import { crossSigningCallbacks } from './CrossSigningManager'; +import { cacheDehydrationKey, crossSigningCallbacks } from './CrossSigningManager'; import {SHOW_QR_CODE_METHOD} from "matrix-js-sdk/src/crypto/verification/QRCode"; export interface IMatrixClientCreds { @@ -270,33 +270,43 @@ class _MatrixClientPeg implements IMatrixClientPeg { }; if (creds.olmAccount) { + console.log("got a dehydrated account"); opts.deviceToImport = { olmDevice: { - pickledAccount: creds.olmAccount.pickle("DEFAULT_KEY"), + pickledAccount: creds.olmAccount.pickle(creds.pickleKey || "DEFAULT_KEY"), sessions: [], - pickleKey: "DEFAULT_KEY", + pickleKey: creds.pickleKey || "DEFAULT_KEY", }, userId: creds.userId, deviceId: creds.deviceId, }; + creds.olmAccount.free(); } else { opts.userId = creds.userId; opts.deviceId = creds.deviceId; } - // FIXME: modify crossSigningCallbacks.getSecretStorageKey so that it tries using rehydrationkey and/or saves the passphrase info - // These are always installed regardless of the labs flag so that // cross-signing features can toggle on without reloading and also be // accessed immediately after login. Object.assign(opts.cryptoCallbacks, crossSigningCallbacks); - this.matrixClient = createMatrixClient(opts); + // set dehydration key after cross-signing gets set up -- we wait until + // cross-signing is set up because we want to cross-sign the dehydrated + // key + const origGetSecretStorageKey = opts.cryptoCallbacks.getSecretStorageKey + opts.cryptoCallbacks.getSecretStorageKey = async (keyinfo, ssssItemName) => { + const [name, key] = await origGetSecretStorageKey(keyinfo, ssssItemName); + this.matrixClient.setDehydrationKey(key, {passphrase: keyinfo.keys[name].passphrase}); + return [name, key]; + } if (creds.rehydrationKey) { - this.matrixClient.cacheDehydrationKey(creds.rehydrationKey, creds.rehydrationKeyInfo || {}); + cacheDehydrationKey(creds.rehydrationKey, creds.rehydrationKeyInfo); } + this.matrixClient = createMatrixClient(opts); + // we're going to add eventlisteners for each matrix event tile, so the // potential number of event listeners is quite high. this.matrixClient.setMaxListeners(500); diff --git a/src/async-components/views/dialogs/secretstorage/CreateSecretStorageDialog.js b/src/async-components/views/dialogs/secretstorage/CreateSecretStorageDialog.js index 53b3033330..b1c9dc5a60 100644 --- a/src/async-components/views/dialogs/secretstorage/CreateSecretStorageDialog.js +++ b/src/async-components/views/dialogs/secretstorage/CreateSecretStorageDialog.js @@ -304,6 +304,11 @@ export default class CreateSecretStorageDialog extends React.PureComponent { }, }); } + const dehydrationKeyInfo = + this._recoveryKey.keyInfo && this._recoveryKey.keyInfo.passphrase + ? {passphrase: this._recoveryKey.keyInfo.passphrase} + : {}; + await cli.setDehydrationKey(this._recoveryKey.privateKey, dehydrationKeyInfo); this.props.onFinished(true); } catch (e) { if (this.state.canUploadKeysWithPasswordOnly && e.httpStatus === 401 && e.data.flows) { From 999b5afa0ad9c40a810a39dd2d77a92ed8ab6b09 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Fri, 4 Sep 2020 21:41:14 -0600 Subject: [PATCH 003/331] Acknowledge the visibility request --- src/FromWidgetPostMessageApi.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/FromWidgetPostMessageApi.js b/src/FromWidgetPostMessageApi.js index d5d7c08d50..bbccc47d28 100644 --- a/src/FromWidgetPostMessageApi.js +++ b/src/FromWidgetPostMessageApi.js @@ -218,6 +218,9 @@ export default class FromWidgetPostMessageApi { if (ActiveWidgetStore.widgetHasCapability(widgetId, Capability.AlwaysOnScreen)) { ActiveWidgetStore.setWidgetPersistence(widgetId, val); } + + // acknowledge + this.sendResponse(event, {}); } else if (action === 'get_openid') { // Handled by caller } else { From 9586a981de1b0066f5e06286a640b8def7f1c314 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Priit=20J=C3=B5er=C3=BC=C3=BCt?= Date: Wed, 9 Sep 2020 15:36:43 +0000 Subject: [PATCH 004/331] Translated using Weblate (Estonian) Currently translated at 100.0% (2369 of 2369 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/element-web/matrix-react-sdk/et/ --- src/i18n/strings/et.json | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/src/i18n/strings/et.json b/src/i18n/strings/et.json index 5500a4bd02..8811e49f30 100644 --- a/src/i18n/strings/et.json +++ b/src/i18n/strings/et.json @@ -618,7 +618,7 @@ "%(senderDisplayName)s removed the room name.": "%(senderDisplayName)s eemaldas jututoa nime.", "%(senderDisplayName)s changed the room name from %(oldRoomName)s to %(newRoomName)s.": "%(senderDisplayName)s muutis jututoa vana nime %(oldRoomName)s uueks nimeks %(newRoomName)s.", "%(senderDisplayName)s changed the room name to %(roomName)s.": "%(senderDisplayName)s muutis jututoa nimeks %(roomName)s.", - "Show info about bridges in room settings": "Näita jututoa seadistustes teavet võrgusildade kohta", + "Show info about bridges in room settings": "Näita jututoa seadistustes teavet sõnumisildade kohta", "Upload": "Lae üles", "Save": "Salvesta", "General": "Üldist", @@ -1578,7 +1578,7 @@ "You have successfully set a password and an email address!": "Salasõna loomine ja e-posti aadressi salvestamine õnnestus!", "You can now return to your account after signing out, and sign in on other devices.": "Nüüd sa saad peale väljalogimist pöörduda tagasi oma konto juurde või logida sisse muudest seadmetest.", "Remember, you can always set an email address in user settings if you change your mind.": "Jäta meelde, et sa saad alati hiljem määrata kasutajaseadetest oma e-posti aadressi.", - "Use bots, bridges, widgets and sticker packs": "Kasuta roboteid, võrgusildu, vidinaid või kleepsupakke", + "Use bots, bridges, widgets and sticker packs": "Kasuta roboteid, sõnumisildu, vidinaid või kleepsupakke", "Upload all": "Lae kõik üles", "This file is too large to upload. The file size limit is %(limit)s but this file is %(sizeOfThisFile)s.": "See fail on üleslaadimiseks liiga suur. Üleslaetavate failide mahupiir on %(limit)s, kuid selle faili suurus on %(sizeOfThisFile)s.", "Appearance": "Välimus", @@ -2459,5 +2459,22 @@ "User settings": "Kasutaja seadistused", "Community and user menu": "Kogukonna ja kasutaja menüü", "Privacy": "Privaatsus", - "Prepends ( ͡° ͜ʖ ͡°) to a plain-text message": "Lisa ( ͡° ͜ʖ ͡°) smaili vormindamata sõnumi algusesse" + "Prepends ( ͡° ͜ʖ ͡°) to a plain-text message": "Lisa ( ͡° ͜ʖ ͡°) smaili vormindamata sõnumi algusesse", + "Unknown App": "Tundmatu rakendus", + "%(count)s results|one": "%(count)s tulemus", + "Room Info": "Jututoa teave", + "Apps": "Rakendused", + "Unpin app": "Eemalda rakenduse klammerdus", + "Edit apps, bridges & bots": "Muuda rakendusi, sõnumisildu ja roboteid", + "Add apps, bridges & bots": "Lisa rakendusi, sõnumisildu ja roboteid", + "Not encrypted": "Krüptimata", + "About": "Rakenduse teave", + "%(count)s people|other": "%(count)s inimest", + "%(count)s people|one": "%(count)s isik", + "Show files": "Näita faile", + "Room settings": "Jututoa seadistused", + "Take a picture": "Tee foto", + "Pin to room": "Klammerda jututoa külge", + "You can only pin 2 apps at a time": "Sul võib korraga olla vaid kaks klammerdatud rakendust", + "Unpin": "Eemalda klammerdus" } From 884b54fd02b7faef8f7f8bc596e5d8b29d012f78 Mon Sep 17 00:00:00 2001 From: "@a2sc:matrix.org" Date: Wed, 9 Sep 2020 14:56:29 +0000 Subject: [PATCH 005/331] Translated using Weblate (German) Currently translated at 100.0% (2369 of 2369 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/element-web/matrix-react-sdk/de/ --- src/i18n/strings/de_DE.json | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/de_DE.json b/src/i18n/strings/de_DE.json index 14a87f8308..19b7ca014b 100644 --- a/src/i18n/strings/de_DE.json +++ b/src/i18n/strings/de_DE.json @@ -2457,5 +2457,22 @@ "Community settings": "Community-Einstellungen", "User settings": "Nutzer-Einstellungen", "Community and user menu": "Community- und Nutzer-Menü", - "Prepends ( ͡° ͜ʖ ͡°) to a plain-text message": "Stellt ( ͡° ͜ʖ ͡°) einer Klartextnachricht voran" + "Prepends ( ͡° ͜ʖ ͡°) to a plain-text message": "Stellt ( ͡° ͜ʖ ͡°) einer Klartextnachricht voran", + "Unknown App": "Unbekannte App", + "%(count)s results|one": "%(count)s Ergebnis", + "Room Info": "Raum-Info", + "Apps": "Apps", + "Unpin app": "App nicht mehr anheften", + "Edit apps, bridges & bots": "Apps, Bridges & Bots bearbeiten", + "Add apps, bridges & bots": "Apps, Bridges & Bots hinzufügen", + "Not encrypted": "Nicht verschlüsselt", + "About": "Über", + "%(count)s people|other": "%(count)s Personen", + "%(count)s people|one": "%(count)s Person", + "Show files": "Dateien anzeigen", + "Room settings": "Raum-Einstellungen", + "Take a picture": "Foto aufnehmen", + "Pin to room": "An Raum anheften", + "You can only pin 2 apps at a time": "Du kannst nur 2 Apps gleichzeitig anheften", + "Unpin": "Nicht mehr anheften" } From 188aee0fcf3ad3bacf94bb8eebb636ce4b3f0dbd Mon Sep 17 00:00:00 2001 From: Nikita Epifanov Date: Wed, 9 Sep 2020 15:13:51 +0000 Subject: [PATCH 006/331] Translated using Weblate (Russian) Currently translated at 100.0% (2369 of 2369 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/element-web/matrix-react-sdk/ru/ --- src/i18n/strings/ru.json | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/ru.json b/src/i18n/strings/ru.json index 203f407ece..b9e203b201 100644 --- a/src/i18n/strings/ru.json +++ b/src/i18n/strings/ru.json @@ -2455,5 +2455,22 @@ "User settings": "Пользовательские настройки", "Community and user menu": "Сообщество и меню пользователя", "Privacy": "Конфиденциальность", - "Prepends ( ͡° ͜ʖ ͡°) to a plain-text message": "Добавляет ( ͡° ͜ʖ ͡°) к текстовому сообщению" + "Prepends ( ͡° ͜ʖ ͡°) to a plain-text message": "Добавляет ( ͡° ͜ʖ ͡°) к текстовому сообщению", + "Unknown App": "Неизвестное приложение", + "%(count)s results|one": "%(count)s результат", + "Room Info": "Информация о комнате", + "Apps": "Приложения", + "Unpin app": "Открепить приложение", + "Edit apps, bridges & bots": "Редактировать приложения, мосты и ботов", + "Add apps, bridges & bots": "Добавить приложения, мосты и ботов", + "Not encrypted": "Не зашифровано", + "About": "О приложение", + "%(count)s people|other": "%(count)s человек", + "%(count)s people|one": "%(count)s человек", + "Show files": "Показать файлы", + "Room settings": "Настройки комнаты", + "Take a picture": "Сделать снимок", + "Pin to room": "Закрепить в комнате", + "You can only pin 2 apps at a time": "Вы можете закрепить только 2 приложения за раз", + "Unpin": "Открепить" } From 17a6f33b91b816f18806ba67e612c863e5613ca9 Mon Sep 17 00:00:00 2001 From: Besnik Bleta Date: Thu, 10 Sep 2020 08:41:25 +0000 Subject: [PATCH 007/331] Translated using Weblate (Albanian) Currently translated at 99.7% (2361 of 2369 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/element-web/matrix-react-sdk/sq/ --- src/i18n/strings/sq.json | 52 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 51 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/sq.json b/src/i18n/strings/sq.json index c156e3bad3..397013f9b7 100644 --- a/src/i18n/strings/sq.json +++ b/src/i18n/strings/sq.json @@ -2422,5 +2422,55 @@ "Error leaving room": "Gabim në dalje nga dhoma", "Communities v2 prototypes. Requires compatible homeserver. Highly experimental - use with caution.": "Prototipe bashkësie v2. Lyp shërbyes Home të përputhshëm. Tejet eksperimentale - përdoreni me kujdes.", "Explore rooms in %(communityName)s": "Eksploroni dhoma në %(communityName)s", - "Set up Secure Backup": "Ujdisni Kopjeruajtje të Sigurt" + "Set up Secure Backup": "Ujdisni Kopjeruajtje të Sigurt", + "Prepends ( ͡° ͜ʖ ͡°) to a plain-text message": "Një mesazhi tekst të thjeshtë vëri përpara ( ͡° ͜ʖ ͡°)", + "Unknown App": "Aplikacion i Panjohur", + "Cross-signing is ready for use, but secret storage is currently not being used to backup your keys.": "Cross-signing është gati për përdorim, por depozita e fshehtë s’është duke u përdorur për kopjeruajtje të kyçeve tuaj.", + "Privacy": "Privatësi", + "Explore community rooms": "Eksploroni dhoma bashkësie", + "%(count)s results|one": "%(count)s përfundim", + "Room Info": "Të dhëna Dhome", + "Apps": "Aplikacione", + "Unpin app": "Shfiksoje aplikacionin", + "Edit apps, bridges & bots": "Përpunoni aplikacione, ura & robotë", + "Add apps, bridges & bots": "Shtoni aplikacione, ura & robotë", + "Not encrypted": "Jo e fshehtëzuar", + "About": "Mbi", + "%(count)s people|other": "%(count)s vetë", + "%(count)s people|one": "%(count)s person", + "Show files": "Shfaq kartela", + "Room settings": "Rregullime dhome", + "Take a picture": "Bëni një foto", + "Pin to room": "Fiksoje te dhoma", + "You can only pin 2 apps at a time": "Mund të fiksoni vetëm 2 aplikacione në herë", + "Information": "Informacion", + "Add another email": "Shtoni email tjetër", + "People you know on %(brand)s": "Persona që njihni në %(brand)s", + "Send %(count)s invites|other": "Dërgo %(count)s ftesa", + "Send %(count)s invites|one": "Dërgo %(count)s ftesë", + "Invite people to join %(communityName)s": "Ftoni njerëz të marrin pjesë në %(communityName)s", + "There was an error creating your community. The name may be taken or the server is unable to process your request.": "Pati një gabim teksa krijohej bashkësia juaj. Emri mund të jetë i zënë ose shërbyesi s’arrin të merret me kërkesën tuaj.", + "Community ID: +:%(domain)s": "ID Bashkësie: +:%(domain)s", + "Use this when referencing your community to others. The community ID cannot be changed.": "Përdoreni këtë kur ia referoheni bashkësinë tuaj të tjerëve. ID-ja e bashkësisë s’mund të ndryshohet.", + "You can change this later if needed.": "Këtë mund ta ndryshoni më vonë, nëse ju duhet.", + "What's the name of your community or team?": "Cili është emri i bashkësisë apo ekipit tuaj?", + "Enter name": "Jepni emër", + "Add image (optional)": "Shtoni figurë (në daçi)", + "An image will help people identify your community.": "Një figurë do t’i ndihmojë njerëzit të identifikojnë bashkësinë tuaj.", + "Private rooms can be found and joined by invitation only. Public rooms can be found and joined by anyone.": "Dhoma private mund të gjenden dhe në to të hyhet vetëm me ftesë. Dhomat publike mund të gjenden dhe në to të hyhet nga kushdo.", + "Private rooms can be found and joined by invitation only. Public rooms can be found and joined by anyone in this community.": "Dhoma private mund të gjenden dhe në to të hyhet vetëm me ftesë. Dhomat publike mund të gjenden dhe në to të hyhet nga kushdo në këtë bashkësi.", + "You might enable this if the room will only be used for collaborating with internal teams on your homeserver. This cannot be changed later.": "Këtë mund ta aktivizonit, nëse kjo dhomë do të përdoret vetëm për bashkëpunim me ekipe të brendshëm në shërbyesin tuaj Home. Kjo s’mund të ndryshohet më vonë.", + "You might disable this if the room will be used for collaborating with external teams who have their own homeserver. This cannot be changed later.": "Këtë mund të çaktivizonit, nëse dhoma do të përdoret për bashkëpunim me ekipe të jashtëm që kanë shërbyesin e tyre Home. Kjo s’mund të ndryshohet më vonë.", + "Create a room in %(communityName)s": "Krijo një dhomë te %(communityName)s", + "Block anyone not part of %(serverName)s from ever joining this room.": "Bllokoji cilitdo që s’është pjesë e %(serverName)s marrjen pjesë në këtë dhomë.", + "There was an error updating your community. The server is unable to process your request.": "Pati një gabim teksa përditësohej bashkësia juaj. Shërbyesi s’është në gjendje të merret me kërkesën tuaj.", + "Update community": "Përditësoni bashkësinë", + "May include members not in %(communityName)s": "Mund të përfshijë anëtarë jo në %(communityName)s", + "Start a conversation with someone using their name, username (like ) or email address. This won't invite them to %(communityName)s. To invite someone to %(communityName)s, click here.": "Filloni një bisedë me dikë duke përdorur emrin e tij, emrin e përdoruesit (bie fjala, ) ose adresën e tij email. Kjo s’do të përbëjë ftesë për ta për t’u bërë pjesë e %(communityName)s. Për të ftuar dikë te %(communityName)s, klikoni këtu.", + "Unpin": "Shfiksoje", + "Create community": "Krijoni bashkësi", + "Failed to find the general chat for this community": "S’u arrit të gjendej fjalosja e përgjithshme për këtë bashkësi", + "Community settings": "Rregullime bashkësie", + "User settings": "Rregullime përdoruesi", + "Community and user menu": "Menu bashkësie dhe përdoruesish" } From 7f1c5537fb44f034cb7ac2ac634b7c52900c344b Mon Sep 17 00:00:00 2001 From: Jeff Huang Date: Thu, 10 Sep 2020 01:39:02 +0000 Subject: [PATCH 008/331] Translated using Weblate (Chinese (Traditional)) Currently translated at 100.0% (2369 of 2369 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/element-web/matrix-react-sdk/zh_Hant/ --- src/i18n/strings/zh_Hant.json | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/zh_Hant.json b/src/i18n/strings/zh_Hant.json index 6aa980cd72..389ccc6b03 100644 --- a/src/i18n/strings/zh_Hant.json +++ b/src/i18n/strings/zh_Hant.json @@ -2462,5 +2462,22 @@ "User settings": "使用者設定", "Community and user menu": "社群與使用者選單", "Privacy": "隱私", - "Prepends ( ͡° ͜ʖ ͡°) to a plain-text message": "把 ( ͡° ͜ʖ ͡°) 加在純文字訊息前" + "Prepends ( ͡° ͜ʖ ͡°) to a plain-text message": "把 ( ͡° ͜ʖ ͡°) 加在純文字訊息前", + "Unknown App": "未知的應用程式", + "%(count)s results|one": "%(count)s 個結果", + "Room Info": "聊天室資訊", + "Apps": "應用程式", + "Unpin app": "取消釘選應用程式", + "Edit apps, bridges & bots": "編輯應用程式、橋接與機器人", + "Add apps, bridges & bots": "新增應用程式、橋接與機器人", + "Not encrypted": "未加密", + "About": "關於", + "%(count)s people|other": "%(count)s 個夥伴", + "%(count)s people|one": "%(count)s 個人", + "Show files": "顯示檔案", + "Room settings": "聊天室設定", + "Take a picture": "拍照", + "Pin to room": "釘選到聊天室", + "You can only pin 2 apps at a time": "您僅能同時釘選 2 個應用程式", + "Unpin": "取消釘選" } From c5bf61e270d63a12b821713b0b8dfb65affd01bf Mon Sep 17 00:00:00 2001 From: XoseM Date: Thu, 10 Sep 2020 05:43:54 +0000 Subject: [PATCH 009/331] Translated using Weblate (Galician) Currently translated at 100.0% (2369 of 2369 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/element-web/matrix-react-sdk/gl/ --- src/i18n/strings/gl.json | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/gl.json b/src/i18n/strings/gl.json index b8dcc48b68..8a56fe84e0 100644 --- a/src/i18n/strings/gl.json +++ b/src/i18n/strings/gl.json @@ -2458,5 +2458,23 @@ "Failed to find the general chat for this community": "Non se atopou o chat xenérico para esta comunidade", "Community settings": "Axustes da comunidade", "User settings": "Axustes de usuaria", - "Community and user menu": "Menú de usuaria e comunidade" + "Community and user menu": "Menú de usuaria e comunidade", + "Prepends ( ͡° ͜ʖ ͡°) to a plain-text message": "Engade ( ͡° ͜ʖ ͡°) a unha mensaxe de texto-plano", + "Unknown App": "App descoñecida", + "%(count)s results|one": "%(count)s resultado", + "Room Info": "Info da sala", + "Apps": "Apps", + "Unpin app": "Desafixar app", + "Edit apps, bridges & bots": "Editar apps, pontes e bots", + "Add apps, bridges & bots": "Engadir apps, pontes e bots", + "Not encrypted": "Sen cifrar", + "About": "Acerca de", + "%(count)s people|other": "%(count)s persoas", + "%(count)s people|one": "%(count)s persoa", + "Show files": "Mostrar ficheiros", + "Room settings": "Axustes da sala", + "Take a picture": "Tomar unha foto", + "Pin to room": "Fixar a sala", + "You can only pin 2 apps at a time": "Só podes fixar 2 apps ó tempo", + "Unpin": "Desafixar" } From 9c749626e4d267703091b28c73a4c1f32c01ce9e Mon Sep 17 00:00:00 2001 From: Szimszon Date: Thu, 10 Sep 2020 09:47:42 +0000 Subject: [PATCH 010/331] Translated using Weblate (Hungarian) Currently translated at 100.0% (2369 of 2369 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/element-web/matrix-react-sdk/hu/ --- src/i18n/strings/hu.json | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/hu.json b/src/i18n/strings/hu.json index a9e209c169..1ebc9027d0 100644 --- a/src/i18n/strings/hu.json +++ b/src/i18n/strings/hu.json @@ -2457,5 +2457,24 @@ "Failed to find the general chat for this community": "Ehhez a közösséghez nem található általános csevegés", "Community settings": "Közösségi beállítások", "User settings": "Felhasználói beállítások", - "Community and user menu": "Közösségi és felhasználói menü" + "Community and user menu": "Közösségi és felhasználói menü", + "Prepends ( ͡° ͜ʖ ͡°) to a plain-text message": "( ͡° ͜ʖ ͡°) -t tesz a szöveg elejére", + "Unknown App": "Ismeretlen alkalmazás", + "Privacy": "Adatvédelem", + "%(count)s results|one": "%(count)s találat", + "Room Info": "Szoba információ", + "Apps": "Alkalmazások", + "Unpin app": "Alkalmazás kitűzésének megszüntetése", + "Edit apps, bridges & bots": "Alkalmazások, hidak és botok szerkesztése", + "Add apps, bridges & bots": "Alkalmazások, hidak és botok hozzáadása", + "Not encrypted": "Nem titkosított", + "About": "Névjegy", + "%(count)s people|other": "%(count)s személy", + "%(count)s people|one": "%(count)s személy", + "Show files": "Fájlok megjelenítése", + "Room settings": "Szoba beállítások", + "Take a picture": "Fénykép készítése", + "Pin to room": "A szobába kitűz", + "You can only pin 2 apps at a time": "Csak 2 alkalmazást tűzhetsz ki egyszerre", + "Unpin": "Leszed" } From 8d4a2521844721e11f28148acef114e3d334ea26 Mon Sep 17 00:00:00 2001 From: yuuki-san Date: Thu, 10 Sep 2020 11:43:18 +0000 Subject: [PATCH 011/331] Translated using Weblate (Slovak) Currently translated at 69.2% (1640 of 2369 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/element-web/matrix-react-sdk/sk/ --- src/i18n/strings/sk.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/i18n/strings/sk.json b/src/i18n/strings/sk.json index 5ed562e400..454d86cb64 100644 --- a/src/i18n/strings/sk.json +++ b/src/i18n/strings/sk.json @@ -295,7 +295,7 @@ "A text message has been sent to %(msisdn)s": "Na číslo %(msisdn)s bola odoslaná textová správa", "Please enter the code it contains:": "Prosím, zadajte kód z tejto správy:", "Start authentication": "Spustiť overenie", - "powered by Matrix": "Poháňa Matrix", + "powered by Matrix": "používa protokol Matrix", "Sign in with": "Na prihlásenie sa použije", "Email address": "Emailová adresa", "Sign in": "Prihlásiť sa", From 7d3e0ed9ce51f39d594456d74024955dbcd5363a Mon Sep 17 00:00:00 2001 From: LinAGKar Date: Thu, 10 Sep 2020 08:01:58 +0000 Subject: [PATCH 012/331] Translated using Weblate (Swedish) Currently translated at 100.0% (2369 of 2369 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/element-web/matrix-react-sdk/sv/ --- src/i18n/strings/sv.json | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/src/i18n/strings/sv.json b/src/i18n/strings/sv.json index 2032eca4ff..c230c361be 100644 --- a/src/i18n/strings/sv.json +++ b/src/i18n/strings/sv.json @@ -801,7 +801,7 @@ "Unpin Message": "Ta bort fastnålning", "No pinned messages.": "Inga fastnålade meddelanden.", "Pinned Messages": "Fastnålade meddelanden", - "Pin Message": "Nåla fast meddelande", + "Pin Message": "Fäst meddelande", "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.": "Den exporterade filen kommer att låta de som kan läsa den att dekryptera alla krypterade meddelanden som du kan se, så du bör vara noga med att hålla den säker. För att hjälpa till med detta, bör du ange en lösenfras nedan, som kommer att användas för att kryptera exporterad data. Det kommer bara vara möjligt att importera data genom att använda samma lösenfras.", "This process allows you to import encryption keys that you had previously exported from another Matrix client. You will then be able to decrypt any messages that the other client could decrypt.": "Denna process möjliggör import av krypteringsnycklar som tidigare exporterats från en annan Matrix-klient. Du kommer då kunna avkryptera alla meddelanden som den andra klienten kunde avkryptera.", "The export file will be protected with a passphrase. You should enter the passphrase here, to decrypt the file.": "Den exporterade filen kommer vara skyddad med en lösenfras. Du måste ange lösenfrasen här, för att avkryptera filen.", @@ -2392,5 +2392,22 @@ "Toggle this dialog": "Växla den här dialogrutan", "Move autocomplete selection up/down": "Flytta autokompletteringssektionen upp/ner", "Cancel autocomplete": "Stäng autokomplettering", - "Prepends ( ͡° ͜ʖ ͡°) to a plain-text message": "Lägger till ( ͡° ͜ʖ ͡°) i början på ett textmeddelande" + "Prepends ( ͡° ͜ʖ ͡°) to a plain-text message": "Lägger till ( ͡° ͜ʖ ͡°) i början på ett textmeddelande", + "Unknown App": "Okänd app", + "%(count)s results|one": "%(count)s resultat", + "Room Info": "Rumsinfo", + "Apps": "Appar", + "Unpin app": "Avfäst app", + "Edit apps, bridges & bots": "Redigera appar, bryggor och bottar", + "Add apps, bridges & bots": "Lägg till appar, bryggor och bottar", + "Not encrypted": "Inte krypterad", + "About": "Om", + "%(count)s people|other": "%(count)s personer", + "%(count)s people|one": "%(count)s person", + "Show files": "Visa filer", + "Room settings": "Rumsinställningar", + "Take a picture": "Ta en bild", + "Pin to room": "Fäst i rum", + "You can only pin 2 apps at a time": "Du kan bara fästa två appar på en gång", + "Unpin": "Avfäst" } From 19ebc6401f5b500434f99872a14bfda193e97516 Mon Sep 17 00:00:00 2001 From: Nikita Epifanov Date: Fri, 11 Sep 2020 09:08:15 +0000 Subject: [PATCH 013/331] Translated using Weblate (Russian) Currently translated at 100.0% (2370 of 2370 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/element-web/matrix-react-sdk/ru/ --- src/i18n/strings/ru.json | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/ru.json b/src/i18n/strings/ru.json index b9e203b201..904763db67 100644 --- a/src/i18n/strings/ru.json +++ b/src/i18n/strings/ru.json @@ -2472,5 +2472,16 @@ "Take a picture": "Сделать снимок", "Pin to room": "Закрепить в комнате", "You can only pin 2 apps at a time": "Вы можете закрепить только 2 приложения за раз", - "Unpin": "Открепить" + "Unpin": "Открепить", + "Cross-signing is ready for use.": "Кросс-подпись готова к использованию.", + "Cross-signing is not set up.": "Кросс-подпись не настроена.", + "Backup version:": "Версия резервной копии:", + "Algorithm:": "Алгоритм:", + "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.": "Сделайте резервную копию ключей шифрования с данными вашей учетной записи на случай, если вы потеряете доступ к своим сеансам. Ваши ключи будут защищены уникальным ключом восстановления.", + "Backup key stored:": "Резервный ключ сохранён:", + "Backup key cached:": "Резервный ключ кэширован:", + "Secret storage:": "Секретное хранилище:", + "ready": "готов", + "not ready": "не готов", + "Secure Backup": "Безопасное резервное копирование" } From 277aefdd5d69c48233503fbbe094320c18fda5bf Mon Sep 17 00:00:00 2001 From: Jeff Huang Date: Fri, 11 Sep 2020 13:09:59 +0000 Subject: [PATCH 014/331] Translated using Weblate (Chinese (Traditional)) Currently translated at 100.0% (2373 of 2373 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/element-web/matrix-react-sdk/zh_Hant/ --- src/i18n/strings/zh_Hant.json | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/zh_Hant.json b/src/i18n/strings/zh_Hant.json index 389ccc6b03..c7dc5555c4 100644 --- a/src/i18n/strings/zh_Hant.json +++ b/src/i18n/strings/zh_Hant.json @@ -2479,5 +2479,19 @@ "Take a picture": "拍照", "Pin to room": "釘選到聊天室", "You can only pin 2 apps at a time": "您僅能同時釘選 2 個應用程式", - "Unpin": "取消釘選" + "Unpin": "取消釘選", + "Group call modified by %(senderName)s": "由 %(senderName)s 修改的群組通話", + "Group call started by %(senderName)s": "由 %(senderName)s 開始的群組通話", + "Group call ended by %(senderName)s": "由 %(senderName)s 結束的群組通話", + "Cross-signing is ready for use.": "交叉簽章已準備好使用。", + "Cross-signing is not set up.": "交叉簽章尚未設定。", + "Backup version:": "備份版本:", + "Algorithm:": "演算法:", + "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.": "如果您無法存取您的工作階段,請使用您的帳號資料來備份加密金鑰。您的金鑰將會被獨一無二的金鑰保護。", + "Backup key stored:": "備份金鑰已儲存:", + "Backup key cached:": "備份金鑰已快取:", + "Secret storage:": "秘密儲存空間:", + "ready": "準備好", + "not ready": "尚未準備好", + "Secure Backup": "安全備份" } From b1bdb0650771797faca192e9762af8d281437ef3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Priit=20J=C3=B5er=C3=BC=C3=BCt?= Date: Fri, 11 Sep 2020 11:40:31 +0000 Subject: [PATCH 015/331] Translated using Weblate (Estonian) Currently translated at 100.0% (2373 of 2373 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/element-web/matrix-react-sdk/et/ --- src/i18n/strings/et.json | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/et.json b/src/i18n/strings/et.json index 8811e49f30..5fd83557bd 100644 --- a/src/i18n/strings/et.json +++ b/src/i18n/strings/et.json @@ -2476,5 +2476,19 @@ "Take a picture": "Tee foto", "Pin to room": "Klammerda jututoa külge", "You can only pin 2 apps at a time": "Sul võib korraga olla vaid kaks klammerdatud rakendust", - "Unpin": "Eemalda klammerdus" + "Unpin": "Eemalda klammerdus", + "Group call modified by %(senderName)s": "%(senderName)s muutis rühmakõnet", + "Group call started by %(senderName)s": "%(senderName)s algatas rühmakõne", + "Group call ended by %(senderName)s": "%(senderName)s lõpetas rühmakõne", + "Cross-signing is ready for use.": "Risttunnustamine on kasutamiseks valmis.", + "Cross-signing is not set up.": "Risttunnustamine on seadistamata.", + "Backup version:": "Varukoopia versioon:", + "Algorithm:": "Algoritm:", + "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.": "Selleks puhuks, kui sa kaotad ligipääsu kõikidele oma sessioonidele, tee varukoopia oma krüptovõtmetest ja kasutajakonto seadistustest. Unikaalse taastevõtmega tagad selle, et sinu varukoopia on turvaline.", + "Backup key stored:": "Varukoopia võti on salvestatud:", + "Backup key cached:": "Varukoopia võti on puhverdatud:", + "Secret storage:": "Turvahoidla:", + "ready": "valmis", + "not ready": "ei ole valmis", + "Secure Backup": "Turvaline varundus" } From ada8b8deec33b541d2807efc7ad8d2ea11fba28b Mon Sep 17 00:00:00 2001 From: Nikita Epifanov Date: Fri, 11 Sep 2020 12:39:06 +0000 Subject: [PATCH 016/331] Translated using Weblate (Russian) Currently translated at 100.0% (2373 of 2373 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.riot.im/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 904763db67..906f9a7901 100644 --- a/src/i18n/strings/ru.json +++ b/src/i18n/strings/ru.json @@ -2483,5 +2483,8 @@ "Secret storage:": "Секретное хранилище:", "ready": "готов", "not ready": "не готов", - "Secure Backup": "Безопасное резервное копирование" + "Secure Backup": "Безопасное резервное копирование", + "Group call modified by %(senderName)s": "%(senderName)s изменил(а) групповой вызов", + "Group call started by %(senderName)s": "Групповой вызов начат %(senderName)s", + "Group call ended by %(senderName)s": "%(senderName)s завершил(а) групповой вызов" } From d67ad473c3fc7690fdf0110198d40ad0ca4803a2 Mon Sep 17 00:00:00 2001 From: LinAGKar Date: Fri, 11 Sep 2020 11:01:47 +0000 Subject: [PATCH 017/331] Translated using Weblate (Swedish) Currently translated at 100.0% (2373 of 2373 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/element-web/matrix-react-sdk/sv/ --- src/i18n/strings/sv.json | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/sv.json b/src/i18n/strings/sv.json index c230c361be..8be68c031e 100644 --- a/src/i18n/strings/sv.json +++ b/src/i18n/strings/sv.json @@ -2409,5 +2409,19 @@ "Take a picture": "Ta en bild", "Pin to room": "Fäst i rum", "You can only pin 2 apps at a time": "Du kan bara fästa två appar på en gång", - "Unpin": "Avfäst" + "Unpin": "Avfäst", + "Group call modified by %(senderName)s": "Gruppsamtal ändrat av %(senderName)s", + "Group call started by %(senderName)s": "Gruppsamtal startat av %(senderName)s", + "Group call ended by %(senderName)s": "Gruppsamtal avslutat av %(senderName)s", + "Cross-signing is ready for use.": "Korssignering är klart att användas.", + "Cross-signing is not set up.": "Korssignering är inte inställt.", + "Backup version:": "Version av säkerhetskopia:", + "Algorithm:": "Algoritm:", + "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.": "Säkerhetskopiera dina krypteringsnycklar med dina kontodata ifall du förlorar åtkomst till dina sessioner. Dina nycklar skyddas med en unik återställningsnyckel.", + "Backup key stored:": "Lagrad säkerhetskopieringsnyckel:", + "Backup key cached:": "Cachad säkerhetskopieringsnyckel:", + "Secret storage:": "Hemlig lagring:", + "ready": "klart", + "not ready": "inte klart", + "Secure Backup": "Säker säkerhetskopiering" } From 4c7d2363cee4782d4bb794eb52edef55ffd004ca Mon Sep 17 00:00:00 2001 From: "@a2sc:matrix.org" Date: Fri, 11 Sep 2020 14:10:51 +0000 Subject: [PATCH 018/331] Translated using Weblate (German) Currently translated at 99.9% (2372 of 2373 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/element-web/matrix-react-sdk/de/ --- src/i18n/strings/de_DE.json | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/de_DE.json b/src/i18n/strings/de_DE.json index 19b7ca014b..c664caed14 100644 --- a/src/i18n/strings/de_DE.json +++ b/src/i18n/strings/de_DE.json @@ -2474,5 +2474,19 @@ "Take a picture": "Foto aufnehmen", "Pin to room": "An Raum anheften", "You can only pin 2 apps at a time": "Du kannst nur 2 Apps gleichzeitig anheften", - "Unpin": "Nicht mehr anheften" + "Unpin": "Nicht mehr anheften", + "Group call modified by %(senderName)s": "Gruppenanruf wurde von %(senderName)s verändert", + "Group call started by %(senderName)s": "Gruppenanruf von %(senderName)s gestartet", + "Group call ended by %(senderName)s": "Gruppenanruf wurde von %(senderName)s beendet", + "Cross-signing is ready for use.": "Cross-Signing ist bereit zur Anwendung.", + "Cross-signing is not set up.": "Cross-Signing wurde nicht eingerichtet.", + "Backup version:": "Backup-Version:", + "Algorithm:": "Algorithmus:", + "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.": "Sichere deine Verschlüsselungsschlüssel mit deinen Kontodaten, falls du den Zugriff auf deine Sitzungen verlierst. Deine Schlüssel werden mit einem eindeutigen Wiederherstellungsschlüssel gesichert.", + "Backup key stored:": "Sicherungsschlüssel gespeichert:", + "Backup key cached:": "Sicherungsschlüssel zwischengespeichert:", + "Secret storage:": "Sicherer Speicher:", + "ready": "bereit", + "not ready": "nicht bereit", + "Secure Backup": "Sicheres Backup" } From d5b8588cb4828ee17fc16ae3a9f075dbb703c986 Mon Sep 17 00:00:00 2001 From: toastbroot Date: Fri, 11 Sep 2020 14:39:32 +0000 Subject: [PATCH 019/331] Translated using Weblate (German) Currently translated at 99.9% (2372 of 2373 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.riot.im/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 c664caed14..9313861206 100644 --- a/src/i18n/strings/de_DE.json +++ b/src/i18n/strings/de_DE.json @@ -1633,7 +1633,7 @@ "Sends a message as html, without interpreting it as markdown": "Verschickt eine Nachricht im html-Format, ohne sie in Markdown zu formatieren", "Show rooms with unread notifications first": "Räume mit ungelesenen Benachrichtigungen zuerst zeigen", "Show shortcuts to recently viewed rooms above the room list": "Kurzbefehle zu den kürzlich gesichteten Räumen über der Raumliste anzeigen", - "Use Single Sign On to continue": "Verwende Single Sign on um fortzufahren", + "Use Single Sign On to continue": "Benutze Single Sign-On um fortzufahren", "Confirm adding this email address by using Single Sign On to prove your identity.": "Bestätige die hinzugefügte E-Mail-Adresse mit Single Sign-On, um deine Identität nachzuweisen.", "Single Sign On": "Single Sign-On", "Confirm adding email": "Bestätige hinzugefügte E-Mail-Addresse", From 7a26eb98401e01243f82b0a98940a884f15a7ad0 Mon Sep 17 00:00:00 2001 From: felix adernog Date: Fri, 11 Sep 2020 14:43:50 +0000 Subject: [PATCH 020/331] Translated using Weblate (German) Currently translated at 99.9% (2372 of 2373 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.riot.im/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 9313861206..0cf4b6323f 100644 --- a/src/i18n/strings/de_DE.json +++ b/src/i18n/strings/de_DE.json @@ -1330,7 +1330,7 @@ "If you can't find the room you're looking for, ask for an invite or Create a new room.": "Wenn du den gesuchten Raum nicht finden kannst, frage nach einer Einladung für den Raum oder Erstelle einen neuen Raum.", "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.": "Alternativ kannst du versuchen, den öffentlichen Server unter turn.matrix.org zu verwenden. Allerdings wird dieser nicht so zuverlässig sein, und deine IP-Adresse mit diesem Server teilen. Du kannst dies auch in den Einstellungen konfigurieren.", "This action requires accessing the default identity server to validate an email address or phone number, but the server does not have any terms of service.": "Diese Handlung erfordert es, auf den Standard-Identitätsserver zuzugreifen, um eine E-Mail Adresse oder Telefonnummer zu validieren, aber der Server hat keine Nutzungsbedingungen.", - "Only continue if you trust the owner of the server.": "Fahre nur fort, wenn du den Inhaber*innen des Servers vertraust.", + "Only continue if you trust the owner of the server.": "Fahre nur fort, wenn du dem Besitzer*in des Servers vertraust.", "Trust": "Vertrauen", "Custom (%(level)s)": "Benutzerdefinierte (%(level)s)", "Sends a message as plain text, without interpreting it as markdown": "Verschickt eine Nachricht in reinem Textformat, ohne sie in Markdown zu formatieren", From 0721ff85fe070c3e6a0873718ad25c5c6ef9c57f Mon Sep 17 00:00:00 2001 From: "@a2sc:matrix.org" Date: Fri, 11 Sep 2020 14:44:02 +0000 Subject: [PATCH 021/331] Translated using Weblate (German) Currently translated at 99.9% (2372 of 2373 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.riot.im/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 0cf4b6323f..4deb58887a 100644 --- a/src/i18n/strings/de_DE.json +++ b/src/i18n/strings/de_DE.json @@ -1330,7 +1330,7 @@ "If you can't find the room you're looking for, ask for an invite or Create a new room.": "Wenn du den gesuchten Raum nicht finden kannst, frage nach einer Einladung für den Raum oder Erstelle einen neuen Raum.", "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.": "Alternativ kannst du versuchen, den öffentlichen Server unter turn.matrix.org zu verwenden. Allerdings wird dieser nicht so zuverlässig sein, und deine IP-Adresse mit diesem Server teilen. Du kannst dies auch in den Einstellungen konfigurieren.", "This action requires accessing the default identity server to validate an email address or phone number, but the server does not have any terms of service.": "Diese Handlung erfordert es, auf den Standard-Identitätsserver zuzugreifen, um eine E-Mail Adresse oder Telefonnummer zu validieren, aber der Server hat keine Nutzungsbedingungen.", - "Only continue if you trust the owner of the server.": "Fahre nur fort, wenn du dem Besitzer*in des Servers vertraust.", + "Only continue if you trust the owner of the server.": "Fahre nur fort, wenn du dem/r Besitzer*in des Servers vertraust.", "Trust": "Vertrauen", "Custom (%(level)s)": "Benutzerdefinierte (%(level)s)", "Sends a message as plain text, without interpreting it as markdown": "Verschickt eine Nachricht in reinem Textformat, ohne sie in Markdown zu formatieren", From 80f8a18c2a78206435d321a5a0ced1c13f85c862 Mon Sep 17 00:00:00 2001 From: Safa Alfulaij Date: Sat, 12 Sep 2020 10:45:32 +0000 Subject: [PATCH 022/331] Translated using Weblate (Arabic) Currently translated at 14.9% (354 of 2373 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/element-web/matrix-react-sdk/ar/ --- src/i18n/strings/ar.json | 200 +++++++++++++++++++-------------------- 1 file changed, 100 insertions(+), 100 deletions(-) diff --git a/src/i18n/strings/ar.json b/src/i18n/strings/ar.json index a6a52b147d..718edd4c26 100644 --- a/src/i18n/strings/ar.json +++ b/src/i18n/strings/ar.json @@ -1,5 +1,5 @@ { - "Continue": "إستمر", + "Continue": "واصِل", "Username available": "اسم المستخدم متاح", "Username not available": "الإسم المستخدم غير موجود", "Something went wrong!": "هناك خطأ ما!", @@ -7,18 +7,18 @@ "Close": "إغلاق", "Create new room": "إنشاء غرفة جديدة", "Custom Server Options": "الإعدادات الشخصية للخادوم", - "Dismiss": "تجاهل", + "Dismiss": "أهمِل", "Failed to change password. Is your password correct?": "فشلت عملية تعديل الكلمة السرية. هل كلمتك السرية صحيحة ؟", "Warning": "تنبيه", - "Error": "خطأ", + "Error": "عُطل", "Remove": "حذف", "Send": "إرسال", "Edit": "تعديل", "This email address is already in use": "عنوان البريد هذا مستخدم بالفعل", "This phone number is already in use": "رقم الهاتف هذا مستخدم بالفعل", - "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": "فشل التثبّت من عنوان البريد الإلكتروني: تأكّد من نقر الرابط في البريد المُرسل", "The version of %(brand)s": "إصدارة %(brand)s", - "Whether or not you're using the Richtext mode of the Rich Text Editor": "فيما إذا كنت تستخدم وضع النص الغني لمحرر النصوص الغني أم لا", + "Whether or not you're using the Richtext mode of the Rich Text Editor": "فيما إذا كنت تستعمل وضع النص الغني في محرّر النصوص الغنية", "Your homeserver's URL": "عنوان خادوم المنزل", "Analytics": "التحاليل", "The information being sent to us to help make %(brand)s better includes:": "تحتوي المعلومات التي تُرسل إلينا للمساعدة بتحسين جودة %(brand)s الآتي:", @@ -59,120 +59,120 @@ "Checking for an update...": "البحث عن تحديث …", "powered by Matrix": "مشغل بواسطة Matrix", "The platform you're on": "المنصة الحالية", - "Your language of choice": "اللغة المختارة", - "e.g. %(exampleValue)s": "مثال %(exampleValue)s", - "Use Single Sign On to continue": "استخدم تسجيل الدخول الموحد للاستمرار", - "Confirm adding this email address by using Single Sign On to prove your identity.": "اكد اضافة بريدك الالكتروني عن طريق الدخول الموحد (SSO) لتثبت هويتك.", - "Single Sign On": "تسجيل الدخول الموحد", - "Confirm adding email": "تأكيد اضافة بريدك الالكتروني", - "Click the button below to confirm adding this email address.": "انقر على الزر ادناه لتأكد اضافة هذا البريد الالكتروني.", - "Confirm": "تأكيد", - "Add Email Address": "اضافة بريد الكتروني", - "Confirm adding this phone number by using Single Sign On to prove your identity.": "قم بتأكيد اضافة رقم الهاتف هذا باستخدام تقنية الدخول الموحد لتثبت هويتك.", - "Confirm adding phone number": "قم بتأكيد اضافة رقم الهاتف", - "Click the button below to confirm adding this phone number.": "انقر الزر ادناه لتأكيد اضافة رقم الهاتف.", - "Add Phone Number": "اضافة رقم هاتف", - "Which officially provided instance you are using, if any": "التي تقدم البيئة التي تستخدمها بشكل رسمي، اذا كان هناك", - "Whether you're using %(brand)s on a device where touch is the primary input mechanism": "عندما تستخدم %(brand)s على جهاز تكون شاشة اللمس هي طريقة الادخال الرئيسية", - "Whether or not you're using the 'breadcrumbs' feature (avatars above the room list)": "اذا كنت تستخدم او لا تستخدم ميزة 'breadcrumbs' (الافاتار فوق قائمة الغرف)", - "Whether you're using %(brand)s as an installed Progressive Web App": "اذا كنت تستخدم %(brand)s كتطبيق ويب", - "Your user agent": "وكيل المستخدم الخاص بك", - "Unable to load! Check your network connectivity and try again.": "غير قادر على التحميل! قم فحص اتصالك الشبكي وحاول مرة اخرى.", - "Call Timeout": "مهلة الاتصال", - "Call failed due to misconfigured server": "فشل الاتصال بسبب إعداد السيرفر بشكل خاطئ", - "Please ask the administrator of your homeserver (%(homeserverDomain)s) to configure a TURN server in order for calls to work reliably.": "يرجى مطالبة مسئول سيرفرك (%(homeserverDomain)s) بإعداد سيرفر TURN لكي تعمل المكالمات بشكل صحيح.", - "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.": "بدلاً من ذلك، يمكنك محاولة استخدام السيرفر العام على turn.matrix.org، ولكن هذا لن يكون موثوقًا به، وسيشارك عنوان IP الخاص بك مع هذا السيرفر. يمكنك أيضًا تعديل ذلك في الإعدادات.", - "Try using turn.matrix.org": "جرب استخدام turn.matrix.org", - "OK": "حسنا", - "Unable to capture screen": "غير قادر على التقاط الشاشة", - "Call Failed": "فل الاتصال", - "You are already in a call.": "أنت بالفعل في مكالمة.", + "Your language of choice": "اللغة التي تريد", + "e.g. %(exampleValue)s": "مثال: %(exampleValue)s", + "Use Single Sign On to continue": "استعمل الولوج الموحّد للمواصلة", + "Confirm adding this email address by using Single Sign On to prove your identity.": "أكّد إضافتك لعنوان البريد هذا باستعمال الولوج الموحّد لإثبات هويّتك.", + "Single Sign On": "الولوج الموحّد", + "Confirm adding email": "أكّد إضافة البريد الإلكتروني", + "Click the button below to confirm adding this email address.": "انقر الزر أسفله لتأكيد إضافة عنوان البريد الإلكتروني هذا.", + "Confirm": "أكّد", + "Add Email Address": "أضِف بريدًا إلكترونيًا", + "Confirm adding this phone number by using Single Sign On to prove your identity.": "أكّد إضافتك لرقم الهاتف هذا باستعمال الولوج الموحّد لإثبات هويّتك.", + "Confirm adding phone number": "أكّد إضافة رقم الهاتف", + "Click the button below to confirm adding this phone number.": "انقر الزر أسفله لتأكيد إضافة رقم الهاتف هذا", + "Add Phone Number": "أضِف رقم الهاتف", + "Which officially provided instance you are using, if any": "السيرورة المقدّمة رسميًا التي تستعملها، لو وُجدت", + "Whether you're using %(brand)s on a device where touch is the primary input mechanism": "فيما إذا كنت تستعمل %(brand)s على جهاز اللمس فيه هو طريقة الإدخال الرئيسة", + "Whether or not you're using the 'breadcrumbs' feature (avatars above the room list)": "", + "Whether you're using %(brand)s as an installed Progressive Web App": "فيما إذا كنت تستعمل %(brand)s كتطبيق وِب تدرّجي", + "Your user agent": "وكيل المستخدم الذي تستعمله", + "Unable to load! Check your network connectivity and try again.": "تعذر التحميل! افحص اتصالك بالشبكة وأعِد المحاولة.", + "Call Timeout": "انتهت مهلة الاتصال", + "Call failed due to misconfigured server": "فشل الاتصال بسبب سوء ضبط الخادوم", + "Please ask the administrator of your homeserver (%(homeserverDomain)s) to configure a TURN server in order for calls to work reliably.": "من فضلك اطلب من مسؤول الخادوم المنزل الذي تستعمله (%(homeserverDomain)s) أن يضبط خادوم TURN كي تعمل الاتصالات بنحوٍ يكون محط ثقة.", + "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.": "أو يمكنك محاولة الخادوم العمومي turn.matrix.org إلا أنه لن يكون محطّ ثقة إذ سيُشارك عنوان IP لديك بذاك الخادوم. يمكنك أيضًا إدارة هذا من الإعدادات.", + "Try using turn.matrix.org": "جرّب استعمال turn.matrix.org", + "OK": "حسنًا", + "Unable to capture screen": "تعذر التقاط الشاشة", + "Call Failed": "فشل الاتصال", + "You are already in a call.": "تُجري مكالمة الآن.", "VoIP is unsupported": "تقنية VoIP غير مدعومة", - "You cannot place VoIP calls in this browser.": "لايمكنك اجراء مكالمات VoIP عبر هذا المتصفح.", - "A call is currently being placed!": "يتم حاليًا إجراء مكالمة!", - "A call is already in progress!": "المكالمة جارية بالفعل!", - "Permission Required": "مطلوب صلاحية", - "You do not have permission to start a conference call in this room": "ليس لديك صلاحية لبدء مكالمة جماعية في هذه الغرفة", - "Replying With Files": "الرد مع الملفات", - "At this time it is not possible to reply with a file. Would you like to upload this file without replying?": "في الوقت الحالي ، لا يمكن الرد مع ملف. هل تريد تحميل هذا الملف بدون رد؟", - "The file '%(fileName)s' failed to upload.": "فشل في رفع الملف '%(fileName)s'.", - "The file '%(fileName)s' exceeds this homeserver's size limit for uploads": "إن حجم الملف '%(fileName)s' يتجاوز الحد المسموح به للرفع في السيرفر", + "You cannot place VoIP calls in this browser.": "لا يمكنك إجراء مكالمات VoIP عبر هذا المتصفح.", + "A call is currently being placed!": "يجري إجراء المكالمة!", + "A call is already in progress!": "تُجري مكالمة الآن فعلًا!", + "Permission Required": "التصريح مطلوب", + "You do not have permission to start a conference call in this room": "ينقصك تصريح بدء مكالمة جماعية في هذه الغرفة", + "Replying With Files": "الرد مع ملفات", + "At this time it is not possible to reply with a file. Would you like to upload this file without replying?": "لا يمكنك حاليًا إرسال رد مع ملف. أتريد رفع الملف دون الرد؟", + "The file '%(fileName)s' failed to upload.": "فشل رفع الملف ”%(fileName)s“.", + "The file '%(fileName)s' exceeds this homeserver's size limit for uploads": "حجم الملف ”%(fileName)s“ يتجاوز الحجم الأقصى الذي يسمح به الخادوم المنزل", "Upload Failed": "فشل الرفع", - "Server may be unavailable, overloaded, or you hit a bug.": "قد يكون السيرفر غير متوفر، او محملا بشكل زائد او انك طلبت ميزة بها مشكلة.", - "The server does not support the room version specified.": "السيرفر لا يدعم إصدار الغرفة المحدد.", - "Failure to create room": "فشل في انشاء الغرفة", + "Server may be unavailable, overloaded, or you hit a bug.": "قد لا يكون الخادوم متاحًا، أو أن عليه ضغط، أو أنك واجهت علة.", + "The server does not support the room version specified.": "لا يدعم الخادوم إصدارة الغرفة المحدّدة.", + "Failure to create room": "فشل إنشاء الغرفة", "Cancel entering passphrase?": "هل تريد إلغاء إدخال عبارة المرور؟", "Are you sure you want to cancel entering passphrase?": "هل أنت متأكد من أنك تريد إلغاء إدخال عبارة المرور؟", "Go Back": "الرجوع للخلف", "Setting up keys": "إعداد المفاتيح", - "Sun": "احد", - "Mon": "اثنين", - "Tue": "ثلاثاء", - "Wed": "اربعاء", - "Thu": "خميس", - "Fri": "جمعة", - "Sat": "سبت", + "Sun": "الأحد", + "Mon": "الإثنين", + "Tue": "الثلاثاء", + "Wed": "الأربعاء", + "Thu": "الخميس", + "Fri": "الجمعة", + "Sat": "السبت", "Jan": "يناير", "Feb": "فبراير", "Mar": "مارس", - "Apr": "ابريل", + "Apr": "أبريل", "May": "مايو", "Jun": "يونيو", "Jul": "يوليو", - "Aug": "اغسطس", + "Aug": "أغسطس", "Sep": "سبتمبر", - "Oct": "اكتوبر", + "Oct": "أكتوبر", "Nov": "نوفمبر", "Dec": "ديسمبر", - "PM": "مساء", - "AM": "صباحا", - "%(weekDayName)s %(time)s": "%(weekDayName)s %(time)s", - "%(weekDayName)s, %(monthName)s %(day)s %(time)s": "%(weekDayName)s, %(monthName)s %(day)s %(time)s", + "PM": "م", + "AM": "ص", + "%(weekDayName)s %(time)s": "%(weekDayName)s ‏%(time)s", + "%(weekDayName)s, %(monthName)s %(day)s %(time)s": "", "%(weekDayName)s, %(monthName)s %(day)s %(fullYear)s": "%(weekDayName)s, %(monthName)s %(day)s %(fullYear)s", "%(weekDayName)s, %(monthName)s %(day)s %(fullYear)s %(time)s": "%(weekDayName)s, %(monthName)s %(day)s %(fullYear)s %(time)s", - "Who would you like to add to this community?": "هل ترغب في اضافة هذا المجتمع؟", - "Warning: any person you add to a community will be publicly visible to anyone who knows the community ID": "تحذير: أي شخص تضيفه إلى مجتمع سيكون مرئيًا للعامة لأي شخص يعرف معرف المجتمع", - "Invite new community members": "دعوى اعضاء جدد للمجتمع", - "Name or Matrix ID": "الاسم او معرف Matrix", - "Invite to Community": "دعوة الى المجتمع", - "Which rooms would you like to add to this community?": "ما هي الغرف التي ترغب في إضافتها إلى هذا المجتمع؟", - "Show these rooms to non-members on the community page and room list?": "هل تريد إظهار هذه الغرف لغير الأعضاء في صفحة المجتمع وقائمة الغرف؟", - "Add rooms to the community": "اضافة غرف الى المجتمع", - "Room name or address": "اسم او عنوان الغرفة", - "Add to community": "اضافة لمجتمع", - "Failed to invite the following users to %(groupId)s:": "فشل في اضافة المستخدمين التاليين الى %(groupId)s:", - "Failed to invite users to community": "فشل دعوة المستخدمين إلى المجتمع", - "Failed to invite users to %(groupId)s": "فشل في دعوة المستخدمين الى %(groupId)s", - "Failed to add the following rooms to %(groupId)s:": "فشل في اضافة الغرف التالية الى %(groupId)s:", + "Who would you like to add to this community?": "مَن تريد إضافته إلى هذا المجتمع؟", + "Warning: any person you add to a community will be publicly visible to anyone who knows the community ID": "تحذير: كلّ من تُضيفه إلى أحد المجتمعات سيكون ظاهرًا لكل من يعرف معرّف المجتمع", + "Invite new community members": "ادعُ أعضاء جدد إلى المجتمع", + "Name or Matrix ID": "الاسم أو معرّف «ماترِكس", + "Invite to Community": "ادعُ إلى المجتمع", + "Which rooms would you like to add to this community?": "ما الغرف التي تُريد إضافتها إلى هذا المجتمع؟", + "Show these rooms to non-members on the community page and room list?": "أتريد عرض هذه الغرف على غير المسجلين كأعضاء في صفحة المجتمع وقائمة الغُرف؟", + "Add rooms to the community": "أضِف غرف إلى المجتمع", + "Room name or address": "اسم الغرفة أو العنوان", + "Add to community": "أضِف إلى المجتمع", + "Failed to invite the following users to %(groupId)s:": "فشلت دعوة المستخدمين الآتية أسمائهم إلى %(groupId)s:", + "Failed to invite users to community": "فشلت دعوة المستخدمين إلى المجتمع", + "Failed to invite users to %(groupId)s": "فشلت دعوة المستخدمين إلى %(groupId)s", + "Failed to add the following rooms to %(groupId)s:": "فشلت إضافة الغرف الآتية إلى %(groupId)s:", "Unnamed Room": "غرفة بدون اسم", - "Identity server has no terms of service": "سيرفر الهوية ليس لديه شروط للخدمة", - "This action requires accessing the default identity server to validate an email address or phone number, but the server does not have any terms of service.": "هذا الحدث يتطلب الوصول الى السيرفر الافتراضي للهوية للتحقق من البريد الالكتروني او رقم الهاتف، ولكن هذا السيرفر ليس لديه اي شروط للخدمة.", - "Only continue if you trust the owner of the server.": "لا تستمر إلا إذا كنت تثق في مالك السيرفر.", - "Trust": "ثِق", - "%(name)s is requesting verification": "%(name)s يطلب التحقق", - "%(brand)s does not have permission to send you notifications - please check your browser settings": "%(brand)s ليس لديه الصلاحية لارسال التنبيهات - يرجى فحص اعدادات متصفحك", - "%(brand)s was not given permission to send notifications - please try again": "لم تعطى الصلاحية ل %(brand)s لارسال التنبيهات - يرجى المحاولة ثانية", - "Unable to enable Notifications": "غير قادر على تفعيل التنبيهات", - "This email address was not found": "لم يتم العثور على البريد الالكتروني هذا", - "Your email address does not appear to be associated with a Matrix ID on this Homeserver.": "يبدو ان بريدك الالكتروني غير مرتبط بمعرف Matrix على هذا السيرفر.", + "Identity server has no terms of service": "ليس لخادوم الهويّة أيّ شروط خدمة", + "This action requires accessing the default identity server to validate an email address or phone number, but the server does not have any terms of service.": "يطلب هذا الإجراء الوصول إلى خادوم الهويّات المبدئيللتثبّت من عنوان البريد الإلكتروني أو رقم الهاتف، ولكن ليس للخادوم أيّ شروط خدمة.", + "Only continue if you trust the owner of the server.": "لا تُواصل لو لم تكن تثق بمالك الخادوم.", + "Trust": "أثق به", + "%(name)s is requesting verification": "يطلب %(name)s التثبّت", + "%(brand)s does not have permission to send you notifications - please check your browser settings": "لا يملك %(brand)s التصريح لإرسال التنبيهات. من فضلك تحقّق من إعدادات المتصفح", + "%(brand)s was not given permission to send notifications - please try again": "لم تقدّم التصريح اللازم كي يُرسل %(brand)s التنبيهات. من فضلك أعِد المحاولة", + "Unable to enable Notifications": "تعذر تفعيل التنبيهات", + "This email address was not found": "لم يوجد عنوان البريد الإلكتروني هذا", + "Your email address does not appear to be associated with a Matrix ID on this Homeserver.": "لا يظهر بأن عنوان بريدك مرتبط بمعرّف «ماترِكس» على الخادوم المنزل هذا.", "Use your account to sign in to the latest version": "استخدم حسابك للدخول الى الاصدار الاخير", "We’re excited to announce Riot is now Element": "نحن سعيدون باعلان ان Riot اصبح الان Element", "Riot is now Element!": "Riot اصبح الان Element!", "Learn More": "تعلم المزيد", - "Sign In or Create Account": "قم بتسجيل الدخول او انشاء حساب جديد", - "Use your account or create a new one to continue.": "استخدم حسابك او قم بانشاء حساب اخر للاستمرار.", - "Create Account": "انشاء حساب", - "Sign In": "الدخول", - "Default": "افتراضي", + "Sign In or Create Account": "لِج أو أنشِئ حسابًا", + "Use your account or create a new one to continue.": "استعمل حسابك أو أنشِئ واحدًا جديدًا للمواصلة.", + "Create Account": "أنشِئ حسابًا", + "Sign In": "لِج", + "Default": "المبدئي", "Restricted": "مقيد", "Moderator": "مشرف", "Admin": "مدير", "Custom (%(level)s)": "(%(level)s) مخصص", - "Failed to invite": "فشل في الدعوة", + "Failed to invite": "فشلت الدعوة", "Operation failed": "فشلت العملية", - "Failed to invite users to the room:": "فشل في دعوة المستخدمين للغرفة:", - "Failed to invite the following users to the %(roomName)s room:": "فشل في دعوة المستخدمين التالية اسمائهم الى الغرفة %(roomName)s:", - "You need to be logged in.": "تحتاج إلى تسجيل الدخول.", + "Failed to invite users to the room:": "فشلت دعوة المستخدمين إلى الغرفة:", + "Failed to invite the following users to the %(roomName)s room:": "فشلت دعوة المستخدمين الآتية أسمائهم إلى غرفة %(roomName)s:", + "You need to be logged in.": "عليك الولوج.", "You need to be able to invite users to do that.": "يجب أن تكون قادرًا على دعوة المستخدمين للقيام بذلك.", "Unable to create widget.": "غير قادر على إنشاء Widget.", "Missing roomId.": "معرف الغرفة مفقود.", @@ -320,15 +320,15 @@ "%(widgetName)s widget modified by %(senderName)s": "الودجت %(widgetName)s تعدلت بواسطة %(senderName)s", "%(widgetName)s widget added by %(senderName)s": "الودجت %(widgetName)s اضيفت بواسطة %(senderName)s", "%(widgetName)s widget removed by %(senderName)s": "الودجت %(widgetName)s حذفت بواسطة %(senderName)s", - "Whether or not you're logged in (we don't record your username)": "سواءً كنت مسجلا دخولك أم لا (لا نحتفظ باسم المستخدم)", - "Every page you use in the app": "كل صفحة تستخدمها في التطبيق", - "e.g. ": "مثلا <رابط الصفحة الحالية>", - "Your device resolution": "دقة شاشة جهازك", - "Where this page includes identifiable information, such as a room, user or group ID, that data is removed before being sent to the server.": "على الرغم من كون هذه الصفحة تحوي معلومات تمكن تحديد الهوية، مثل معرف الغرفة والمستخدم والمجموعة، فهذه البيانات يتم حذفها قبل أن ترسل للسيرفر.", - "The remote side failed to pick up": "الطرف الآخر لم يتمكن من الرد", - "Existing Call": "مكالمة موجودة", + "Whether or not you're logged in (we don't record your username)": "سواءً كنت والجًا أم لا (لا نحتفظ باسم المستخدم)", + "Every page you use in the app": "كل صفحة تستعملها في التطبيق", + "e.g. ": "مثال: <عنوان_الصفحة_الحالية>", + "Your device resolution": "ميز الجهاز لديك", + "Where this page includes identifiable information, such as a room, user or group ID, that data is removed before being sent to the server.": "على الرغم من احتواء هذه الصفحة على معلومات تُحدّد الهويّة (مثل معرّف الغرفة والمستخدم والمجموعة) إلّا أن هذه البيانات تُحذف قبل إرسالها إلى الخادوم.", + "The remote side failed to pick up": "لم يردّ الطرف الآخر", + "Existing Call": "مكالمة جارية", "You cannot place a call with yourself.": "لا يمكنك الاتصال بنفسك.", - "Call in Progress": "المكالمة قيد التحضير", + "Call in Progress": "إجراء المكالمة جارٍ", "Please install Chrome, Firefox, or Safari for the best experience.": "يرجى تثبيت Chrome, Firefox, or Safari for the best experience.", "%(senderName)s removed the rule banning users matching %(glob)s": "%(اسم المرسل)S إزالة القاعدة التي تحظر المستخدمين المتطابقين %(عام)s", "%(senderName)s removed the rule banning rooms matching %(glob)s": "%(اسم المرسل)s إزالة القاعدة التي تحظر الغرف المتطابقة %(عام)s", From 0923eeb2ad4e7bb7b70577598fd54de91872fdaf Mon Sep 17 00:00:00 2001 From: XoseM Date: Sat, 12 Sep 2020 06:36:39 +0000 Subject: [PATCH 023/331] Translated using Weblate (Galician) Currently translated at 100.0% (2373 of 2373 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/element-web/matrix-react-sdk/gl/ --- src/i18n/strings/gl.json | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/gl.json b/src/i18n/strings/gl.json index 8a56fe84e0..82c3453dc5 100644 --- a/src/i18n/strings/gl.json +++ b/src/i18n/strings/gl.json @@ -2476,5 +2476,19 @@ "Take a picture": "Tomar unha foto", "Pin to room": "Fixar a sala", "You can only pin 2 apps at a time": "Só podes fixar 2 apps ó tempo", - "Unpin": "Desafixar" + "Unpin": "Desafixar", + "Group call modified by %(senderName)s": "Chamada en grupo modificada por %(senderName)s", + "Group call started by %(senderName)s": "Chamada en grupo iniciada por %(senderName)s", + "Group call ended by %(senderName)s": "Chamada en grupo rematada por %(senderName)s", + "Cross-signing is ready for use.": "A Sinatura-Cruzada está lista para usar.", + "Cross-signing is not set up.": "Non está configurada a Sinatura-Cruzada.", + "Backup version:": "Versión da copia:", + "Algorithm:": "Algoritmo:", + "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.": "Fai copia de apoio das chaves de cifrado para a continxencia de perder o acceso a todas as sesións. As chaves quedarán aseguradas cunha Chave de Recuperación única.", + "Backup key stored:": "Chave da copia gardada:", + "Backup key cached:": "Chave da copia na caché:", + "Secret storage:": "Almacenaxe segreda:", + "ready": "lista", + "not ready": "non lista", + "Secure Backup": "Copia Segura" } From 91dc346e5ba1bbd0d5a606a6c25cbd4fa6755c19 Mon Sep 17 00:00:00 2001 From: "@a2sc:matrix.org" Date: Sat, 12 Sep 2020 12:56:31 +0000 Subject: [PATCH 024/331] Translated using Weblate (German) Currently translated at 100.0% (2373 of 2373 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.riot.im/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 4deb58887a..d5f71062cd 100644 --- a/src/i18n/strings/de_DE.json +++ b/src/i18n/strings/de_DE.json @@ -1836,7 +1836,7 @@ "Mark all as read": "Alle als gelesen markieren", "Local address": "Lokale Adresse", "Published Addresses": "Öffentliche Adresse", - "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.": "Öffentliche Adressen können von jedem verwendet werden um den Raum zu betreten. Um eine Adresse zu veröffentlichen musst du zunächst eine lokale Adresse anlegen.", + "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.": "Öffentliche Adressen können von jedem/r verwendet werden, um den Raum zu betreten. Um eine Adresse zu veröffentlichen musst du zunächst eine lokale Adresse anlegen.", "Other published addresses:": "Andere öffentliche Adressen:", "No other published addresses yet, add one below": "Keine anderen öffentlichen Adressen vorhanden, füge unten eine hinzu", "New published address (e.g. #alias:server)": "Neue öffentliche Adresse (z.B. #alias:server)", From b857b1a239a6cf434ac1aa35c73a7ad623b0ee58 Mon Sep 17 00:00:00 2001 From: Szimszon Date: Fri, 11 Sep 2020 18:14:04 +0000 Subject: [PATCH 025/331] Translated using Weblate (Hungarian) Currently translated at 100.0% (2373 of 2373 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/element-web/matrix-react-sdk/hu/ --- src/i18n/strings/hu.json | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/hu.json b/src/i18n/strings/hu.json index 1ebc9027d0..648885480b 100644 --- a/src/i18n/strings/hu.json +++ b/src/i18n/strings/hu.json @@ -2476,5 +2476,19 @@ "Take a picture": "Fénykép készítése", "Pin to room": "A szobába kitűz", "You can only pin 2 apps at a time": "Csak 2 alkalmazást tűzhetsz ki egyszerre", - "Unpin": "Leszed" + "Unpin": "Leszed", + "Group call modified by %(senderName)s": "A konferenciahívást módosította: %(senderName)s", + "Group call started by %(senderName)s": "A konferenciahívást elindította: %(senderName)s", + "Group call ended by %(senderName)s": "A konferenciahívást befejezte: %(senderName)s", + "Cross-signing is ready for use.": "Eszközök közötti hitelesítés kész a használatra.", + "Cross-signing is not set up.": "Eszközök közötti hitelesítés nincs beállítva.", + "Backup version:": "Mentés verzió:", + "Algorithm:": "Algoritmus:", + "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.": "Ments el a titkosítási kulcsaidat a fiókadatokkal arra az esetre ha levesztenéd a hozzáférést a munkameneteidhez. A kulcsok egy egyedi visszaállítási kulccsal lesznek védve.", + "Backup key stored:": "Mentési kulcs tár:", + "Backup key cached:": "Mentési kulcs gyorsítótár:", + "Secret storage:": "Biztonsági tároló:", + "ready": "kész", + "not ready": "nem kész", + "Secure Backup": "Biztonsági Mentés" } From 6950159f227a020f3774ed16cbae661e4d73cfe1 Mon Sep 17 00:00:00 2001 From: random Date: Sat, 12 Sep 2020 09:59:05 +0000 Subject: [PATCH 026/331] Translated using Weblate (Italian) Currently translated at 100.0% (2373 of 2373 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/element-web/matrix-react-sdk/it/ --- src/i18n/strings/it.json | 43 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/it.json b/src/i18n/strings/it.json index 48e2b2df20..eb33a8b3a6 100644 --- a/src/i18n/strings/it.json +++ b/src/i18n/strings/it.json @@ -2452,5 +2452,46 @@ "Private rooms can be found and joined by invitation only. Public rooms can be found and joined by anyone in this community.": "Le stanze private possono essere trovate e visitate solo con invito. Le stanze pubbliche invece sono aperte a tutti i membri di questa comunità.", "You might enable this if the room will only be used for collaborating with internal teams on your homeserver. This cannot be changed later.": "Dovresti attivarlo se questa stanza verrà usata solo per collaborazioni tra squadre interne nel tuo homeserver. Non può essere cambiato in seguito.", "You might disable this if the room will be used for collaborating with external teams who have their own homeserver. This cannot be changed later.": "Dovresti disattivarlo se questa stanza verrà usata per collaborazioni con squadre esterne che hanno il loro homeserver. Non può essere cambiato in seguito.", - "Block anyone not part of %(serverName)s from ever joining this room.": "Blocca l'accesso alla stanza per chiunque non faccia parte di %(serverName)s." + "Block anyone not part of %(serverName)s from ever joining this room.": "Blocca l'accesso alla stanza per chiunque non faccia parte di %(serverName)s.", + "Prepends ( ͡° ͜ʖ ͡°) to a plain-text message": "Antepone ( ͡° ͜ʖ ͡°) ad un messaggio di testo", + "Group call modified by %(senderName)s": "Chiamata di gruppo modificata da %(senderName)s", + "Group call started by %(senderName)s": "Chiamata di gruppo iniziata da %(senderName)s", + "Group call ended by %(senderName)s": "Chiamata di gruppo terminata da %(senderName)s", + "Unknown App": "App sconosciuta", + "Cross-signing is ready for use.": "La firma incrociata è pronta all'uso.", + "Cross-signing is not set up.": "La firma incrociata non è impostata.", + "Backup version:": "Versione backup:", + "Algorithm:": "Algoritmo:", + "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.": "Fai il backup delle tue chiavi di crittografia con i dati del tuo account in caso perdessi l'accesso alle sessioni. Le tue chiavi saranno protette con una chiave di recupero univoca.", + "Backup key stored:": "Chiave di backup salvata:", + "Backup key cached:": "Chiave di backup in cache:", + "Secret storage:": "Archivio segreto:", + "ready": "pronto", + "not ready": "non pronto", + "Secure Backup": "Backup Sicuro", + "Privacy": "Privacy", + "%(count)s results|one": "%(count)s risultato", + "Room Info": "Info stanza", + "Apps": "App", + "Unpin app": "Sblocca app", + "Edit apps, bridges & bots": "Modifica app, bridge e bot", + "Add apps, bridges & bots": "Aggiungi app, bridge e bot", + "Not encrypted": "Non cifrato", + "About": "Al riguardo", + "%(count)s people|other": "%(count)s persone", + "%(count)s people|one": "%(count)s persona", + "Show files": "Mostra file", + "Room settings": "Impostazioni stanza", + "Take a picture": "Scatta una foto", + "Pin to room": "Fissa nella stanza", + "You can only pin 2 apps at a time": "Puoi fissare solo 2 app alla volta", + "There was an error updating your community. The server is unable to process your request.": "Si è verificato un errore nell'aggiornamento della comunità. Il server non riesce ad elaborare la richiesta.", + "Update community": "Aggiorna comunità", + "May include members not in %(communityName)s": "Può includere membri non in %(communityName)s", + "Start a conversation with someone using their name, username (like ) or email address. This won't invite them to %(communityName)s. To invite someone to %(communityName)s, click here.": "Inizia una conversazione con qualcuno usando il suo nome, nome utente (come ) o indirizzo email. Ciò non lo inviterà in %(communityName)s. Per invitare qualcuno in %(communityName)s, clicca qui.", + "Unpin": "Sblocca", + "Failed to find the general chat for this community": "Impossibile trovare la chat generale di questa comunità", + "Community settings": "Impostazioni comunità", + "User settings": "Impostazioni utente", + "Community and user menu": "Menu comunità e utente" } From e5e7c873bc041045e73d6b95b7806d655cc807cf Mon Sep 17 00:00:00 2001 From: Kahina Messaoudi Date: Sun, 13 Sep 2020 21:16:40 +0000 Subject: [PATCH 027/331] Translated using Weblate (Kabyle) Currently translated at 99.5% (2360 of 2373 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/element-web/matrix-react-sdk/kab/ --- src/i18n/strings/kab.json | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/kab.json b/src/i18n/strings/kab.json index f5efc1bb87..3b9b08ca6a 100644 --- a/src/i18n/strings/kab.json +++ b/src/i18n/strings/kab.json @@ -2410,5 +2410,33 @@ "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.": "Yegguma ad yeqqen ɣer uqeddac agejdan - ttxil-k·m senqed tuqqna-inek·inem, tḍemneḍ belli aselken n SSL n uqeddac agejdan yettwattkal, rnu aseɣzan n yiminig-nni ur issewḥal ara isutar.", "Your new account (%(newAccountId)s) is registered, but you're already logged into a different account (%(loggedInUserId)s).": "Amiḍan-ik·im amaynut (%(newAccountId)s) yettwaseklas, maca teqqneḍ yakan ɣer umiḍan wayeḍ (%(loggedInUserId)s).", "Your recovery key is a safety net - you can use it to restore access to your encrypted messages if you forget your recovery passphrase.": "Tasarut-ik·im n tririt d azeṭṭa aɣelsan - tzemreḍ ad tt-tesqedceḍ i wakken ad d-terreḍ anekcum ɣer yiznan-ik·im yettwawgelhen ma yella tettuḍ tafyirt-ik·im tuffirt n tririt.", - "Trophy": "Arraz" + "Trophy": "Arraz", + "Prepends ( ͡° ͜ʖ ͡°) to a plain-text message": "Irennu ( ͡° ͜ʖ ͡°) ɣer yizen s uḍris arewway", + "Group call modified by %(senderName)s": "Asiwel n ugraw yettwabeddel sɣur %(senderName)s", + "Group call started by %(senderName)s": "Asiwel n ugraw yebda-t-id %(senderName)s", + "Group call ended by %(senderName)s": "Asiwel n ugraw yekfa-t %(senderName)s", + "Unknown App": "Asnas arussin", + "Cross-signing is ready for use.": "Azmul anmidag yewjed i useqdec.", + "Cross-signing is not set up.": "Azmul anmidag ur yettwasebded ara.", + "Backup version:": "Lqem n uklas:", + "Algorithm:": "Alguritm:", + "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.": "Kkes tisura-k•m n uwgelhen s yisefka n umiḍan-ik•im ma ur tezmireḍ ara ad tkecmeḍ ɣer tɣimiyin-ik•im. Tisura-k•m ad ttwaɣellsent s yiwet n tsarut n tiririt.", + "Backup key stored:": "Tasarut n uklas tettwaḥrez:", + "ready": "yewjed", + "not ready": "ur yewjid ara", + "Secure Backup": "Aklas aɣellsan", + "Privacy": "Tabaḍnit", + "Room Info": "Talɣut ɣef texxamt", + "Apps": "Isnasen", + "Not encrypted": "Ur yettwawgelhen ara", + "About": "Ɣef", + "%(count)s people|other": "%(count)s n yimdanen", + "%(count)s people|one": "%(count)s n umdan", + "Show files": "Sken ifuyla", + "Room settings": "Iɣewwaṛen n texxamt", + "Take a picture": "Ṭṭef tawlaft", + "There was an error updating your community. The server is unable to process your request.": "Tella-d tuccḍa deg uleqqem n temɣiwent-ik•im. Aqeddac ur izmir ara ad isesfer asuter.", + "Update community": "Leqqem tamɣiwent", + "May include members not in %(communityName)s": "Yezmer ad d-isseddu iɛeggalen ur nelli deg %(communityName)s", + "Start a conversation with someone using their name, username (like ) or email address. This won't invite them to %(communityName)s. To invite someone to %(communityName)s, click here.": "Bdu adiwenni akked ḥedd s useqdec n yisem-is, isem uffir (am ) neɣ tansa imayl. Aya ur ten-iecced ara ɣer %(communityName)s. Akked ad d-tnecdeḍ yiwen ɣer %(communityName)s sit ɣef da." } From 06a8ab20fb7d86fcbbd8ed3bf63e0938e3d356aa Mon Sep 17 00:00:00 2001 From: discapacidad5 Date: Sun, 13 Sep 2020 20:35:59 +0000 Subject: [PATCH 028/331] Translated using Weblate (Spanish) Currently translated at 100.0% (2373 of 2373 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/element-web/matrix-react-sdk/es/ --- src/i18n/strings/es.json | 314 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 313 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/es.json b/src/i18n/strings/es.json index 307c8c10c9..34c40800f7 100644 --- a/src/i18n/strings/es.json +++ b/src/i18n/strings/es.json @@ -2135,5 +2135,317 @@ "Explore public rooms": "Buscar salas publicas", "Can't see what you’re looking for?": "¿No encuentras nada de lo que buscas?", "Explore all public rooms": "Buscar todas las salas publicas", - "%(count)s results|other": "%(count)s resultados" + "%(count)s results|other": "%(count)s resultados", + "Prepends ( ͡° ͜ʖ ͡°) to a plain-text message": "Antepone ( ͡° ͜ʖ ͡°) a un mensaje de texto sin formato", + "Group call modified by %(senderName)s": "Llamada grupal modificada por %(senderName)s", + "Group call started by %(senderName)s": "Llamada grupal iniciada por %(senderName)s", + "Group call ended by %(senderName)s": "Llamada de grupo finalizada por %(senderName)s", + "Unknown App": "Aplicación desconocida", + "New spinner design": "Nuevo diseño de ruleta", + "Show message previews for reactions in DMs": "Mostrar vistas previas de mensajes para reacciones en DM", + "Show message previews for reactions in all rooms": "Mostrar vistas previas de mensajes para reacciones en todas las salas", + "Enable advanced debugging for the room list": "Habilite la depuración avanzada para la lista de salas", + "IRC display name width": "Ancho del nombre de visualización de IRC", + "Unknown caller": "Llamador desconocido", + "Cross-signing is ready for use.": "La firma cruzada está lista para su uso.", + "Cross-signing is not set up.": "La firma cruzada no está configurada.", + "Master private key:": "Clave privada maestra:", + "%(brand)s can't securely cache encrypted messages locally while running in a web browser. Use %(brand)s Desktop for encrypted messages to appear in search results.": "%(brand)s no puede almacenar en caché de forma segura mensajes cifrados localmente mientras se ejecuta en un navegador web. Utilizar %(brand)s Escritorio para que los mensajes cifrados aparezcan en los resultados de búsqueda.", + "Backup version:": "Versión de respaldo:", + "Algorithm:": "Algoritmo:", + "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.": "Haga una copia de seguridad de sus claves de cifrado con los datos de su cuenta en caso de que pierda el acceso a sus sesiones. Sus claves estarán protegidas con una clave de recuperación única.", + "Backup key stored:": "Clave de respaldo almacenada:", + "Backup key cached:": "Clave de respaldo almacenada en caché:", + "Secret storage:": "Almacenamiento secreto:", + "ready": "Listo", + "not ready": "no está listo", + "Room ID or address of ban list": "ID de habitación o dirección de la lista de prohibición", + "Secure Backup": "Copia de seguridad segura", + "Privacy": "Intimidad", + "Emoji picker": "Selector de emoji", + "Explore community rooms": "Explore las salas comunitarias", + "Custom Tag": "Etiqueta personalizada", + "%(count)s results|one": "%(count)s resultado", + "Appearance": "Apariencia", + "Show rooms with unread messages first": "Mostrar primero las salas con mensajes no leídos", + "Show previews of messages": "Mostrar vistas previas de mensajes", + "Sort by": "Ordenar por", + "Activity": "Actividad", + "A-Z": "A-Z", + "List options": "Opciones de lista", + "Show %(count)s more|other": "Mostrar %(count)s más", + "Show %(count)s more|one": "Mostrar %(count)s más", + "Use default": "Uso por defecto", + "Mentions & Keywords": "Menciones y palabras clave", + "Notification options": "Opciones de notificación", + "Forget Room": "Olvidar habitación", + "Favourited": "Favorecido", + "Leave Room": "Dejar la habitación", + "Room options": "Opciones de habitación", + "Error creating address": "Error al crear la dirección", + "There was an error creating that address. It may not be allowed by the server or a temporary failure occurred.": "Hubo un error al crear esa dirección. Es posible que el servidor no lo permita o que haya ocurrido una falla temporal.", + "You don't have permission to delete the address.": "No tienes permiso para borrar la dirección.", + "There was an error removing that address. It may no longer exist or a temporary error occurred.": "Se produjo un error al eliminar esa dirección. Puede que ya no exista o se haya producido un error temporal.", + "Error removing address": "Error al eliminar la dirección", + "Room Info": "Información de la habitación", + "Apps": "Aplicaciones", + "Unpin app": "Desanclar aplicación", + "Edit apps, bridges & bots": "Edite aplicaciones, puentes y bots", + "Add apps, bridges & bots": "Agregar aplicaciones, puentes y bots", + "Not encrypted": "No encriptado", + "About": "Acerca de", + "%(count)s people|other": "%(count)s personas", + "%(count)s people|one": "%(count)s persona", + "Show files": "Mostrar archivos", + "Room settings": "Configuración de la habitación", + "You've successfully verified your device!": "¡Ha verificado correctamente su dispositivo!", + "Take a picture": "Toma una foto", + "Pin to room": "Anclar a la habitación", + "You can only pin 2 apps at a time": "Solo puedes anclar 2 aplicaciones a la vez", + "Message deleted on %(date)s": "Mensaje eliminado el %(date)s", + "Edited at %(date)s": "Editado el %(date)s", + "Click to view edits": "Haga clic para ver las ediciones", + "Categories": "Categorías", + "Information": "Información", + "QR Code": "Código QR", + "Room address": "Dirección de la habitación", + "Please provide a room address": "Proporcione una dirección de habitación", + "This address is available to use": "Esta dirección está disponible para usar", + "This address is already in use": "Esta dirección ya está en uso", + "Preparing to download logs": "Preparándose para descargar registros", + "Download logs": "Descargar registros", + "Add another email": "Agregar otro correo electrónico", + "People you know on %(brand)s": "Gente que conoces %(brand)s", + "Show": "Mostrar", + "Send %(count)s invites|other": "Enviar %(count)s invitaciones", + "Send %(count)s invites|one": "Enviar invitación a %(count)s", + "Invite people to join %(communityName)s": "Invita a personas a unirse %(communityName)s", + "There was an error creating your community. The name may be taken or the server is unable to process your request.": "Hubo un error al crear tu comunidad. El nombre puede ser tomado o el servidor no puede procesar su solicitud.", + "Community ID: +:%(domain)s": "ID de comunidad: +:%(domain)s", + "Use this when referencing your community to others. The community ID cannot be changed.": "Use esto cuando haga referencia a su comunidad con otras. La identificación de la comunidad no se puede cambiar.", + "You can change this later if needed.": "Puede cambiar esto más tarde si es necesario.", + "What's the name of your community or team?": "¿Cuál es el nombre de tu comunidad o equipo?", + "Enter name": "Ingrese su nombre", + "Add image (optional)": "Agregar imagen (opcional)", + "An image will help people identify your community.": "Una imagen ayudará a las personas a identificar su comunidad.", + "Private rooms can be found and joined by invitation only. Public rooms can be found and joined by anyone.": "Las salas privadas se pueden encontrar y unirse solo con invitación. Cualquier persona puede encontrar y unirse a las salas públicas.", + "Private rooms can be found and joined by invitation only. Public rooms can be found and joined by anyone in this community.": "Las salas privadas se pueden encontrar y unirse solo con invitación. Cualquier persona de esta comunidad puede encontrar salas públicas y unirse a ellas.", + "You might enable this if the room will only be used for collaborating with internal teams on your homeserver. This cannot be changed later.": "Puede habilitar esto si la sala solo se usará para colaborar con equipos internos en su servidor doméstico. Esto no se puede cambiar después.", + "You might disable this if the room will be used for collaborating with external teams who have their own homeserver. This cannot be changed later.": "Puede desactivar esto si la sala se utilizará para colaborar con equipos externos que tengan su propio servidor doméstico. Esto no se puede cambiar después.", + "Create a room in %(communityName)s": "Crea una habitación en %(communityName)s", + "Block anyone not part of %(serverName)s from ever joining this room.": "Bloquea a cualquier persona que no sea parte de %(serverName)s para que no se una a esta sala.", + "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.": "Anteriormente usaste una versión más nueva de %(brand)s con esta sesión. Para volver a utilizar esta versión con cifrado de extremo a extremo, deberá cerrar sesión y volver a iniciar sesión.", + "There was an error updating your community. The server is unable to process your request.": "Hubo un error al actualizar tu comunidad. El servidor no puede procesar su solicitud.", + "Update community": "Actualizar comunidad", + "To continue, use Single Sign On to prove your identity.": "Para continuar, utilice el inicio de sesión único para demostrar su identidad.", + "Confirm to continue": "Confirmar para continuar", + "Click the button below to confirm your identity.": "Haga clic en el botón de abajo para confirmar su identidad.", + "May include members not in %(communityName)s": "Puede incluir miembros que no están en %(communityName)s", + "Start a conversation with someone using their name, username (like ) or email address. This won't invite them to %(communityName)s. To invite someone to %(communityName)s, click here.": "Inicie una conversación con alguien usando su nombre, nombre de usuario (como) o dirección de correo electrónico. Esto no los invitará a %(communityName)s Para invitar a alguien a %(communityName)s, haga clic aquí.", + "You're all caught up.": "Estás al día.", + "Server isn't responding": "El servidor no responde", + "Your server isn't responding to some of your requests. Below are some of the most likely reasons.": "Su servidor no responde a algunas de sus solicitudes. A continuación se presentan algunas de las razones más probables.", + "The server (%(serverName)s) took too long to respond.": "El servidor (%(serverName)s) tardó demasiado en responder.", + "Your firewall or anti-virus is blocking the request.": "Su firewall o antivirus está bloqueando la solicitud.", + "A browser extension is preventing the request.": "Una extensión del navegador impide la solicitud.", + "The server is offline.": "El servidor está desconectado.", + "The server has denied your request.": "El servidor ha denegado su solicitud.", + "Your area is experiencing difficulties connecting to the internet.": "Su área está experimentando dificultades para conectarse a Internet.", + "A connection error occurred while trying to contact the server.": "Se produjo un error de conexión al intentar contactar con el servidor.", + "The server is not configured to indicate what the problem is (CORS).": "El servidor no está configurado para indicar cuál es el problema (CORS).", + "Recent changes that have not yet been received": "Cambios recientes que aún no se han recibido", + "Copy": "Copiar", + "Wrong file type": "Tipo de archivo incorrecto", + "Looks good!": "¡Se ve bien!", + "Wrong Recovery Key": "Clave de recuperación incorrecta", + "Invalid Recovery Key": "Clave de recuperación no válida", + "Security Phrase": "Frase de seguridad", + "Enter your Security Phrase or to continue.": "Ingrese su Frase de seguridad o para continuar.", + "Security Key": "Clave de seguridad", + "Use your Security Key to continue.": "Usa tu llave de seguridad para continuar.", + "Unpin": "Desprender", + "This room is public": "Esta sala es pública", + "Away": "Lejos", + "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.": "Puede utilizar las opciones del servidor personalizado para iniciar sesión en otros servidores Matrix especificando una URL de servidor principal diferente. Esto le permite utilizar %(brand)s con una cuenta Matrix existente en un servidor doméstico diferente.", + "Enter the location of your Element Matrix Services homeserver. It may use your own domain name or be a subdomain of element.io.": "Ingrese la ubicación de su servidor doméstico de Element Matrix Services. Puede usar su propio nombre de dominio o ser un subdominio de element.io.", + "No files visible in this room": "No hay archivos visibles en esta sala", + "Attach files from chat or just drag and drop them anywhere in a room.": "Adjunte archivos desde el chat o simplemente arrástrelos y suéltelos en cualquier lugar de una sala.", + "You’re all caught up": "Estás al día", + "You have no visible notifications in this room.": "No tienes notificaciones visibles en esta sala.", + "Delete the room address %(alias)s and remove %(name)s from the directory?": "¿Eliminar la dirección de la sala %(alias)s y eliminar %(name)s del directorio?", + "delete the address.": "eliminar la dirección.", + "Explore rooms in %(communityName)s": "Explora habitaciones en %(communityName)s", + "Search rooms": "Buscar salas", + "Create community": "Crear comunidad", + "Failed to find the general chat for this community": "No se pudo encontrar el chat general de esta comunidad", + "Security & privacy": "Seguridad y Privacidad", + "All settings": "Todos los ajustes", + "Feedback": "Realimentación", + "Community settings": "Configuración de la comunidad", + "User settings": "Ajustes de usuario", + "Switch to light mode": "Cambiar al modo de luz", + "Switch to dark mode": "Cambiar al modo oscuro", + "Switch theme": "Cambiar tema", + "User menu": "Menú del Usuario", + "Community and user menu": "Menú de comunidad y usuario", + "Failed to perform homeserver discovery": "No se pudo realizar el descubrimiento del servidor doméstico", + "Syncing...": "Sincronizando ...", + "Signing In...": "Iniciando sesión...", + "If you've joined lots of rooms, this might take a while": "Si se ha unido a muchas salas, esto puede llevar un tiempo", + "Create account": "Crear una cuenta", + "Unable to query for supported registration methods.": "No se pueden consultar los métodos de registro admitidos.", + "Registration has been disabled on this homeserver.": "El registro ha sido deshabilitado en este servidor doméstico.", + "Your new account (%(newAccountId)s) is registered, but you're already logged into a different account (%(loggedInUserId)s).": "Su nueva cuenta (%(newAccountId)s) está registrada, pero ya inició sesión en una cuenta diferente (%(loggedInUserId)s).", + "Continue with previous account": "Continuar con la cuenta anterior", + "Log in to your new account.": "Inicie sesión en su nueva cuenta.", + "You can now close this window or log in to your new account.": "Ahora puede cerrar esta ventana o iniciar sesión en su nueva cuenta.", + "Registration Successful": "Registro exitoso", + "Create your account": "Crea tu cuenta", + "Use Recovery Key or Passphrase": "Usar clave de recuperación o frase de contraseña", + "Use Recovery Key": "Usar clave de recuperación", + "Confirm your identity by verifying this login from one of your other sessions, granting it access to encrypted messages.": "Confirme su identidad verificando este inicio de sesión de una de sus otras sesiones, otorgándole acceso a los mensajes cifrados.", + "This requires the latest %(brand)s on your other devices:": "Esto requiere la última %(brand)s en sus otros dispositivos:", + "%(brand)s Web": "%(brand)s Web", + "%(brand)s Desktop": "%(brand)s Escritorio", + "%(brand)s iOS": "%(brand)s iOS", + "%(brand)s Android": "%(brand)s Android", + "or another cross-signing capable Matrix client": "u otro cliente Matrix con capacidad de firma cruzada", + "Without completing security on this session, it won’t have access to encrypted messages.": "Sin completar la seguridad en esta sesión, no tendrá acceso a los mensajes cifrados.", + "Failed to re-authenticate due to a homeserver problem": "No se pudo volver a autenticar debido a un problema con el servidor doméstico", + "Failed to re-authenticate": "No se pudo volver a autenticar", + "Regain access to your account and recover encryption keys stored in this session. Without them, you won’t be able to read all of your secure messages in any session.": "Recupere el acceso a su cuenta y recupere las claves de cifrado almacenadas en esta sesión. Sin ellos, no podrá leer todos sus mensajes seguros en ninguna sesión.", + "Enter your password to sign in and regain access to your account.": "Ingrese su contraseña para iniciar sesión y recuperar el acceso a su cuenta.", + "Forgotten your password?": "¿Olvidaste tu contraseña?", + "Sign in and regain access to your account.": "Inicie sesión y recupere el acceso a su cuenta.", + "You cannot sign in to your account. Please contact your homeserver admin for more information.": "No puede iniciar sesión en su cuenta. Comuníquese con el administrador de su servidor doméstico para obtener más información.", + "You're signed out": "Estás desconectado", + "Clear personal data": "Borrar datos personales", + "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.": "Advertencia: sus datos personales (incluidas las claves de cifrado) todavía se almacenan en esta sesión. Bórrelo si terminó de usar esta sesión o si desea iniciar sesión en otra cuenta.", + "Command Autocomplete": "Comando Autocompletar", + "Community Autocomplete": "Autocompletar de la comunidad", + "DuckDuckGo Results": "Resultados de DuckDuckGo", + "Emoji Autocomplete": "Autocompletar Emoji", + "Notification Autocomplete": "Autocompletar notificación", + "Room Autocomplete": "Autocompletar habitación", + "User Autocomplete": "Autocompletar de usuario", + "Confirm encryption setup": "Confirmar la configuración de cifrado", + "Click the button below to confirm setting up encryption.": "Haga clic en el botón de abajo para confirmar la configuración del cifrado.", + "Safeguard against losing access to encrypted messages & data by backing up encryption keys on your server.": "Protéjase contra la pérdida de acceso a los mensajes y datos cifrados haciendo una copia de seguridad de las claves de cifrado en su servidor.", + "Generate a Security Key": "Generar una llave de seguridad", + "We’ll generate a Security Key for you to store somewhere safe, like a password manager or a safe.": "Generaremos una llave de seguridad para que la guardes en un lugar seguro, como un administrador de contraseñas o una caja fuerte.", + "Enter a Security Phrase": "Ingrese una frase de seguridad", + "Use a secret phrase only you know, and optionally save a Security Key to use for backup.": "Use una frase secreta que solo usted conozca y, opcionalmente, guarde una clave de seguridad para usarla como respaldo.", + "Enter your account password to confirm the upgrade:": "Ingrese la contraseña de su cuenta para confirmar la actualización:", + "Restore your key backup to upgrade your encryption": "Restaure la copia de seguridad de su clave para actualizar su cifrado", + "Restore": "Restaurar", + "You'll need to authenticate with the server to confirm the upgrade.": "Deberá autenticarse con el servidor para confirmar la actualización.", + "Upgrade this session to allow it to verify other sessions, granting them access to encrypted messages and marking them as trusted for other users.": "Actualice esta sesión para permitirle verificar otras sesiones, otorgándoles acceso a mensajes cifrados y marcándolos como confiables para otros usuarios.", + "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.": "Ingrese una frase de seguridad que solo usted conozca, ya que se usa para proteger sus datos. Para estar seguro, no debe volver a utilizar la contraseña de su cuenta.", + "Enter a recovery passphrase": "Ingrese una frase de contraseña de recuperación", + "Great! This recovery passphrase looks strong enough.": "¡Excelente! Esta frase de contraseña de recuperación parece lo suficientemente sólida.", + "That matches!": "¡Eso combina!", + "Use a different passphrase?": "¿Utiliza una frase de contraseña diferente?", + "That doesn't match.": "Eso no coincide.", + "Go back to set it again.": "Regrese para configurarlo nuevamente.", + "Enter your recovery passphrase a second time to confirm it.": "Ingrese su contraseña de recuperación por segunda vez para confirmarla.", + "Confirm your recovery passphrase": "Confirma tu contraseña de recuperación", + "Store your Security Key somewhere safe, like a password manager or a safe, as it’s used to safeguard your encrypted data.": "Guarde su llave de seguridad en un lugar seguro, como un administrador de contraseñas o una caja fuerte, ya que se usa para proteger sus datos cifrados.", + "Download": "Descargar", + "Unable to query secret storage status": "No se puede consultar el estado del almacenamiento secreto", + "Retry": "Reintentar", + "If you cancel now, you may lose encrypted messages & data if you lose access to your logins.": "Si cancela ahora, puede perder mensajes y datos cifrados si pierde el acceso a sus inicios de sesión.", + "You can also set up Secure Backup & manage your keys in Settings.": "También puede configurar la Copia de seguridad segura y administrar sus claves en Configuración.", + "Set up Secure Backup": "Configurar copia de seguridad segura", + "Upgrade your encryption": "Actualice su cifrado", + "Set a Security Phrase": "Establecer una frase de seguridad", + "Confirm Security Phrase": "Confirmar la frase de seguridad", + "Save your Security Key": "Guarde su llave de seguridad", + "Unable to set up secret storage": "No se puede configurar el almacenamiento secreto", + "We'll store an encrypted copy of your keys on our server. Secure your backup with a recovery passphrase.": "Almacenaremos una copia encriptada de sus claves en nuestro servidor. Asegure su copia de seguridad con una contraseña de recuperación.", + "For maximum security, this should be different from your account password.": "Para mayor seguridad, esta debe ser diferente a la contraseña de su cuenta.", + "Set up with a recovery key": "Configurar con una clave de recuperación", + "Please enter your recovery passphrase a second time to confirm.": "Ingrese su contraseña de recuperación por segunda vez para confirmar.", + "Repeat your recovery passphrase...": "Repite tu contraseña de recuperación ...", + "Your recovery key is a safety net - you can use it to restore access to your encrypted messages if you forget your recovery passphrase.": "Su clave de recuperación es una red de seguridad; puede usarla para restaurar el acceso a sus mensajes cifrados si olvida su contraseña de recuperación.", + "Keep a copy of it somewhere secure, like a password manager or even a safe.": "Guarde una copia en un lugar seguro, como un administrador de contraseñas o incluso una caja fuerte.", + "Your recovery key": "Tu clave de recuperación", + "Your recovery key has been copied to your clipboard, paste it to:": "Tu clave de recuperación se ha copiado en tu portapapeles, pégala en:", + "Your recovery key is in your Downloads folder.": "Tu clave de recuperación está en tu carpeta Descargas.", + "Print it and store it somewhere safe": "Imprímelo y guárdalo en un lugar seguro", + "Save it on a USB key or backup drive": "Guárdelo en una llave USB o unidad de respaldo", + "Copy it to your personal cloud storage": "Cópielo a su almacenamiento personal en la nube", + "Your keys are being backed up (the first backup could take a few minutes).": "Se está realizando una copia de seguridad de sus claves (la primera copia de seguridad puede tardar unos minutos).", + "Without setting up Secure Message Recovery, you won't be able to restore your encrypted message history if you log out or use another session.": "Sin configurar Secure Message Recovery, no podrá restaurar su historial de mensajes encriptados si cierra sesión o usa otra sesión.", + "Set up Secure Message Recovery": "Configurar la recuperación segura de mensajes", + "Secure your backup with a recovery passphrase": "Asegure su copia de seguridad con una frase de contraseña de recuperación", + "Make a copy of your recovery key": "Haz una copia de tu clave de recuperación", + "Starting backup...": "Iniciando copia de seguridad ...", + "Success!": "¡Éxito!", + "Create key backup": "Crear copia de seguridad de claves", + "Unable to create key backup": "No se puede crear una copia de seguridad de la clave", + "Without setting up Secure Message Recovery, you'll lose your secure message history when you log out.": "Sin configurar Secure Message Recovery, perderá su historial de mensajes seguros cuando cierre la sesión.", + "If you don't want to set this up now, you can later in Settings.": "Si no desea configurar esto ahora, puede hacerlo más tarde en Configuración.", + "Don't ask again": "No vuelvas a preguntar", + "New Recovery Method": "Nuevo método de recuperación", + "A new recovery passphrase and key for Secure Messages have been detected.": "Se han detectado una nueva contraseña y clave de recuperación para mensajes seguros.", + "If you didn't set the new recovery method, an attacker may be trying to access your account. Change your account password and set a new recovery method immediately in Settings.": "Si no configuró el nuevo método de recuperación, es posible que un atacante esté intentando acceder a su cuenta. Cambie la contraseña de su cuenta y configure un nuevo método de recuperación inmediatamente en Configuración.", + "Go to Settings": "Ir a la configuración", + "Set up Secure Messages": "Configurar mensajes seguros", + "Recovery Method Removed": "Método de recuperación eliminado", + "This session has detected that your recovery passphrase and key for Secure Messages have been removed.": "Esta sesión ha detectado que se han eliminado su contraseña de recuperación y la clave para Mensajes seguros.", + "If you did this accidentally, you can setup Secure Messages on this session which will re-encrypt this session's message history with a new recovery method.": "Si hizo esto accidentalmente, puede configurar Mensajes seguros en esta sesión que volverá a cifrar el historial de mensajes de esta sesión con un nuevo método de recuperación.", + "If you didn't remove the recovery method, an attacker may be trying to access your account. Change your account password and set a new recovery method immediately in Settings.": "Si no eliminó el método de recuperación, es posible que un atacante esté intentando acceder a su cuenta. Cambie la contraseña de su cuenta y configure un nuevo método de recuperación inmediatamente en Configuración.", + "If disabled, messages from encrypted rooms won't appear in search results.": "Si está desactivado, los mensajes de las salas cifradas no aparecerán en los resultados de búsqueda.", + "Disable": "Inhabilitar", + "Not currently indexing messages for any room.": "Actualmente no indexa mensajes para ninguna sala.", + "Currently indexing: %(currentRoom)s": "Actualmente indexando: %(currentRoom)s", + "%(brand)s is securely caching encrypted messages locally for them to appear in search results:": "%(brand)s está almacenando en caché de forma segura los mensajes cifrados localmente para que aparezcan en los resultados de búsqueda:", + "Space used:": "Espacio usado:", + "Indexed messages:": "Mensajes indexados:", + "Indexed rooms:": "Salas indexadas:", + "%(doneRooms)s out of %(totalRooms)s": "%(doneRooms)s fuera de %(totalRooms)s", + "Message downloading sleep time(ms)": "Tiempo de suspensión de descarga de mensajes(ms)", + "Navigation": "Navegación", + "Calls": "Llamadas", + "Room List": "Lista de habitaciones", + "Autocomplete": "Autocompletar", + "Alt": "Alt", + "Alt Gr": "Alt Gr", + "Shift": "Shift", + "Super": "Super", + "Ctrl": "Ctrl", + "Toggle Bold": "Alternar negrita", + "Toggle Italics": "Alternar cursiva", + "Toggle Quote": "Alternar Entrecomillar", + "New line": "Nueva línea", + "Navigate recent messages to edit": "Navegar por mensajes recientes para editar", + "Jump to start/end of the composer": "Saltar al inicio / final del compositor", + "Navigate composer history": "Navegar por el historial del compositor", + "Cancel replying to a message": "Cancelar la respuesta a un mensaje", + "Toggle microphone mute": "Alternar silencio del micrófono", + "Toggle video on/off": "Activar/desactivar video", + "Scroll up/down in the timeline": "Desplazarse hacia arriba o hacia abajo en la línea de tiempo", + "Dismiss read marker and jump to bottom": "Descartar el marcador de lectura y saltar al final", + "Jump to oldest unread message": "Ir al mensaje no leído más antiguo", + "Upload a file": "Cargar un archivo", + "Jump to room search": "Ir a la búsqueda de Salas", + "Navigate up/down in the room list": "Navegar hacia arriba/abajo en la lista de salas", + "Select room from the room list": "Seleccionar sala de la lista de salas", + "Collapse room list section": "Contraer la sección de lista de salas", + "Expand room list section": "Expandir la sección de la lista de salas", + "Clear room list filter field": "Borrar campo de filtro de lista de salas", + "Previous/next unread room or DM": "Sala o DM anterior/siguiente sin leer", + "Previous/next room or DM": "Sala anterior/siguiente o DM", + "Toggle the top left menu": "Alternar el menú superior izquierdo", + "Close dialog or context menu": "Cerrar cuadro de diálogo o menú contextual", + "Activate selected button": "Activar botón seleccionado", + "Toggle right panel": "Alternar panel derecho", + "Toggle this dialog": "Alternar este diálogo", + "Move autocomplete selection up/down": "Mover la selección de autocompletar hacia arriba/abajo", + "Cancel autocomplete": "Cancelar autocompletar", + "Page Up": "Página arriba", + "Page Down": "Página abajo", + "Esc": "Esc", + "Enter": "Enter", + "Space": "Espacio" } From 99811bfc74bf7fedaa6f8fb784363a297585d0cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Priit=20J=C3=B5er=C3=BC=C3=BCt?= Date: Mon, 14 Sep 2020 09:03:36 +0000 Subject: [PATCH 029/331] Translated using Weblate (Estonian) Currently translated at 100.0% (2375 of 2375 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.riot.im/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 5fd83557bd..6855c87efb 100644 --- a/src/i18n/strings/et.json +++ b/src/i18n/strings/et.json @@ -2490,5 +2490,8 @@ "Secret storage:": "Turvahoidla:", "ready": "valmis", "not ready": "ei ole valmis", - "Secure Backup": "Turvaline varundus" + "Secure Backup": "Turvaline varundus", + "End Call": "Lõpeta kõne", + "Remove the group call from the room?": "Kas eemaldame jututoast rühmakõne?", + "You don't have permission to remove the call from the room": "Sinul pole õigusi rühmakõne eemaldamiseks sellest jututoast" } From 2317300a59cf235442cb3f032e1df06cfc2db11b Mon Sep 17 00:00:00 2001 From: Michael Albert Date: Mon, 14 Sep 2020 10:49:24 +0000 Subject: [PATCH 030/331] Translated using Weblate (German) Currently translated at 100.0% (2375 of 2375 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/element-web/matrix-react-sdk/de/ --- src/i18n/strings/de_DE.json | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/i18n/strings/de_DE.json b/src/i18n/strings/de_DE.json index d5f71062cd..2c2f832fc8 100644 --- a/src/i18n/strings/de_DE.json +++ b/src/i18n/strings/de_DE.json @@ -2262,7 +2262,7 @@ "Message layout": "Nachrichtenlayout", "Compact": "Kompakt", "Modern": "Modern", - "Use a system font": "Verwende die System-Schriftart", + "Use a system font": "Verwende eine System-Schriftart", "System font name": "System-Schriftart", "Customise your appearance": "Verändere das Erscheinungsbild", "Appearance Settings only affect this %(brand)s session.": "Einstellungen zum Erscheinungsbild wirken sich nur auf diese %(brand)s Sitzung aus.", @@ -2488,5 +2488,8 @@ "Secret storage:": "Sicherer Speicher:", "ready": "bereit", "not ready": "nicht bereit", - "Secure Backup": "Sicheres Backup" + "Secure Backup": "Sicheres Backup", + "End Call": "Anruf beenden", + "Remove the group call from the room?": "Konferenzgespräch aus diesem Raum entfernen?", + "You don't have permission to remove the call from the room": "Du hast keine Berechtigung um den Konferenzanruf aus dem Raum zu entfernen" } From 475ea4aa2a6c4a8735f024128c1c8b8e03e318e8 Mon Sep 17 00:00:00 2001 From: Szimszon Date: Mon, 14 Sep 2020 09:02:37 +0000 Subject: [PATCH 031/331] Translated using Weblate (Hungarian) Currently translated at 100.0% (2375 of 2375 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/element-web/matrix-react-sdk/hu/ --- src/i18n/strings/hu.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/hu.json b/src/i18n/strings/hu.json index 648885480b..8c797a16b1 100644 --- a/src/i18n/strings/hu.json +++ b/src/i18n/strings/hu.json @@ -2490,5 +2490,8 @@ "Secret storage:": "Biztonsági tároló:", "ready": "kész", "not ready": "nem kész", - "Secure Backup": "Biztonsági Mentés" + "Secure Backup": "Biztonsági Mentés", + "End Call": "Hívás befejezése", + "Remove the group call from the room?": "Törlöd a konferenciahívást a szobából?", + "You don't have permission to remove the call from the room": "A konferencia hívás törléséhez nincs jogosultságod" } From f6a405ffd7bc2101bf380f65258707237e447eda Mon Sep 17 00:00:00 2001 From: Nikita Epifanov Date: Mon, 14 Sep 2020 09:18:15 +0000 Subject: [PATCH 032/331] Translated using Weblate (Russian) Currently translated at 100.0% (2375 of 2375 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.riot.im/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 906f9a7901..0827b920b2 100644 --- a/src/i18n/strings/ru.json +++ b/src/i18n/strings/ru.json @@ -2486,5 +2486,8 @@ "Secure Backup": "Безопасное резервное копирование", "Group call modified by %(senderName)s": "%(senderName)s изменил(а) групповой вызов", "Group call started by %(senderName)s": "Групповой вызов начат %(senderName)s", - "Group call ended by %(senderName)s": "%(senderName)s завершил(а) групповой вызов" + "Group call ended by %(senderName)s": "%(senderName)s завершил(а) групповой вызов", + "End Call": "Завершить звонок", + "Remove the group call from the room?": "Удалить групповой вызов из комнаты?", + "You don't have permission to remove the call from the room": "У вас нет разрешения на удаление звонка из комнаты" } From 9a3dfe5235e8585265cd06008816c9498134fb3a Mon Sep 17 00:00:00 2001 From: random Date: Mon, 14 Sep 2020 13:58:22 +0000 Subject: [PATCH 033/331] Translated using Weblate (Italian) Currently translated at 100.0% (2375 of 2375 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/element-web/matrix-react-sdk/it/ --- src/i18n/strings/it.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/it.json b/src/i18n/strings/it.json index eb33a8b3a6..9730c055ec 100644 --- a/src/i18n/strings/it.json +++ b/src/i18n/strings/it.json @@ -2493,5 +2493,8 @@ "Failed to find the general chat for this community": "Impossibile trovare la chat generale di questa comunità", "Community settings": "Impostazioni comunità", "User settings": "Impostazioni utente", - "Community and user menu": "Menu comunità e utente" + "Community and user menu": "Menu comunità e utente", + "End Call": "Chiudi chiamata", + "Remove the group call from the room?": "Rimuovere la chiamata di gruppo dalla stanza?", + "You don't have permission to remove the call from the room": "Non hai l'autorizzazione per rimuovere la chiamata dalla stanza" } From 5202037eeb3c9f73ab0b8aa65ee3945254cda20a Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Mon, 14 Sep 2020 15:16:29 +0100 Subject: [PATCH 034/331] Retry joinRoom up to 5 times in the case of a 504 GATEWAY TIMEOUT --- src/stores/RoomViewStore.tsx | 25 +++++++++++++++++++------ src/utils/promise.ts | 18 ++++++++++++++++++ 2 files changed, 37 insertions(+), 6 deletions(-) diff --git a/src/stores/RoomViewStore.tsx b/src/stores/RoomViewStore.tsx index a0f0fb8f68..be1141fa1e 100644 --- a/src/stores/RoomViewStore.tsx +++ b/src/stores/RoomViewStore.tsx @@ -18,6 +18,7 @@ limitations under the License. import React from "react"; import {Store} from 'flux/utils'; +import {MatrixError} from "matrix-js-sdk/src/http-api"; import dis from '../dispatcher/dispatcher'; import {MatrixClientPeg} from '../MatrixClientPeg'; @@ -26,6 +27,9 @@ import Modal from '../Modal'; import { _t } from '../languageHandler'; import { getCachedRoomIDForAlias, storeRoomAliasInCache } from '../RoomAliasCache'; import {ActionPayload} from "../dispatcher/payloads"; +import {retry} from "../utils/promise"; + +const NUM_JOIN_RETRY = 5; const INITIAL_STATE = { // Whether we're joining the currently viewed room (see isJoining()) @@ -259,24 +263,32 @@ class RoomViewStore extends Store { }); } - private joinRoom(payload: ActionPayload) { + private async joinRoom(payload: ActionPayload) { this.setState({ joining: true, }); - MatrixClientPeg.get().joinRoom( - this.state.roomAlias || this.state.roomId, payload.opts, - ).then(() => { + + const cli = MatrixClientPeg.get(); + const address = this.state.roomAlias || this.state.roomId; + try { + await retry(() => cli.joinRoom(address, payload.opts), NUM_JOIN_RETRY, (err) => { + // if we received a Gateway timeout then retry + return err.httpStatus === 504; + }); + // We do *not* clear the 'joining' flag because the Room object and/or our 'joined' member event may not // have come down the sync stream yet, and that's the point at which we'd consider the user joined to the // room. dis.dispatch({ action: 'join_room_ready' }); - }, (err) => { + } catch (err) { dis.dispatch({ action: 'join_room_error', err: err, }); + let msg = err.message ? err.message : JSON.stringify(err); console.log("Failed to join room:", msg); + if (err.name === "ConnectionError") { msg = _t("There was an error joining the room"); } else if (err.errcode === 'M_INCOMPATIBLE_ROOM_VERSION') { @@ -296,12 +308,13 @@ class RoomViewStore extends Store { } } } + const ErrorDialog = sdk.getComponent("dialogs.ErrorDialog"); Modal.createTrackedDialog('Failed to join room', '', ErrorDialog, { title: _t("Failed to join room"), description: msg, }); - }); + } } private getInvitingUserId(roomId: string): string { diff --git a/src/utils/promise.ts b/src/utils/promise.ts index d3ae2c3d1b..f828ddfdaf 100644 --- a/src/utils/promise.ts +++ b/src/utils/promise.ts @@ -68,3 +68,21 @@ export function allSettled(promises: Promise[]): Promise(fn: () => Promise, num: number, predicate?: (e: E) => boolean) { + let lastErr: E; + for (let i = 0; i < num; i++) { + try { + const v = await fn(); + // If `await fn()` throws then we won't reach here + return v; + } catch (err) { + if (predicate && !predicate(err)) { + throw err; + } + lastErr = err; + } + } + throw lastErr; +} From 608249745ae3215c51acb6f28a1af61640f0f9e7 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Tue, 15 Sep 2020 13:19:47 +0100 Subject: [PATCH 035/331] Attempt to fix tests some more --- src/languageHandler.tsx | 15 ++++++++++++--- test/i18n-test/languageHandler-test.js | 4 ++-- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/languageHandler.tsx b/src/languageHandler.tsx index d9feec95b1..e699f8e301 100644 --- a/src/languageHandler.tsx +++ b/src/languageHandler.tsx @@ -27,6 +27,7 @@ import PlatformPeg from "./PlatformPeg"; // @ts-ignore - $webapp is a webpack resolve alias pointing to the output directory, see webpack config import webpackLangJsonUrl from "$webapp/i18n/languages.json"; import { SettingLevel } from "./settings/SettingLevel"; +import {retry} from "./utils/promise"; const i18nFolder = 'i18n/'; @@ -327,7 +328,7 @@ export function setLanguage(preferredLangs: string | string[]) { console.error("Unable to find an appropriate language"); } - return getLanguage(i18nFolder + availLangs[langToUse].fileName); + return getLanguageRetry(i18nFolder + availLangs[langToUse].fileName); }).then((langData) => { counterpart.registerTranslations(langToUse, langData); counterpart.setLocale(langToUse); @@ -336,7 +337,7 @@ export function setLanguage(preferredLangs: string | string[]) { // Set 'en' as fallback language: if (langToUse !== "en") { - return getLanguage(i18nFolder + availLangs['en'].fileName); + return getLanguageRetry(i18nFolder + availLangs['en'].fileName); } }).then((langData) => { if (langData) counterpart.registerTranslations('en', langData); @@ -482,7 +483,15 @@ function weblateToCounterpart(inTrs: object): object { return outTrs; } -function getLanguage(langPath: string): object { +async function getLanguageRetry(langPath: string, num = 3): Promise { + return retry(() => getLanguage(langPath), num, e => { + console.log("Failed to load i18n", langPath); + console.error(e); + return true; // always retry + }); +} + +function getLanguage(langPath: string): Promise { return new Promise((resolve, reject) => { request( { method: "GET", url: langPath }, diff --git a/test/i18n-test/languageHandler-test.js b/test/i18n-test/languageHandler-test.js index 7968186e9e..b9bc955269 100644 --- a/test/i18n-test/languageHandler-test.js +++ b/test/i18n-test/languageHandler-test.js @@ -12,11 +12,11 @@ describe('languageHandler', function() { languageHandler.setMissingEntryGenerator(key => key.split("|", 2)[1]); }); - it('translates a string to german', function() { + it('translates a string to german', function(done) { languageHandler.setLanguage('de').then(function() { const translated = languageHandler._t('Rooms'); expect(translated).toBe('Räume'); - }); + }).then(done); }); it('handles plurals', function() { From 8e871c455ce457596bda265a3e6414dd3edd79b0 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Tue, 15 Sep 2020 13:24:20 +0100 Subject: [PATCH 036/331] Fix german i18n test which was previously broken due to async --- __mocks__/browser-request.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/__mocks__/browser-request.js b/__mocks__/browser-request.js index 7d231fb9db..391be7c54f 100644 --- a/__mocks__/browser-request.js +++ b/__mocks__/browser-request.js @@ -1,4 +1,5 @@ const en = require("../src/i18n/strings/en_EN"); +const de = require("../src/i18n/strings/de_DE"); module.exports = jest.fn((opts, cb) => { const url = opts.url || opts.uri; @@ -8,9 +9,15 @@ module.exports = jest.fn((opts, cb) => { "fileName": "en_EN.json", "label": "English", }, + "de": { + "fileName": "de_DE.json", + "label": "German", + }, })); } else if (url && url.endsWith("en_EN.json")) { cb(undefined, {status: 200}, JSON.stringify(en)); + } else if (url && url.endsWith("de_DE.json")) { + cb(undefined, {status: 200}, JSON.stringify(de)); } else { cb(true, {status: 404}, ""); } From d643f908b1a9ab1e8cb45d805845c3f14861dca1 Mon Sep 17 00:00:00 2001 From: linsui Date: Tue, 15 Sep 2020 03:57:38 +0000 Subject: [PATCH 037/331] Translated using Weblate (Chinese (Simplified)) Currently translated at 97.5% (2316 of 2375 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/element-web/matrix-react-sdk/zh_Hans/ --- src/i18n/strings/zh_Hans.json | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/zh_Hans.json b/src/i18n/strings/zh_Hans.json index f1a3af31d7..eaf3b0d329 100644 --- a/src/i18n/strings/zh_Hans.json +++ b/src/i18n/strings/zh_Hans.json @@ -2371,5 +2371,18 @@ "Toggle this dialog": "切换此对话框", "End": "End", "The server is not configured to indicate what the problem is (CORS).": "服务器没有配置为提示错误是什么(CORS)。", - "Activate selected button": "激活选择的按钮" + "Activate selected button": "激活选择的按钮", + "End Call": "结束通话", + "Remove the group call from the room?": "是否从聊天室中移除聊天室?", + "You don't have permission to remove the call from the room": "您没有权限从聊天室中移除此通话", + "Prepends ( ͡° ͜ʖ ͡°) to a plain-text message": "在纯文本消息之前附加 ( ͡° ͜ʖ ͡°)", + "Group call modified by %(senderName)s": "群通话被 %(senderName)s 修改", + "Group call started by %(senderName)s": "%(senderName)s 发起的群通话", + "Group call ended by %(senderName)s": "%(senderName)s 结束了群通话", + "Unknown App": "未知应用", + "Communities v2 prototypes. Requires compatible homeserver. Highly experimental - use with caution.": "社区 v2 原型。需要兼容的主服务器。高度实验性 - 谨慎使用。", + "Cross-signing is ready for use.": "交叉签名已可用。", + "Cross-signing is not set up.": "未设置交叉签名。", + "Backup version:": "备份版本:", + "Algorithm:": "算法:" } From 0e3c478e38d2ef13ef035a464d9dbd577ecde8e5 Mon Sep 17 00:00:00 2001 From: Jeff Huang Date: Tue, 15 Sep 2020 02:22:58 +0000 Subject: [PATCH 038/331] Translated using Weblate (Chinese (Traditional)) Currently translated at 100.0% (2375 of 2375 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.riot.im/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 c7dc5555c4..0a2c16343d 100644 --- a/src/i18n/strings/zh_Hant.json +++ b/src/i18n/strings/zh_Hant.json @@ -2493,5 +2493,8 @@ "Secret storage:": "秘密儲存空間:", "ready": "準備好", "not ready": "尚未準備好", - "Secure Backup": "安全備份" + "Secure Backup": "安全備份", + "End Call": "結束通話", + "Remove the group call from the room?": "從聊天室中移除群組通話?", + "You don't have permission to remove the call from the room": "您沒有從聊天室移除通話的權限" } From c605c3636b92dbf9962d45dc4f47404d1c6ea826 Mon Sep 17 00:00:00 2001 From: LinAGKar Date: Tue, 15 Sep 2020 06:34:18 +0000 Subject: [PATCH 039/331] Translated using Weblate (Swedish) Currently translated at 100.0% (2375 of 2375 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/element-web/matrix-react-sdk/sv/ --- src/i18n/strings/sv.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/sv.json b/src/i18n/strings/sv.json index 8be68c031e..3feee476c6 100644 --- a/src/i18n/strings/sv.json +++ b/src/i18n/strings/sv.json @@ -2423,5 +2423,8 @@ "Secret storage:": "Hemlig lagring:", "ready": "klart", "not ready": "inte klart", - "Secure Backup": "Säker säkerhetskopiering" + "Secure Backup": "Säker säkerhetskopiering", + "End Call": "Avsluta samtal", + "Remove the group call from the room?": "Ta bort gruppsamtalet från rummet?", + "You don't have permission to remove the call from the room": "Du har inte behörighet från att ta bort samtalet från rummet" } From 8cbd67d6117647a51082b1d2bea4205f6282b72e Mon Sep 17 00:00:00 2001 From: Mirza Arnaut Date: Tue, 15 Sep 2020 22:38:43 +0000 Subject: [PATCH 040/331] Translated using Weblate (Bosnian) Currently translated at 0.2% (4 of 2374 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/element-web/matrix-react-sdk/bs/ --- src/i18n/strings/bs.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/bs.json b/src/i18n/strings/bs.json index 9e26dfeeb6..dc4ebda993 100644 --- a/src/i18n/strings/bs.json +++ b/src/i18n/strings/bs.json @@ -1 +1,6 @@ -{} \ No newline at end of file +{ + "Dismiss": "Odbaci", + "Create Account": "Otvori račun", + "Sign In": "Prijavite se", + "Explore rooms": "Istražite sobe" +} From c653e7c5a06bfa8ade2efb1c6f0ab2685fd4c78e Mon Sep 17 00:00:00 2001 From: call_xz Date: Tue, 15 Sep 2020 20:59:48 +0000 Subject: [PATCH 041/331] Translated using Weblate (Japanese) Currently translated at 56.6% (1344 of 2374 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/element-web/matrix-react-sdk/ja/ --- src/i18n/strings/ja.json | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/i18n/strings/ja.json b/src/i18n/strings/ja.json index 4edf415efb..f5c2b89f8c 100644 --- a/src/i18n/strings/ja.json +++ b/src/i18n/strings/ja.json @@ -1319,7 +1319,7 @@ "Set addresses for this room so users can find this room through your homeserver (%(localDomain)s)": "他のユーザーがあなたのホームサーバー (%(localDomain)s) を通じてこの部屋を見つけられるよう、アドレスを設定しましょう", "Enter recovery key": "リカバリキーを入力", "Verify this login": "このログインを承認", - "Signing In...": "サインインしています...", + "Signing In...": "サインイン中...", "If you've joined lots of rooms, this might take a while": "たくさんの部屋に参加している場合は、時間がかかる可能性があります", "Confirm your identity by verifying this login from one of your other sessions, granting it access to encrypted messages.": "このログインを他のセッションで承認し、あなたの認証情報を確認すれば、暗号化されたメッセージへアクセスできるようになります。", "This requires the latest %(brand)s on your other devices:": "最新版の %(brand)s が他のあなたのデバイスで実行されている必要があります:", @@ -1387,5 +1387,15 @@ "Your server": "あなたのサーバー", "Matrix": "Matrix", "Add a new server": "新しいサーバーを追加", - "Server name": "サーバー名" + "Server name": "サーバー名", + "Privacy": "プライバシー", + "Syncing...": "同期中...", + "Log in to your new account.": "新しいアカウントでログインする。", + "Use Recovery Key or Passphrase": "リカバリーキーまたはパスフレーズを使う", + "Use Recovery Key": "リカバリーキーを使う", + "%(brand)s Web": "%(brand)s ウェブ", + "%(brand)s Desktop": "%(brand)s デスクトップ", + "%(brand)s iOS": "%(brand)s iOS", + "%(brand)s Android": "%(brand)s Android", + "Your recovery key": "あなたのリカバリーキー" } From b4af0140d425c03ffe2e8044edf30f1fe8326d7a Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Wed, 16 Sep 2020 12:38:47 -0600 Subject: [PATCH 042/331] Render Jitsi widget state events in a more obvious way A clear improvement to this would be to include join/leave buttons in the tiles, however this is currently deferred. --- res/css/_components.scss | 1 + .../views/messages/_MJitsiWidgetEvent.scss | 55 ++++++++++++++ src/TextForEvent.js | 4 - .../views/messages/MJitsiWidgetEvent.tsx | 74 +++++++++++++++++++ src/components/views/rooms/EventTile.js | 20 ++++- src/i18n/strings/en_EN.json | 4 + 6 files changed, 152 insertions(+), 6 deletions(-) create mode 100644 res/css/views/messages/_MJitsiWidgetEvent.scss create mode 100644 src/components/views/messages/MJitsiWidgetEvent.tsx diff --git a/res/css/_components.scss b/res/css/_components.scss index 54e7436886..26ad802955 100644 --- a/res/css/_components.scss +++ b/res/css/_components.scss @@ -139,6 +139,7 @@ @import "./views/messages/_MEmoteBody.scss"; @import "./views/messages/_MFileBody.scss"; @import "./views/messages/_MImageBody.scss"; +@import "./views/messages/_MJitsiWidgetEvent.scss"; @import "./views/messages/_MNoticeBody.scss"; @import "./views/messages/_MStickerBody.scss"; @import "./views/messages/_MTextBody.scss"; diff --git a/res/css/views/messages/_MJitsiWidgetEvent.scss b/res/css/views/messages/_MJitsiWidgetEvent.scss new file mode 100644 index 0000000000..3e51e89744 --- /dev/null +++ b/res/css/views/messages/_MJitsiWidgetEvent.scss @@ -0,0 +1,55 @@ +/* +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_MJitsiWidgetEvent { + display: grid; + grid-template-columns: 24px minmax(0, 1fr) min-content; + + &::before { + grid-column: 1; + grid-row: 1 / 3; + width: 16px; + height: 16px; + content: ""; + top: 0; + bottom: 0; + left: 0; + right: 0; + mask-repeat: no-repeat; + mask-position: center; + mask-size: contain; + background-color: $composer-e2e-icon-color; // XXX: Variable abuse + margin-top: 4px; + mask-image: url('$(res)/img/element-icons/call/video-call.svg'); + } + + .mx_MJitsiWidgetEvent_title { + font-weight: 600; + font-size: $font-15px; + grid-column: 2; + grid-row: 1; + } + + .mx_MJitsiWidgetEvent_subtitle { + grid-column: 2; + grid-row: 2; + } + + .mx_MJitsiWidgetEvent_title, + .mx_MJitsiWidgetEvent_subtitle { + overflow-wrap: break-word; + } +} diff --git a/src/TextForEvent.js b/src/TextForEvent.js index a76c1f59e6..46e1878d5f 100644 --- a/src/TextForEvent.js +++ b/src/TextForEvent.js @@ -476,10 +476,6 @@ function textForWidgetEvent(event) { const {name: prevName, type: prevType, url: prevUrl} = event.getPrevContent(); const {name, type, url} = event.getContent() || {}; - if (WidgetType.JITSI.matches(type) || WidgetType.JITSI.matches(prevType)) { - return textForJitsiWidgetEvent(event, senderName, url, prevUrl); - } - let widgetName = name || prevName || type || prevType || ''; // Apply sentence case to widget name if (widgetName && widgetName.length > 0) { diff --git a/src/components/views/messages/MJitsiWidgetEvent.tsx b/src/components/views/messages/MJitsiWidgetEvent.tsx new file mode 100644 index 0000000000..1bfefbff6a --- /dev/null +++ b/src/components/views/messages/MJitsiWidgetEvent.tsx @@ -0,0 +1,74 @@ +/* +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 { MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { _t } from "../../../languageHandler"; + +interface IProps { + mxEvent: MatrixEvent; +} + +interface IState { +} + +export default class MJitsiWidgetEvent extends React.PureComponent { + constructor(props) { + super(props); + this.state = {}; + } + + render() { + const url = this.props.mxEvent.getContent()['url']; + const prevUrl = this.props.mxEvent.getPrevContent()['url']; + const senderName = this.props.mxEvent.sender?.name || this.props.mxEvent.getSender(); + + if (!url) { + // removed + return ( +
+
+ {_t("Video conference ended by %(senderName)s", {senderName})} +
+
+ ); + } else if (prevUrl) { + // modified + return ( +
+
+ {_t("Video conference updated by %(senderName)s", {senderName})} +
+
+ {_t("Join the conference at the top of this room.")} +
+
+ ); + } else { + // assume added + return ( +
+
+ {_t("Video conference started by %(senderName)s", {senderName})} +
+
+ {_t("Join the conference at the top of this room.")} +
+
+ ); + } + } +} diff --git a/src/components/views/rooms/EventTile.js b/src/components/views/rooms/EventTile.js index ab9f240f2d..ef9317704d 100644 --- a/src/components/views/rooms/EventTile.js +++ b/src/components/views/rooms/EventTile.js @@ -34,6 +34,7 @@ import * as ObjectUtils from "../../../ObjectUtils"; import MatrixClientContext from "../../../contexts/MatrixClientContext"; import {E2E_STATE} from "./E2EIcon"; import {toRem} from "../../../utils/units"; +import {WidgetType} from "../../../widgets/WidgetType"; const eventTileTypes = { 'm.room.message': 'messages.MessageEvent', @@ -110,6 +111,19 @@ export function getHandlerTile(ev) { } } + // TODO: Enable support for m.widget event type (https://github.com/vector-im/element-web/issues/13111) + if (type === "im.vector.modular.widgets") { + let type = ev.getContent()['type']; + if (!type) { + // deleted/invalid widget - try the past widget type + type = ev.getPrevContent()['type']; + } + + if (WidgetType.JITSI.matches(type)) { + return "messages.MJitsiWidgetEvent"; + } + } + return ev.isState() ? stateEventTileTypes[type] : eventTileTypes[type]; } @@ -619,16 +633,18 @@ export default class EventTile extends React.Component { const msgtype = content.msgtype; const eventType = this.props.mxEvent.getType(); + let tileHandler = getHandlerTile(this.props.mxEvent); + // Info messages are basically information about commands processed on a room const isBubbleMessage = eventType.startsWith("m.key.verification") || (eventType === "m.room.message" && msgtype && msgtype.startsWith("m.key.verification")) || - (eventType === "m.room.encryption"); + (eventType === "m.room.encryption") || + (tileHandler === "messages.MJitsiWidgetEvent"); let isInfoMessage = ( !isBubbleMessage && eventType !== 'm.room.message' && eventType !== 'm.sticker' && eventType !== 'm.room.create' ); - let tileHandler = getHandlerTile(this.props.mxEvent); // If we're showing hidden events in the timeline, we should use the // source tile when there's no regular tile for an event and also for // replace relations (which otherwise would display as a confusing diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index b2b4e01202..9d1d39477c 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -1405,6 +1405,10 @@ "Invalid file%(extra)s": "Invalid file%(extra)s", "Error decrypting image": "Error decrypting image", "Show image": "Show image", + "Video conference ended by %(senderName)s": "Video conference ended by %(senderName)s", + "Video conference updated by %(senderName)s": "Video conference updated by %(senderName)s", + "Join the conference at the top of this room.": "Join the conference at the top of this room.", + "Video conference started by %(senderName)s": "Video conference started by %(senderName)s", "You have ignored this user, so their message is hidden. Show anyways.": "You have ignored this user, so their message is hidden. Show anyways.", "You verified %(name)s": "You verified %(name)s", "You cancelled verifying %(name)s": "You cancelled verifying %(name)s", From 12fb1ee1cf82a2d4c70636681314c5bc1a087a78 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Wed, 16 Sep 2020 12:43:28 -0600 Subject: [PATCH 043/331] Clean up now-unused code --- src/TextForEvent.js | 19 ------------------- src/i18n/strings/en_EN.json | 3 --- 2 files changed, 22 deletions(-) diff --git a/src/TextForEvent.js b/src/TextForEvent.js index 46e1878d5f..c55380bd9b 100644 --- a/src/TextForEvent.js +++ b/src/TextForEvent.js @@ -19,7 +19,6 @@ import { _t } from './languageHandler'; import * as Roles from './Roles'; import {isValid3pidInvite} from "./RoomInvite"; import SettingsStore from "./settings/SettingsStore"; -import {WidgetType} from "./widgets/WidgetType"; import {ALL_RULE_TYPES, ROOM_RULE_TYPES, SERVER_RULE_TYPES, USER_RULE_TYPES} from "./mjolnir/BanList"; function textForMemberEvent(ev) { @@ -501,24 +500,6 @@ function textForWidgetEvent(event) { } } -function textForJitsiWidgetEvent(event, senderName, url, prevUrl) { - if (url) { - if (prevUrl) { - return _t('Group call modified by %(senderName)s', { - senderName, - }); - } else { - return _t('Group call started by %(senderName)s', { - senderName, - }); - } - } else { - return _t('Group call ended by %(senderName)s', { - senderName, - }); - } -} - function textForMjolnirEvent(event) { const senderName = event.getSender(); const {entity: prevEntity} = event.getPrevContent(); diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index 9d1d39477c..01d334505c 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -280,9 +280,6 @@ "%(widgetName)s widget modified by %(senderName)s": "%(widgetName)s widget modified by %(senderName)s", "%(widgetName)s widget added by %(senderName)s": "%(widgetName)s widget added by %(senderName)s", "%(widgetName)s widget removed by %(senderName)s": "%(widgetName)s widget removed by %(senderName)s", - "Group call modified by %(senderName)s": "Group call modified by %(senderName)s", - "Group call started by %(senderName)s": "Group call started by %(senderName)s", - "Group call ended by %(senderName)s": "Group call ended by %(senderName)s", "%(senderName)s removed the rule banning users matching %(glob)s": "%(senderName)s removed the rule banning users matching %(glob)s", "%(senderName)s removed the rule banning rooms matching %(glob)s": "%(senderName)s removed the rule banning rooms matching %(glob)s", "%(senderName)s removed the rule banning servers matching %(glob)s": "%(senderName)s removed the rule banning servers matching %(glob)s", From 1ffc6d5bd34fa2d2e87c0ea533c7cd2d9104cf5f Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Wed, 16 Sep 2020 14:35:50 -0600 Subject: [PATCH 044/331] Make the hangup button do things for conference calls Behaviour constraints: * If you're not in the conference, use a grey button that does nothing. * If you're in the conference, show a button: * If you're able to modify widgets in the room, annotate it in the context of ending the call for everyone and remove the widget. Use a confirmation dialog. * If you're not able to modify widgets in the room, hang up. For this we know that persistent Jitsi widgets will mean that the user is in the call, so we use that to determine if they are actually participating. --- res/css/views/rooms/_MessageComposer.scss | 2 +- src/CallHandler.js | 77 ++++++++++++------- src/WidgetMessaging.js | 11 +++ src/components/views/rooms/MessageComposer.js | 63 +++++++++++++-- src/i18n/strings/en_EN.json | 7 +- src/stores/WidgetStore.ts | 19 +++++ src/widgets/WidgetApi.ts | 7 +- 7 files changed, 144 insertions(+), 42 deletions(-) diff --git a/res/css/views/rooms/_MessageComposer.scss b/res/css/views/rooms/_MessageComposer.scss index a403a8dc4c..71c0db947e 100644 --- a/res/css/views/rooms/_MessageComposer.scss +++ b/res/css/views/rooms/_MessageComposer.scss @@ -217,7 +217,7 @@ limitations under the License. } } - &.mx_MessageComposer_hangup::before { + &.mx_MessageComposer_hangup:not(.mx_AccessibleButton_disabled)::before { background-color: $warning-color; } } diff --git a/src/CallHandler.js b/src/CallHandler.js index ad40332af5..e40c97f025 100644 --- a/src/CallHandler.js +++ b/src/CallHandler.js @@ -70,6 +70,8 @@ import {base32} from "rfc4648"; import QuestionDialog from "./components/views/dialogs/QuestionDialog"; import ErrorDialog from "./components/views/dialogs/ErrorDialog"; +import WidgetStore from "./stores/WidgetStore"; +import ActiveWidgetStore from "./stores/ActiveWidgetStore"; global.mxCalls = { //room_id: MatrixCall @@ -310,6 +312,14 @@ function _onAction(payload) { console.info("Place conference call in %s", payload.room_id); _startCallApp(payload.room_id, payload.type); break; + case 'end_conference': + console.info("Terminating conference call in %s", payload.room_id); + _terminateCallApp(payload.room_id); + break; + case 'hangup_conference': + console.info("Leaving conference call in %s", payload.room_id); + _hangupWithCallApp(payload.room_id); + break; case 'incoming_call': { if (callHandler.getAnyActiveCall()) { @@ -357,10 +367,12 @@ async function _startCallApp(roomId, type) { show: true, }); + // prevent double clicking the call button const room = MatrixClientPeg.get().getRoom(roomId); const currentJitsiWidgets = WidgetUtils.getRoomWidgetsOfType(room, WidgetType.JITSI); - - if (WidgetEchoStore.roomHasPendingWidgetsOfType(roomId, currentJitsiWidgets, WidgetType.JITSI)) { + const hasJitsi = currentJitsiWidgets.length > 0 + || WidgetEchoStore.roomHasPendingWidgetsOfType(roomId, currentJitsiWidgets, WidgetType.JITSI); + if (hasJitsi) { Modal.createTrackedDialog('Call already in progress', '', ErrorDialog, { title: _t('Call in Progress'), description: _t('A call is currently being placed!'), @@ -368,33 +380,6 @@ async function _startCallApp(roomId, type) { return; } - if (currentJitsiWidgets.length > 0) { - console.warn( - "Refusing to start conference call widget in " + roomId + - " a conference call widget is already present", - ); - - if (WidgetUtils.canUserModifyWidgets(roomId)) { - Modal.createTrackedDialog('Already have Jitsi Widget', '', QuestionDialog, { - title: _t('End Call'), - description: _t('Remove the group call from the room?'), - button: _t('End Call'), - cancelButton: _t('Cancel'), - onFinished: (endCall) => { - if (endCall) { - WidgetUtils.setRoomWidget(roomId, currentJitsiWidgets[0].getContent()['id']); - } - }, - }); - } else { - Modal.createTrackedDialog('Already have Jitsi Widget', '', ErrorDialog, { - title: _t('Call in Progress'), - description: _t("You don't have permission to remove the call from the room"), - }); - } - return; - } - const jitsiDomain = Jitsi.getInstance().preferredDomain; const jitsiAuth = await Jitsi.getInstance().getJitsiAuth(); let confId; @@ -444,6 +429,40 @@ async function _startCallApp(roomId, type) { }); } +function _terminateCallApp(roomId) { + Modal.createTrackedDialog('Confirm Jitsi Terminate', '', QuestionDialog, { + hasCancelButton: true, + title: _t("End conference"), + description: _t("Ending the conference will end the call for everyone. Continue?"), + button: _t("End conference"), + onFinished: (proceed) => { + if (!proceed) return; + + // We'll just obliterate them all. There should only ever be one, but might as well + // be safe. + const roomInfo = WidgetStore.instance.getRoom(roomId); + const jitsiWidgets = roomInfo.widgets.filter(w => WidgetType.JITSI.matches(w.type)); + jitsiWidgets.forEach(w => { + // setting invalid content removes it + WidgetUtils.setRoomWidget(roomId, w.id); + }); + }, + }); +} + +function _hangupWithCallApp(roomId) { + const roomInfo = WidgetStore.instance.getRoom(roomId); + if (!roomInfo) return; // "should never happen" clauses go here + + const jitsiWidgets = roomInfo.widgets.filter(w => WidgetType.JITSI.matches(w.type)); + jitsiWidgets.forEach(w => { + const messaging = ActiveWidgetStore.getWidgetMessaging(w.id); + if (!messaging) return; // more "should never happen" words + + messaging.hangup(); + }); +} + // FIXME: Nasty way of making sure we only register // with the dispatcher once if (!global.mxCallHandler) { diff --git a/src/WidgetMessaging.js b/src/WidgetMessaging.js index c68e926ac1..0f8626ec66 100644 --- a/src/WidgetMessaging.js +++ b/src/WidgetMessaging.js @@ -107,6 +107,17 @@ export default class WidgetMessaging { }); } + /** + * Tells the widget to hang up on its call. + * @returns {Promise<*>} Resolves when teh widget has acknowledged the message. + */ + hangup() { + return this.messageToWidget({ + api: OUTBOUND_API_NAME, + action: KnownWidgetActions.Hangup, + }); + } + /** * Request a screenshot from a widget * @return {Promise} To be resolved with screenshot data when it has been generated diff --git a/src/components/views/rooms/MessageComposer.js b/src/components/views/rooms/MessageComposer.js index 81c2ae7a33..3eab58557e 100644 --- a/src/components/views/rooms/MessageComposer.js +++ b/src/components/views/rooms/MessageComposer.js @@ -1,6 +1,7 @@ /* Copyright 2015, 2016 OpenMarket Ltd Copyright 2017, 2018 New Vector Ltd +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. @@ -32,6 +33,10 @@ import {aboveLeftOf, ContextMenu, ContextMenuTooltipButton, useContextMenu} from import AccessibleTooltipButton from "../elements/AccessibleTooltipButton"; import ReplyPreview from "./ReplyPreview"; import {UIFeature} from "../../../settings/UIFeature"; +import WidgetStore from "../../../stores/WidgetStore"; +import WidgetUtils from "../../../utils/WidgetUtils"; +import {UPDATE_EVENT} from "../../../stores/AsyncStore"; +import ActiveWidgetStore from "../../../stores/ActiveWidgetStore"; function ComposerAvatar(props) { const MemberStatusMessageAvatar = sdk.getComponent('avatars.MemberStatusMessageAvatar'); @@ -85,8 +90,15 @@ VideoCallButton.propTypes = { }; function HangupButton(props) { - const AccessibleButton = sdk.getComponent('elements.AccessibleButton'); const onHangupClick = () => { + if (props.isConference) { + dis.dispatch({ + action: props.canEndConference ? 'end_conference' : 'hangup_conference', + room_id: props.roomId, + }); + return; + } + const call = CallHandler.getCallForRoom(props.roomId); if (!call) { return; @@ -98,14 +110,28 @@ function HangupButton(props) { room_id: call.roomId, }); }; - return (); + title={tooltip} + disabled={!canLeaveConference} + /> + ); } HangupButton.propTypes = { roomId: PropTypes.string.isRequired, + isConference: PropTypes.bool.isRequired, + canEndConference: PropTypes.bool, + isInConference: PropTypes.bool, }; const EmojiButton = ({addEmoji}) => { @@ -226,12 +252,17 @@ export default class MessageComposer extends React.Component { this._onRoomViewStoreUpdate = this._onRoomViewStoreUpdate.bind(this); this._onTombstoneClick = this._onTombstoneClick.bind(this); this.renderPlaceholderText = this.renderPlaceholderText.bind(this); + WidgetStore.instance.on(UPDATE_EVENT, this._onWidgetUpdate); + ActiveWidgetStore.on('update', this._onActiveWidgetUpdate); this._dispatcherRef = null; + this.state = { isQuoting: Boolean(RoomViewStore.getQuotingEvent()), tombstone: this._getRoomTombstone(), canSendMessages: this.props.room.maySendMessage(), showCallButtons: SettingsStore.getValue("showCallButtonsInComposer"), + hasConference: WidgetStore.instance.doesRoomHaveConference(this.props.room), + joinedConference: WidgetStore.instance.isJoinedToConferenceIn(this.props.room), }; } @@ -247,6 +278,14 @@ export default class MessageComposer extends React.Component { } }; + _onWidgetUpdate = () => { + this.setState({hasConference: WidgetStore.instance.doesRoomHaveConference(this.props.room)}); + }; + + _onActiveWidgetUpdate = () => { + this.setState({joinedConference: WidgetStore.instance.isJoinedToConferenceIn(this.props.room)}); + }; + componentDidMount() { this.dispatcherRef = dis.register(this.onAction); MatrixClientPeg.get().on("RoomState.events", this._onRoomStateEvents); @@ -277,6 +316,8 @@ export default class MessageComposer extends React.Component { if (this._roomStoreToken) { this._roomStoreToken.remove(); } + WidgetStore.instance.removeListener(UPDATE_EVENT, this._onWidgetUpdate); + ActiveWidgetStore.removeListener('update', this._onActiveWidgetUpdate); dis.unregister(this.dispatcherRef); } @@ -392,9 +433,19 @@ export default class MessageComposer extends React.Component { } if (this.state.showCallButtons) { - if (callInProgress) { + if (this.state.hasConference) { + const canEndConf = WidgetUtils.canUserModifyWidgets(this.props.room.roomId); controls.push( - , + , + ); + } else if (callInProgress) { + controls.push( + , ); } else { controls.push( diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index b2b4e01202..b5ecf26cb7 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -50,12 +50,10 @@ "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!", - "End Call": "End Call", - "Remove the group call from the room?": "Remove the group call from the room?", - "Cancel": "Cancel", - "You don't have permission to remove the call from the room": "You don't have permission to remove the call from the room", "Permission Required": "Permission Required", "You do not have permission to start a conference call in this room": "You do not have permission to start a conference call in this room", + "End conference": "End conference", + "Ending the conference will end the call for everyone. Continue?": "Ending the conference will end the call for everyone. Continue?", "Replying With Files": "Replying With Files", "At this time it is not possible to reply with a file. Would you like to upload this file without replying?": "At this time it is not possible to reply with a file. Would you like to upload this file without replying?", "Continue": "Continue", @@ -143,6 +141,7 @@ "Cancel entering passphrase?": "Cancel entering passphrase?", "Are you sure you want to cancel entering passphrase?": "Are you sure you want to cancel entering passphrase?", "Go Back": "Go Back", + "Cancel": "Cancel", "Setting up keys": "Setting up keys", "Messages": "Messages", "Actions": "Actions", diff --git a/src/stores/WidgetStore.ts b/src/stores/WidgetStore.ts index 10327ce4e9..be2233961b 100644 --- a/src/stores/WidgetStore.ts +++ b/src/stores/WidgetStore.ts @@ -22,6 +22,7 @@ import { AsyncStoreWithClient } from "./AsyncStoreWithClient"; import defaultDispatcher from "../dispatcher/dispatcher"; import SettingsStore from "../settings/SettingsStore"; import WidgetEchoStore from "../stores/WidgetEchoStore"; +import ActiveWidgetStore from "../stores/ActiveWidgetStore"; import WidgetUtils from "../utils/WidgetUtils"; import {SettingLevel} from "../settings/SettingLevel"; import {WidgetType} from "../widgets/WidgetType"; @@ -206,6 +207,24 @@ export default class WidgetStore extends AsyncStoreWithClient { } return roomInfo.widgets; } + + public doesRoomHaveConference(room: Room): boolean { + const roomInfo = this.getRoom(room.roomId); + if (!roomInfo) return false; + + const currentWidgets = roomInfo.widgets.filter(w => WidgetType.JITSI.matches(w.type)); + const hasPendingWidgets = WidgetEchoStore.roomHasPendingWidgetsOfType(room.roomId, [], WidgetType.JITSI); + return currentWidgets.length > 0 || hasPendingWidgets; + } + + public isJoinedToConferenceIn(room: Room): boolean { + const roomInfo = this.getRoom(room.roomId); + if (!roomInfo) return false; + + // A persistent conference widget indicates that we're participating + const widgets = roomInfo.widgets.filter(w => WidgetType.JITSI.matches(w.type)); + return widgets.some(w => ActiveWidgetStore.getWidgetPersistence(w.id)); + } } window.mxWidgetStore = WidgetStore.instance; diff --git a/src/widgets/WidgetApi.ts b/src/widgets/WidgetApi.ts index 672cbf2a56..c25d607948 100644 --- a/src/widgets/WidgetApi.ts +++ b/src/widgets/WidgetApi.ts @@ -39,6 +39,7 @@ export enum KnownWidgetActions { SetAlwaysOnScreen = "set_always_on_screen", ClientReady = "im.vector.ready", Terminate = "im.vector.terminate", + Hangup = "im.vector.hangup", } export type WidgetAction = KnownWidgetActions | string; @@ -119,13 +120,15 @@ export class WidgetApi extends EventEmitter { // Automatically acknowledge so we can move on this.replyToRequest(payload, {}); - } else if (payload.action === KnownWidgetActions.Terminate) { + } else if (payload.action === KnownWidgetActions.Terminate + || payload.action === KnownWidgetActions.Hangup) { // Finalization needs to be async, so postpone with a promise let finalizePromise = Promise.resolve(); const wait = (promise) => { finalizePromise = finalizePromise.then(() => promise); }; - this.emit('terminate', wait); + const emitName = payload.action === KnownWidgetActions.Terminate ? 'terminate' : 'hangup'; + this.emit(emitName, wait); Promise.resolve(finalizePromise).then(() => { // Acknowledge that we're shut down now this.replyToRequest(payload, {}); From f412f8defeab4a6af02722f3c91872b9857de83b Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Wed, 16 Sep 2020 14:59:15 -0600 Subject: [PATCH 045/331] Change copy if the widget is unpinned --- .../views/messages/MJitsiWidgetEvent.tsx | 22 +++++++++++++++---- src/i18n/strings/en_EN.json | 3 ++- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/src/components/views/messages/MJitsiWidgetEvent.tsx b/src/components/views/messages/MJitsiWidgetEvent.tsx index 1bfefbff6a..6f87aaec28 100644 --- a/src/components/views/messages/MJitsiWidgetEvent.tsx +++ b/src/components/views/messages/MJitsiWidgetEvent.tsx @@ -17,6 +17,8 @@ limitations under the License. import React from 'react'; import { MatrixEvent } from "matrix-js-sdk/src/models/event"; import { _t } from "../../../languageHandler"; +import WidgetStore from "../../../stores/WidgetStore"; +import { WidgetType } from "../../../widgets/WidgetType"; interface IProps { mxEvent: MatrixEvent; @@ -36,12 +38,24 @@ export default class MJitsiWidgetEvent extends React.PureComponent WidgetType.JITSI.matches(w.type) && WidgetStore.instance.isPinned(w.id)); + + let joinCopy = _t('Join the conference at the top of this room'); + if (!isPinned) { + joinCopy = _t('Join the conference from the room information card on the right'); + } + if (!url) { // removed return (
- {_t("Video conference ended by %(senderName)s", {senderName})} + {_t('Video conference ended by %(senderName)s', {senderName})}
); @@ -50,10 +64,10 @@ export default class MJitsiWidgetEvent extends React.PureComponent
- {_t("Video conference updated by %(senderName)s", {senderName})} + {_t('Video conference updated by %(senderName)s', {senderName})}
- {_t("Join the conference at the top of this room.")} + {joinCopy}
); @@ -65,7 +79,7 @@ export default class MJitsiWidgetEvent extends React.PureComponent
- {_t("Join the conference at the top of this room.")} + {joinCopy}
); diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index 01d334505c..dc218aefc5 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -1402,9 +1402,10 @@ "Invalid file%(extra)s": "Invalid file%(extra)s", "Error decrypting image": "Error decrypting image", "Show image": "Show image", + "Join the conference at the top of this room": "Join the conference at the top of this room", + "Join the conference from the room information card on the right": "Join the conference from the room information card on the right", "Video conference ended by %(senderName)s": "Video conference ended by %(senderName)s", "Video conference updated by %(senderName)s": "Video conference updated by %(senderName)s", - "Join the conference at the top of this room.": "Join the conference at the top of this room.", "Video conference started by %(senderName)s": "Video conference started by %(senderName)s", "You have ignored this user, so their message is hidden. Show anyways.": "You have ignored this user, so their message is hidden. Show anyways.", "You verified %(name)s": "You verified %(name)s", From 959b8dd31419003d598991785005d34c2d28255d Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Wed, 16 Sep 2020 14:59:40 -0600 Subject: [PATCH 046/331] de-state --- src/components/views/messages/MJitsiWidgetEvent.tsx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/components/views/messages/MJitsiWidgetEvent.tsx b/src/components/views/messages/MJitsiWidgetEvent.tsx index 6f87aaec28..5171780ecc 100644 --- a/src/components/views/messages/MJitsiWidgetEvent.tsx +++ b/src/components/views/messages/MJitsiWidgetEvent.tsx @@ -24,13 +24,9 @@ interface IProps { mxEvent: MatrixEvent; } -interface IState { -} - -export default class MJitsiWidgetEvent extends React.PureComponent { +export default class MJitsiWidgetEvent extends React.PureComponent { constructor(props) { super(props); - this.state = {}; } render() { From dca48b984fa3440e2b78be33f984da459d16327e Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Wed, 16 Sep 2020 15:47:06 -0600 Subject: [PATCH 047/331] Be more sane --- src/components/views/messages/MJitsiWidgetEvent.tsx | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/components/views/messages/MJitsiWidgetEvent.tsx b/src/components/views/messages/MJitsiWidgetEvent.tsx index 5171780ecc..bd161b5ca2 100644 --- a/src/components/views/messages/MJitsiWidgetEvent.tsx +++ b/src/components/views/messages/MJitsiWidgetEvent.tsx @@ -34,15 +34,8 @@ export default class MJitsiWidgetEvent extends React.PureComponent { const prevUrl = this.props.mxEvent.getPrevContent()['url']; const senderName = this.props.mxEvent.sender?.name || this.props.mxEvent.getSender(); - // XXX: We are assuming that there will only be one Jitsi widget per room, which isn't entirely - // safe but if there's more than 1 the user will be super confused anyways - the copy doesn't - // need to concern itself with this. - const roomInfo = WidgetStore.instance.getRoom(this.props.mxEvent.getRoomId()); - const isPinned = roomInfo?.widgets - .some(w => WidgetType.JITSI.matches(w.type) && WidgetStore.instance.isPinned(w.id)); - let joinCopy = _t('Join the conference at the top of this room'); - if (!isPinned) { + if (!WidgetStore.instance.isPinned(this.props.mxEvent.getStateKey())) { joinCopy = _t('Join the conference from the room information card on the right'); } From bfbbf44dfcc85e990eb579bd67aa7782d6280d6a Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Wed, 16 Sep 2020 17:23:37 -0600 Subject: [PATCH 048/331] Add a note to use the desktop builds when seshat isn't available Fixes https://github.com/vector-im/element-web/issues/15184 This is currently temporary design for https://github.com/vector-im/element-web/issues/12896 but does not fix it. --- res/css/_components.scss | 1 + .../views/elements/_DesktopBuildsNotice.scss | 28 ++++ res/css/views/rooms/_SearchBar.scss | 1 + res/img/element-desktop-logo.svg | 157 ++++++++++++++++++ src/SdkConfig.ts | 5 + src/components/structures/FilePanel.js | 4 + src/components/structures/RoomView.tsx | 1 + .../views/elements/DesktopBuildsNotice.tsx | 77 +++++++++ src/components/views/rooms/SearchBar.js | 35 ++-- src/i18n/strings/en_EN.json | 4 + 10 files changed, 299 insertions(+), 14 deletions(-) create mode 100644 res/css/views/elements/_DesktopBuildsNotice.scss create mode 100644 res/img/element-desktop-logo.svg create mode 100644 src/components/views/elements/DesktopBuildsNotice.tsx diff --git a/res/css/_components.scss b/res/css/_components.scss index 54e7436886..4c83dd7a31 100644 --- a/res/css/_components.scss +++ b/res/css/_components.scss @@ -100,6 +100,7 @@ @import "./views/elements/_AccessibleButton.scss"; @import "./views/elements/_AddressSelector.scss"; @import "./views/elements/_AddressTile.scss"; +@import "./views/elements/_DesktopBuildsNotice.scss"; @import "./views/elements/_DirectorySearchBox.scss"; @import "./views/elements/_Dropdown.scss"; @import "./views/elements/_EditableItemList.scss"; diff --git a/res/css/views/elements/_DesktopBuildsNotice.scss b/res/css/views/elements/_DesktopBuildsNotice.scss new file mode 100644 index 0000000000..3672595bf1 --- /dev/null +++ b/res/css/views/elements/_DesktopBuildsNotice.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_DesktopBuildsNotice { + text-align: center; + padding: 0 16px; + + > * { + vertical-align: middle; + } + + > img { + margin-right: 8px; + } +} diff --git a/res/css/views/rooms/_SearchBar.scss b/res/css/views/rooms/_SearchBar.scss index fecc8d78d8..d9f730a8b6 100644 --- a/res/css/views/rooms/_SearchBar.scss +++ b/res/css/views/rooms/_SearchBar.scss @@ -68,3 +68,4 @@ limitations under the License. cursor: pointer; } } + diff --git a/res/img/element-desktop-logo.svg b/res/img/element-desktop-logo.svg new file mode 100644 index 0000000000..2031733ce3 --- /dev/null +++ b/res/img/element-desktop-logo.svg @@ -0,0 +1,157 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/SdkConfig.ts b/src/SdkConfig.ts index b914aaaf6d..7d7caa2d24 100644 --- a/src/SdkConfig.ts +++ b/src/SdkConfig.ts @@ -33,6 +33,11 @@ export const DEFAULTS: ConfigOptions = { // Default conference domain preferredDomain: "jitsi.riot.im", }, + desktopBuilds: { + available: true, + logo: require("../res/img/element-desktop-logo.svg"), + url: "https://element.io/get-started", + }, }; export default class SdkConfig { diff --git a/src/components/structures/FilePanel.js b/src/components/structures/FilePanel.js index 6d618d0b9d..4836b0f554 100644 --- a/src/components/structures/FilePanel.js +++ b/src/components/structures/FilePanel.js @@ -25,6 +25,7 @@ import EventIndexPeg from "../../indexing/EventIndexPeg"; import { _t } from '../../languageHandler'; import BaseCard from "../views/right_panel/BaseCard"; import {RightPanelPhases} from "../../stores/RightPanelStorePhases"; +import DesktopBuildsNotice, {WarningKind} from "../views/elements/DesktopBuildsNotice"; /* * Component which shows the filtered file using a TimelinePanel @@ -222,6 +223,8 @@ class FilePanel extends React.Component {

{_t('Attach files from chat or just drag and drop them anywhere in a room.')}

); + const isRoomEncrypted = this.noRoom ? false : MatrixClientPeg.get().isRoomEncrypted(this.props.roomId); + if (this.state.timelineSet) { // console.log("rendering TimelinePanel for timelineSet " + this.state.timelineSet.room.roomId + " " + // "(" + this.state.timelineSet._timelines.join(", ") + ")" + " with key " + this.props.roomId); @@ -232,6 +235,7 @@ class FilePanel extends React.Component { previousPhase={RightPanelPhases.RoomSummary} withoutScrollContainer > + { searchInProgress={this.state.searchInProgress} onCancelClick={this.onCancelSearchClick} onSearch={this.onSearch} + isRoomEncrypted={this.context.isRoomEncrypted(this.state.room.roomId)} />; } else if (showRoomUpgradeBar) { aux = ; diff --git a/src/components/views/elements/DesktopBuildsNotice.tsx b/src/components/views/elements/DesktopBuildsNotice.tsx new file mode 100644 index 0000000000..688d0669da --- /dev/null +++ b/src/components/views/elements/DesktopBuildsNotice.tsx @@ -0,0 +1,77 @@ +/* +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 EventIndexPeg from "../../../indexing/EventIndexPeg"; +import { _t } from "../../../languageHandler"; +import SdkConfig from "../../../SdkConfig"; +import React from "react"; + +export enum WarningKind { + Files, + Search, +} + +interface IProps { + isRoomEncrypted: boolean; + kind: WarningKind; +} + +export default function DesktopBuildsNotice({isRoomEncrypted, kind}: IProps) { + if (!isRoomEncrypted) return null; + if (EventIndexPeg.get()) return null; + + const {desktopBuilds, brand} = SdkConfig.get(); + + let text = null; + let logo = null; + if (desktopBuilds.available) { + logo = ; + switch(kind) { + case WarningKind.Files: + text = _t("Use the Desktop app to see encrypted files", {}, { + a: sub => ({sub}), + }); + break; + case WarningKind.Search: + text = _t("Use the Desktop app to search encrypted messages", {}, { + a: sub => ({sub}), + }); + break; + } + } else { + switch(kind) { + case WarningKind.Files: + text = _t("This version of %(brand)s does not support viewing encrypted files", {brand}); + break; + case WarningKind.Search: + text = _t("This version of %(brand)s does not support searching encrypted messages", {brand}); + break; + } + } + + // for safety + if (!text) { + console.warn("Unknown desktop builds warning kind: ", kind); + return null; + } + + return ( +
+ {logo} + {text} +
+ ); +} diff --git a/src/components/views/rooms/SearchBar.js b/src/components/views/rooms/SearchBar.js index 767f5a35f5..4bf97aac10 100644 --- a/src/components/views/rooms/SearchBar.js +++ b/src/components/views/rooms/SearchBar.js @@ -1,5 +1,6 @@ /* Copyright 2015, 2016 OpenMarket Ltd +Copyright 2020 The Matrix.org Foundation C.I.C. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -19,6 +20,9 @@ import AccessibleButton from "../elements/AccessibleButton"; import classNames from "classnames"; import { _t } from '../../../languageHandler'; import {Key} from "../../../Keyboard"; +import SdkConfig from "../../../SdkConfig"; +import EventIndexPeg from "../../../indexing/EventIndexPeg"; +import DesktopBuildsNotice, {WarningKind} from "../elements/DesktopBuildsNotice"; export default class SearchBar extends React.Component { constructor(props) { @@ -72,21 +76,24 @@ export default class SearchBar extends React.Component { }); return ( -
-
- - {_t("This Room")} - - - {_t("All Rooms")} - + <> +
+
+ + {_t("This Room")} + + + {_t("All Rooms")} + +
+
+ + +
+
-
- - -
- -
+ + ); } } diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index b2b4e01202..d4053f4418 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -1493,6 +1493,10 @@ "Maximize apps": "Maximize apps", "Popout widget": "Popout widget", "More options": "More options", + "Use the Desktop app to see encrypted files": "Use the Desktop app to see encrypted files", + "Use the Desktop app to search encrypted messages": "Use the Desktop app to search encrypted messages", + "This version of %(brand)s does not support viewing encrypted files": "This version of %(brand)s does not support viewing encrypted files", + "This version of %(brand)s does not support searching encrypted messages": "This version of %(brand)s does not support searching encrypted messages", "Join": "Join", "No results": "No results", "Please create a new issue on GitHub so that we can investigate this bug.": "Please create a new issue on GitHub so that we can investigate this bug.", From e52a02d733505d1a15e0957de9011f2296fffb77 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Wed, 16 Sep 2020 17:26:00 -0600 Subject: [PATCH 049/331] Appease the linter --- src/components/views/messages/MJitsiWidgetEvent.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/views/messages/MJitsiWidgetEvent.tsx b/src/components/views/messages/MJitsiWidgetEvent.tsx index bd161b5ca2..3d191209f9 100644 --- a/src/components/views/messages/MJitsiWidgetEvent.tsx +++ b/src/components/views/messages/MJitsiWidgetEvent.tsx @@ -18,7 +18,6 @@ import React from 'react'; import { MatrixEvent } from "matrix-js-sdk/src/models/event"; import { _t } from "../../../languageHandler"; import WidgetStore from "../../../stores/WidgetStore"; -import { WidgetType } from "../../../widgets/WidgetType"; interface IProps { mxEvent: MatrixEvent; From c3a37544323da3c2d7801114563c597fd57e352a Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Wed, 16 Sep 2020 17:27:45 -0600 Subject: [PATCH 050/331] Appease the linter --- src/components/views/elements/DesktopBuildsNotice.tsx | 4 ++-- src/components/views/rooms/SearchBar.js | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/components/views/elements/DesktopBuildsNotice.tsx b/src/components/views/elements/DesktopBuildsNotice.tsx index 688d0669da..cc5b9174d1 100644 --- a/src/components/views/elements/DesktopBuildsNotice.tsx +++ b/src/components/views/elements/DesktopBuildsNotice.tsx @@ -39,7 +39,7 @@ export default function DesktopBuildsNotice({isRoomEncrypted, kind}: IProps) { let logo = null; if (desktopBuilds.available) { logo = ; - switch(kind) { + switch (kind) { case WarningKind.Files: text = _t("Use the Desktop app to see encrypted files", {}, { a: sub => ({sub}), @@ -52,7 +52,7 @@ export default function DesktopBuildsNotice({isRoomEncrypted, kind}: IProps) { break; } } else { - switch(kind) { + switch (kind) { case WarningKind.Files: text = _t("This version of %(brand)s does not support viewing encrypted files", {brand}); break; diff --git a/src/components/views/rooms/SearchBar.js b/src/components/views/rooms/SearchBar.js index 4bf97aac10..ac637673e4 100644 --- a/src/components/views/rooms/SearchBar.js +++ b/src/components/views/rooms/SearchBar.js @@ -20,8 +20,6 @@ import AccessibleButton from "../elements/AccessibleButton"; import classNames from "classnames"; import { _t } from '../../../languageHandler'; import {Key} from "../../../Keyboard"; -import SdkConfig from "../../../SdkConfig"; -import EventIndexPeg from "../../../indexing/EventIndexPeg"; import DesktopBuildsNotice, {WarningKind} from "../elements/DesktopBuildsNotice"; export default class SearchBar extends React.Component { From 8129333dcc35d4ea8cec32521489e1819cc52f5b Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Wed, 16 Sep 2020 22:38:12 -0600 Subject: [PATCH 051/331] Make the PIP Jitsi look and feel like the 1:1 PIP * Similar sizing * Fix pointers so the jitsi widget doesn't feel clickable when it's not * We might want to introduce click-to-visit-room for the Jitsi widget (like the 1:1 call), however the Jitsi widget has many more controls to worry about * Remove the menu bar from the widget to avoid accidents --- res/css/views/rooms/_AppsDrawer.scss | 4 ++-- res/css/views/voip/_CallContainer.scss | 14 ++++++++++++-- src/components/views/elements/PersistentApp.js | 1 + 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/res/css/views/rooms/_AppsDrawer.scss b/res/css/views/rooms/_AppsDrawer.scss index fee3d61153..b9249d310a 100644 --- a/res/css/views/rooms/_AppsDrawer.scss +++ b/res/css/views/rooms/_AppsDrawer.scss @@ -15,7 +15,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -$MiniAppTileHeight: 114px; +$MiniAppTileHeight: 200px; .mx_AppsDrawer { margin: 5px 5px 5px 18px; @@ -220,7 +220,7 @@ $MiniAppTileHeight: 114px; } .mx_AppTileBody_mini { - height: 112px; + height: $MiniAppTileHeight; width: 100%; overflow: hidden; } diff --git a/res/css/views/voip/_CallContainer.scss b/res/css/views/voip/_CallContainer.scss index 4d26d8a312..650302b7e1 100644 --- a/res/css/views/voip/_CallContainer.scss +++ b/res/css/views/voip/_CallContainer.scss @@ -23,9 +23,16 @@ limitations under the License. z-index: 100; box-shadow: 0px 14px 24px rgba(0, 0, 0, 0.08); - cursor: pointer; + // Disable pointer events for Jitsi widgets to function. Direct + // calls have their own cursor and behaviour, but we need to make + // sure the cursor hits the iframe for Jitsi which will be at a + // different level. + pointer-events: none; .mx_CallPreview { + pointer-events: initial; // restore pointer events so the user can leave/interact + cursor: pointer; + .mx_VideoView { width: 350px; } @@ -37,7 +44,7 @@ limitations under the License. } .mx_AppTile_persistedWrapper div { - min-width: 300px; + min-width: 350px; } .mx_IncomingCallBox { @@ -45,6 +52,9 @@ limitations under the License. background-color: $primary-bg-color; padding: 8px; + pointer-events: initial; // restore pointer events so the user can accept/decline + cursor: pointer; + .mx_IncomingCallBox_CallerInfo { display: flex; direction: row; diff --git a/src/components/views/elements/PersistentApp.js b/src/components/views/elements/PersistentApp.js index 686739a9f7..a3e413151a 100644 --- a/src/components/views/elements/PersistentApp.js +++ b/src/components/views/elements/PersistentApp.js @@ -82,6 +82,7 @@ export default class PersistentApp extends React.Component { showDelete={false} showMinimise={false} miniMode={true} + showMenubar={false} />; } } From e849cd8fe54466468ef6867d0546f43aafe57dc9 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Wed, 16 Sep 2020 18:13:52 -0600 Subject: [PATCH 052/331] Null-check the widget before continuing Deleted widgets should return isPinned=false --- 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 10327ce4e9..f3b8ee1299 100644 --- a/src/stores/WidgetStore.ts +++ b/src/stores/WidgetStore.ts @@ -158,7 +158,8 @@ export default class WidgetStore extends AsyncStoreWithClient { let pinned = roomInfo && roomInfo.pinned[widgetId]; // Jitsi widgets should be pinned by default - if (pinned === undefined && WidgetType.JITSI.matches(this.widgetMap.get(widgetId).type)) pinned = true; + const widget = this.widgetMap.get(widgetId); + if (pinned === undefined && WidgetType.JITSI.matches(widget?.type)) pinned = true; return pinned; } From 55ceb2abd6278b26b8a7d3cdf30ea0703c85088f Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Thu, 17 Sep 2020 09:33:05 -0600 Subject: [PATCH 053/331] speeeeeeling Co-authored-by: J. Ryan Stinnett --- src/WidgetMessaging.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/WidgetMessaging.js b/src/WidgetMessaging.js index 0f8626ec66..9394abf025 100644 --- a/src/WidgetMessaging.js +++ b/src/WidgetMessaging.js @@ -109,7 +109,7 @@ export default class WidgetMessaging { /** * Tells the widget to hang up on its call. - * @returns {Promise<*>} Resolves when teh widget has acknowledged the message. + * @returns {Promise<*>} Resolves when the widget has acknowledged the message. */ hangup() { return this.messageToWidget({ From 849a5e4a3976b7856e0c1efb998ed375c0a5887f Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Thu, 17 Sep 2020 14:58:48 -0600 Subject: [PATCH 054/331] Round the jitsi pip corners --- res/css/views/rooms/_AppsDrawer.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/res/css/views/rooms/_AppsDrawer.scss b/res/css/views/rooms/_AppsDrawer.scss index b9249d310a..244e88ca3e 100644 --- a/res/css/views/rooms/_AppsDrawer.scss +++ b/res/css/views/rooms/_AppsDrawer.scss @@ -223,6 +223,7 @@ $MiniAppTileHeight: 200px; height: $MiniAppTileHeight; width: 100%; overflow: hidden; + border-radius: 8px; } .mx_AppTile .mx_AppTileBody, From feaa5f31eabd94cf34db78bd518a1c85ee31f7be Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Thu, 17 Sep 2020 15:00:35 -0600 Subject: [PATCH 055/331] Match consistency --- src/CallHandler.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/CallHandler.js b/src/CallHandler.js index e40c97f025..3de1566234 100644 --- a/src/CallHandler.js +++ b/src/CallHandler.js @@ -318,7 +318,7 @@ function _onAction(payload) { break; case 'hangup_conference': console.info("Leaving conference call in %s", payload.room_id); - _hangupWithCallApp(payload.room_id); + _hangupCallApp(payload.room_id); break; case 'incoming_call': { @@ -450,7 +450,7 @@ function _terminateCallApp(roomId) { }); } -function _hangupWithCallApp(roomId) { +function _hangupCallApp(roomId) { const roomInfo = WidgetStore.instance.getRoom(roomId); if (!roomInfo) return; // "should never happen" clauses go here From 3707359ec329d0db5cc6aed8f5b340de6c83d6e5 Mon Sep 17 00:00:00 2001 From: Jeff Huang Date: Fri, 18 Sep 2020 02:20:26 +0000 Subject: [PATCH 056/331] Translated using Weblate (Chinese (Traditional)) Currently translated at 100.0% (2376 of 2376 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.riot.im/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 0a2c16343d..6bcd94bd9a 100644 --- a/src/i18n/strings/zh_Hant.json +++ b/src/i18n/strings/zh_Hant.json @@ -2496,5 +2496,8 @@ "Secure Backup": "安全備份", "End Call": "結束通話", "Remove the group call from the room?": "從聊天室中移除群組通話?", - "You don't have permission to remove the call from the room": "您沒有從聊天室移除通話的權限" + "You don't have permission to remove the call from the room": "您沒有從聊天室移除通話的權限", + "Start a conversation with someone using their name or username (like ).": "使用某人的名字或使用者名稱(如 )以與他們開始對話。", + "This won't invite them to %(communityName)s. To invite someone to %(communityName)s, click here": "這不會邀請他們加入 %(communityName)s。要邀請某人加入 %(communityName)s,請點擊這裡", + "Invite someone using their name, username (like ) or share this room.": "使用某人的名字、使用者名稱(如 )或分享此聊天室來邀請他們。" } From 72d40b604e762880cf59cdf3c7e7b75a1608836a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Priit=20J=C3=B5er=C3=BC=C3=BCt?= Date: Thu, 17 Sep 2020 20:42:10 +0000 Subject: [PATCH 057/331] Translated using Weblate (Estonian) Currently translated at 100.0% (2376 of 2376 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.riot.im/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 6855c87efb..15fef484e2 100644 --- a/src/i18n/strings/et.json +++ b/src/i18n/strings/et.json @@ -2493,5 +2493,8 @@ "Secure Backup": "Turvaline varundus", "End Call": "Lõpeta kõne", "Remove the group call from the room?": "Kas eemaldame jututoast rühmakõne?", - "You don't have permission to remove the call from the room": "Sinul pole õigusi rühmakõne eemaldamiseks sellest jututoast" + "You don't have permission to remove the call from the room": "Sinul pole õigusi rühmakõne eemaldamiseks sellest jututoast", + "Start a conversation with someone using their name or username (like ).": "Alusta vestlust kasutades teise osapoole nime või kasutajanime (näiteks ).", + "This won't invite them to %(communityName)s. To invite someone to %(communityName)s, click here": "Sellega ei kutsu sa teda %(communityName)s kogukonna liikmeks. %(communityName)s kogukonna kutse saatmiseks klõpsi siin", + "Invite someone using their name, username (like ) or share this room.": "Kutsu kedagi tema nime, kasutajanime (nagu ) alusel või jaga seda jututuba." } From 2c4a4a13a4cf7a1208fc31f96ab3b9c729a153f7 Mon Sep 17 00:00:00 2001 From: Szimszon Date: Thu, 17 Sep 2020 19:11:16 +0000 Subject: [PATCH 058/331] Translated using Weblate (Hungarian) Currently translated at 100.0% (2376 of 2376 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/element-web/matrix-react-sdk/hu/ --- src/i18n/strings/hu.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/hu.json b/src/i18n/strings/hu.json index 8c797a16b1..0e899ad242 100644 --- a/src/i18n/strings/hu.json +++ b/src/i18n/strings/hu.json @@ -2493,5 +2493,8 @@ "Secure Backup": "Biztonsági Mentés", "End Call": "Hívás befejezése", "Remove the group call from the room?": "Törlöd a konferenciahívást a szobából?", - "You don't have permission to remove the call from the room": "A konferencia hívás törléséhez nincs jogosultságod" + "You don't have permission to remove the call from the room": "A konferencia hívás törléséhez nincs jogosultságod", + "Start a conversation with someone using their name or username (like ).": "Indíts beszélgetést valakivel és használd hozzá a nevét vagy a felhasználói nevét (mint ).", + "This won't invite them to %(communityName)s. To invite someone to %(communityName)s, click here": "Ez nem hívja meg őket ebbe a közösségbe: %(communityName)s. Hogy meghívj valakit ebbe a közösségbe: %(communityName)s kattints ide", + "Invite someone using their name, username (like ) or share this room.": "Hívj meg valakit a nevével, felhasználói nevével (pl. ) vagy oszd meg ezt a szobát." } From adcb75facbefec580207bc976cd652e908e73348 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Fri, 18 Sep 2020 14:34:51 +0100 Subject: [PATCH 059/331] Only show User Info verify button if the other user has e2ee devices Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/components/views/right_panel/UserInfo.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/views/right_panel/UserInfo.js b/src/components/views/right_panel/UserInfo.js index 3171890955..a02b53b413 100644 --- a/src/components/views/right_panel/UserInfo.js +++ b/src/components/views/right_panel/UserInfo.js @@ -1306,7 +1306,7 @@ const BasicUserInfo = ({room, member, groupId, devices, isRoomEncrypted}) => { const showDeviceListSpinner = devices === undefined; if (canVerify) { - if (hasCrossSigningKeys !== undefined) { + if (hasCrossSigningKeys !== undefined && devices.length > 0) { // Note: mx_UserInfo_verifyButton is for the end-to-end tests verifyButton = ( { From e3f7860f30af6faa05b6d5f0c783f7082b02274e Mon Sep 17 00:00:00 2001 From: XoseM Date: Fri, 18 Sep 2020 13:01:03 +0000 Subject: [PATCH 060/331] Translated using Weblate (Galician) Currently translated at 100.0% (2368 of 2368 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/element-web/matrix-react-sdk/gl/ --- src/i18n/strings/gl.json | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/gl.json b/src/i18n/strings/gl.json index 82c3453dc5..51f39758e1 100644 --- a/src/i18n/strings/gl.json +++ b/src/i18n/strings/gl.json @@ -2490,5 +2490,14 @@ "Secret storage:": "Almacenaxe segreda:", "ready": "lista", "not ready": "non lista", - "Secure Backup": "Copia Segura" + "Secure Backup": "Copia Segura", + "End Call": "Finalizar chamada", + "Remove the group call from the room?": "Eliminar a chamada en grupo da sala?", + "You don't have permission to remove the call from the room": "Non tes permiso para eliminar a chamada da sala", + "Safeguard against losing access to encrypted messages & data": "Protéxete de perder o acceso a mensaxes e datos cifrados", + "not found in storage": "non atopado no almacenaxe", + "Start a conversation with someone using their name or username (like ).": "Inicia unha conversa con alguén usando o seu nome ou nome de usuaria (como ).", + "This won't invite them to %(communityName)s. To invite someone to %(communityName)s, click here": "Esto non as convidará a %(communityName)s. Para convidar alguén a %(communityName)s, preme aquí", + "Invite someone using their name, username (like ) or share this room.": "Convida a alguén usando o seu nome, nome de usuaria (como ) ou comparte esta sala.", + "Unable to set up keys": "Non se puideron configurar as chaves" } From 8838bd724b1a23805e61e92565c1992ddc7c88a8 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Fri, 18 Sep 2020 10:58:17 -0600 Subject: [PATCH 061/331] Update copy for files --- src/components/views/elements/DesktopBuildsNotice.tsx | 4 ++-- src/i18n/strings/en_EN.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/views/elements/DesktopBuildsNotice.tsx b/src/components/views/elements/DesktopBuildsNotice.tsx index cc5b9174d1..fd1c7848aa 100644 --- a/src/components/views/elements/DesktopBuildsNotice.tsx +++ b/src/components/views/elements/DesktopBuildsNotice.tsx @@ -41,7 +41,7 @@ export default function DesktopBuildsNotice({isRoomEncrypted, kind}: IProps) { logo = ; switch (kind) { case WarningKind.Files: - text = _t("Use the Desktop app to see encrypted files", {}, { + text = _t("Use the Desktop app to see all encrypted files", {}, { a: sub => ({sub}), }); break; @@ -54,7 +54,7 @@ export default function DesktopBuildsNotice({isRoomEncrypted, kind}: IProps) { } else { switch (kind) { case WarningKind.Files: - text = _t("This version of %(brand)s does not support viewing encrypted files", {brand}); + text = _t("This version of %(brand)s does not support viewing some encrypted files", {brand}); break; case WarningKind.Search: text = _t("This version of %(brand)s does not support searching encrypted messages", {brand}); diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index 024809f214..01fd172879 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -1487,9 +1487,9 @@ "Maximize apps": "Maximize apps", "Popout widget": "Popout widget", "More options": "More options", - "Use the Desktop app to see encrypted files": "Use the Desktop app to see encrypted files", + "Use the Desktop app to see all encrypted files": "Use the Desktop app to see all encrypted files", "Use the Desktop app to search encrypted messages": "Use the Desktop app to search encrypted messages", - "This version of %(brand)s does not support viewing encrypted files": "This version of %(brand)s does not support viewing encrypted files", + "This version of %(brand)s does not support viewing some encrypted files": "This version of %(brand)s does not support viewing some encrypted files", "This version of %(brand)s does not support searching encrypted messages": "This version of %(brand)s does not support searching encrypted messages", "Join": "Join", "No results": "No results", From 7e0b5534e68d78f22f779b9771c3f7c4b3ea6ad8 Mon Sep 17 00:00:00 2001 From: Marcelo Filho Date: Fri, 18 Sep 2020 14:12:02 +0000 Subject: [PATCH 062/331] Translated using Weblate (Portuguese (Brazil)) Currently translated at 94.1% (2229 of 2369 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/element-web/matrix-react-sdk/pt_BR/ --- src/i18n/strings/pt_BR.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/i18n/strings/pt_BR.json b/src/i18n/strings/pt_BR.json index 975281aa00..3276952d28 100644 --- a/src/i18n/strings/pt_BR.json +++ b/src/i18n/strings/pt_BR.json @@ -866,7 +866,7 @@ "Submit debug logs": "Submeter registros de depuração", "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.": "Os registros de depuração contêm dados de uso do aplicativo, incluindo seu nome de usuário, os IDs ou aliases das salas ou comunidades que você visitou e os nomes de usuários de outros usuários. Eles não contêm mensagens.", "Before submitting logs, you must create a GitHub issue to describe your problem.": "Antes de enviar os registros, você deve criar um bilhete de erro no GitHub para descrever seu problema.", - "Unable to load commit detail: %(msg)s": "Não é possível carregar os detalhes do commit: %(msg)s", + "Unable to load commit detail: %(msg)s": "Não foi possível carregar os detalhes do envio: %(msg)s", "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 seu histórico de bate-papo, você precisa exportar as chaves da sua sala antes de se desconectar. Quando entrar novamente, você precisará usar a versão mais atual do %(brand)s", "Incompatible Database": "Banco de dados incompatível", "Continue With Encryption Disabled": "Continuar com criptografia desativada", From 6f7d6f27f1bf1f3cfcc73179a21553b4c76cbd1a Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Fri, 18 Sep 2020 18:15:05 +0100 Subject: [PATCH 063/331] move the check Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/components/views/right_panel/UserInfo.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/views/right_panel/UserInfo.js b/src/components/views/right_panel/UserInfo.js index a02b53b413..a9aebd9b33 100644 --- a/src/components/views/right_panel/UserInfo.js +++ b/src/components/views/right_panel/UserInfo.js @@ -1296,7 +1296,7 @@ const BasicUserInfo = ({room, member, groupId, devices, isRoomEncrypted}) => { const userTrust = cryptoEnabled && cli.checkUserTrust(member.userId); const userVerified = cryptoEnabled && userTrust.isCrossSigningVerified(); const isMe = member.userId === cli.getUserId(); - const canVerify = cryptoEnabled && homeserverSupportsCrossSigning && !userVerified && !isMe; + const canVerify = cryptoEnabled && homeserverSupportsCrossSigning && !userVerified && !isMe && devices.length > 0; const setUpdating = (updating) => { setPendingUpdateCount(count => count + (updating ? 1 : -1)); @@ -1306,7 +1306,7 @@ const BasicUserInfo = ({room, member, groupId, devices, isRoomEncrypted}) => { const showDeviceListSpinner = devices === undefined; if (canVerify) { - if (hasCrossSigningKeys !== undefined && devices.length > 0) { + if (hasCrossSigningKeys !== undefined) { // Note: mx_UserInfo_verifyButton is for the end-to-end tests verifyButton = ( { From 1574dd551020ef370324cca5f427453f8e86e68c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Priit=20J=C3=B5er=C3=BC=C3=BCt?= Date: Fri, 18 Sep 2020 18:23:18 +0000 Subject: [PATCH 064/331] Translated using Weblate (Estonian) Currently translated at 100.0% (2369 of 2369 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.riot.im/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 15fef484e2..2cba9908d1 100644 --- a/src/i18n/strings/et.json +++ b/src/i18n/strings/et.json @@ -2496,5 +2496,15 @@ "You don't have permission to remove the call from the room": "Sinul pole õigusi rühmakõne eemaldamiseks sellest jututoast", "Start a conversation with someone using their name or username (like ).": "Alusta vestlust kasutades teise osapoole nime või kasutajanime (näiteks ).", "This won't invite them to %(communityName)s. To invite someone to %(communityName)s, click here": "Sellega ei kutsu sa teda %(communityName)s kogukonna liikmeks. %(communityName)s kogukonna kutse saatmiseks klõpsi siin", - "Invite someone using their name, username (like ) or share this room.": "Kutsu kedagi tema nime, kasutajanime (nagu ) alusel või jaga seda jututuba." + "Invite someone using their name, username (like ) or share this room.": "Kutsu kedagi tema nime, kasutajanime (nagu ) alusel või jaga seda jututuba.", + "Safeguard against losing access to encrypted messages & data": "Hoia ära, et kaotad ligipääsu krüptitud sõnumitele ja andmetele", + "not found in storage": "ei leidunud turvahoidlas", + "Widgets": "Vidinad", + "Edit widgets, bridges & bots": "Muuda vidinaid, võrgusildu ja roboteid", + "Add widgets, bridges & bots": "Lisa vidinaid, võrgusildu ja roboteid", + "You can only pin 2 widgets at a time": "Korraga saavad kinniklammerdatud olla vaid 2 vidinat", + "Minimize widget": "Vähenda vidinat", + "Maximize widget": "Suurenda vidinat", + "Your server requires encryption to be enabled in private rooms.": "Sinu koduserveri seadistused eeldavad, et mitteavalikud jututoad asutavad läbivat krüptimist.", + "Unable to set up keys": "Krüptovõtmete kasutuselevõtmine ei õnnestu" } From c05dc45eb50dd48a65a995e593d49b7ff2fd367e Mon Sep 17 00:00:00 2001 From: Nikita Epifanov Date: Fri, 18 Sep 2020 19:41:34 +0000 Subject: [PATCH 065/331] Translated using Weblate (Russian) Currently translated at 100.0% (2369 of 2369 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/element-web/matrix-react-sdk/ru/ --- src/i18n/strings/ru.json | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/ru.json b/src/i18n/strings/ru.json index 0827b920b2..8ac246af4b 100644 --- a/src/i18n/strings/ru.json +++ b/src/i18n/strings/ru.json @@ -2489,5 +2489,18 @@ "Group call ended by %(senderName)s": "%(senderName)s завершил(а) групповой вызов", "End Call": "Завершить звонок", "Remove the group call from the room?": "Удалить групповой вызов из комнаты?", - "You don't have permission to remove the call from the room": "У вас нет разрешения на удаление звонка из комнаты" + "You don't have permission to remove the call from the room": "У вас нет разрешения на удаление звонка из комнаты", + "Safeguard against losing access to encrypted messages & data": "Защита от потери доступа к зашифрованным сообщениям и данным", + "not found in storage": "не найдено в хранилище", + "Widgets": "Виджеты", + "Edit widgets, bridges & bots": "Редактировать виджеты, мосты и ботов", + "Add widgets, bridges & bots": "Добавить виджеты, мосты и ботов", + "You can only pin 2 widgets at a time": "Вы можете закрепить только 2 виджета за раз", + "Minimize widget": "Свернуть виджет", + "Maximize widget": "Развернуть виджет", + "Your server requires encryption to be enabled in private rooms.": "Вашему серверу необходимо включить шифрование в приватных комнатах.", + "Start a conversation with someone using their name or username (like ).": "Начните разговор с кем-нибудь, используя его имя или имя пользователя (например, ).", + "This won't invite them to %(communityName)s. To invite someone to %(communityName)s, click here": "Это не пригласит их в %(communityName)s. Чтобы пригласить кого-нибудь в %(communityName)s, нажмите здесь", + "Invite someone using their name, username (like ) or share this room.": "Пригласите кого-нибудь, используя его имя, имя пользователя (например, ) или поделитесь этой комнатой.", + "Unable to set up keys": "Невозможно настроить ключи" } From 26b18811ce9bfa2e86e743c221ae79be81238d26 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Fri, 18 Sep 2020 16:04:19 -0600 Subject: [PATCH 066/331] Add some permission checks to the communities v2 prototype Prototype behaviour: * If you can't create a room in the community, say so. * The UX for this could probably be improved, but for now the intention is to not break muscle memory by hiding the create room option. * If you can't change settings in the community, or can't invite people, don't show those respective options. * Breaking muscle memory here is moderately okay. --- src/components/structures/MatrixChat.tsx | 14 ++++++++++++ src/components/structures/UserMenu.tsx | 27 ++++++++++++++++++------ src/i18n/strings/en_EN.json | 2 ++ src/stores/CommunityPrototypeStore.ts | 24 +++++++++++++++++++-- 4 files changed, 58 insertions(+), 9 deletions(-) diff --git a/src/components/structures/MatrixChat.tsx b/src/components/structures/MatrixChat.tsx index ea1f424af6..1fdb96a971 100644 --- a/src/components/structures/MatrixChat.tsx +++ b/src/components/structures/MatrixChat.tsx @@ -80,6 +80,8 @@ import { leaveRoomBehaviour } from "../../utils/membership"; import CreateCommunityPrototypeDialog from "../views/dialogs/CreateCommunityPrototypeDialog"; import ThreepidInviteStore, { IThreepidInvite, IThreepidInviteWireFormat } from "../../stores/ThreepidInviteStore"; import {UIFeature} from "../../settings/UIFeature"; +import { CommunityPrototypeStore } from "../../stores/CommunityPrototypeStore"; +import GroupStore from "../../stores/GroupStore"; /** constants for MatrixChat.state.view */ export enum Views { @@ -1016,6 +1018,18 @@ export default class MatrixChat extends React.PureComponent { } private async createRoom(defaultPublic = false) { + const communityId = CommunityPrototypeStore.instance.getSelectedCommunityId(); + if (communityId) { + // double check the user will have permission to associate this room with the community + if (CommunityPrototypeStore.instance.isAdminOf(communityId)) { + Modal.createTrackedDialog('Pre-failure to create room', '', ErrorDialog, { + title: _t("Cannot create rooms in this community"), + description: _t("You do not have permission to create rooms in this community."), + }); + return; + } + } + const CreateRoomDialog = sdk.getComponent('dialogs.CreateRoomDialog'); const modal = Modal.createTrackedDialog('Create Room', '', CreateRoomDialog, { defaultPublic }); diff --git a/src/components/structures/UserMenu.tsx b/src/components/structures/UserMenu.tsx index 369d3b7720..17523290b9 100644 --- a/src/components/structures/UserMenu.tsx +++ b/src/components/structures/UserMenu.tsx @@ -343,6 +343,7 @@ export default class UserMenu extends React.Component { let secondarySection = null; if (prototypeCommunityName) { + const communityId = CommunityPrototypeStore.instance.getSelectedCommunityId(); primaryHeader = (
@@ -350,24 +351,36 @@ export default class UserMenu extends React.Component {
); - primaryOptionList = ( - + let settingsOption; + let inviteOption; + if (CommunityPrototypeStore.instance.canInviteTo(communityId)) { + inviteOption = ( + + ); + } + if (CommunityPrototypeStore.instance.isAdminOf(communityId)) { + settingsOption = ( + ); + } + primaryOptionList = ( + + {settingsOption} - + {inviteOption} ); secondarySection = ( diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index d7360430ae..0cd0c6bc7b 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -2057,6 +2057,8 @@ "Create a Group Chat": "Create a Group Chat", "Explore rooms": "Explore rooms", "Failed to reject invitation": "Failed to reject invitation", + "Cannot create rooms in this community": "Cannot create rooms in this community", + "You do not have permission to create rooms in this community.": "You do not have permission to create rooms in this community.", "This room is not public. You will not be able to rejoin without an invite.": "This room is not public. You will not be able to rejoin without an invite.", "Are you sure you want to leave the room '%(roomName)s'?": "Are you sure you want to leave the room '%(roomName)s'?", "Failed to forget room %(errCode)s": "Failed to forget room %(errCode)s", diff --git a/src/stores/CommunityPrototypeStore.ts b/src/stores/CommunityPrototypeStore.ts index db747d105c..4ff859d4fe 100644 --- a/src/stores/CommunityPrototypeStore.ts +++ b/src/stores/CommunityPrototypeStore.ts @@ -24,9 +24,9 @@ import * as utils from "matrix-js-sdk/src/utils"; import { UPDATE_EVENT } from "./AsyncStore"; import FlairStore from "./FlairStore"; import TagOrderStore from "./TagOrderStore"; -import { MatrixClientPeg } from "../MatrixClientPeg"; import GroupStore from "./GroupStore"; import dis from "../dispatcher/dispatcher"; +import { isNullOrUndefined } from "matrix-js-sdk/src/utils"; interface IState { // nothing of value - we use account data @@ -77,7 +77,7 @@ export class CommunityPrototypeStore extends AsyncStoreWithClient { public getGeneralChat(communityId: string): Room { const rooms = GroupStore.getGroupRooms(communityId) - .map(r => MatrixClientPeg.get().getRoom(r.roomId)) + .map(r => this.matrixClient.getRoom(r.roomId)) .filter(r => !!r); let chat = rooms.find(r => { const idState = r.currentState.getStateEvents("im.vector.general_chat", ""); @@ -88,6 +88,26 @@ export class CommunityPrototypeStore extends AsyncStoreWithClient { return chat; // can be null } + public isAdminOf(communityId: string): boolean { + const members = GroupStore.getGroupMembers(communityId); + const myMember = members.find(m => m.userId === this.matrixClient.getUserId()); + return myMember?.isPrivileged; + } + + public canInviteTo(communityId: string): boolean { + const generalChat = this.getGeneralChat(communityId); + if (!generalChat) return this.isAdminOf(communityId); + + const myMember = generalChat.getMember(this.matrixClient.getUserId()); + if (!myMember) return this.isAdminOf(communityId); + + const pl = generalChat.currentState.getStateEvents("m.room.power_levels", ""); + if (!pl) return this.isAdminOf(communityId); + + const invitePl = isNullOrUndefined(pl.invite) ? 50 : Number(pl.invite); + return invitePl <= myMember.powerLevel; + } + protected async onAction(payload: ActionPayload): Promise { if (!this.matrixClient || !SettingsStore.getValue("feature_communities_v2_prototypes")) { return; From b1b7215532596acac7fe17fd83f65ca317dd8e7d Mon Sep 17 00:00:00 2001 From: Hubert Chathi Date: Fri, 18 Sep 2020 18:08:17 -0400 Subject: [PATCH 067/331] fix lint and merge issues --- src/Login.js | 6 +++--- src/SecurityManager.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Login.js b/src/Login.js index 0563952c5d..c04b086afa 100644 --- a/src/Login.js +++ b/src/Login.js @@ -25,7 +25,7 @@ import { cacheDehydrationKey, confirmToDismiss, getDehydrationKeyCache, -} from "./CrossSigningManager"; +} from "./SecurityManager"; import Matrix from "matrix-js-sdk"; import { deriveKey } from 'matrix-js-sdk/src/crypto/key_passphrase'; import { decodeRecoveryKey } from 'matrix-js-sdk/src/crypto/recoverykey'; @@ -173,8 +173,8 @@ export async function sendLoginRequest(hsUrl, isUrl, loginType, loginParams) { baseUrl: hsUrl, idBaseUrl: isUrl, cryptoCallbacks: { - getDehydrationKey - } + getDehydrationKey, + }, }); const data = await client.loginWithRehydration(null, loginType, loginParams); diff --git a/src/SecurityManager.js b/src/SecurityManager.js index e8bd63d2ff..967c0cc266 100644 --- a/src/SecurityManager.js +++ b/src/SecurityManager.js @@ -91,7 +91,7 @@ async function getSecretStorageKey({ keys: keyInfos }, ssssItemName) { // if we dehydrated a device, see if that key works for SSSS if (dehydrationInfo.key) { try { - if (await MatrixClientPeg.get().checkSecretStorageKey(dehydrationInfo.key, info)) { + if (await MatrixClientPeg.get().checkSecretStorageKey(dehydrationInfo.key, keyInfo)) { const key = dehydrationInfo.key; // Save to cache to avoid future prompts in the current session if (isCachingAllowed()) { From d4c14b33997ddf524c20f8dee34be8eb009b3c79 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Fri, 18 Sep 2020 16:11:18 -0600 Subject: [PATCH 068/331] Don't import things we don't use --- src/components/structures/MatrixChat.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/structures/MatrixChat.tsx b/src/components/structures/MatrixChat.tsx index 1fdb96a971..3f4b3115af 100644 --- a/src/components/structures/MatrixChat.tsx +++ b/src/components/structures/MatrixChat.tsx @@ -81,7 +81,6 @@ import CreateCommunityPrototypeDialog from "../views/dialogs/CreateCommunityProt import ThreepidInviteStore, { IThreepidInvite, IThreepidInviteWireFormat } from "../../stores/ThreepidInviteStore"; import {UIFeature} from "../../settings/UIFeature"; import { CommunityPrototypeStore } from "../../stores/CommunityPrototypeStore"; -import GroupStore from "../../stores/GroupStore"; /** constants for MatrixChat.state.view */ export enum Views { From 4e2397a79db8242f6ff04f9b5c5e61693d21533c Mon Sep 17 00:00:00 2001 From: Hubert Chathi Date: Fri, 18 Sep 2020 20:53:39 -0400 Subject: [PATCH 069/331] doc fixes and minor code improvement --- src/MatrixClientPeg.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/MatrixClientPeg.ts b/src/MatrixClientPeg.ts index a5fa0fb3cf..84bc610896 100644 --- a/src/MatrixClientPeg.ts +++ b/src/MatrixClientPeg.ts @@ -271,11 +271,12 @@ class _MatrixClientPeg implements IMatrixClientPeg { if (creds.olmAccount) { console.log("got a dehydrated account"); + const pickleKey = creds.pickleKey || "DEFAULT_KEY"; opts.deviceToImport = { olmDevice: { - pickledAccount: creds.olmAccount.pickle(creds.pickleKey || "DEFAULT_KEY"), + pickledAccount: creds.olmAccount.pickle(pickleKey), sessions: [], - pickleKey: creds.pickleKey || "DEFAULT_KEY", + pickleKey: pickleKey, }, userId: creds.userId, deviceId: creds.deviceId, @@ -293,7 +294,7 @@ class _MatrixClientPeg implements IMatrixClientPeg { // set dehydration key after cross-signing gets set up -- we wait until // cross-signing is set up because we want to cross-sign the dehydrated - // key + // device const origGetSecretStorageKey = opts.cryptoCallbacks.getSecretStorageKey opts.cryptoCallbacks.getSecretStorageKey = async (keyinfo, ssssItemName) => { const [name, key] = await origGetSecretStorageKey(keyinfo, ssssItemName); @@ -302,6 +303,8 @@ class _MatrixClientPeg implements IMatrixClientPeg { } if (creds.rehydrationKey) { + // cache the key so that the SSSS prompt tries using it without + // prompting the user cacheDehydrationKey(creds.rehydrationKey, creds.rehydrationKeyInfo); } From 590c24ab3737c151b29ff631698fe2f4571da10e Mon Sep 17 00:00:00 2001 From: Besnik Bleta Date: Sat, 19 Sep 2020 11:51:37 +0000 Subject: [PATCH 070/331] Translated using Weblate (Albanian) Currently translated at 99.7% (2362 of 2369 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/element-web/matrix-react-sdk/sq/ --- src/i18n/strings/sq.json | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/sq.json b/src/i18n/strings/sq.json index 397013f9b7..9d44131ed0 100644 --- a/src/i18n/strings/sq.json +++ b/src/i18n/strings/sq.json @@ -2472,5 +2472,33 @@ "Failed to find the general chat for this community": "S’u arrit të gjendej fjalosja e përgjithshme për këtë bashkësi", "Community settings": "Rregullime bashkësie", "User settings": "Rregullime përdoruesi", - "Community and user menu": "Menu bashkësie dhe përdoruesish" + "Community and user menu": "Menu bashkësie dhe përdoruesish", + "End Call": "Përfundoje Thirrjen", + "Remove the group call from the room?": "Të hiqet nga dhoma thirrja e grupit?", + "You don't have permission to remove the call from the room": "S’keni leje të hiqni thirrjen nga dhoma", + "Group call modified by %(senderName)s": "Thirrja e grupit u modifikua nga %(senderName)s", + "Group call started by %(senderName)s": "Thirrje grupi e nisur nga %(senderName)s", + "Group call ended by %(senderName)s": "Thirrje grupi e përfunduar nga %(senderName)s", + "Safeguard against losing access to encrypted messages & data": "Mbrohuni nga humbja e hyrjes te mesazhe & të dhëna të fshehtëzuara", + "not found in storage": "s’u gjet në depozitë", + "Backup version:": "Version kopjeruajtjeje:", + "Algorithm:": "Algoritëm:", + "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.": "Kopjeruani kyçet tuaj të fshehtëzimit me të dhënat e llogarisë tuaj, për rastin kur humbni hyrje te sesionet tuaj. Kyçet tuaj do të sigurohen me një Kyç unik Rimarrjesh.", + "Backup key stored:": "Kyç kopjeruajtjesh i depozituar:", + "Backup key cached:": "Kyç kopjeruajtjesh i ruajtur në fshehtinë:", + "Secret storage:": "Depozitë e fshehtë:", + "ready": "gati", + "not ready": "jo gati", + "Secure Backup": "Kopjeruajtje e Sigurt", + "Widgets": "Widget-e", + "Edit widgets, bridges & bots": "Përpunoni widget-e, ura & robotë", + "Add widgets, bridges & bots": "Shtoni widget-e, ura & robotë", + "You can only pin 2 widgets at a time": "Mundeni të fiksoni vetëm 2 widget-e në herë", + "Minimize widget": "Minimizoje widget-in", + "Maximize widget": "Maksimizoj widget-in", + "Your server requires encryption to be enabled in private rooms.": "Shërbyesi juaj lyp që fshehtëzimi të jetë i aktivizuar në dhoma private.", + "Start a conversation with someone using their name or username (like ).": "Nisni një bisedë me dikë duke përdorur emrin e tij ose emrin e tij të përdoruesit (bie fjala, ).", + "This won't invite them to %(communityName)s. To invite someone to %(communityName)s, click here": "Kjo s’do ta ftojë te %(communityName)s. Që të ftoni dikë te %(communityName)s, klikoni këtu", + "Invite someone using their name, username (like ) or share this room.": "Ftoni dikë duke përdorur emrin e tij, emrin e tij të përdoruesit (bie fjala, ) ose ndani me të këtë dhomë.", + "Unable to set up keys": "S’arrihet të ujdisen kyçe" } From 28eef21714a62b8638448cb6c8cdea457b66e9fe Mon Sep 17 00:00:00 2001 From: Jeff Huang Date: Sat, 19 Sep 2020 01:27:34 +0000 Subject: [PATCH 071/331] Translated using Weblate (Chinese (Traditional)) Currently translated at 100.0% (2369 of 2369 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.riot.im/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 6bcd94bd9a..fcdb7c9927 100644 --- a/src/i18n/strings/zh_Hant.json +++ b/src/i18n/strings/zh_Hant.json @@ -2499,5 +2499,15 @@ "You don't have permission to remove the call from the room": "您沒有從聊天室移除通話的權限", "Start a conversation with someone using their name or username (like ).": "使用某人的名字或使用者名稱(如 )以與他們開始對話。", "This won't invite them to %(communityName)s. To invite someone to %(communityName)s, click here": "這不會邀請他們加入 %(communityName)s。要邀請某人加入 %(communityName)s,請點擊這裡", - "Invite someone using their name, username (like ) or share this room.": "使用某人的名字、使用者名稱(如 )或分享此聊天室來邀請他們。" + "Invite someone using their name, username (like ) or share this room.": "使用某人的名字、使用者名稱(如 )或分享此聊天室來邀請他們。", + "Safeguard against losing access to encrypted messages & data": "防止遺失對加密訊息與資料的存取權", + "not found in storage": "在儲存空間中找不到", + "Widgets": "小工具", + "Edit widgets, bridges & bots": "編輯小工具、橋接與機器人", + "Add widgets, bridges & bots": "新增小工具、橋接與機器人", + "You can only pin 2 widgets at a time": "您僅能同時釘選兩個小工具", + "Minimize widget": "最小化小工具", + "Maximize widget": "最大化小工具", + "Your server requires encryption to be enabled in private rooms.": "您的伺服器需要在私人聊天室中啟用加密。", + "Unable to set up keys": "無法設定金鑰" } From 3523342a5a5fdfbb61b6c3aab3d7c2bc22baa216 Mon Sep 17 00:00:00 2001 From: notramo Date: Sun, 20 Sep 2020 05:44:46 +0000 Subject: [PATCH 072/331] Translated using Weblate (Hungarian) Currently translated at 99.8% (2365 of 2369 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/element-web/matrix-react-sdk/hu/ --- src/i18n/strings/hu.json | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/i18n/strings/hu.json b/src/i18n/strings/hu.json index 0e899ad242..8095401bf9 100644 --- a/src/i18n/strings/hu.json +++ b/src/i18n/strings/hu.json @@ -31,7 +31,7 @@ "Default Device": "Alapértelmezett eszköz", "Microphone": "Mikrofon", "Camera": "Kamera", - "Advanced": "Speciális", + "Advanced": "Haladó", "Always show message timestamps": "Üzenet időbélyeg folyamatos megjelenítése", "Authentication": "Azonosítás", "Failed to change password. Is your password correct?": "Nem sikerült megváltoztatni a jelszót. Helyesen írtad be a jelszavadat?", @@ -1070,7 +1070,7 @@ "Identity Server URL": "Azonosítási Szerver URL", "Free": "Szabad", "Join millions for free on the largest public server": "Milliók kapcsolódnak ingyen a legnagyobb nyilvános szerveren", - "Premium": "Pérmium", + "Premium": "Prémium", "Premium hosting for organisations Learn more": "Prémium üzemeltetés szervezetek részére Tudj meg többet", "Other": "Más", "Find other public servers or use a custom server": "Találj más nyilvános szervereket vagy használj egyedi szervert", @@ -2496,5 +2496,11 @@ "You don't have permission to remove the call from the room": "A konferencia hívás törléséhez nincs jogosultságod", "Start a conversation with someone using their name or username (like ).": "Indíts beszélgetést valakivel és használd hozzá a nevét vagy a felhasználói nevét (mint ).", "This won't invite them to %(communityName)s. To invite someone to %(communityName)s, click here": "Ez nem hívja meg őket ebbe a közösségbe: %(communityName)s. Hogy meghívj valakit ebbe a közösségbe: %(communityName)s kattints ide", - "Invite someone using their name, username (like ) or share this room.": "Hívj meg valakit a nevével, felhasználói nevével (pl. ) vagy oszd meg ezt a szobát." + "Invite someone using their name, username (like ) or share this room.": "Hívj meg valakit a nevével, felhasználói nevével (pl. ) vagy oszd meg ezt a szobát.", + "Add widgets, bridges & bots": "Widget-ek, hidak, és botok hozzáadása", + "You can only pin 2 widgets at a time": "Egyszerre csak 2 widget-et lehet kitűzni", + "Minimize widget": "Widget minimalizálása", + "Maximize widget": "Widget maximalizálása", + "Your server requires encryption to be enabled in private rooms.": "A szervered megköveteli, hogy a titkosítás be legyen kapcsolva a privát szobákban.", + "Unable to set up keys": "Nem sikerült a kulcsok beállítása" } From 60013e74edd445b94f7c544d5f354e0ed631af44 Mon Sep 17 00:00:00 2001 From: call_xz Date: Sat, 19 Sep 2020 03:22:33 +0000 Subject: [PATCH 073/331] Translated using Weblate (Japanese) Currently translated at 57.7% (1367 of 2369 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/element-web/matrix-react-sdk/ja/ --- src/i18n/strings/ja.json | 40 +++++++++++++++++++++++++++++++++------- 1 file changed, 33 insertions(+), 7 deletions(-) diff --git a/src/i18n/strings/ja.json b/src/i18n/strings/ja.json index f5c2b89f8c..ca1cf0a200 100644 --- a/src/i18n/strings/ja.json +++ b/src/i18n/strings/ja.json @@ -126,7 +126,7 @@ "You are not receiving desktop notifications": "デスクトップ通知を受け取っていません", "Update": "アップデート", "Unable to fetch notification target list": "通知先リストを取得できませんでした", - "Uploaded on %(date)s by %(user)s": "%(date)s に %(user)s によりアップロードされました", + "Uploaded on %(date)s by %(user)s": "このファイルは %(date)s に %(user)s によりアップロードされました", "Send Custom Event": "カスタムイベントを送信する", "All notifications are currently disabled for all targets.": "現在すべての対象についての全通知が無効です。", "Failed to send logs: ": "ログの送信に失敗しました: ", @@ -341,7 +341,7 @@ "Unable to connect to Homeserver. Retrying...": "ホームサーバーに接続できません。 再試行中...", "Your browser does not support the required cryptography extensions": "お使いのブラウザは、必要な暗号化拡張機能をサポートしていません", "Not a valid %(brand)s keyfile": "有効な%(brand)sキーファイルではありません", - "Authentication check failed: incorrect password?": "認証チェックに失敗しました: パスワードの間違い?", + "Authentication check failed: incorrect password?": "認証に失敗しました: パスワードの間違っている可能性があります。", "Sorry, your homeserver is too old to participate in this room.": "申し訳ありませんが、あなたのホームサーバーはこの部屋に参加するには古すぎます。", "Please contact your homeserver administrator.": "ホームサーバー管理者に連絡してください。", "Failed to join room": "部屋に参加できませんでした", @@ -454,7 +454,7 @@ "(~%(count)s results)|one": "(~%(count)s 結果)", "Join Room": "部屋に入る", "Forget room": "部屋を忘れる", - "Share room": "部屋を共有する", + "Share room": "部屋を共有", "Community Invites": "コミュニティへの招待", "Invites": "招待", "Unban": "ブロック解除", @@ -508,10 +508,10 @@ "When someone puts a URL in their message, a URL preview can be shown to give more information about that link such as the title, description, and an image from the website.": "メッセージにURLを入力すると、URLプレビューが表示され、タイトル、説明、ウェブサイトからの画像など、そのリンクに関する詳細情報が表示されます。", "Error decrypting audio": "オーディオの復号化エラー", "Error decrypting attachment": "添付ファイルの復号化エラー", - "Decrypt %(text)s": "%(text)s を解読する", + "Decrypt %(text)s": "%(text)s を復号", "Download %(text)s": "%(text)s をダウンロード", "Invalid file%(extra)s": "無効なファイル %(extra)s", - "Error decrypting image": "イメージの復号化エラー", + "Error decrypting image": "画像の復号中にエラーが発生しました", "Error decrypting video": "動画の復号エラー", "%(senderDisplayName)s changed the avatar for %(roomName)s": "%(senderDisplayName)s が %(roomName)s のアバターを変更しました", "%(senderDisplayName)s removed the room avatar.": "%(senderDisplayName)s がルームアバターを削除しました。", @@ -783,7 +783,7 @@ "Connectivity to the server has been lost.": "サーバーへの接続が失われました。", "Sent messages will be stored until your connection has returned.": "送信されたメッセージは、接続が復旧するまで保存されます。", "Active call": "アクティブコール", - "There's no one else here! Would you like to invite others or stop warning about the empty room?": "他に誰もいません! 他のユーザーを招待または空の部屋に関する警告を停止しますか?", + "There's no one else here! Would you like to invite others or stop warning about the empty room?": "この部屋には他に誰もいません!:他のユーザーを招待この警告を停止", "You seem to be uploading files, are you sure you want to quit?": "ファイルをアップロードしているようですが、中止しますか?", "You seem to be in a call, are you sure you want to quit?": "通話中のようですが、本当にやめたいですか?", "Search failed": "検索に失敗しました", @@ -1397,5 +1397,31 @@ "%(brand)s Desktop": "%(brand)s デスクトップ", "%(brand)s iOS": "%(brand)s iOS", "%(brand)s Android": "%(brand)s Android", - "Your recovery key": "あなたのリカバリーキー" + "Your recovery key": "あなたのリカバリーキー", + "a few seconds ago": "数秒前", + "about a minute ago": "約1分前", + "about an hour ago": "約1時間前", + "about a day ago": "約1日前", + "a few seconds from now": "今から数秒前", + "about a minute from now": "今から約1分前", + "%(num)s minutes from now": "今から %(num)s 分前", + "about an hour from now": "今から約1時間前", + "%(num)s hours from now": "今から %(num)s 時間前", + "about a day from now": "今から約1日前", + "%(num)s days from now": "今から %(num)s 日前", + "%(name)s (%(userId)s)": "%(name)s (%(userId)s)", + "User %(user_id)s may or may not exist": "ユーザー %(user_id)s は存在しないとは限りません", + "Unknown App": "未知のアプリ", + "Room Info": "部屋の情報", + "About": "概要", + "%(count)s people|other": "%(count)s 人の参加者", + "%(count)s people|one": "%(count)s 人の参加者", + "Show files": "ファイルを表示", + "Room settings": "部屋の設定", + "Show image": "画像を表示", + "Upload files (%(current)s of %(total)s)": "ファイルのアップロード (%(current)s/%(total)s)", + "Upload files": "ファイルのアップロード", + "Upload all": "全てアップロード", + "No files visible in this room": "この部屋にファイルはありません", + "Attach files from chat or just drag and drop them anywhere in a room.": "チャットでファイルを添付するか、部屋のどこかにドラッグ&ドロップするとファイルを追加できます。" } From 30c020ce13cd09b999423104f85d5c237278ed29 Mon Sep 17 00:00:00 2001 From: LinAGKar Date: Sat, 19 Sep 2020 09:27:30 +0000 Subject: [PATCH 074/331] Translated using Weblate (Swedish) Currently translated at 100.0% (2369 of 2369 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/element-web/matrix-react-sdk/sv/ --- src/i18n/strings/sv.json | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/sv.json b/src/i18n/strings/sv.json index 3feee476c6..a5421b2bc0 100644 --- a/src/i18n/strings/sv.json +++ b/src/i18n/strings/sv.json @@ -2426,5 +2426,18 @@ "Secure Backup": "Säker säkerhetskopiering", "End Call": "Avsluta samtal", "Remove the group call from the room?": "Ta bort gruppsamtalet från rummet?", - "You don't have permission to remove the call from the room": "Du har inte behörighet från att ta bort samtalet från rummet" + "You don't have permission to remove the call from the room": "Du har inte behörighet från att ta bort samtalet från rummet", + "Safeguard against losing access to encrypted messages & data": "Skydda mot att förlora åtkomst till krypterade meddelanden och data", + "not found in storage": "hittades inte i lagring", + "Widgets": "Widgets", + "Edit widgets, bridges & bots": "Redigera widgets, bryggor och bottar", + "Add widgets, bridges & bots": "Lägg till widgets, bryggor och bottar", + "You can only pin 2 widgets at a time": "Du kan bara fästa 2 widgets i taget", + "Minimize widget": "Minimera widget", + "Maximize widget": "Maximera widget", + "Your server requires encryption to be enabled in private rooms.": "Din server kräver att kryptering ska användas i privata rum.", + "Start a conversation with someone using their name or username (like ).": "Starta en konversation med någon med deras namn eller användarnamn (som ).", + "This won't invite them to %(communityName)s. To invite someone to %(communityName)s, click here": "Detta kommer inte att bjuda in dem till %(communityName)s. För att bjuda in någon till %(communityName)s, klicka här", + "Invite someone using their name, username (like ) or share this room.": "Bjud in någon med deras namn eller användarnamn (som ) eller dela det här rummet.", + "Unable to set up keys": "Kunde inte ställa in nycklar" } From 42cdf4b7c9b1491bfe1c2f2e6cacba5888dd3dbb Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Mon, 21 Sep 2020 13:57:33 +0100 Subject: [PATCH 075/331] fix undefined devices case Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/components/views/right_panel/UserInfo.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/views/right_panel/UserInfo.js b/src/components/views/right_panel/UserInfo.js index a9aebd9b33..8440532b9d 100644 --- a/src/components/views/right_panel/UserInfo.js +++ b/src/components/views/right_panel/UserInfo.js @@ -1296,7 +1296,8 @@ const BasicUserInfo = ({room, member, groupId, devices, isRoomEncrypted}) => { const userTrust = cryptoEnabled && cli.checkUserTrust(member.userId); const userVerified = cryptoEnabled && userTrust.isCrossSigningVerified(); const isMe = member.userId === cli.getUserId(); - const canVerify = cryptoEnabled && homeserverSupportsCrossSigning && !userVerified && !isMe && devices.length > 0; + const canVerify = cryptoEnabled && homeserverSupportsCrossSigning && !userVerified && !isMe && + devices && devices.length > 0; const setUpdating = (updating) => { setPendingUpdateCount(count => count + (updating ? 1 : -1)); From ed0e188b4f354072413e881a6fdd5fef5fd7f26f Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Mon, 21 Sep 2020 14:35:35 +0100 Subject: [PATCH 076/331] Validation improve pattern for derived data Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/components/views/auth/PassphraseField.tsx | 30 ++++++--------- src/components/views/elements/Validation.tsx | 38 +++++++++++-------- 2 files changed, 34 insertions(+), 34 deletions(-) diff --git a/src/components/views/auth/PassphraseField.tsx b/src/components/views/auth/PassphraseField.tsx index 2f5064447e..b420ed0872 100644 --- a/src/components/views/auth/PassphraseField.tsx +++ b/src/components/views/auth/PassphraseField.tsx @@ -40,11 +40,7 @@ interface IProps { onValidate(result: IValidationResult); } -interface IState { - complexity: zxcvbn.ZXCVBNResult; -} - -class PassphraseField extends PureComponent { +class PassphraseField extends PureComponent { static defaultProps = { label: _td("Password"), labelEnterPassword: _td("Enter password"), @@ -52,14 +48,16 @@ class PassphraseField extends PureComponent { labelAllowedButUnsafe: _td("Password is allowed, but unsafe"), }; - state = { complexity: null }; - - public readonly validate = withValidation({ - description: function() { - const complexity = this.state.complexity; + public readonly validate = withValidation({ + description: function(complexity) { const score = complexity ? complexity.score : 0; return ; }, + deriveData: async ({ value }) => { + if (!value) return null; + const { scorePassword } = await import('../../../utils/PasswordScorer'); + return scorePassword(value); + }, rules: [ { key: "required", @@ -68,28 +66,24 @@ class PassphraseField extends PureComponent { }, { key: "complexity", - test: async function({ value }) { + test: async function({ value }, complexity) { if (!value) { return false; } - const { scorePassword } = await import('../../../utils/PasswordScorer'); - const complexity = scorePassword(value); - this.setState({ complexity }); const safe = complexity.score >= this.props.minScore; const allowUnsafe = SdkConfig.get()["dangerously_allow_unsafe_and_insecure_passwords"]; return allowUnsafe || safe; }, - valid: function() { + valid: function(complexity) { // Unsafe passwords that are valid are only possible through a // configuration flag. We'll print some helper text to signal // to the user that their password is allowed, but unsafe. - if (this.state.complexity.score >= this.props.minScore) { + if (complexity.score >= this.props.minScore) { return _t(this.props.labelStrongPassword); } return _t(this.props.labelAllowedButUnsafe); }, - invalid: function() { - const complexity = this.state.complexity; + invalid: function(complexity) { if (!complexity) { return null; } diff --git a/src/components/views/elements/Validation.tsx b/src/components/views/elements/Validation.tsx index 50544c9f51..55e5714719 100644 --- a/src/components/views/elements/Validation.tsx +++ b/src/components/views/elements/Validation.tsx @@ -21,18 +21,19 @@ import classNames from "classnames"; type Data = Pick; -interface IRule { +interface IRule { key: string; final?: boolean; - skip?(this: T, data: Data): boolean; - test(this: T, data: Data): boolean | Promise; - valid?(this: T): string; - invalid?(this: T): string; + skip?(this: T, data: Data, derivedData: D): boolean; + test(this: T, data: Data, derivedData: D): boolean | Promise; + valid?(this: T, derivedData: D): string; + invalid?(this: T, derivedData: D): string; } -interface IArgs { - rules: IRule[]; - description(this: T): React.ReactChild; +interface IArgs { + rules: IRule[]; + description(this: T, derivedData: D): React.ReactChild; + deriveData?(data: Data): Promise; } export interface IFieldState { @@ -53,6 +54,10 @@ export interface IValidationResult { * @param {Function} description * Function that returns a string summary of the kind of value that will * meet the validation rules. Shown at the top of the validation feedback. + * @param {Function} deriveData + * Optional function that returns a Promise to an object of generic type D. + * The result of this Promise is passed to rule methods `skip`, `test`, `valid`, and `invalid`. + * Useful for doing calculations per-value update once rather than in each of the above rule methods. * @param {Object} rules * An array of rules describing how to check to input value. Each rule in an object * and may have the following properties: @@ -66,7 +71,7 @@ export interface IValidationResult { * A validation function that takes in the current input value and returns * the overall validity and a feedback UI that can be rendered for more detail. */ -export default function withValidation({ description, rules }: IArgs) { +export default function withValidation({ description, deriveData, rules }: IArgs) { return async function onValidate({ value, focused, allowEmpty = true }: IFieldState): Promise { if (!value && allowEmpty) { return { @@ -75,6 +80,9 @@ export default function withValidation({ description, rules }: IA }; } + const data = { value, allowEmpty }; + const derivedData = deriveData ? await deriveData(data) : undefined; + const results = []; let valid = true; if (rules && rules.length) { @@ -87,20 +95,18 @@ export default function withValidation({ description, rules }: IA continue; } - const data = { value, allowEmpty }; - - if (rule.skip && rule.skip.call(this, data)) { + if (rule.skip && rule.skip.call(this, data, derivedData)) { continue; } // We're setting `this` to whichever component holds the validation // function. That allows rules to access the state of the component. - const ruleValid = await rule.test.call(this, data); + const ruleValid = await rule.test.call(this, data, derivedData); valid = valid && ruleValid; if (ruleValid && rule.valid) { // If the rule's result is valid and has text to show for // the valid state, show it. - const text = rule.valid.call(this); + const text = rule.valid.call(this, derivedData); if (!text) { continue; } @@ -112,7 +118,7 @@ export default function withValidation({ description, rules }: IA } else if (!ruleValid && rule.invalid) { // If the rule's result is invalid and has text to show for // the invalid state, show it. - const text = rule.invalid.call(this); + const text = rule.invalid.call(this, derivedData); if (!text) { continue; } @@ -153,7 +159,7 @@ export default function withValidation({ description, rules }: IA if (description) { // We're setting `this` to whichever component holds the validation // function. That allows rules to access the state of the component. - const content = description.call(this); + const content = description.call(this, derivedData); summary =
{content}
; } From 1d3ea35267dc284faed8a5310b7b582b30d7a4f5 Mon Sep 17 00:00:00 2001 From: "@a2sc:matrix.org" Date: Mon, 21 Sep 2020 13:25:32 +0000 Subject: [PATCH 077/331] Translated using Weblate (German) Currently translated at 100.0% (2369 of 2369 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/element-web/matrix-react-sdk/de/ --- src/i18n/strings/de_DE.json | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/i18n/strings/de_DE.json b/src/i18n/strings/de_DE.json index 2c2f832fc8..08cf756c8b 100644 --- a/src/i18n/strings/de_DE.json +++ b/src/i18n/strings/de_DE.json @@ -1434,7 +1434,7 @@ "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.": "Durch die Änderung des Passworts werden derzeit alle Ende-zu-Ende-Verschlüsselungsschlüssel in allen Sitzungen zurückgesetzt, sodass der verschlüsselte Chat-Verlauf nicht mehr lesbar ist, es sei denn, du exportierst zuerst deine Raumschlüssel und importierst sie anschließend wieder. In Zukunft wird dies verbessert werden.", "Delete %(count)s sessions|other": "Lösche %(count)s Sitzungen", "Backup is not signed by any of your sessions": "Die Sicherung wurde von keiner deiner Sitzungen unterzeichnet", - "Your password was successfully changed. You will not receive push notifications on other sessions until you log back in to them": "Ihr Passwort wurde erfolgreich geändert. Sie erhalten keine Push-Benachrichtigungen zu anderen Sitzungen, bis Sie sich wieder bei diesen anmelden", + "Your password was successfully changed. You will not receive push notifications on other sessions until you log back in to them": "Dein Passwort wurde erfolgreich geändert. Du erhälst keine Push-Benachrichtigungen zu anderen Sitzungen, bis du dich wieder bei diesen anmeldst", "Notification sound": "Benachrichtigungston", "Set a new custom sound": "Setze einen neuen benutzerdefinierten Ton", "Browse": "Durchsuche", @@ -2491,5 +2491,18 @@ "Secure Backup": "Sicheres Backup", "End Call": "Anruf beenden", "Remove the group call from the room?": "Konferenzgespräch aus diesem Raum entfernen?", - "You don't have permission to remove the call from the room": "Du hast keine Berechtigung um den Konferenzanruf aus dem Raum zu entfernen" + "You don't have permission to remove the call from the room": "Du hast keine Berechtigung um den Konferenzanruf aus dem Raum zu entfernen", + "Safeguard against losing access to encrypted messages & data": "Schütze dich vor dem Verlust des Zugriffs auf verschlüsselte Nachrichten und Daten", + "not found in storage": "nicht im Speicher gefunden", + "Widgets": "Widgets", + "Edit widgets, bridges & bots": "Widgets, Bridges & Bots bearbeiten", + "Add widgets, bridges & bots": "Widgets, Bridges & Bots hinzufügen", + "You can only pin 2 widgets at a time": "Du kannst jeweils nur 2 Widgets anheften", + "Minimize widget": "Widget minimieren", + "Maximize widget": "Widget maximieren", + "Your server requires encryption to be enabled in private rooms.": "Für deinen Server muss die Verschlüsselung in privaten Räumen aktiviert sein.", + "Start a conversation with someone using their name or username (like ).": "Starte ein Gespräch unter Verwendung des Namen oder Benutzernamens des Gegenübers (z. B. ).", + "This won't invite them to %(communityName)s. To invite someone to %(communityName)s, click here": "Das wird sie nicht zu %(communityName)s einladen. Um jemand zu %(communityName)s einzuladen, klicke hier", + "Invite someone using their name, username (like ) or share this room.": "Lade jemand mittels seinem/ihrem Namen oder Benutzernamen (z.B. ) ein, oder teile diesem Raum.", + "Unable to set up keys": "Schlüssel können nicht eingerichtet werden" } From 93492572397eb96d0aa26812d61fe47497ccbdb6 Mon Sep 17 00:00:00 2001 From: Michael Albert Date: Mon, 21 Sep 2020 13:38:25 +0000 Subject: [PATCH 078/331] Translated using Weblate (German) Currently translated at 100.0% (2369 of 2369 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/element-web/matrix-react-sdk/de/ --- src/i18n/strings/de_DE.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/i18n/strings/de_DE.json b/src/i18n/strings/de_DE.json index 08cf756c8b..4cebb135ac 100644 --- a/src/i18n/strings/de_DE.json +++ b/src/i18n/strings/de_DE.json @@ -1456,8 +1456,8 @@ "If disabled, messages from encrypted rooms won't appear in search results.": "Wenn deaktiviert, werden Nachrichten von verschlüsselten Räumen nicht in den Ergebnissen auftauchen.", "This user has not verified all of their sessions.": "Dieser Benutzer hat nicht alle seine Sitzungen verifiziert.", "You have verified this user. This user has verified all of their sessions.": "Sie haben diesen Benutzer verifiziert. Dieser Benutzer hat alle seine Sitzungen verifiziert.", - "Your key share request has been sent - please check your other sessions for key share requests.": "Ihre Anfrage zur Schlüssel-Teilung wurde gesendet - bitte überprüfen Sie Ihre anderen Sitzungen auf Anfragen zur Schlüssel-Teilung.", - "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.": "Anfragen zum Teilen von Schlüsseln werden automatisch an Ihre anderen Sitzungen gesendet. Wenn Sie die Anfragen zum Teilen von Schlüsseln in Ihren anderen Sitzungen abgelehnt oder abgewiesen haben, klicken Sie hier, um die Schlüssel für diese Sitzung erneut anzufordern.", + "Your key share request has been sent - please check your other sessions for key share requests.": "Deine Schlüsselanfrage wurde gesendet - sieh in deinen anderen Sitzungen nach der Schlüsselanfrage.", + "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.": "Schlüsselanfragen werden automatisch an deine anderen Sitzungen gesendet. Wenn du sie abgelehnt oder ignoriert hast klicke hier um die Schlüssel erneut anzufordern.", "If your other sessions do not have the key for this message you will not be able to decrypt them.": "Wenn Ihre anderen Sitzungen nicht über den Schlüssel für diese Nachricht verfügen, können Sie sie nicht entschlüsseln.", "Re-request encryption keys from your other sessions.": "Fordern Sie Verschlüsselungsschlüssel aus Ihren anderen Sitzungen erneut an.", "Room %(name)s": "Raum %(name)s", From e7eb3b62a97d643da8b67b8a9c676e28dcf8120a Mon Sep 17 00:00:00 2001 From: "@a2sc:matrix.org" Date: Mon, 21 Sep 2020 13:39:23 +0000 Subject: [PATCH 079/331] Translated using Weblate (German) Currently translated at 100.0% (2369 of 2369 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/element-web/matrix-react-sdk/de/ --- src/i18n/strings/de_DE.json | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/i18n/strings/de_DE.json b/src/i18n/strings/de_DE.json index 4cebb135ac..43ecff16b2 100644 --- a/src/i18n/strings/de_DE.json +++ b/src/i18n/strings/de_DE.json @@ -880,7 +880,7 @@ "Delete Backup": "Sicherung löschen", "Backup version: ": "Sicherungsversion: ", "Algorithm: ": "Algorithmus: ", - "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": "Um zu vermeiden, dass Ihr Chat-Verlauf verloren geht, müssen Sie Ihre Raum-Schlüssel exportieren, bevor Sie sich abmelden. Dazu müssen Sie auf die neuere Version von %(brand)s zurückgehen", + "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": "Um zu vermeiden, dass dein Chat-Verlauf verloren geht, musst du deine Raum-Schlüssel exportieren, bevor du dich abmeldest. Dazu musst du auf die neuere Version von %(brand)s zurückgehen", "Incompatible Database": "Inkompatible Datenbanken", "Continue With Encryption Disabled": "Mit deaktivierter Verschlüsselung fortfahren", "Next": "Weiter", @@ -944,9 +944,9 @@ "Checking...": "Überprüfe...", "Unable to load backup status": "Konnte Sicherungsstatus nicht laden", "Failed to decrypt %(failedCount)s sessions!": "Konnte %(failedCount)s Sitzungen nicht entschlüsseln!", - "Access your secure message history and set up secure messaging by entering your recovery passphrase.": "Greifen Sie auf Ihre sichere Nachrichtenhistorie zu und richten Sie einen sicheren Nachrichtenversand ein, indem Sie Ihre Wiederherstellungspassphrase eingeben.", + "Access your secure message history and set up secure messaging by entering your recovery passphrase.": "Greife auf deine gesicherten Chatverlauf zu und richten einen sicheren Nachrichtenversand ein, indem du deine Wiederherstellungspassphrase eingibst.", "If you've forgotten your recovery passphrase you can use your recovery key or set up new recovery options": "Wenn du deinen Wiederherstellungspassphrase vergessen hast, kannst du deinen Wiederherstellungsschlüssel benutzen oder neue Wiederherstellungsoptionen einrichten", - "Access your secure message history and set up secure messaging by entering your recovery key.": "Greifen Sie auf Ihren sicheren Nachrichtenverlauf zu und richten Sie durch Eingabe Ihres Wiederherstellungsschlüssels einen sicheren Nachrichtenversand ein.", + "Access your secure message history and set up secure messaging by entering your recovery key.": "Greife auf deinen gesicherten Chatverlauf zu und richten durch Eingabe deines Wiederherstellungsschlüssels einen sicheren Nachrichtenversand ein.", "Set a new status...": "Setze einen neuen Status...", "Clear status": "Status löschen", "Invalid homeserver discovery response": "Ungültige Antwort beim Aufspüren des Heimservers", @@ -957,7 +957,7 @@ "Without setting up Secure Message Recovery, you'll lose your secure message history when you log out.": "Ohne Sichere Nachrichten-Wiederherstellung einzurichten, wirst du deine sichere Nachrichtenhistorie verlieren, wenn du dich abmeldest.", "If you don't want to set this up now, you can later in Settings.": "Wenn du dies jetzt nicht einrichten willst, kannst du dies später in den Einstellungen tun.", "New Recovery Method": "Neue Wiederherstellungsmethode", - "If you didn't set the new recovery method, an attacker may be trying to access your account. Change your account password and set a new recovery method immediately in Settings.": "Wenn Sie die neue Wiederherstellungsmethode nicht festgelegt haben, versucht ein Angreifer möglicherweise, auf Ihr Konto zuzugreifen. Ändern Sie Ihr Kontopasswort und legen Sie sofort eine neue Wiederherstellungsmethode in den Einstellungen fest.", + "If you didn't set the new recovery method, an attacker may be trying to access your account. Change your account password and set a new recovery method immediately in Settings.": "Wenn du die neue Wiederherstellungsmethode nicht festgelegt hast, versucht ein/e Angreifer!n möglicherweise, auf dein Konto zuzugreifen. Ändere dein Kontopasswort und lege sofort eine neue Wiederherstellungsmethode in den Einstellungen fest.", "Set up Secure Messages": "Richte sichere Nachrichten ein", "Go to Settings": "Gehe zu Einstellungen", "Sign in with single sign-on": "Melden Sie sich mit Single Sign-On an", @@ -1417,7 +1417,7 @@ "You are currently subscribed to:": "Du abonnierst momentan:", "⚠ These settings are meant for advanced users.": "⚠ Diese Einstellungen sind für fortgeschrittene Nutzer gedacht.", "Whether you're using %(brand)s on a device where touch is the primary input mechanism": "Ob du %(brand)s auf einem Gerät verwendest, bei dem Berührung der primäre Eingabemechanismus ist", - "Whether you're using %(brand)s as an installed Progressive Web App": "Ob Sie %(brand)s als installierte progressive Web-App verwenden", + "Whether you're using %(brand)s as an installed Progressive Web App": "Ob du %(brand)s als installierte progressive Web-App verwendest", "Your user agent": "Dein User-Agent", "If you cancel now, you won't complete verifying the other user.": "Wenn Sie jetzt abbrechen, werden Sie die Verifizierung des anderen Nutzers nicht beenden können.", "If you cancel now, you won't complete verifying your other session.": "Wenn Sie jetzt abbrechen, werden Sie die Verifizierung der anderen Sitzung nicht beenden können.", @@ -1439,7 +1439,7 @@ "Set a new custom sound": "Setze einen neuen benutzerdefinierten Ton", "Browse": "Durchsuche", "Direct Messages": "Direktnachrichten", - "You can use /help to list available commands. Did you mean to send this as a message?": "Sie können /help benutzen, um verfügbare Befehle aufzulisten. Wollten Sie dies als Nachricht senden?", + "You can use /help to list available commands. Did you mean to send this as a message?": "Du kannst /help benutzen, um verfügbare Befehle aufzulisten. Willst du dies als Nachricht senden?", "Direct message": "Direktnachricht", "Suggestions": "Vorschläge", "Recently Direct Messaged": "Kürzlich direkt verschickt", @@ -1455,9 +1455,9 @@ "Notification Autocomplete": "Benachrichtigung Autovervollständigen", "If disabled, messages from encrypted rooms won't appear in search results.": "Wenn deaktiviert, werden Nachrichten von verschlüsselten Räumen nicht in den Ergebnissen auftauchen.", "This user has not verified all of their sessions.": "Dieser Benutzer hat nicht alle seine Sitzungen verifiziert.", - "You have verified this user. This user has verified all of their sessions.": "Sie haben diesen Benutzer verifiziert. Dieser Benutzer hat alle seine Sitzungen verifiziert.", + "You have verified this user. This user has verified all of their sessions.": "Du hast diese/n Nutzer!n verifiziert. Er/Sie hat alle seine/ihre Sitzungen verifiziert.", "Your key share request has been sent - please check your other sessions for key share requests.": "Deine Schlüsselanfrage wurde gesendet - sieh in deinen anderen Sitzungen nach der Schlüsselanfrage.", - "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.": "Schlüsselanfragen werden automatisch an deine anderen Sitzungen gesendet. Wenn du sie abgelehnt oder ignoriert hast klicke hier um die Schlüssel erneut anzufordern.", + "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.": "Schlüsselanfragen werden automatisch an deine anderen Sitzungen gesendet. Wenn du sie abgelehnt oder ignoriert hast klicke hier, um die Schlüssel erneut anzufordern.", "If your other sessions do not have the key for this message you will not be able to decrypt them.": "Wenn Ihre anderen Sitzungen nicht über den Schlüssel für diese Nachricht verfügen, können Sie sie nicht entschlüsseln.", "Re-request encryption keys from your other sessions.": "Fordern Sie Verschlüsselungsschlüssel aus Ihren anderen Sitzungen erneut an.", "Room %(name)s": "Raum %(name)s", @@ -1468,16 +1468,16 @@ "%(count)s sessions|other": "%(count)s Sitzungen", "Hide sessions": "Sitzungen ausblenden", "Encryption enabled": "Verschlüsselung aktiviert", - "Messages in this room are end-to-end encrypted. Learn more & verify this user in their user profile.": "Nachrichten in diesem Raum sind Ende-zu-Ende verschlüsselt. Erfahren Sie mehr & überprüfen Sie diesen Benutzer in seinem Benutzerprofil.", + "Messages in this room are end-to-end encrypted. Learn more & verify this user in their user profile.": "Nachrichten in diesem Raum sind Ende-zu-Ende verschlüsselt. Erfahre mehr & überprüfe diesen Benutzer in seinem Benutzerprofil.", "Encryption not enabled": "Verschlüsselung nicht aktiviert", "You verified %(name)s": "Du hast %(name)s verifiziert", - "You cancelled verifying %(name)s": "Sie haben die Verifizierung von %(name)s abgebrochen", + "You cancelled verifying %(name)s": "Du hast die Verifizierung von %(name)s abgebrochen", "%(name)s cancelled verifying": "%(name)s hat die Verifizierung abgebrochen", "%(name)s accepted": "%(name)s hat akzeptiert", "%(name)s declined": "%(name)s hat abgelehnt", "%(name)s cancelled": "%(name)s hat abgebrochen", "%(name)s wants to verify": "%(name)s will eine Verifizierung", - "Your display name": "Ihr Anzeigename", + "Your display name": "Dein Anzeigename", "Please enter a name for the room": "Bitte geben Sie einen Namen für den Raum ein", "This room is private, and can only be joined by invitation.": "Dieser Raum ist privat und kann nur auf Einladung betreten werden.", "Create a private room": "Erstelle einen privaten Raum", @@ -1486,9 +1486,9 @@ "Hide advanced": "Weitere Einstellungen ausblenden", "Block users on other matrix homeservers from joining this room (This setting cannot be changed later!)": "Hindere Benutzer auf anderen Matrix-Homeservern daran, diesem Raum beizutreten (Diese Einstellung kann später nicht geändert werden!)", "Session name": "Name der Sitzung", - "This will allow you to return to your account after signing out, and sign in on other sessions.": "So können Sie nach der Abmeldung zu Ihrem Konto zurückkehren und sich bei anderen Sitzungen anmelden.", + "This will allow you to return to your account after signing out, and sign in on other sessions.": "So kannst du nach der Abmeldung zu deinem Konto zurückkehren und dich bei anderen Sitzungen anmelden.", "Use bots, bridges, widgets and sticker packs": "Benutze Bots, Bridges, Widgets und Sticker-Packs", - "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.": "Wenn Sie Ihr Passwort ändern, werden alle End-to-End-Verschlüsselungsschlüssel für alle Ihre Sitzungen zurückgesetzt, sodass der verschlüsselte Chat-Verlauf nicht mehr lesbar ist. Richten Sie ein Schlüssel-Backup ein oder exportieren Sie Ihre Raumschlüssel aus einer anderen Sitzung, bevor Sie Ihr Passwort zurücksetzen.", + "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.": "Wenn du dein Passwort änderst, werden alle Ende-zu-Ende-Verschlüsselungsschlüssel für alle deine Sitzungen zurückgesetzt, sodass der verschlüsselte Chat-Verlauf nicht mehr lesbar ist. Richte ein Schlüssel-Backup ein oder exportiere deine Raumschlüssel aus einer anderen Sitzung, bevor du dein Passwort zurücksetzst.", "You have been logged out of all sessions and will no longer receive push notifications. To re-enable notifications, sign in again on each device.": "Sie wurden von allen Sitzungen abgemeldet und erhalten keine Push-Benachrichtigungen mehr. Um die Benachrichtigungen wieder zu aktivieren, melden Sie sich auf jedem Gerät erneut an.", "Upgrade this session to allow it to verify other sessions, granting them access to encrypted messages and marking them as trusted for other users.": "Aktualisieren Sie diese Sitzung, damit sie andere Sitzungen verifizieren kann, indem sie ihnen Zugang zu verschlüsselten Nachrichten gewährt und sie für andere Benutzer als vertrauenswürdig markiert.", "Sign out and remove encryption keys?": "Abmelden und Verschlüsselungsschlüssel entfernen?", @@ -2410,7 +2410,7 @@ "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", "Show message previews for reactions in DMs": "Anzeigen einer Nachrichtenvorschau für Reaktionen in DMs", - "Show message previews for reactions in all rooms": "Zeigen Sie eine Nachrichtenvorschau für Reaktionen in allen Räumen an", + "Show message previews for reactions in all rooms": "Zeige eine Nachrichtenvorschau für Reaktionen in allen Räumen an", "Uploading logs": "Protokolle werden hochgeladen", "Downloading logs": "Protokolle werden heruntergeladen", "Explore public rooms": "Erkunde öffentliche Räume", From e92d75ea6a688e0758c6d9e55442879efa430893 Mon Sep 17 00:00:00 2001 From: Michael Albert Date: Mon, 21 Sep 2020 13:39:47 +0000 Subject: [PATCH 080/331] Translated using Weblate (German) Currently translated at 100.0% (2369 of 2369 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/element-web/matrix-react-sdk/de/ --- src/i18n/strings/de_DE.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/i18n/strings/de_DE.json b/src/i18n/strings/de_DE.json index 43ecff16b2..fb4ce48796 100644 --- a/src/i18n/strings/de_DE.json +++ b/src/i18n/strings/de_DE.json @@ -1458,8 +1458,8 @@ "You have verified this user. This user has verified all of their sessions.": "Du hast diese/n Nutzer!n verifiziert. Er/Sie hat alle seine/ihre Sitzungen verifiziert.", "Your key share request has been sent - please check your other sessions for key share requests.": "Deine Schlüsselanfrage wurde gesendet - sieh in deinen anderen Sitzungen nach der Schlüsselanfrage.", "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.": "Schlüsselanfragen werden automatisch an deine anderen Sitzungen gesendet. Wenn du sie abgelehnt oder ignoriert hast klicke hier, um die Schlüssel erneut anzufordern.", - "If your other sessions do not have the key for this message you will not be able to decrypt them.": "Wenn Ihre anderen Sitzungen nicht über den Schlüssel für diese Nachricht verfügen, können Sie sie nicht entschlüsseln.", - "Re-request encryption keys from your other sessions.": "Fordern Sie Verschlüsselungsschlüssel aus Ihren anderen Sitzungen erneut an.", + "If your other sessions do not have the key for this message you will not be able to decrypt them.": "Wenn deine anderen Sitzungen nicht über den Schlüssel für diese Nachricht verfügen, kannst du die Nachricht nicht entschlüsseln.", + "Re-request encryption keys from your other sessions.": "Fordere die Verschlüsselungsschlüssel aus deinen anderen Sitzungen erneut an.", "Room %(name)s": "Raum %(name)s", "Upgrading this room will shut down the current instance of the room and create an upgraded room with the same name.": "Ein Upgrade dieses Raums schaltet die aktuelle Instanz des Raums ab und erstellt einen aktualisierten Raum mit demselben Namen.", "%(name)s (%(userId)s) signed in to a new session without verifying it:": "%(name)s (%(userId)s) hat sich zu einer neuen Sitzung angemeldet, ohne sie zu verifizieren:", From 10dfb64092d8e6aeaab3f159d4e57d562b742159 Mon Sep 17 00:00:00 2001 From: Christian Paul Date: Mon, 21 Sep 2020 13:48:10 +0000 Subject: [PATCH 081/331] Translated using Weblate (German) Currently translated at 100.0% (2369 of 2369 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.riot.im/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 fb4ce48796..e211ef6a2a 100644 --- a/src/i18n/strings/de_DE.json +++ b/src/i18n/strings/de_DE.json @@ -960,7 +960,7 @@ "If you didn't set the new recovery method, an attacker may be trying to access your account. Change your account password and set a new recovery method immediately in Settings.": "Wenn du die neue Wiederherstellungsmethode nicht festgelegt hast, versucht ein/e Angreifer!n möglicherweise, auf dein Konto zuzugreifen. Ändere dein Kontopasswort und lege sofort eine neue Wiederherstellungsmethode in den Einstellungen fest.", "Set up Secure Messages": "Richte sichere Nachrichten ein", "Go to Settings": "Gehe zu Einstellungen", - "Sign in with single sign-on": "Melden Sie sich mit Single Sign-On an", + "Sign in with single sign-on": "Melden Sie sich mit „Single Sign-On“ an", "Unrecognised address": "Nicht erkannte Adresse", "User %(user_id)s may or may not exist": "Existenz der Benutzer %(user_id)s unsicher", "Prompt before sending invites to potentially invalid matrix IDs": "Nachfragen bevor Einladungen zu möglichen ungültigen Matrix IDs gesendet werden", From 115c7ccd4e5d22c27ca757102fbca0be0c34882f Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Mon, 21 Sep 2020 15:48:47 +0100 Subject: [PATCH 082/331] Support HS-preferred Secure Backup setup methods This adds support for the `secure_backup_setup_methods` key, which allows HS admins to state that Element should simplify down to only one setup method, rather than offering both. Fixes https://github.com/vector-im/element-web/issues/15238 --- .../security/CreateSecretStorageDialog.js | 78 ++++++++++++------- src/i18n/strings/en_EN.json | 2 +- src/utils/WellKnownUtils.ts | 16 ++++ 3 files changed, 67 insertions(+), 29 deletions(-) diff --git a/src/async-components/views/dialogs/security/CreateSecretStorageDialog.js b/src/async-components/views/dialogs/security/CreateSecretStorageDialog.js index f3b52da141..00aad2a0ce 100644 --- a/src/async-components/views/dialogs/security/CreateSecretStorageDialog.js +++ b/src/async-components/views/dialogs/security/CreateSecretStorageDialog.js @@ -31,7 +31,7 @@ import AccessibleButton from "../../../../components/views/elements/AccessibleBu import DialogButtons from "../../../../components/views/elements/DialogButtons"; import InlineSpinner from "../../../../components/views/elements/InlineSpinner"; import RestoreKeyBackupDialog from "../../../../components/views/dialogs/security/RestoreKeyBackupDialog"; -import { isSecureBackupRequired } from '../../../../utils/WellKnownUtils'; +import { getSecureBackupSetupMethods, isSecureBackupRequired } from '../../../../utils/WellKnownUtils'; const PHASE_LOADING = 0; const PHASE_LOADERROR = 1; @@ -87,10 +87,16 @@ export default class CreateSecretStorageDialog extends React.PureComponent { canUploadKeysWithPasswordOnly: null, accountPassword: props.accountPassword || "", accountPasswordCorrect: null, - passPhraseKeySelected: CREATE_STORAGE_OPTION_KEY, canSkip: !isSecureBackupRequired(), }; + const setupMethods = getSecureBackupSetupMethods(); + if (setupMethods.includes("key")) { + this.state.passPhraseKeySelected = CREATE_STORAGE_OPTION_KEY; + } else { + this.state.passPhraseKeySelected = CREATE_STORAGE_OPTION_PASSPHRASE; + } + this._passphraseField = createRef(); this._fetchBackupInfo(); @@ -441,39 +447,55 @@ export default class CreateSecretStorageDialog extends React.PureComponent { }); } + _renderOptionKey() { + return ( + +
+ + {_t("Generate a Security Key")} +
+
{_t("We’ll generate a Security Key for you to store somewhere safe, like a password manager or a safe.")}
+
+ ); + } + + _renderOptionPassphrase() { + return ( + +
+ + {_t("Enter a Security Phrase")} +
+
{_t("Use a secret phrase only you know, and optionally save a Security Key to use for backup.")}
+
+ ); + } + _renderPhaseChooseKeyPassphrase() { + const setupMethods = getSecureBackupSetupMethods(); + const optionKey = setupMethods.includes("key") ? this._renderOptionKey() : null; + const optionPassphrase = setupMethods.includes("passphrase") ? this._renderOptionPassphrase() : null; + return

{_t( "Safeguard against losing access to encrypted messages & data by " + "backing up encryption keys on your server.", )}

- -
- - {_t("Generate a Security Key")} -
-
{_t("We’ll generate a Security Key for you to store somewhere safe, like a password manager or a safe.")}
-
- -
- - {_t("Enter a Security Phrase")} -
-
{_t("Use a secret phrase only you know, and optionally save a Security Key to use for backup.")}
-
+ {optionKey} + {optionPassphrase}
Date: Mon, 21 Sep 2020 12:13:41 +0000 Subject: [PATCH 083/331] Translated using Weblate (Dutch) Currently translated at 82.7% (1958 of 2369 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/element-web/matrix-react-sdk/nl/ --- src/i18n/strings/nl.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/nl.json b/src/i18n/strings/nl.json index bb0fb5def6..1ec887c364 100644 --- a/src/i18n/strings/nl.json +++ b/src/i18n/strings/nl.json @@ -2026,5 +2026,6 @@ "To return to your account in future you need to set a password": "Zonder wachtwoord kunt u later niet tot uw account terugkeren", "Restart": "Herstarten", "People": "Tweegesprekken", - "Set a room address to easily share your room with other people.": "Geef het gesprek een adres om het gemakkelijk met anderen te kunnen delen." + "Set a room address to easily share your room with other people.": "Geef het gesprek een adres om het gemakkelijk met anderen te kunnen delen.", + "Invite people to join %(communityName)s": "Stuur uitnodigingen voor %(communityName)s" } From b7d4a94edd0f7f21d526f5ddb03cd319902b6dde Mon Sep 17 00:00:00 2001 From: XoseM Date: Mon, 21 Sep 2020 08:24:55 +0000 Subject: [PATCH 084/331] Translated using Weblate (Galician) Currently translated at 100.0% (2369 of 2369 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/element-web/matrix-react-sdk/gl/ --- src/i18n/strings/gl.json | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/gl.json b/src/i18n/strings/gl.json index 51f39758e1..b19cb28420 100644 --- a/src/i18n/strings/gl.json +++ b/src/i18n/strings/gl.json @@ -2499,5 +2499,12 @@ "Start a conversation with someone using their name or username (like ).": "Inicia unha conversa con alguén usando o seu nome ou nome de usuaria (como ).", "This won't invite them to %(communityName)s. To invite someone to %(communityName)s, click here": "Esto non as convidará a %(communityName)s. Para convidar alguén a %(communityName)s, preme aquí", "Invite someone using their name, username (like ) or share this room.": "Convida a alguén usando o seu nome, nome de usuaria (como ) ou comparte esta sala.", - "Unable to set up keys": "Non se puideron configurar as chaves" + "Unable to set up keys": "Non se puideron configurar as chaves", + "Widgets": "Widgets", + "Edit widgets, bridges & bots": "Editar widgets, pontes e bots", + "Add widgets, bridges & bots": "Engade widgets, pontes e bots", + "You can only pin 2 widgets at a time": "Só podes fixar 2 widgets ó mesmo tempo", + "Minimize widget": "Minimizar widget", + "Maximize widget": "Maximizar widget", + "Your server requires encryption to be enabled in private rooms.": "O servidor require que actives o cifrado nas salas privadas." } From e691f78c513505e1db3068c9d6dc88c4e5629533 Mon Sep 17 00:00:00 2001 From: "@a2sc:matrix.org" Date: Mon, 21 Sep 2020 13:48:27 +0000 Subject: [PATCH 085/331] Translated using Weblate (German) Currently translated at 100.0% (2369 of 2369 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/element-web/matrix-react-sdk/de/ --- src/i18n/strings/de_DE.json | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/i18n/strings/de_DE.json b/src/i18n/strings/de_DE.json index e211ef6a2a..b21898a561 100644 --- a/src/i18n/strings/de_DE.json +++ b/src/i18n/strings/de_DE.json @@ -801,7 +801,7 @@ "Muted Users": "Stummgeschaltete Benutzer", "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.": "Dies wird deinen Account permanent unbenutzbar machen. Du wirst nicht in der Lage sein, dich anzumelden und keiner wird dieselbe Benutzer-ID erneut registrieren können. Alle Räume, in denen der Account ist, werden verlassen und deine Account-Daten werden vom Identitätsserver gelöscht. Diese Aktion ist unumkehrbar.", "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.": "Standardmäßig werden die von dir gesendeten Nachrichten beim Deaktiveren nicht gelöscht. Wenn du dies von uns möchtest, aktivere das Auswalfeld unten.", - "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.": "Sie Sichtbarkeit der Nachrichten in Matrix ist vergleichbar mit E-Mails: Wenn wir deine Nachrichten vergessen heißt das, dass diese nicht mit neuen oder nicht registrierten Nutzern teilen werden, aber registrierte Nutzer, die bereits zugriff haben, werden Zugriff auf ihre Kopie behalten.", + "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.": "Die Sichtbarkeit der Nachrichten in Matrix ist vergleichbar mit E-Mails: Wenn wir deine Nachrichten vergessen heißt das, dass diese nicht mit neuen oder nicht registrierten Nutzern teilen werden, aber registrierte Nutzer, die bereits zugriff haben, werden Zugriff auf ihre Kopie behalten.", "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)": "Bitte vergesst alle Nachrichten, die ich gesendet habe, wenn mein Account deaktiviert wird. (Warnung: Zukünftige Nutzer werden eine unvollständige Konversation sehen)", "To continue, please enter your password:": "Um fortzufahren, bitte Passwort eingeben:", "Can't leave Server Notices room": "Du kannst den Raum für Server-Notizen nicht verlassen", @@ -937,9 +937,9 @@ "Unable to load key backup status": "Konnte Status der Schlüsselsicherung nicht laden", "Don't ask again": "Nicht erneut fragen", "Set up": "Einrichten", - "Please review and accept all of the homeserver's policies": "Bitte prüfen und akzeptieren Sie alle Richtlinien des Heimservers", + "Please review and accept all of the homeserver's policies": "Bitte prüfe und akzeptiere alle Richtlinien des Heimservers", "Failed to load group members": "Konnte Gruppenmitglieder nicht laden", - "That doesn't look like a valid email address": "Sieht nicht nach einer validen E-Mail-Adresse aus", + "That doesn't look like a valid email address": "Sieht nicht nach einer gültigen E-Mail-Adresse aus", "Unable to load commit detail: %(msg)s": "Konnte Commit-Details nicht laden: %(msg)s", "Checking...": "Überprüfe...", "Unable to load backup status": "Konnte Sicherungsstatus nicht laden", @@ -960,7 +960,7 @@ "If you didn't set the new recovery method, an attacker may be trying to access your account. Change your account password and set a new recovery method immediately in Settings.": "Wenn du die neue Wiederherstellungsmethode nicht festgelegt hast, versucht ein/e Angreifer!n möglicherweise, auf dein Konto zuzugreifen. Ändere dein Kontopasswort und lege sofort eine neue Wiederherstellungsmethode in den Einstellungen fest.", "Set up Secure Messages": "Richte sichere Nachrichten ein", "Go to Settings": "Gehe zu Einstellungen", - "Sign in with single sign-on": "Melden Sie sich mit „Single Sign-On“ an", + "Sign in with single sign-on": "Melde dich mit „Single Sign-On“ an", "Unrecognised address": "Nicht erkannte Adresse", "User %(user_id)s may or may not exist": "Existenz der Benutzer %(user_id)s unsicher", "Prompt before sending invites to potentially invalid matrix IDs": "Nachfragen bevor Einladungen zu möglichen ungültigen Matrix IDs gesendet werden", @@ -1141,11 +1141,11 @@ "Are you sure you want to sign out?": "Bist du sicher, dass du dich abmelden möchtest?", "Manually export keys": "Manueller Schlüssel Export", "Composer": "Nachrichteneingabefeld", - "Verify this user to mark them as trusted. Trusting users gives you extra peace of mind when using end-to-end encrypted messages.": "Überprüfen Sie diesen Benutzer, um ihn als vertrauenswürdig zu kennzeichnen. Benutzern zu vertrauen gibt Ihnen zusätzliche Sicherheit bei der Verwendung von Ende-zu-Ende-verschlüsselten Nachrichten.", + "Verify this user to mark them as trusted. Trusting users gives you extra peace of mind when using end-to-end encrypted messages.": "Überprüfe diesen Benutzer, um ihn als vertrauenswürdig zu kennzeichnen. Benutzern zu vertrauen gibt dir zusätzliche Sicherheit bei der Verwendung von Ende-zu-Ende-verschlüsselten Nachrichten.", "I don't want my encrypted messages": "Ich möchte meine verschlüsselten Nachrichten nicht", "You'll lose access to your encrypted messages": "Du wirst den Zugang zu deinen verschlüsselten Nachrichten verlieren", "If you run into any bugs or have feedback you'd like to share, please let us know on GitHub.": "Wenn du Fehler bemerkst oder eine Rückmeldung geben möchtest, teile dies uns auf GitHub mit.", - "To help avoid duplicate issues, please view existing issues first (and add a +1) or create a new issue if you can't find it.": "Um doppelte Issues zu vermeiden, schauen Sie bitte zuerst die existierenden Issues an (und fügen Sie ein \"+1\" hinzu), oder erstellen Sie ein neues Issue, wenn Sie keines finden können.", + "To help avoid duplicate issues, please view existing issues first (and add a +1) or create a new issue if you can't find it.": "Um doppelte Issues zu vermeiden, schaue bitte zuerst die existierenden Issues an (und füge ein \"+1\" hinzu), oder erstelle ein neues Issue, wenn du kein passendes findest.", "Report bugs & give feedback": "Melde Fehler & gib Rückmeldungen", "Update status": "Aktualisiere Status", "Set status": "Setze Status", @@ -1188,7 +1188,7 @@ "Enter the location of your Modular homeserver. It may use your own domain name or be a subdomain of modular.im.": "Gib die Adresse deines Modular-Heimservers an. Es kann deine eigene Domain oder eine Subdomain von modular.im sein.", "Unable to query for supported registration methods.": "Konnte unterstützte Registrierungsmethoden nicht abrufen.", "Bulk options": "Sammeloptionen", - "Join millions for free on the largest public server": "Schließen Sie sich auf dem größten öffentlichen Server kostenlos Millionen von Menschen an", + "Join millions for free on the largest public server": "Schließe dich kostenlos auf dem größten öffentlichen Server Millionen von Menschen an", "Prepends ¯\\_(ツ)_/¯ to a plain-text message": "Fügt ¯\\_(ツ)_/¯ vor einer Klartextnachricht ein", "Changes your display nickname in the current room only": "Ändert den Anzeigenamen ausschließlich für den aktuellen Raum", "%(senderDisplayName)s enabled flair for %(groups)s in this room.": "%(senderDisplayName)s aktivierte Abzeichen der Gruppen %(groups)s für diesen Raum.", @@ -1445,12 +1445,12 @@ "Recently Direct Messaged": "Kürzlich direkt verschickt", "Go": "Los", "Command Help": "Befehl Hilfe", - "To help us prevent this in future, please send us logs.": "Um uns zu helfen, dies in Zukunft zu vermeiden, senden Sie uns bitte Logs.", + "To help us prevent this in future, please send us logs.": "Um uns zu helfen, dies in Zukunft zu vermeiden, sende uns bitte Logs.", "Notification settings": "Benachrichtigungseinstellungen", "Help": "Hilf uns", "Filter": "Filtern", "Filter rooms…": "Räume filtern…", - "You have %(count)s unread notifications in a prior version of this room.|one": "Sie haben %(count)s ungelesene Benachrichtigungen in einer früheren Version dieses Raumes.", + "You have %(count)s unread notifications in a prior version of this room.|one": "Du hast %(count)s ungelesene Benachrichtigungen in einer früheren Version dieses Raumes.", "Go Back": "Gehe zurück", "Notification Autocomplete": "Benachrichtigung Autovervollständigen", "If disabled, messages from encrypted rooms won't appear in search results.": "Wenn deaktiviert, werden Nachrichten von verschlüsselten Räumen nicht in den Ergebnissen auftauchen.", @@ -1478,19 +1478,19 @@ "%(name)s cancelled": "%(name)s hat abgebrochen", "%(name)s wants to verify": "%(name)s will eine Verifizierung", "Your display name": "Dein Anzeigename", - "Please enter a name for the room": "Bitte geben Sie einen Namen für den Raum ein", + "Please enter a name for the room": "Bitte gib einen Namen für den Raum ein", "This room is private, and can only be joined by invitation.": "Dieser Raum ist privat und kann nur auf Einladung betreten werden.", "Create a private room": "Erstelle einen privaten Raum", "Topic (optional)": "Thema (optional)", - "Make this room public": "Machen Sie diesen Raum öffentlich", + "Make this room public": "Mache diesen Raum öffentlich", "Hide advanced": "Weitere Einstellungen ausblenden", "Block users on other matrix homeservers from joining this room (This setting cannot be changed later!)": "Hindere Benutzer auf anderen Matrix-Homeservern daran, diesem Raum beizutreten (Diese Einstellung kann später nicht geändert werden!)", "Session name": "Name der Sitzung", "This will allow you to return to your account after signing out, and sign in on other sessions.": "So kannst du nach der Abmeldung zu deinem Konto zurückkehren und dich bei anderen Sitzungen anmelden.", "Use bots, bridges, widgets and sticker packs": "Benutze Bots, Bridges, Widgets und Sticker-Packs", "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.": "Wenn du dein Passwort änderst, werden alle Ende-zu-Ende-Verschlüsselungsschlüssel für alle deine Sitzungen zurückgesetzt, sodass der verschlüsselte Chat-Verlauf nicht mehr lesbar ist. Richte ein Schlüssel-Backup ein oder exportiere deine Raumschlüssel aus einer anderen Sitzung, bevor du dein Passwort zurücksetzst.", - "You have been logged out of all sessions and will no longer receive push notifications. To re-enable notifications, sign in again on each device.": "Sie wurden von allen Sitzungen abgemeldet und erhalten keine Push-Benachrichtigungen mehr. Um die Benachrichtigungen wieder zu aktivieren, melden Sie sich auf jedem Gerät erneut an.", - "Upgrade this session to allow it to verify other sessions, granting them access to encrypted messages and marking them as trusted for other users.": "Aktualisieren Sie diese Sitzung, damit sie andere Sitzungen verifizieren kann, indem sie ihnen Zugang zu verschlüsselten Nachrichten gewährt und sie für andere Benutzer als vertrauenswürdig markiert.", + "You have been logged out of all sessions and will no longer receive push notifications. To re-enable notifications, sign in again on each device.": "Du wurdest von allen Sitzungen abgemeldet und erhälst keine Push-Benachrichtigungen mehr. Um die Benachrichtigungen wieder zu aktivieren, melde dich auf jedem Gerät erneut an.", + "Upgrade this session to allow it to verify other sessions, granting them access to encrypted messages and marking them as trusted for other users.": "Aktualisiere diese Sitzung, damit sie andere Sitzungen verifizieren kann, indem sie dir Zugang zu verschlüsselten Nachrichten gewährt und sie für andere Benutzer als vertrauenswürdig markiert.", "Sign out and remove encryption keys?": "Abmelden und Verschlüsselungsschlüssel entfernen?", "Sign in to your Matrix account on ": "Melde dich bei deinem Matrix-Konto auf an", "Enter your password to sign in and regain access to your account.": "Gib dein Passwort ein, um dich anzumelden und wieder Zugang zu deinem Konto zu erhalten.", From 6fee3d8f4f2aa63615ddffef20a476b0c0776160 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Mon, 21 Sep 2020 18:37:08 -0600 Subject: [PATCH 086/331] Spread out the general user settings sections like the other tabs By design request. --- .../views/settings/tabs/user/_GeneralUserSettingsTab.scss | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/res/css/views/settings/tabs/user/_GeneralUserSettingsTab.scss b/res/css/views/settings/tabs/user/_GeneralUserSettingsTab.scss index 6c9b89cf5a..8b73e69031 100644 --- a/res/css/views/settings/tabs/user/_GeneralUserSettingsTab.scss +++ b/res/css/views/settings/tabs/user/_GeneralUserSettingsTab.scss @@ -22,6 +22,13 @@ limitations under the License. margin-top: 0; } +// TODO: Make this selector less painful +.mx_GeneralUserSettingsTab_accountSection .mx_SettingsTab_subheading:nth-child(n + 1), +.mx_GeneralUserSettingsTab_discovery .mx_SettingsTab_subheading:nth-child(n + 2), +.mx_SetIdServer .mx_SettingsTab_subheading { + margin-top: 24px; +} + .mx_GeneralUserSettingsTab_accountSection .mx_Spinner, .mx_GeneralUserSettingsTab_discovery .mx_Spinner { // Move the spinner to the left side of the container (default center) From 4f983ad9a1fe84616971c4f2bebcbe1ed1ac514d Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Mon, 21 Sep 2020 21:00:51 -0600 Subject: [PATCH 087/331] Rework profile sections of user and room settings Mostly by design request. Some is freehand, to be reviewed. --- res/css/views/settings/_AvatarSetting.scss | 87 +++++++++++++++++-- res/css/views/settings/_ProfileSettings.scss | 23 ++++- .../room_settings/RoomProfileSettings.js | 33 +++++-- .../views/settings/AvatarSetting.js | 56 +++++++----- .../views/settings/ProfileSettings.js | 43 +++++++-- .../tabs/user/GeneralUserSettingsTab.js | 1 - src/i18n/strings/en_EN.json | 4 +- 7 files changed, 200 insertions(+), 47 deletions(-) diff --git a/res/css/views/settings/_AvatarSetting.scss b/res/css/views/settings/_AvatarSetting.scss index eddcf9f55a..871b436ba6 100644 --- a/res/css/views/settings/_AvatarSetting.scss +++ b/res/css/views/settings/_AvatarSetting.scss @@ -1,5 +1,5 @@ /* -Copyright 2019 The Matrix.org Foundation C.I.C. +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. @@ -15,13 +15,55 @@ limitations under the License. */ .mx_AvatarSetting_avatar { - width: $font-88px; - height: $font-88px; - margin-left: 13px; + width: 90px; + height: 90px; + margin-top: 8px; position: relative; + .mx_AvatarSetting_hover { + transition: opacity 0.08s cubic-bezier(.46, .03, .52, .96); // quadratic + + // position to place the hover bg over the entire thing + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; + + pointer-events: none; // let the pointer fall through the underlying thing + + line-height: 90px; + text-align: center; + + > span { + color: #fff; // hardcoded to contrast with background + position: relative; // tricks the layout engine into putting this on top of the bg + font-weight: 500; + } + + .mx_AvatarSetting_hoverBg { + // absolute position to lazily fill the entire container + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; + + opacity: 0.5; + background-color: $settings-profile-overlay-placeholder-fg-color; + border-radius: 90px; + } + } + + &.mx_AvatarSetting_avatar_hovering .mx_AvatarSetting_hover { + opacity: 1; + } + + &:not(.mx_AvatarSetting_avatar_hovering) .mx_AvatarSetting_hover { + opacity: 0; + } + & > * { - width: $font-88px; box-sizing: border-box; } @@ -30,7 +72,7 @@ limitations under the License. } .mx_AccessibleButton.mx_AccessibleButton_kind_link_sm { - color: $button-danger-bg-color; + width: 100%; } & > img { @@ -41,8 +83,9 @@ limitations under the License. & > img, .mx_AvatarSetting_avatarPlaceholder { display: block; - height: $font-88px; - border-radius: 4px; + height: 90px; + border-radius: 90px; + cursor: pointer; } .mx_AvatarSetting_avatarPlaceholder::before { @@ -58,6 +101,34 @@ limitations under the License. left: 0; right: 0; } + + .mx_AvatarSetting_avatarPlaceholder ~ .mx_AvatarSetting_uploadButton { + border: 1px solid $settings-profile-overlay-placeholder-fg-color; + } + + .mx_AvatarSetting_uploadButton { + width: 32px; + height: 32px; + border-radius: 32px; + background-color: $settings-profile-placeholder-bg-color; + + position: absolute; + bottom: 0; + right: 0; + } + + .mx_AvatarSetting_uploadButton::before { + content: ""; + display: block; + width: 100%; + height: 100%; + mask-repeat: no-repeat; + mask-position: center; + mask-size: 55%; + background-color: $settings-profile-overlay-placeholder-fg-color; + mask-image: url('$(res)/img/feather-customised/edit.svg'); + } + } .mx_AvatarSetting_avatar .mx_AvatarSetting_avatarPlaceholder { diff --git a/res/css/views/settings/_ProfileSettings.scss b/res/css/views/settings/_ProfileSettings.scss index 58624d1597..732cbedf02 100644 --- a/res/css/views/settings/_ProfileSettings.scss +++ b/res/css/views/settings/_ProfileSettings.scss @@ -1,5 +1,5 @@ /* -Copyright 2019 New Vector 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. @@ -20,6 +20,13 @@ limitations under the License. .mx_ProfileSettings_controls { flex-grow: 1; + margin-right: 54px; + + // We put the header under the controls with some minor styling to cheat + // alignment of the field with the avatar + .mx_SettingsTab_subheading { + margin-top: 0; + } } .mx_ProfileSettings_controls .mx_Field #profileTopic { @@ -41,3 +48,17 @@ limitations under the License. .mx_ProfileSettings_avatarUpload { display: none; } + +.mx_ProfileSettings_profileForm { + @mixin mx_Settings_fullWidthField; + border-bottom: 1px solid $menu-border-color; +} + +.mx_ProfileSettings_buttons { + margin-top: 10px; // 18px is already accounted for by the

above the buttons + margin-bottom: 28px; + + > .mx_AccessibleButton_kind_link { + padding-left: 0; // to align with left side + } +} diff --git a/src/components/views/room_settings/RoomProfileSettings.js b/src/components/views/room_settings/RoomProfileSettings.js index f657fbf509..621c8b287e 100644 --- a/src/components/views/room_settings/RoomProfileSettings.js +++ b/src/components/views/room_settings/RoomProfileSettings.js @@ -75,6 +75,15 @@ export default class RoomProfileSettings extends React.Component { }); }; + _clearProfile = async (e) => { + e.stopPropagation(); + e.preventDefault(); + + if (!this.state.enableProfileSave) return; + this._removeAvatar(); + this.setState({enableProfileSave: false, displayName: this.state.originalDisplayName}); + }; + _saveProfile = async (e) => { e.stopPropagation(); e.preventDefault(); @@ -150,7 +159,11 @@ export default class RoomProfileSettings extends React.Component { const AccessibleButton = sdk.getComponent('elements.AccessibleButton'); const AvatarSetting = sdk.getComponent('settings.AvatarSetting'); return ( - +

@@ -169,10 +182,20 @@ export default class RoomProfileSettings extends React.Component { uploadAvatar={this.state.canSetAvatar ? this._uploadAvatar : undefined} removeAvatar={this.state.canSetAvatar ? this._removeAvatar : undefined} />
- - {_t("Save")} - +
+ + {_t("Cancel")} + + + {_t("Save")} + +
); } diff --git a/src/components/views/settings/AvatarSetting.js b/src/components/views/settings/AvatarSetting.js index 888d99ca49..580ebdcdad 100644 --- a/src/components/views/settings/AvatarSetting.js +++ b/src/components/views/settings/AvatarSetting.js @@ -14,25 +14,25 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React, {useCallback} from "react"; +import React, {useState} from "react"; import PropTypes from "prop-types"; - -import * as sdk from "../../../index"; import {_t} from "../../../languageHandler"; -import Modal from "../../../Modal"; +import AccessibleButton from "../elements/AccessibleButton"; +import classNames from "classnames"; const AvatarSetting = ({avatarUrl, avatarAltText, avatarName, uploadAvatar, removeAvatar}) => { - const AccessibleButton = sdk.getComponent('elements.AccessibleButton'); + const [isHovering, setIsHovering] = useState(); + const hoveringProps = { + onMouseEnter: () => setIsHovering(true), + onMouseLeave: () => setIsHovering(false), + }; - const openImageView = useCallback(() => { - const ImageView = sdk.getComponent("elements.ImageView"); - Modal.createDialog(ImageView, { - src: avatarUrl, - name: avatarName, - }, "mx_Dialog_lightbox"); - }, [avatarUrl, avatarName]); - - let avatarElement =
; + let avatarElement = ; if (avatarUrl) { avatarElement = ( + onClick={uploadAvatar} + {...hoveringProps} + /> ); } let uploadAvatarBtn; if (uploadAvatar) { // insert an empty div to be the host for a css mask containing the upload.svg - uploadAvatarBtn = - {_t("Upload")} - ; + uploadAvatarBtn = ; } let removeAvatarBtn; @@ -59,10 +63,18 @@ const AvatarSetting = ({avatarUrl, avatarAltText, avatarName, uploadAvatar, remo ; } - return
- { avatarElement } - { uploadAvatarBtn } - { removeAvatarBtn } + const avatarClasses = classNames({ + "mx_AvatarSetting_avatar": true, + "mx_AvatarSetting_avatar_hovering": isHovering, + }) + return
+ {avatarElement} +
+
+ {_t("Upload")} +
+ {uploadAvatarBtn} + {removeAvatarBtn}
; }; diff --git a/src/components/views/settings/ProfileSettings.js b/src/components/views/settings/ProfileSettings.js index 5dbdcd4901..75c0fc0226 100644 --- a/src/components/views/settings/ProfileSettings.js +++ b/src/components/views/settings/ProfileSettings.js @@ -65,6 +65,15 @@ export default class ProfileSettings extends React.Component { }); }; + _clearProfile = async (e) => { + e.stopPropagation(); + e.preventDefault(); + + if (!this.state.enableProfileSave) return; + this._removeAvatar(); + this.setState({enableProfileSave: false, displayName: this.state.originalDisplayName}); + }; + _saveProfile = async (e) => { e.stopPropagation(); e.preventDefault(); @@ -144,18 +153,26 @@ export default class ProfileSettings extends React.Component { const AccessibleButton = sdk.getComponent('elements.AccessibleButton'); const AvatarSetting = sdk.getComponent('settings.AvatarSetting'); return ( -
+
+ {_t("Profile")} +

{this.state.userId} {hostingSignup}

-
- - {_t("Save")} - +
+ + {_t("Cancel")} + + + {_t("Save")} + +
); } diff --git a/src/components/views/settings/tabs/user/GeneralUserSettingsTab.js b/src/components/views/settings/tabs/user/GeneralUserSettingsTab.js index 54d4928d83..35285351ab 100644 --- a/src/components/views/settings/tabs/user/GeneralUserSettingsTab.js +++ b/src/components/views/settings/tabs/user/GeneralUserSettingsTab.js @@ -221,7 +221,6 @@ export default class GeneralUserSettingsTab extends React.Component { _renderProfileSection() { return (
- {_t("Profile")}
); diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index d7360430ae..22bba60ea4 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -624,8 +624,8 @@ "From %(deviceName)s (%(deviceId)s)": "From %(deviceName)s (%(deviceId)s)", "Decline (%(counter)s)": "Decline (%(counter)s)", "Accept to continue:": "Accept to continue:", - "Upload": "Upload", "Remove": "Remove", + "Upload": "Upload", "This bridge was provisioned by .": "This bridge was provisioned by .", "This bridge is managed by .": "This bridge is managed by .", "Workspace: %(networkName)s": "Workspace: %(networkName)s", @@ -722,6 +722,7 @@ "On": "On", "Noisy": "Noisy", "Upgrade to your own domain": "Upgrade to your own domain", + "Profile": "Profile", "Display Name": "Display Name", "Profile picture": "Profile picture", "Save": "Save", @@ -822,7 +823,6 @@ "Failed to change password. Is your password correct?": "Failed to change password. Is your password correct?", "Success": "Success", "Your password was successfully changed. You will not receive push notifications on other sessions until you log back in to them": "Your password was successfully changed. You will not receive push notifications on other sessions until you log back in to them", - "Profile": "Profile", "Email addresses": "Email addresses", "Phone numbers": "Phone numbers", "Set a new account password...": "Set a new account password...", From 3e0cbd7bfe0c55e7b5bc3dab7292774aa92545c3 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Mon, 21 Sep 2020 21:09:46 -0600 Subject: [PATCH 088/331] Appease the linters --- res/css/views/settings/_AvatarSetting.scss | 1 - src/components/views/settings/AvatarSetting.js | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/res/css/views/settings/_AvatarSetting.scss b/res/css/views/settings/_AvatarSetting.scss index 871b436ba6..d2c0268a5c 100644 --- a/res/css/views/settings/_AvatarSetting.scss +++ b/res/css/views/settings/_AvatarSetting.scss @@ -128,7 +128,6 @@ limitations under the License. background-color: $settings-profile-overlay-placeholder-fg-color; mask-image: url('$(res)/img/feather-customised/edit.svg'); } - } .mx_AvatarSetting_avatar .mx_AvatarSetting_avatarPlaceholder { diff --git a/src/components/views/settings/AvatarSetting.js b/src/components/views/settings/AvatarSetting.js index 580ebdcdad..84effe3dc0 100644 --- a/src/components/views/settings/AvatarSetting.js +++ b/src/components/views/settings/AvatarSetting.js @@ -66,7 +66,7 @@ const AvatarSetting = ({avatarUrl, avatarAltText, avatarName, uploadAvatar, remo const avatarClasses = classNames({ "mx_AvatarSetting_avatar": true, "mx_AvatarSetting_avatar_hovering": isHovering, - }) + }); return
{avatarElement}
From 693dbab54e48f061ac715aa0932dea651780e5f6 Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Tue, 22 Sep 2020 15:22:39 +0100 Subject: [PATCH 089/331] Add more types and enums --- src/utils/WellKnownUtils.ts | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/src/utils/WellKnownUtils.ts b/src/utils/WellKnownUtils.ts index 6437d22cb3..69ed39e0ee 100644 --- a/src/utils/WellKnownUtils.ts +++ b/src/utils/WellKnownUtils.ts @@ -19,9 +19,13 @@ import {MatrixClientPeg} from '../MatrixClientPeg'; const E2EE_WK_KEY = "io.element.e2ee"; const E2EE_WK_KEY_DEPRECATED = "im.vector.riot.e2ee"; +/* eslint-disable camelcase */ export interface IE2EEWellKnown { default?: boolean; + secure_backup_required?: boolean; + secure_backup_setup_methods?: SecureBackupSetupMethod[]; } +/* eslint-enable camelcase */ export function getE2EEWellKnown(): IE2EEWellKnown { const clientWellKnown = MatrixClientPeg.get().getClientWellKnown(); @@ -39,18 +43,26 @@ export function isSecureBackupRequired(): boolean { return wellKnown && wellKnown["secure_backup_required"] === true; } -export function getSecureBackupSetupMethods(): string[] { +export enum SecureBackupSetupMethod { + Key = "key", + Passphrase = "passphrase", +} + +export function getSecureBackupSetupMethods(): SecureBackupSetupMethod[] { const wellKnown = getE2EEWellKnown(); if ( !wellKnown || !wellKnown["secure_backup_setup_methods"] || !wellKnown["secure_backup_setup_methods"].length || !( - wellKnown["secure_backup_setup_methods"].includes("key") || - wellKnown["secure_backup_setup_methods"].includes("passphrase") + wellKnown["secure_backup_setup_methods"].includes(SecureBackupSetupMethod.Key) || + wellKnown["secure_backup_setup_methods"].includes(SecureBackupSetupMethod.Passphrase) ) ) { - return ["key", "passphrase"]; + return [ + SecureBackupSetupMethod.Key, + SecureBackupSetupMethod.Passphrase, + ]; } return wellKnown["secure_backup_setup_methods"]; } From 06b616eb1923b4c8dc9a6e3ae5699ecf0b77a4cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Priit=20J=C3=B5er=C3=BC=C3=BCt?= Date: Mon, 21 Sep 2020 17:53:32 +0000 Subject: [PATCH 090/331] Translated using Weblate (Estonian) Currently translated at 100.0% (2369 of 2369 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.riot.im/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 2cba9908d1..981ee512c8 100644 --- a/src/i18n/strings/et.json +++ b/src/i18n/strings/et.json @@ -1930,7 +1930,7 @@ "'%(groupId)s' is not a valid community ID": "'%(groupId)s' ei ole korrektne kogukonna tunnus", "Direct message": "Otsevestlus", "Demote yourself?": "Kas vähendad enda õigusi?", - "You will not be able to undo this change as you are demoting yourself, if you are the last privileged user in the room it will be impossible to regain privileges.": "Kuna sa vähendad enda õigusi, siis sul ei pruugi enam olla võimalik seda muutust tagasi pöörata. Kui sa juhtumisi oled viimane haldusõigustega kasutaja jututoas, siis hiljem on võimatu samu õigusi tagasi saada.", + "You will not be able to undo this change as you are demoting yourself, if you are the last privileged user in the room it will be impossible to regain privileges.": "Kuna sa vähendad enda õigusi, siis sul ei pruugi hiljem olla võimalik seda muutust tagasi pöörata. Kui sa juhtumisi oled viimane haldusõigustega kasutaja jututoas, siis hiljem on võimatu samu õigusi tagasi saada.", "Demote": "Vähenda enda õigusi", "Ban": "Keela ligipääs", "Unban this user?": "Kas taastame selle kasutaja ligipääsu?", From 898b2540df09374511132ff924abe3f73fb8d296 Mon Sep 17 00:00:00 2001 From: "@a2sc:matrix.org" Date: Mon, 21 Sep 2020 23:04:50 +0000 Subject: [PATCH 091/331] Translated using Weblate (German) Currently translated at 100.0% (2369 of 2369 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.riot.im/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 b21898a561..9ed6119873 100644 --- a/src/i18n/strings/de_DE.json +++ b/src/i18n/strings/de_DE.json @@ -818,7 +818,7 @@ "Share Room Message": "Teile Raumnachricht", "Link to selected message": "Link zur ausgewählten Nachricht", "COPY": "KOPIEREN", - "Share Message": "Teile Nachricht", + "Share Message": "Nachricht teilen", "No Audio Outputs detected": "Keine Ton-Ausgabe erkannt", "Audio Output": "Ton-Ausgabe", "In encrypted rooms, like this one, URL previews are disabled by default to ensure that your homeserver (where the previews are generated) cannot gather information about links you see in this room.": "In verschlüsselten Räumen, wie diesem, ist die Link-Vorschau standardmäßig deaktiviert damit dein Heimserver (auf dem die Vorschau erzeugt wird) keine Informationen über Links in diesem Raum bekommt.", From 81997a94a032a44b1497a001140a91a845afa545 Mon Sep 17 00:00:00 2001 From: random Date: Tue, 22 Sep 2020 14:48:44 +0000 Subject: [PATCH 092/331] Translated using Weblate (Italian) Currently translated at 100.0% (2369 of 2369 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/element-web/matrix-react-sdk/it/ --- src/i18n/strings/it.json | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/it.json b/src/i18n/strings/it.json index 9730c055ec..dbcf51f926 100644 --- a/src/i18n/strings/it.json +++ b/src/i18n/strings/it.json @@ -2496,5 +2496,18 @@ "Community and user menu": "Menu comunità e utente", "End Call": "Chiudi chiamata", "Remove the group call from the room?": "Rimuovere la chiamata di gruppo dalla stanza?", - "You don't have permission to remove the call from the room": "Non hai l'autorizzazione per rimuovere la chiamata dalla stanza" + "You don't have permission to remove the call from the room": "Non hai l'autorizzazione per rimuovere la chiamata dalla stanza", + "Safeguard against losing access to encrypted messages & data": "Proteggiti dalla perdita dei messaggi e dati crittografati", + "not found in storage": "non trovato nell'archivio", + "Widgets": "Widget", + "Edit widgets, bridges & bots": "Modifica widget, bridge e bot", + "Add widgets, bridges & bots": "Aggiungi widget, bridge e bot", + "You can only pin 2 widgets at a time": "Puoi fissare solo 2 widget alla volta", + "Minimize widget": "Riduci widget", + "Maximize widget": "Espandi widget", + "Your server requires encryption to be enabled in private rooms.": "Il tuo server richiede la crittografia attiva nelle stanze private.", + "Start a conversation with someone using their name or username (like ).": "Inizia una conversazione con qualcuno usando il suo nome o il nome utente (come ).", + "This won't invite them to %(communityName)s. To invite someone to %(communityName)s, click here": "Ciò non lo inviterà in %(communityName)s. Per invitare qualcuno in %(communityName)s, clicca qui", + "Invite someone using their name, username (like ) or share this room.": "Invita qualcuno usando il suo nome, nome utente (come ) o condividi questa stanza.", + "Unable to set up keys": "Impossibile impostare le chiavi" } From 064ae187e29939f3b346031a83b9fcbce7bf9a82 Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Tue, 22 Sep 2020 18:06:10 +0100 Subject: [PATCH 093/331] Upgrade sanitize-html, set nesting limit This uses the recently added option to allow specifying a nesting limit. Fixes https://github.com/vector-im/element-web/issues/15122 --- package.json | 2 +- src/@types/sanitize-html.ts | 23 ++++++++++++ src/HtmlUtils.tsx | 10 +++-- yarn.lock | 74 +++++++++++++++++++++++++++++++------ 4 files changed, 92 insertions(+), 17 deletions(-) create mode 100644 src/@types/sanitize-html.ts diff --git a/package.json b/package.json index 156cbb1bc8..53b54cbb60 100644 --- a/package.json +++ b/package.json @@ -95,7 +95,7 @@ "react-transition-group": "^4.4.1", "resize-observer-polyfill": "^1.5.1", "rfc4648": "^1.4.0", - "sanitize-html": "^1.27.1", + "sanitize-html": "github:apostrophecms/sanitize-html#3c7f93f2058f696f5359e3e58d464161647226db", "tar-js": "^0.3.0", "text-encoding-utf-8": "^1.0.2", "url": "^0.11.0", diff --git a/src/@types/sanitize-html.ts b/src/@types/sanitize-html.ts new file mode 100644 index 0000000000..188c8f9997 --- /dev/null +++ b/src/@types/sanitize-html.ts @@ -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. +*/ + +import sanitizeHtml from 'sanitize-html'; + +export interface IExtendedSanitizeOptions extends sanitizeHtml.IOptions { + // This option only exists in 2.x RCs so far, so not yet present in the + // separate type definition module. + nestingLimit?: number; +} diff --git a/src/HtmlUtils.tsx b/src/HtmlUtils.tsx index bd314c2e5f..f991d2df5d 100644 --- a/src/HtmlUtils.tsx +++ b/src/HtmlUtils.tsx @@ -19,6 +19,7 @@ limitations under the License. import React from 'react'; import sanitizeHtml from 'sanitize-html'; +import { IExtendedSanitizeOptions } from './@types/sanitize-html'; import * as linkify from 'linkifyjs'; import linkifyMatrix from './linkify-matrix'; import _linkifyElement from 'linkifyjs/element'; @@ -151,7 +152,7 @@ export function isUrlPermitted(inputUrl: string) { } } -const transformTags: sanitizeHtml.IOptions["transformTags"] = { // custom to matrix +const transformTags: IExtendedSanitizeOptions["transformTags"] = { // custom to matrix // add blank targets to all hyperlinks except vector URLs 'a': function(tagName: string, attribs: sanitizeHtml.Attributes) { if (attribs.href) { @@ -224,7 +225,7 @@ const transformTags: sanitizeHtml.IOptions["transformTags"] = { // custom to mat }, }; -const sanitizeHtmlParams: sanitizeHtml.IOptions = { +const sanitizeHtmlParams: IExtendedSanitizeOptions = { allowedTags: [ 'font', // custom to matrix for IRC-style font coloring 'del', // for markdown @@ -245,13 +246,14 @@ const sanitizeHtmlParams: sanitizeHtml.IOptions = { selfClosing: ['img', 'br', 'hr', 'area', 'base', 'basefont', 'input', 'link', 'meta'], // URL schemes we permit allowedSchemes: PERMITTED_URL_SCHEMES, - allowProtocolRelative: false, transformTags, + // 50 levels deep "should be enough for anyone" + nestingLimit: 50, }; // this is the same as the above except with less rewriting -const composerSanitizeHtmlParams: sanitizeHtml.IOptions = { +const composerSanitizeHtmlParams: IExtendedSanitizeOptions = { ...sanitizeHtmlParams, transformTags: { 'code': transformTags['code'], diff --git a/yarn.lock b/yarn.lock index efc1f0eae1..ad1057cdcd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2726,6 +2726,11 @@ color-name@~1.1.4: resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== +colorette@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.2.1.tgz#4d0b921325c14faf92633086a536db6e89564b1b" + integrity sha512-puCDz0CzydiSYOrnXpz/PKd69zRrribezjtE9yd4zvytoRc8+RY/KJPvtPFKZS3E3wP6neGyMe0vOTlHO5L3Pw== + combined-stream@^1.0.6, combined-stream@~1.0.6: version "1.0.8" resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" @@ -3032,6 +3037,11 @@ deep-is@^0.1.3, deep-is@~0.1.3: resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ= +deepmerge@^4.2.2: + version "4.2.2" + resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.2.2.tgz#44d2ea3679b8f4d4ffba33f03d865fc1e7bf4955" + integrity sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg== + define-properties@^1.1.2, define-properties@^1.1.3, define-properties@~1.1.2: version "1.1.3" resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" @@ -3430,6 +3440,11 @@ escape-string-regexp@^1.0.5: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= +escape-string-regexp@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" + integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== + escodegen@^1.9.1: version "1.14.2" resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.14.2.tgz#14ab71bf5026c2aa08173afba22c6f3173284a84" @@ -4964,6 +4979,11 @@ is-plain-object@^2.0.3, is-plain-object@^2.0.4: dependencies: isobject "^3.0.1" +is-plain-object@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-5.0.0.tgz#4427f50ab3429e9025ea7d52e9043a9ef4159344" + integrity sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q== + is-regex@^1.0.3, is-regex@^1.0.4, is-regex@^1.0.5: version "1.1.0" resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.0.tgz#ece38e389e490df0dc21caea2bd596f987f767ff" @@ -5636,6 +5656,11 @@ kleur@^3.0.3: resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== +klona@^2.0.3: + version "2.0.4" + resolved "https://registry.yarnpkg.com/klona/-/klona-2.0.4.tgz#7bb1e3affb0cb8624547ef7e8f6708ea2e39dfc0" + integrity sha512-ZRbnvdg/NxqzC7L9Uyqzf4psi1OM4Cuc+sJAkQPjO6XkQIJTNbfK2Rsmbw8fx1p2mkZdp2FZYo2+LwXYY/uwIA== + known-css-properties@^0.11.0: version "0.11.0" resolved "https://registry.yarnpkg.com/known-css-properties/-/known-css-properties-0.11.0.tgz#0da784f115ea77c76b81536d7052e90ee6c86a8a" @@ -5686,6 +5711,14 @@ levn@^0.4.1: prelude-ls "^1.2.1" type-check "~0.4.0" +line-column@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/line-column/-/line-column-1.0.2.tgz#d25af2936b6f4849172b312e4792d1d987bc34a2" + integrity sha1-0lryk2tvSEkXKzEuR5LR2Ye8NKI= + dependencies: + isarray "^1.0.0" + isobject "^2.0.0" + linkifyjs@^2.1.9: version "2.1.9" resolved "https://registry.yarnpkg.com/linkifyjs/-/linkifyjs-2.1.9.tgz#af06e45a2866ff06c4766582590d098a4d584702" @@ -6093,6 +6126,11 @@ nan@^2.12.1: resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.1.tgz#d7be34dfa3105b91494c3147089315eff8874b01" integrity sha512-isWHgVjnFjh2x2yuJ/tj3JbwoHu3UC2dX5G/88Cm24yB6YopVgxvBObDY7n5xW6ExmFhJpSEQqFPvq9zaXc8Jw== +nanoid@^3.1.12: + version "3.1.12" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.12.tgz#6f7736c62e8d39421601e4a0c77623a97ea69654" + integrity sha512-1qstj9z5+x491jfiC4Nelk+f8XBad7LN20PmyWINJEMRSf3wcAjAWysw1qaA8z6NSKe2sjq1hRSDpBH5paCb6A== + nanomatch@^1.2.9: version "1.2.13" resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" @@ -6772,7 +6810,7 @@ postcss-value-parser@^4.1.0: resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.1.0.tgz#443f6a20ced6481a2bda4fa8532a6e55d789a2cb" integrity sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ== -postcss@^7.0.1, postcss@^7.0.13, postcss@^7.0.14, postcss@^7.0.2, postcss@^7.0.26, postcss@^7.0.27, postcss@^7.0.30, postcss@^7.0.6, postcss@^7.0.7: +postcss@^7.0.1, postcss@^7.0.13, postcss@^7.0.14, postcss@^7.0.2, postcss@^7.0.26, postcss@^7.0.30, postcss@^7.0.6, postcss@^7.0.7: version "7.0.32" resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.32.tgz#4310d6ee347053da3433db2be492883d62cec59d" integrity sha512-03eXong5NLnNCD05xscnGKGDZ98CyzoqPSMjOe6SuoQY7Z2hIj0Ld1g/O/UQRuOle2aRtiIRDg9tDcTGAkLfKw== @@ -6781,6 +6819,16 @@ postcss@^7.0.1, postcss@^7.0.13, postcss@^7.0.14, postcss@^7.0.2, postcss@^7.0.2 source-map "^0.6.1" supports-color "^6.1.0" +postcss@^8.0.2: + version "8.0.7" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.0.7.tgz#764d26d8bc64a87af6d945238ae6ef36bf6fc32d" + integrity sha512-LTCMGOjmC/CGWV/azk3h34u6TNj1s9p4XleEiW8yA3j+8k+z3mnv5V7yyREvWDKlkel8GxqhjEZJ+JXWTzKPWw== + dependencies: + colorette "^1.2.1" + line-column "^1.0.2" + nanoid "^3.1.12" + source-map "^0.6.1" + prelude-ls@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" @@ -7617,15 +7665,17 @@ sane@^4.0.3: minimist "^1.1.1" walker "~1.0.5" -sanitize-html@^1.27.1: - version "1.27.1" - resolved "https://registry.yarnpkg.com/sanitize-html/-/sanitize-html-1.27.1.tgz#ce147951aa3defba13448e2ca8a4e18d8f2e2cd7" - integrity sha512-C+N7E+7ikYaLHdb9lEkQaFOgmj+9ddZ311Ixs/QsBsoLD411/vdLweiFyGqrswUVgLqagOS5NCDxcEPH7trObQ== +"sanitize-html@github:apostrophecms/sanitize-html#3c7f93f2058f696f5359e3e58d464161647226db": + version "2.0.0-rc.3" + resolved "https://codeload.github.com/apostrophecms/sanitize-html/tar.gz/3c7f93f2058f696f5359e3e58d464161647226db" dependencies: + deepmerge "^4.2.2" + escape-string-regexp "^4.0.0" htmlparser2 "^4.1.0" - lodash "^4.17.15" - postcss "^7.0.27" - srcset "^2.0.1" + is-plain-object "^5.0.0" + klona "^2.0.3" + postcss "^8.0.2" + srcset "^3.0.0" sax@^1.2.4: version "1.2.4" @@ -7884,10 +7934,10 @@ sprintf-js@~1.0.2: resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= -srcset@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/srcset/-/srcset-2.0.1.tgz#8f842d357487eb797f413d9c309de7a5149df5ac" - integrity sha512-00kZI87TdRKwt+P8jj8UZxbfp7mK2ufxcIMWvhAOZNJTRROimpHeruWrGvCZneiuVDLqdyHefVp748ECTnyUBQ== +srcset@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/srcset/-/srcset-3.0.0.tgz#8afd8b971362dfc129ae9c1a99b3897301ce6441" + integrity sha512-D59vF08Qzu/C4GAOXVgMTLfgryt5fyWo93FZyhEWANo0PokFz/iWdDe13mX3O5TRf6l8vMTqckAfR4zPiaH0yQ== sshpk@^1.7.0: version "1.16.1" From c3c3472ae4b343567372dc286aad9926e04992ea Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Wed, 23 Sep 2020 10:06:25 +0100 Subject: [PATCH 094/331] Fix copyright header --- src/@types/sanitize-html.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/@types/sanitize-html.ts b/src/@types/sanitize-html.ts index 188c8f9997..4cada29845 100644 --- a/src/@types/sanitize-html.ts +++ b/src/@types/sanitize-html.ts @@ -1,5 +1,5 @@ /* -Copyright 2020 New Vector Ltd +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. From 1a60f80407e5bcbc9572bd0326ee9ba7a5d24bcb Mon Sep 17 00:00:00 2001 From: Jeff Huang Date: Wed, 23 Sep 2020 02:14:07 +0000 Subject: [PATCH 095/331] Translated using Weblate (Chinese (Traditional)) Currently translated at 100.0% (2375 of 2375 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.riot.im/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 fcdb7c9927..5fdf2b7d85 100644 --- a/src/i18n/strings/zh_Hant.json +++ b/src/i18n/strings/zh_Hant.json @@ -2509,5 +2509,11 @@ "Minimize widget": "最小化小工具", "Maximize widget": "最大化小工具", "Your server requires encryption to be enabled in private rooms.": "您的伺服器需要在私人聊天室中啟用加密。", - "Unable to set up keys": "無法設定金鑰" + "Unable to set up keys": "無法設定金鑰", + "Use the Desktop app to see all encrypted files": "使用桌面應用程式以檢視所有加密的檔案", + "Use the Desktop app to search encrypted messages": "使用桌面應用程式以搜尋加密訊息", + "This version of %(brand)s does not support viewing some encrypted files": "此版本的 %(brand)s 不支援檢視某些加密檔案", + "This version of %(brand)s does not support searching encrypted messages": "此版本的 %(brand)s 不支援搜尋加密訊息", + "Cannot create rooms in this community": "無法在此社群中建立聊天室", + "You do not have permission to create rooms in this community.": "您沒有在此社群中建立聊天室的權限。" } From e69c5d49cada75626ae2c77cb5510762a7452a2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Priit=20J=C3=B5er=C3=BC=C3=BCt?= Date: Tue, 22 Sep 2020 16:28:45 +0000 Subject: [PATCH 096/331] Translated using Weblate (Estonian) Currently translated at 100.0% (2375 of 2375 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/element-web/matrix-react-sdk/et/ --- src/i18n/strings/et.json | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/et.json b/src/i18n/strings/et.json index 981ee512c8..50517165d3 100644 --- a/src/i18n/strings/et.json +++ b/src/i18n/strings/et.json @@ -2506,5 +2506,11 @@ "Minimize widget": "Vähenda vidinat", "Maximize widget": "Suurenda vidinat", "Your server requires encryption to be enabled in private rooms.": "Sinu koduserveri seadistused eeldavad, et mitteavalikud jututoad asutavad läbivat krüptimist.", - "Unable to set up keys": "Krüptovõtmete kasutuselevõtmine ei õnnestu" + "Unable to set up keys": "Krüptovõtmete kasutuselevõtmine ei õnnestu", + "Use the Desktop app to see all encrypted files": "Kõikide krüptitud failide vaatamiseks kasuta Element Desktop rakendust", + "Use the Desktop app to search encrypted messages": "Otsinguks krüptitud sõnumite hulgast kasuta Element Desktop rakendust", + "This version of %(brand)s does not support viewing some encrypted files": "See %(brand)s versioon ei toeta mõnede krüptitud failide vaatatamist", + "This version of %(brand)s does not support searching encrypted messages": "See %(brand)s versioon ei toeta otsingut krüptitud sõnumite seast", + "Cannot create rooms in this community": "Siia kogukonda ei saa jututubasid luua", + "You do not have permission to create rooms in this community.": "Sul pole õigusi luua siin kogukonnas uusi jututubasid." } From f8d46448be42264ac9e37861e4b042d7ef20a3ee Mon Sep 17 00:00:00 2001 From: XoseM Date: Wed, 23 Sep 2020 05:50:24 +0000 Subject: [PATCH 097/331] Translated using Weblate (Galician) Currently translated at 100.0% (2375 of 2375 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.riot.im/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 b19cb28420..ab00d564d0 100644 --- a/src/i18n/strings/gl.json +++ b/src/i18n/strings/gl.json @@ -2506,5 +2506,11 @@ "You can only pin 2 widgets at a time": "Só podes fixar 2 widgets ó mesmo tempo", "Minimize widget": "Minimizar widget", "Maximize widget": "Maximizar widget", - "Your server requires encryption to be enabled in private rooms.": "O servidor require que actives o cifrado nas salas privadas." + "Your server requires encryption to be enabled in private rooms.": "O servidor require que actives o cifrado nas salas privadas.", + "Use the Desktop app to see all encrypted files": "Usa a app de Escritorio para ver todos os ficheiros cifrados", + "Use the Desktop app to search encrypted messages": "Usa a app de Escritorio para buscar mensaxes cifradas", + "This version of %(brand)s does not support viewing some encrypted files": "Esta versión de %(brand)s non soporta o visionado dalgúns ficheiros cifrados", + "This version of %(brand)s does not support searching encrypted messages": "Esta versión de %(brand)s non soporta a busca de mensaxes cifradas", + "Cannot create rooms in this community": "Non se poden crear salas nesta comunidade", + "You do not have permission to create rooms in this community.": "Non tes permiso para crear salas nesta comunidade." } From 938371efa7ad947bdbc02aac1676a63264deb748 Mon Sep 17 00:00:00 2001 From: Marcelo Filho Date: Tue, 22 Sep 2020 16:35:52 +0000 Subject: [PATCH 098/331] Translated using Weblate (Portuguese (Brazil)) Currently translated at 95.2% (2261 of 2375 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/element-web/matrix-react-sdk/pt_BR/ --- src/i18n/strings/pt_BR.json | 38 +++++++++++++++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/src/i18n/strings/pt_BR.json b/src/i18n/strings/pt_BR.json index 3276952d28..8eee0c0909 100644 --- a/src/i18n/strings/pt_BR.json +++ b/src/i18n/strings/pt_BR.json @@ -167,7 +167,7 @@ "This email address was not found": "Este endereço de e-mail não foi encontrado", "The remote side failed to pick up": "A pessoa não atendeu a chamada", "This room is not recognised.": "Esta sala não é reconhecida.", - "This phone number is already in use": "Este número de telefone já está sendo usado", + "This phone number is already in use": "Este número de telefone já está em uso", "To use it, just wait for autocomplete results to load and tab through them.": "Para usar este recurso, aguarde o carregamento dos resultados de autocompletar e então escolha entre as opções.", "%(senderName)s unbanned %(targetName)s.": "%(senderName)s removeu o banimento de %(targetName)s.", "Unable to capture screen": "Não foi possível capturar a imagem da tela", @@ -2295,5 +2295,39 @@ "Send %(count)s invites|other": "Enviar %(count)s convites", "Send %(count)s invites|one": "Enviar %(count)s convite", "Community ID: +:%(domain)s": "ID da comunidade: +:%(domain)s", - "Enter name": "Digitar nome" + "Enter name": "Digitar nome", + "End Call": "Encerrar chamada", + "Remove the group call from the room?": "Remover esta chamada em grupo da sala?", + "You don't have permission to remove the call from the room": "Você não tem permissão para remover a chamada da sala", + "Group call modified by %(senderName)s": "Chamada em grupo modificada por %(senderName)s", + "Group call started by %(senderName)s": "Chamada em grupo iniciada por %(senderName)s", + "Group call ended by %(senderName)s": "Chamada em grupo encerrada por %(senderName)s", + "Unknown App": "App desconhecido", + "eg: @bot:* or example.org": "por exemplo: @bot:* ou exemplo.org", + "Privacy": "Privacidade", + "Room Info": "Informações da sala", + "Widgets": "Widgets", + "Unpin app": "Desafixar app", + "Edit widgets, bridges & bots": "Editar widgets, pontes & bots", + "Add widgets, bridges & bots": "Adicionar widgets, pontes & bots", + "%(count)s people|other": "%(count)s pessoas", + "%(count)s people|one": "%(count)s pessoa", + "Show files": "Mostrar arquivos", + "Room settings": "Configurações da sala", + "Almost there! Is your other session showing the same shield?": "Quase lá! A sua outra sessão está mostrando o mesmo escudo?", + "Take a picture": "Tirar uma foto", + "Minimize widget": "Minimizar widget", + "Maximize widget": "Maximizar widget", + "Use the Desktop app to see all encrypted files": "Use o app para Computador para ver todos os arquivos criptografados", + "Use the Desktop app to search encrypted messages": "Use o app para Computador para buscar mensagens criptografadas", + "This version of %(brand)s does not support viewing some encrypted files": "Esta versão do %(brand)s não permite visualizar alguns arquivos criptografados", + "This version of %(brand)s does not support searching encrypted messages": "Esta versão do %(brand)s não permite buscar mensagens criptografadas", + "Information": "Informação", + "Add another email": "Adicionar outro e-mail", + "Invite people to join %(communityName)s": "Convidar pessoas para entrarem em %(communityName)s", + "There was an error creating your community. The name may be taken or the server is unable to process your request.": "Houve um erro ao criar sua comunidade. Ou o nome dela pode já estar em uso, ou o servidor não foi capaz de processar a sua solicitação.", + "What's the name of your community or team?": "Qual é o nome da sua comunidade ou equipe?", + "Add image (optional)": "Adicionar foto (opcional)", + "An image will help people identify your community.": "Uma foto ajudará as pessoas identificarem a sua comunidade.", + "Preview": "Visualizar" } From 05dac6da3c77a62154d672d150f93047c3187e9a Mon Sep 17 00:00:00 2001 From: Nikita Epifanov Date: Tue, 22 Sep 2020 20:05:45 +0000 Subject: [PATCH 099/331] Translated using Weblate (Russian) Currently translated at 100.0% (2375 of 2375 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/element-web/matrix-react-sdk/ru/ --- src/i18n/strings/ru.json | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/ru.json b/src/i18n/strings/ru.json index 8ac246af4b..946e8a5c89 100644 --- a/src/i18n/strings/ru.json +++ b/src/i18n/strings/ru.json @@ -2502,5 +2502,11 @@ "Start a conversation with someone using their name or username (like ).": "Начните разговор с кем-нибудь, используя его имя или имя пользователя (например, ).", "This won't invite them to %(communityName)s. To invite someone to %(communityName)s, click here": "Это не пригласит их в %(communityName)s. Чтобы пригласить кого-нибудь в %(communityName)s, нажмите здесь", "Invite someone using their name, username (like ) or share this room.": "Пригласите кого-нибудь, используя его имя, имя пользователя (например, ) или поделитесь этой комнатой.", - "Unable to set up keys": "Невозможно настроить ключи" + "Unable to set up keys": "Невозможно настроить ключи", + "Use the Desktop app to see all encrypted files": "Используйте настольное приложение, чтобы просмотреть все зашифрованные файлы", + "Use the Desktop app to search encrypted messages": "Используйте настольное приложение для поиска зашифрованных сообщений", + "This version of %(brand)s does not support viewing some encrypted files": "Эта версия %(brand)s не поддерживает просмотр некоторых зашифрованных файлов", + "This version of %(brand)s does not support searching encrypted messages": "Эта версия %(brand)s не поддерживает поиск зашифрованных сообщений", + "Cannot create rooms in this community": "Невозможно создать комнаты в этом сообществе", + "You do not have permission to create rooms in this community.": "У вас нет разрешения на создание комнат в этом сообществе." } From 91617ae0eb723a8744e27174badd77628026edfe Mon Sep 17 00:00:00 2001 From: random Date: Wed, 23 Sep 2020 12:51:20 +0000 Subject: [PATCH 100/331] Translated using Weblate (Italian) Currently translated at 100.0% (2375 of 2375 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/element-web/matrix-react-sdk/it/ --- src/i18n/strings/it.json | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/it.json b/src/i18n/strings/it.json index dbcf51f926..3deba88144 100644 --- a/src/i18n/strings/it.json +++ b/src/i18n/strings/it.json @@ -2509,5 +2509,11 @@ "Start a conversation with someone using their name or username (like ).": "Inizia una conversazione con qualcuno usando il suo nome o il nome utente (come ).", "This won't invite them to %(communityName)s. To invite someone to %(communityName)s, click here": "Ciò non lo inviterà in %(communityName)s. Per invitare qualcuno in %(communityName)s, clicca qui", "Invite someone using their name, username (like ) or share this room.": "Invita qualcuno usando il suo nome, nome utente (come ) o condividi questa stanza.", - "Unable to set up keys": "Impossibile impostare le chiavi" + "Unable to set up keys": "Impossibile impostare le chiavi", + "Use the Desktop app to see all encrypted files": "Usa l'app desktop per vedere tutti i file cifrati", + "Use the Desktop app to search encrypted messages": "Usa l'app desktop per cercare i messaggi cifrati", + "This version of %(brand)s does not support viewing some encrypted files": "Questa versione di %(brand)s non supporta la visualizzazione di alcuni file cifrati", + "This version of %(brand)s does not support searching encrypted messages": "Questa versione di %(brand)s non supporta la ricerca di messaggi cifrati", + "Cannot create rooms in this community": "Impossibile creare stanze in questa comunità", + "You do not have permission to create rooms in this community.": "Non hai i permessi per creare stanze in questa comunità." } From ca4b11ec6a4d94fb5fa546edd1431c795d1ddee5 Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Wed, 23 Sep 2020 15:27:40 +0100 Subject: [PATCH 101/331] Upgrade matrix-js-sdk to 8.4.0-rc.1 --- package.json | 2 +- yarn.lock | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 53b54cbb60..446810e058 100644 --- a/package.json +++ b/package.json @@ -78,7 +78,7 @@ "is-ip": "^2.0.0", "linkifyjs": "^2.1.9", "lodash": "^4.17.19", - "matrix-js-sdk": "github:matrix-org/matrix-js-sdk#develop", + "matrix-js-sdk": "8.4.0-rc.1", "minimist": "^1.2.5", "pako": "^1.0.11", "parse5": "^5.1.1", diff --git a/yarn.lock b/yarn.lock index ad1057cdcd..fd97a1c854 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5919,9 +5919,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@github:matrix-org/matrix-js-sdk#develop": - version "8.3.0" - resolved "https://codeload.github.com/matrix-org/matrix-js-sdk/tar.gz/b9886d4f3479c041fc6d91ebc88c4a998e9d2e7c" +matrix-js-sdk@8.4.0-rc.1: + version "8.4.0-rc.1" + resolved "https://registry.yarnpkg.com/matrix-js-sdk/-/matrix-js-sdk-8.4.0-rc.1.tgz#9547e6d0088ec22fc6463c3144aee8c03266c215" + integrity sha512-u5I8OesrGePVj+NoZByXwV4QBujrMPb4BlKWII4VscvVitLoD/iuz9beNvic3esNF8U3ruWVDcOwA0XQIoumQQ== dependencies: "@babel/runtime" "^7.8.3" another-json "^0.2.0" From 65923c3c55fb763ae89dc9f226a7218f94c75368 Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Wed, 23 Sep 2020 15:32:46 +0100 Subject: [PATCH 102/331] Prepare changelog for v3.5.0-rc.1 --- CHANGELOG.md | 112 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 112 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6fa9cc29f9..03d066be99 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,115 @@ +Changes in [3.5.0-rc.1](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.5.0-rc.1) (2020-09-23) +============================================================================================================= +[Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v3.4.1...v3.5.0-rc.1) + + * Upgrade JS SDK to 8.4.0-rc.1 + * Update from Weblate + [\#5246](https://github.com/matrix-org/matrix-react-sdk/pull/5246) + * Upgrade sanitize-html, set nesting limit + [\#5245](https://github.com/matrix-org/matrix-react-sdk/pull/5245) + * Add a note to use the desktop builds when seshat isn't available + [\#5225](https://github.com/matrix-org/matrix-react-sdk/pull/5225) + * Add some permission checks to the communities v2 prototype + [\#5240](https://github.com/matrix-org/matrix-react-sdk/pull/5240) + * Support HS-preferred Secure Backup setup methods + [\#5242](https://github.com/matrix-org/matrix-react-sdk/pull/5242) + * Only show User Info verify button if the other user has e2ee devices + [\#5234](https://github.com/matrix-org/matrix-react-sdk/pull/5234) + * Fix New Room List arrow key management + [\#5237](https://github.com/matrix-org/matrix-react-sdk/pull/5237) + * Fix Room Directory View & Preview actions for federated joins + [\#5235](https://github.com/matrix-org/matrix-react-sdk/pull/5235) + * Add a UI feature to disable advanced encryption options + [\#5238](https://github.com/matrix-org/matrix-react-sdk/pull/5238) + * UI Feature Flag: Communities + [\#5216](https://github.com/matrix-org/matrix-react-sdk/pull/5216) + * Rename apps back to widgets + [\#5236](https://github.com/matrix-org/matrix-react-sdk/pull/5236) + * Adjust layout and formatting of notifications / files cards + [\#5229](https://github.com/matrix-org/matrix-react-sdk/pull/5229) + * Fix Search Results Tile undefined variable access regression + [\#5232](https://github.com/matrix-org/matrix-react-sdk/pull/5232) + * Fix Cmd/Ctrl+Shift+U for File Upload + [\#5233](https://github.com/matrix-org/matrix-react-sdk/pull/5233) + * Disable the e2ee toggle when creating a room on a server with forced e2e + [\#5231](https://github.com/matrix-org/matrix-react-sdk/pull/5231) + * UI Feature Flag: Disable advanced options and tidy up some copy + [\#5215](https://github.com/matrix-org/matrix-react-sdk/pull/5215) + * UI Feature Flag: 3PIDs + [\#5228](https://github.com/matrix-org/matrix-react-sdk/pull/5228) + * Defer encryption setup until first E2EE room + [\#5219](https://github.com/matrix-org/matrix-react-sdk/pull/5219) + * Tidy devDeps, all the webpack stuff lives in the layer above + [\#5179](https://github.com/matrix-org/matrix-react-sdk/pull/5179) + * UI Feature Flag: Hide flair + [\#5214](https://github.com/matrix-org/matrix-react-sdk/pull/5214) + * UI Feature Flag: Identity server + [\#5218](https://github.com/matrix-org/matrix-react-sdk/pull/5218) + * UI Feature Flag: Share dialog QR code and social icons + [\#5221](https://github.com/matrix-org/matrix-react-sdk/pull/5221) + * UI Feature Flag: Registration, Password Reset, Deactivate + [\#5227](https://github.com/matrix-org/matrix-react-sdk/pull/5227) + * Retry joinRoom up to 5 times in the case of a 504 GATEWAY TIMEOUT + [\#5204](https://github.com/matrix-org/matrix-react-sdk/pull/5204) + * UI Feature Flag: Disable VoIP + [\#5217](https://github.com/matrix-org/matrix-react-sdk/pull/5217) + * Fix setState() usage in the constructor of RoomDirectory + [\#5224](https://github.com/matrix-org/matrix-react-sdk/pull/5224) + * Hide Analytics sections if piwik config is not provided + [\#5211](https://github.com/matrix-org/matrix-react-sdk/pull/5211) + * UI Feature Flag: Disable feedback button + [\#5213](https://github.com/matrix-org/matrix-react-sdk/pull/5213) + * Clean up UserInfo to not show a blank Power Selector for users not in room + [\#5220](https://github.com/matrix-org/matrix-react-sdk/pull/5220) + * Also hide bug reporting prompts from the Error Boundaries + [\#5212](https://github.com/matrix-org/matrix-react-sdk/pull/5212) + * Tactical improvements to 3PID invites + [\#5201](https://github.com/matrix-org/matrix-react-sdk/pull/5201) + * If no bug_report_endpoint_url, hide rageshaking from the App + [\#5210](https://github.com/matrix-org/matrix-react-sdk/pull/5210) + * Introduce a concept of UI features, using it for URL previews at first + [\#5208](https://github.com/matrix-org/matrix-react-sdk/pull/5208) + * Remove defunct "always show encryption icons" setting + [\#5207](https://github.com/matrix-org/matrix-react-sdk/pull/5207) + * Don't show Notifications Prompt Toast if user has master rule enabled + [\#5203](https://github.com/matrix-org/matrix-react-sdk/pull/5203) + * Fix Bridges tab crashing when the room does not have bridges + [\#5206](https://github.com/matrix-org/matrix-react-sdk/pull/5206) + * Don't count widgets which no longer exist towards pinned count + [\#5202](https://github.com/matrix-org/matrix-react-sdk/pull/5202) + * Fix crashes with cannot read isResizing of undefined + [\#5205](https://github.com/matrix-org/matrix-react-sdk/pull/5205) + * Prompt to remove the jitsi widget when pressing the call button + [\#5193](https://github.com/matrix-org/matrix-react-sdk/pull/5193) + * Show verification status in the room summary card + [\#5195](https://github.com/matrix-org/matrix-react-sdk/pull/5195) + * Fix user info scrolling in new card view + [\#5198](https://github.com/matrix-org/matrix-react-sdk/pull/5198) + * Fix sticker picker height + [\#5197](https://github.com/matrix-org/matrix-react-sdk/pull/5197) + * Call jitsi widgets 'group calls' + [\#5191](https://github.com/matrix-org/matrix-react-sdk/pull/5191) + * Don't show 'unpin' for persistent widgets + [\#5194](https://github.com/matrix-org/matrix-react-sdk/pull/5194) + * Split up cross-signing and secure backup settings + [\#5182](https://github.com/matrix-org/matrix-react-sdk/pull/5182) + * Fix onNewScreen to use replace when going from roomId->roomAlias + [\#5185](https://github.com/matrix-org/matrix-react-sdk/pull/5185) + * bring back 1.2M style badge counts rather than 99+ + [\#5192](https://github.com/matrix-org/matrix-react-sdk/pull/5192) + * Run the rageshake command through the bug report dialog + [\#5189](https://github.com/matrix-org/matrix-react-sdk/pull/5189) + * Account for via in pill matching regex + [\#5188](https://github.com/matrix-org/matrix-react-sdk/pull/5188) + * Remove now-unused create-react-class from lockfile + [\#5187](https://github.com/matrix-org/matrix-react-sdk/pull/5187) + * Fixed 1px jump upwards + [\#5163](https://github.com/matrix-org/matrix-react-sdk/pull/5163) + * Always allow widgets when using the local version + [\#5184](https://github.com/matrix-org/matrix-react-sdk/pull/5184) + * Migrate RoomView and RoomContext to Typescript + [\#5175](https://github.com/matrix-org/matrix-react-sdk/pull/5175) + Changes in [3.4.1](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.4.1) (2020-09-14) =================================================================================================== [Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v3.4.0...v3.4.1) From 9ac3af4176f46558e2458a0b37d82654efe751f0 Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Wed, 23 Sep 2020 15:32:47 +0100 Subject: [PATCH 103/331] v3.5.0-rc.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 446810e058..f19c247d0c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "matrix-react-sdk", - "version": "3.4.1", + "version": "3.5.0-rc.1", "description": "SDK for matrix.org using React", "author": "matrix.org", "repository": { From 1ab2e06887e6c1bb093279cdf44f68561cccdc17 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Wed, 23 Sep 2020 12:29:49 -0600 Subject: [PATCH 104/331] Clean up unused variables --- res/themes/dark/css/_dark.scss | 5 +---- res/themes/legacy-dark/css/_legacy-dark.scss | 3 --- res/themes/legacy-light/css/_legacy-light.scss | 3 --- res/themes/light/css/_light.scss | 5 +---- 4 files changed, 2 insertions(+), 14 deletions(-) diff --git a/res/themes/dark/css/_dark.scss b/res/themes/dark/css/_dark.scss index a3b03c777e..bb494811d4 100644 --- a/res/themes/dark/css/_dark.scss +++ b/res/themes/dark/css/_dark.scss @@ -87,10 +87,7 @@ $dialog-background-bg-color: $header-panel-bg-color; $lightbox-background-bg-color: #000; $settings-grey-fg-color: #a2a2a2; -$settings-profile-placeholder-bg-color: #e7e7e7; -$settings-profile-overlay-bg-color: #000; -$settings-profile-overlay-placeholder-bg-color: transparent; -$settings-profile-overlay-fg-color: #fff; +$settings-profile-placeholder-bg-color: #21262c; $settings-profile-overlay-placeholder-fg-color: #454545; $settings-subsection-fg-color: $text-secondary-color; diff --git a/res/themes/legacy-dark/css/_legacy-dark.scss b/res/themes/legacy-dark/css/_legacy-dark.scss index 2741dcebf8..b49e014e70 100644 --- a/res/themes/legacy-dark/css/_legacy-dark.scss +++ b/res/themes/legacy-dark/css/_legacy-dark.scss @@ -86,9 +86,6 @@ $lightbox-background-bg-color: #000; $settings-grey-fg-color: #a2a2a2; $settings-profile-placeholder-bg-color: #e7e7e7; -$settings-profile-overlay-bg-color: #000; -$settings-profile-overlay-placeholder-bg-color: transparent; -$settings-profile-overlay-fg-color: #fff; $settings-profile-overlay-placeholder-fg-color: #454545; $settings-subsection-fg-color: $text-secondary-color; diff --git a/res/themes/legacy-light/css/_legacy-light.scss b/res/themes/legacy-light/css/_legacy-light.scss index 4fd2a3615b..9261dc8240 100644 --- a/res/themes/legacy-light/css/_legacy-light.scss +++ b/res/themes/legacy-light/css/_legacy-light.scss @@ -144,9 +144,6 @@ $blockquote-fg-color: #777; $settings-grey-fg-color: #a2a2a2; $settings-profile-placeholder-bg-color: #e7e7e7; -$settings-profile-overlay-bg-color: #000; -$settings-profile-overlay-placeholder-bg-color: transparent; -$settings-profile-overlay-fg-color: #fff; $settings-profile-overlay-placeholder-fg-color: #2e2f32; $settings-subsection-fg-color: #61708b; diff --git a/res/themes/light/css/_light.scss b/res/themes/light/css/_light.scss index 05302a2a80..8dd21b74ec 100644 --- a/res/themes/light/css/_light.scss +++ b/res/themes/light/css/_light.scss @@ -137,10 +137,7 @@ $blockquote-bar-color: #ddd; $blockquote-fg-color: #777; $settings-grey-fg-color: #a2a2a2; -$settings-profile-placeholder-bg-color: #e7e7e7; -$settings-profile-overlay-bg-color: #000; -$settings-profile-overlay-placeholder-bg-color: transparent; -$settings-profile-overlay-fg-color: #fff; +$settings-profile-placeholder-bg-color: #f4f6fa; $settings-profile-overlay-placeholder-fg-color: #2e2f32; $settings-subsection-fg-color: #61708b; From e658d9619b3896a43f9395952a5cce3349f41344 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Wed, 23 Sep 2020 12:30:01 -0600 Subject: [PATCH 105/331] Update styles for new colours --- res/css/views/settings/_AvatarSetting.scss | 8 ++------ 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 ++ 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/res/css/views/settings/_AvatarSetting.scss b/res/css/views/settings/_AvatarSetting.scss index d2c0268a5c..3576b09888 100644 --- a/res/css/views/settings/_AvatarSetting.scss +++ b/res/css/views/settings/_AvatarSetting.scss @@ -102,15 +102,11 @@ limitations under the License. right: 0; } - .mx_AvatarSetting_avatarPlaceholder ~ .mx_AvatarSetting_uploadButton { - border: 1px solid $settings-profile-overlay-placeholder-fg-color; - } - .mx_AvatarSetting_uploadButton { width: 32px; height: 32px; border-radius: 32px; - background-color: $settings-profile-placeholder-bg-color; + background-color: $settings-profile-button-bg-color; position: absolute; bottom: 0; @@ -125,7 +121,7 @@ limitations under the License. mask-repeat: no-repeat; mask-position: center; mask-size: 55%; - background-color: $settings-profile-overlay-placeholder-fg-color; + background-color: $settings-profile-button-fg-color; mask-image: url('$(res)/img/feather-customised/edit.svg'); } } diff --git a/res/themes/dark/css/_dark.scss b/res/themes/dark/css/_dark.scss index bb494811d4..331b5f4692 100644 --- a/res/themes/dark/css/_dark.scss +++ b/res/themes/dark/css/_dark.scss @@ -89,6 +89,8 @@ $lightbox-background-bg-color: #000; $settings-grey-fg-color: #a2a2a2; $settings-profile-placeholder-bg-color: #21262c; $settings-profile-overlay-placeholder-fg-color: #454545; +$settings-profile-button-bg-color: #e7e7e7; +$settings-profile-button-fg-color: $settings-profile-overlay-placeholder-fg-color; $settings-subsection-fg-color: $text-secondary-color; $topleftmenu-color: $text-primary-color; diff --git a/res/themes/legacy-dark/css/_legacy-dark.scss b/res/themes/legacy-dark/css/_legacy-dark.scss index b49e014e70..14ce264bc0 100644 --- a/res/themes/legacy-dark/css/_legacy-dark.scss +++ b/res/themes/legacy-dark/css/_legacy-dark.scss @@ -87,6 +87,8 @@ $lightbox-background-bg-color: #000; $settings-grey-fg-color: #a2a2a2; $settings-profile-placeholder-bg-color: #e7e7e7; $settings-profile-overlay-placeholder-fg-color: #454545; +$settings-profile-button-bg-color: #e7e7e7; +$settings-profile-button-fg-color: $settings-profile-overlay-placeholder-fg-color; $settings-subsection-fg-color: $text-secondary-color; $topleftmenu-color: $text-primary-color; diff --git a/res/themes/legacy-light/css/_legacy-light.scss b/res/themes/legacy-light/css/_legacy-light.scss index 9261dc8240..b030fb7423 100644 --- a/res/themes/legacy-light/css/_legacy-light.scss +++ b/res/themes/legacy-light/css/_legacy-light.scss @@ -145,6 +145,8 @@ $blockquote-fg-color: #777; $settings-grey-fg-color: #a2a2a2; $settings-profile-placeholder-bg-color: #e7e7e7; $settings-profile-overlay-placeholder-fg-color: #2e2f32; +$settings-profile-button-bg-color: #e7e7e7; +$settings-profile-button-fg-color: $settings-profile-overlay-placeholder-fg-color; $settings-subsection-fg-color: #61708b; $voip-decline-color: #f48080; diff --git a/res/themes/light/css/_light.scss b/res/themes/light/css/_light.scss index 8dd21b74ec..140783212d 100644 --- a/res/themes/light/css/_light.scss +++ b/res/themes/light/css/_light.scss @@ -139,6 +139,8 @@ $blockquote-fg-color: #777; $settings-grey-fg-color: #a2a2a2; $settings-profile-placeholder-bg-color: #f4f6fa; $settings-profile-overlay-placeholder-fg-color: #2e2f32; +$settings-profile-button-bg-color: #e7e7e7; +$settings-profile-button-fg-color: $settings-profile-overlay-placeholder-fg-color; $settings-subsection-fg-color: #61708b; $voip-decline-color: #f48080; From 5f6dec7d189e93bdc7ed15d0ff9895b89e34cea3 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Thu, 24 Sep 2020 10:09:34 +0100 Subject: [PATCH 106/331] add comments Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- __mocks__/browser-request.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/__mocks__/browser-request.js b/__mocks__/browser-request.js index 391be7c54f..4c59e8a43a 100644 --- a/__mocks__/browser-request.js +++ b/__mocks__/browser-request.js @@ -1,6 +1,10 @@ const en = require("../src/i18n/strings/en_EN"); const de = require("../src/i18n/strings/de_DE"); +// Mock the browser-request for the languageHandler tests to return +// Fake languages.json containing references to en_EN and de_DE +// en_EN.json +// de_DE.json module.exports = jest.fn((opts, cb) => { const url = opts.url || opts.uri; if (url && url.endsWith("languages.json")) { From aa0e19daf03509b6aa598c19f5e83c50b03604a8 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Thu, 24 Sep 2020 08:23:06 -0600 Subject: [PATCH 107/331] Make the hover transition a variable --- res/css/_common.scss | 2 ++ res/css/views/settings/_AvatarSetting.scss | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/res/css/_common.scss b/res/css/_common.scss index a22d77f3d3..aafd6e5297 100644 --- a/res/css/_common.scss +++ b/res/css/_common.scss @@ -18,6 +18,8 @@ limitations under the License. @import "./_font-sizes.scss"; +$hover-transition: 0.08s cubic-bezier(.46, .03, .52, .96); // quadratic + :root { font-size: 10px; } diff --git a/res/css/views/settings/_AvatarSetting.scss b/res/css/views/settings/_AvatarSetting.scss index 3576b09888..52a0ee95d7 100644 --- a/res/css/views/settings/_AvatarSetting.scss +++ b/res/css/views/settings/_AvatarSetting.scss @@ -21,7 +21,7 @@ limitations under the License. position: relative; .mx_AvatarSetting_hover { - transition: opacity 0.08s cubic-bezier(.46, .03, .52, .96); // quadratic + transition: opacity $hover-transition; // position to place the hover bg over the entire thing position: absolute; From a2860e698a333c7d03cb84a91b04ac545d6fe0f1 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Thu, 24 Sep 2020 08:26:59 -0600 Subject: [PATCH 108/331] Clean up other unlinted lint issues --- .../views/room_settings/RoomProfileSettings.js | 9 ++++++--- src/components/views/settings/AvatarSetting.js | 2 +- src/components/views/settings/ProfileSettings.js | 9 ++++++--- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/components/views/room_settings/RoomProfileSettings.js b/src/components/views/room_settings/RoomProfileSettings.js index 621c8b287e..ca09c3093a 100644 --- a/src/components/views/room_settings/RoomProfileSettings.js +++ b/src/components/views/room_settings/RoomProfileSettings.js @@ -161,7 +161,8 @@ export default class RoomProfileSettings extends React.Component { return (
{_t("Cancel")} {_t("Save")} diff --git a/src/components/views/settings/AvatarSetting.js b/src/components/views/settings/AvatarSetting.js index 84effe3dc0..487c752c38 100644 --- a/src/components/views/settings/AvatarSetting.js +++ b/src/components/views/settings/AvatarSetting.js @@ -21,7 +21,7 @@ import AccessibleButton from "../elements/AccessibleButton"; import classNames from "classnames"; const AvatarSetting = ({avatarUrl, avatarAltText, avatarName, uploadAvatar, removeAvatar}) => { - const [isHovering, setIsHovering] = useState(); + const [isHovering, setIsHovering] = useState(false); const hoveringProps = { onMouseEnter: () => setIsHovering(true), onMouseLeave: () => setIsHovering(false), diff --git a/src/components/views/settings/ProfileSettings.js b/src/components/views/settings/ProfileSettings.js index 75c0fc0226..651aa9f48d 100644 --- a/src/components/views/settings/ProfileSettings.js +++ b/src/components/views/settings/ProfileSettings.js @@ -155,7 +155,8 @@ export default class ProfileSettings extends React.Component { return (
{_t("Cancel")} {_t("Save")} From 8992dc96550f04a59619e0a9d56aff5c29bd37f2 Mon Sep 17 00:00:00 2001 From: "@a2sc:matrix.org" Date: Wed, 23 Sep 2020 20:14:03 +0000 Subject: [PATCH 109/331] Translated using Weblate (German) Currently translated at 100.0% (2375 of 2375 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/element-web/matrix-react-sdk/de/ --- src/i18n/strings/de_DE.json | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/de_DE.json b/src/i18n/strings/de_DE.json index 9ed6119873..e851725434 100644 --- a/src/i18n/strings/de_DE.json +++ b/src/i18n/strings/de_DE.json @@ -2504,5 +2504,11 @@ "Start a conversation with someone using their name or username (like ).": "Starte ein Gespräch unter Verwendung des Namen oder Benutzernamens des Gegenübers (z. B. ).", "This won't invite them to %(communityName)s. To invite someone to %(communityName)s, click here": "Das wird sie nicht zu %(communityName)s einladen. Um jemand zu %(communityName)s einzuladen, klicke hier", "Invite someone using their name, username (like ) or share this room.": "Lade jemand mittels seinem/ihrem Namen oder Benutzernamen (z.B. ) ein, oder teile diesem Raum.", - "Unable to set up keys": "Schlüssel können nicht eingerichtet werden" + "Unable to set up keys": "Schlüssel können nicht eingerichtet werden", + "Use the Desktop app to see all encrypted files": "Nutze die Desktop-App um alle verschlüsselten Dateien zu sehen", + "Use the Desktop app to search encrypted messages": "Nutze die Desktop-App um verschlüsselte Nachrichten zu suchen", + "This version of %(brand)s does not support viewing some encrypted files": "Diese Version von %(brand)s unterstützt nicht alle verschlüsselten Dateien anzuzeigen", + "This version of %(brand)s does not support searching encrypted messages": "Diese Version von %(brand)s unterstützt nicht verschlüsselte Nachrichten zu durchsuchen", + "Cannot create rooms in this community": "Räume können in dieser Community nicht erstellt werden", + "You do not have permission to create rooms in this community.": "Du bist nicht berechtigt Räume in dieser Community zu erstellen." } From e7241f2dfdae723abd8c594cf80031e463718b9b Mon Sep 17 00:00:00 2001 From: Szimszon Date: Wed, 23 Sep 2020 14:33:40 +0000 Subject: [PATCH 110/331] Translated using Weblate (Hungarian) Currently translated at 100.0% (2375 of 2375 strings) Translation: Element Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/element-web/matrix-react-sdk/hu/ --- src/i18n/strings/hu.json | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/hu.json b/src/i18n/strings/hu.json index 8095401bf9..0207dcc381 100644 --- a/src/i18n/strings/hu.json +++ b/src/i18n/strings/hu.json @@ -2502,5 +2502,15 @@ "Minimize widget": "Widget minimalizálása", "Maximize widget": "Widget maximalizálása", "Your server requires encryption to be enabled in private rooms.": "A szervered megköveteli, hogy a titkosítás be legyen kapcsolva a privát szobákban.", - "Unable to set up keys": "Nem sikerült a kulcsok beállítása" + "Unable to set up keys": "Nem sikerült a kulcsok beállítása", + "Safeguard against losing access to encrypted messages & data": "Biztosítás a titkosított üzenetek és adatokhoz való hozzáférés elvesztése ellen", + "not found in storage": "a tárban nem található", + "Widgets": "Kisalkalmazások", + "Edit widgets, bridges & bots": "Kisalkalmazások, hidak és botok szerkesztése", + "Use the Desktop app to see all encrypted files": "Minden titkosított fájl eléréséhez használd az Asztali alkalmazást", + "Use the Desktop app to search encrypted messages": "A titkosított üzenetek kereséséhez használd az Asztali alkalmazást", + "This version of %(brand)s does not support viewing some encrypted files": "%(brand)s ezen verziója nem minden titkosított fájl megjelenítését támogatja", + "This version of %(brand)s does not support searching encrypted messages": "%(brand)s ezen verziója nem támogatja a keresést a titkosított üzenetekben", + "Cannot create rooms in this community": "A közösségben nem lehet szobát készíteni", + "You do not have permission to create rooms in this community.": "A közösségben szoba létrehozásához nincs jogosultságod." } From 8962f7ae9eba8ce59e5962910b884d3f573a2b82 Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 24 Sep 2020 16:16:20 +0100 Subject: [PATCH 111/331] Convert CallHandler to typescript and remove the old conference call stuff while we're at it: enough time should have passed since those mistakes that we can move on. The old conference call rooms will still appear for anyone whose account dates back to that time, but they've presumably been appearing in any other matrix client they used too. --- src/@types/global.d.ts | 3 + src/CallHandler.js | 526 ------------------ src/CallHandler.tsx | 482 ++++++++++++++++ src/Rooms.js | 52 -- src/TextForEvent.js | 18 +- src/VectorConferenceHandler.js | 135 ----- src/components/structures/LoggedInView.tsx | 2 - src/components/structures/MatrixChat.tsx | 1 - src/components/structures/RoomView.tsx | 41 +- src/components/views/rooms/AuxPanel.js | 37 -- src/components/views/rooms/MemberList.js | 6 - src/components/views/rooms/MessageComposer.js | 2 +- src/components/views/voip/CallContainer.tsx | 3 +- src/components/views/voip/CallPreview.tsx | 13 +- src/components/views/voip/CallView.tsx | 33 +- src/components/views/voip/IncomingCallBox.tsx | 2 +- 16 files changed, 509 insertions(+), 847 deletions(-) delete mode 100644 src/CallHandler.js create mode 100644 src/CallHandler.tsx delete mode 100644 src/VectorConferenceHandler.js diff --git a/src/@types/global.d.ts b/src/@types/global.d.ts index e1111a8a94..c58dca0a09 100644 --- a/src/@types/global.d.ts +++ b/src/@types/global.d.ts @@ -30,6 +30,7 @@ import {Notifier} from "../Notifier"; import type {Renderer} from "react-dom"; import RightPanelStore from "../stores/RightPanelStore"; import WidgetStore from "../stores/WidgetStore"; +import CallHandler from "../CallHandler"; declare global { interface Window { @@ -53,6 +54,7 @@ declare global { mxNotifier: typeof Notifier; mxRightPanelStore: RightPanelStore; mxWidgetStore: WidgetStore; + mxCallHandler: CallHandler; } interface Document { @@ -62,6 +64,7 @@ declare global { interface Navigator { userLanguage?: string; + mediaSession: any; } interface StorageEstimate { diff --git a/src/CallHandler.js b/src/CallHandler.js deleted file mode 100644 index ad40332af5..0000000000 --- a/src/CallHandler.js +++ /dev/null @@ -1,526 +0,0 @@ -/* -Copyright 2015, 2016 OpenMarket Ltd -Copyright 2017, 2018 New Vector 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. -*/ - -/* - * Manages a list of all the currently active calls. - * - * This handler dispatches when voip calls are added/updated/removed from this list: - * { - * action: 'call_state' - * room_id: - * } - * - * To know the state of the call, this handler exposes a getter to - * obtain the call for a room: - * var call = CallHandler.getCall(roomId) - * var state = call.call_state; // ringing|ringback|connected|ended|busy|stop_ringback|stop_ringing - * - * This handler listens for and handles the following actions: - * { - * action: 'place_call', - * type: 'voice|video', - * room_id: - * } - * - * { - * action: 'incoming_call' - * call: MatrixCall - * } - * - * { - * action: 'hangup' - * room_id: - * } - * - * { - * action: 'answer' - * room_id: - * } - */ - -import {MatrixClientPeg} from './MatrixClientPeg'; -import PlatformPeg from './PlatformPeg'; -import Modal from './Modal'; -import { _t } from './languageHandler'; -import Matrix from 'matrix-js-sdk'; -import dis from './dispatcher/dispatcher'; -import WidgetUtils from './utils/WidgetUtils'; -import WidgetEchoStore from './stores/WidgetEchoStore'; -import SettingsStore from './settings/SettingsStore'; -import {generateHumanReadableId} from "./utils/NamingUtils"; -import {Jitsi} from "./widgets/Jitsi"; -import {WidgetType} from "./widgets/WidgetType"; -import {SettingLevel} from "./settings/SettingLevel"; -import {base32} from "rfc4648"; - -import QuestionDialog from "./components/views/dialogs/QuestionDialog"; -import ErrorDialog from "./components/views/dialogs/ErrorDialog"; - -global.mxCalls = { - //room_id: MatrixCall -}; -const calls = global.mxCalls; -let ConferenceHandler = null; - -const audioPromises = {}; - -function play(audioId) { - // TODO: Attach an invisible element for this instead - // which listens? - const audio = document.getElementById(audioId); - if (audio) { - const playAudio = async () => { - try { - // This still causes the chrome debugger to break on promise rejection if - // the promise is rejected, even though we're catching the exception. - await audio.play(); - } catch (e) { - // This is usually because the user hasn't interacted with the document, - // or chrome doesn't think so and is denying the request. Not sure what - // we can really do here... - // https://github.com/vector-im/element-web/issues/7657 - console.log("Unable to play audio clip", e); - } - }; - if (audioPromises[audioId]) { - audioPromises[audioId] = audioPromises[audioId].then(()=>{ - audio.load(); - return playAudio(); - }); - } else { - audioPromises[audioId] = playAudio(); - } - } -} - -function pause(audioId) { - // TODO: Attach an invisible element for this instead - // which listens? - const audio = document.getElementById(audioId); - if (audio) { - if (audioPromises[audioId]) { - audioPromises[audioId] = audioPromises[audioId].then(()=>audio.pause()); - } else { - // pause doesn't actually return a promise, but might as well do this for symmetry with play(); - audioPromises[audioId] = audio.pause(); - } - } -} - -function _setCallListeners(call) { - call.on("error", function(err) { - console.error("Call error:", err); - if ( - MatrixClientPeg.get().getTurnServers().length === 0 && - SettingsStore.getValue("fallbackICEServerAllowed") === null - ) { - _showICEFallbackPrompt(); - return; - } - - Modal.createTrackedDialog('Call Failed', '', ErrorDialog, { - title: _t('Call Failed'), - description: err.message, - }); - }); - call.on("hangup", function() { - _setCallState(undefined, call.roomId, "ended"); - }); - // map web rtc states to dummy UI state - // ringing|ringback|connected|ended|busy|stop_ringback|stop_ringing - call.on("state", function(newState, oldState) { - if (newState === "ringing") { - _setCallState(call, call.roomId, "ringing"); - pause("ringbackAudio"); - } else if (newState === "invite_sent") { - _setCallState(call, call.roomId, "ringback"); - play("ringbackAudio"); - } else if (newState === "ended" && oldState === "connected") { - _setCallState(undefined, call.roomId, "ended"); - pause("ringbackAudio"); - play("callendAudio"); - } else if (newState === "ended" && oldState === "invite_sent" && - (call.hangupParty === "remote" || - (call.hangupParty === "local" && call.hangupReason === "invite_timeout") - )) { - _setCallState(call, call.roomId, "busy"); - pause("ringbackAudio"); - play("busyAudio"); - Modal.createTrackedDialog('Call Handler', 'Call Timeout', ErrorDialog, { - title: _t('Call Timeout'), - description: _t('The remote side failed to pick up') + '.', - }); - } else if (oldState === "invite_sent") { - _setCallState(call, call.roomId, "stop_ringback"); - pause("ringbackAudio"); - } else if (oldState === "ringing") { - _setCallState(call, call.roomId, "stop_ringing"); - pause("ringbackAudio"); - } else if (newState === "connected") { - _setCallState(call, call.roomId, "connected"); - pause("ringbackAudio"); - } - }); -} - -function _setCallState(call, roomId, status) { - console.log( - `Call state in ${roomId} changed to ${status} (${call ? call.call_state : "-"})`, - ); - calls[roomId] = call; - - if (status === "ringing") { - play("ringAudio"); - } else if (call && call.call_state === "ringing") { - pause("ringAudio"); - } - - if (call) { - call.call_state = status; - } - dis.dispatch({ - action: 'call_state', - room_id: roomId, - state: status, - }); -} - -function _showICEFallbackPrompt() { - const cli = MatrixClientPeg.get(); - const code = sub => {sub}; - Modal.createTrackedDialog('No TURN servers', '', QuestionDialog, { - title: _t("Call failed due to misconfigured server"), - description:
-

{_t( - "Please ask the administrator of your homeserver " + - "(%(homeserverDomain)s) to configure a TURN server in " + - "order for calls to work reliably.", - { homeserverDomain: cli.getDomain() }, { code }, - )}

-

{_t( - "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.", - null, { code }, - )}

-
, - button: _t('Try using turn.matrix.org'), - cancelButton: _t('OK'), - onFinished: (allow) => { - SettingsStore.setValue("fallbackICEServerAllowed", null, SettingLevel.DEVICE, allow); - cli.setFallbackICEServerAllowed(allow); - }, - }, null, true); -} - -function _onAction(payload) { - function placeCall(newCall) { - _setCallListeners(newCall); - if (payload.type === 'voice') { - newCall.placeVoiceCall(); - } else if (payload.type === 'video') { - newCall.placeVideoCall( - payload.remote_element, - payload.local_element, - ); - } else if (payload.type === 'screensharing') { - const screenCapErrorString = PlatformPeg.get().screenCaptureErrorString(); - if (screenCapErrorString) { - _setCallState(undefined, newCall.roomId, "ended"); - console.log("Can't capture screen: " + screenCapErrorString); - Modal.createTrackedDialog('Call Handler', 'Unable to capture screen', ErrorDialog, { - title: _t('Unable to capture screen'), - description: screenCapErrorString, - }); - return; - } - newCall.placeScreenSharingCall( - payload.remote_element, - payload.local_element, - ); - } else { - console.error("Unknown conf call type: %s", payload.type); - } - } - - switch (payload.action) { - case 'place_call': - { - if (callHandler.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, { - title: _t('VoIP is unsupported'), - description: _t('You cannot place VoIP calls in this browser.'), - }); - return; - } - - const room = MatrixClientPeg.get().getRoom(payload.room_id); - if (!room) { - console.error("Room %s does not exist.", payload.room_id); - return; - } - - const members = room.getJoinedMembers(); - if (members.length <= 1) { - Modal.createTrackedDialog('Call Handler', 'Cannot place call with self', ErrorDialog, { - description: _t('You cannot place a call with yourself.'), - }); - return; - } else if (members.length === 2) { - console.info("Place %s call in %s", payload.type, payload.room_id); - const call = Matrix.createNewMatrixCall(MatrixClientPeg.get(), payload.room_id); - placeCall(call); - } else { // > 2 - dis.dispatch({ - action: "place_conference_call", - room_id: payload.room_id, - type: payload.type, - remote_element: payload.remote_element, - local_element: payload.local_element, - }); - } - } - break; - case 'place_conference_call': - console.info("Place conference call in %s", payload.room_id); - _startCallApp(payload.room_id, payload.type); - break; - case 'incoming_call': - { - if (callHandler.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; - _setCallListeners(call); - _setCallState(call, call.roomId, "ringing"); - } - break; - case 'hangup': - if (!calls[payload.room_id]) { - return; // no call to hangup - } - calls[payload.room_id].hangup(); - _setCallState(null, payload.room_id, "ended"); - break; - case 'answer': - if (!calls[payload.room_id]) { - return; // no call to answer - } - calls[payload.room_id].answer(); - _setCallState(calls[payload.room_id], payload.room_id, "connected"); - dis.dispatch({ - action: "view_room", - room_id: payload.room_id, - }); - break; - } -} - -async function _startCallApp(roomId, type) { - dis.dispatch({ - action: 'appsDrawer', - show: true, - }); - - const room = MatrixClientPeg.get().getRoom(roomId); - const currentJitsiWidgets = WidgetUtils.getRoomWidgetsOfType(room, WidgetType.JITSI); - - if (WidgetEchoStore.roomHasPendingWidgetsOfType(roomId, currentJitsiWidgets, WidgetType.JITSI)) { - Modal.createTrackedDialog('Call already in progress', '', ErrorDialog, { - title: _t('Call in Progress'), - description: _t('A call is currently being placed!'), - }); - return; - } - - if (currentJitsiWidgets.length > 0) { - console.warn( - "Refusing to start conference call widget in " + roomId + - " a conference call widget is already present", - ); - - if (WidgetUtils.canUserModifyWidgets(roomId)) { - Modal.createTrackedDialog('Already have Jitsi Widget', '', QuestionDialog, { - title: _t('End Call'), - description: _t('Remove the group call from the room?'), - button: _t('End Call'), - cancelButton: _t('Cancel'), - onFinished: (endCall) => { - if (endCall) { - WidgetUtils.setRoomWidget(roomId, currentJitsiWidgets[0].getContent()['id']); - } - }, - }); - } else { - Modal.createTrackedDialog('Already have Jitsi Widget', '', ErrorDialog, { - title: _t('Call in Progress'), - description: _t("You don't have permission to remove the call from the room"), - }); - } - return; - } - - const jitsiDomain = Jitsi.getInstance().preferredDomain; - const jitsiAuth = await Jitsi.getInstance().getJitsiAuth(); - let confId; - if (jitsiAuth === 'openidtoken-jwt') { - // Create conference ID from room ID - // For compatibility with Jitsi, use base32 without padding. - // More details here: - // https://github.com/matrix-org/prosody-mod-auth-matrix-user-verification - confId = base32.stringify(Buffer.from(roomId), { pad: false }); - } else { - // Create a random human readable conference ID - confId = `JitsiConference${generateHumanReadableId()}`; - } - - let widgetUrl = WidgetUtils.getLocalJitsiWrapperUrl({auth: jitsiAuth}); - - // TODO: Remove URL hacks when the mobile clients eventually support v2 widgets - const parsedUrl = new URL(widgetUrl); - parsedUrl.search = ''; // set to empty string to make the URL class use searchParams instead - parsedUrl.searchParams.set('confId', confId); - widgetUrl = parsedUrl.toString(); - - const widgetData = { - conferenceId: confId, - isAudioOnly: type === 'voice', - domain: jitsiDomain, - auth: jitsiAuth, - }; - - const widgetId = ( - 'jitsi_' + - MatrixClientPeg.get().credentials.userId + - '_' + - Date.now() - ); - - WidgetUtils.setRoomWidget(roomId, widgetId, WidgetType.JITSI, widgetUrl, 'Jitsi', widgetData).then(() => { - console.log('Jitsi widget added'); - }).catch((e) => { - if (e.errcode === 'M_FORBIDDEN') { - Modal.createTrackedDialog('Call Failed', '', ErrorDialog, { - title: _t('Permission Required'), - description: _t("You do not have permission to start a conference call in this room"), - }); - } - console.error(e); - }); -} - -// FIXME: Nasty way of making sure we only register -// with the dispatcher once -if (!global.mxCallHandler) { - dis.register(_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. - if (navigator.mediaSession) { - navigator.mediaSession.setActionHandler('play', function() {}); - navigator.mediaSession.setActionHandler('pause', function() {}); - navigator.mediaSession.setActionHandler('seekbackward', function() {}); - navigator.mediaSession.setActionHandler('seekforward', function() {}); - navigator.mediaSession.setActionHandler('previoustrack', function() {}); - navigator.mediaSession.setActionHandler('nexttrack', function() {}); - } -} - -const callHandler = { - getCallForRoom: function(roomId) { - let call = callHandler.getCall(roomId); - if (call) return call; - - if (ConferenceHandler) { - call = ConferenceHandler.getConferenceCallForRoom(roomId); - } - if (call) return call; - - return null; - }, - - getCall: function(roomId) { - return calls[roomId] || null; - }, - - getAnyActiveCall: function() { - const roomsWithCalls = Object.keys(calls); - for (let i = 0; i < roomsWithCalls.length; i++) { - if (calls[roomsWithCalls[i]] && - calls[roomsWithCalls[i]].call_state !== "ended") { - return calls[roomsWithCalls[i]]; - } - } - return null; - }, - - /** - * The conference handler is a module that deals with implementation-specific - * multi-party calling implementations. Element passes in its own which creates - * a one-to-one call with a freeswitch conference bridge. As of July 2018, - * the de-facto way of conference calling is a Jitsi widget, so this is - * deprecated. It reamins here for two reasons: - * 1. So Element still supports joining existing freeswitch conference calls - * (but doesn't support creating them). After a transition period, we can - * remove support for joining them too. - * 2. To hide the one-to-one rooms that old-style conferencing creates. This - * is much harder to remove: probably either we make Element leave & forget these - * rooms after we remove support for joining freeswitch conferences, or we - * accept that random rooms with cryptic users will suddently appear for - * anyone who's ever used conference calling, or we are stuck with this - * code forever. - * - * @param {object} confHandler The conference handler object - */ - setConferenceHandler: function(confHandler) { - ConferenceHandler = confHandler; - }, - - getConferenceHandler: function() { - return ConferenceHandler; - }, -}; -// Only things in here which actually need to be global are the -// calls list (done separately) and making sure we only register -// with the dispatcher once (which uses this mechanism but checks -// separately). This could be tidied up. -if (global.mxCallHandler === undefined) { - global.mxCallHandler = callHandler; -} - -export default global.mxCallHandler; diff --git a/src/CallHandler.tsx b/src/CallHandler.tsx new file mode 100644 index 0000000000..87b26b135d --- /dev/null +++ b/src/CallHandler.tsx @@ -0,0 +1,482 @@ +/* +Copyright 2015, 2016 OpenMarket Ltd +Copyright 2017, 2018 New Vector 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. +*/ + +/* + * Manages a list of all the currently active calls. + * + * This handler dispatches when voip calls are added/updated/removed from this list: + * { + * action: 'call_state' + * room_id: + * } + * + * To know the state of the call, this handler exposes a getter to + * obtain the call for a room: + * var call = CallHandler.getCall(roomId) + * var state = call.call_state; // ringing|ringback|connected|ended|busy|stop_ringback|stop_ringing + * + * This handler listens for and handles the following actions: + * { + * action: 'place_call', + * type: 'voice|video', + * room_id: + * } + * + * { + * action: 'incoming_call' + * call: MatrixCall + * } + * + * { + * action: 'hangup' + * room_id: + * } + * + * { + * action: 'answer' + * room_id: + * } + */ + +import React from 'react'; + +import {MatrixClientPeg} from './MatrixClientPeg'; +import PlatformPeg from './PlatformPeg'; +import Modal from './Modal'; +import { _t } from './languageHandler'; +import Matrix from 'matrix-js-sdk'; +import dis from './dispatcher/dispatcher'; +import WidgetUtils from './utils/WidgetUtils'; +import WidgetEchoStore from './stores/WidgetEchoStore'; +import SettingsStore from './settings/SettingsStore'; +import {generateHumanReadableId} from "./utils/NamingUtils"; +import {Jitsi} from "./widgets/Jitsi"; +import {WidgetType} from "./widgets/WidgetType"; +import {SettingLevel} from "./settings/SettingLevel"; +import {base32} from "rfc4648"; + +import QuestionDialog from "./components/views/dialogs/QuestionDialog"; +import ErrorDialog from "./components/views/dialogs/ErrorDialog"; + +export default class CallHandler { + private calls = {}; + private audioPromises = {}; + + static sharedInstance() { + if (!window.mxCallHandler) { + window.mxCallHandler = new CallHandler() + } + + return window.mxCallHandler; + } + + constructor() { + 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. + if (navigator.mediaSession) { + navigator.mediaSession.setActionHandler('play', function() {}); + navigator.mediaSession.setActionHandler('pause', function() {}); + navigator.mediaSession.setActionHandler('seekbackward', function() {}); + navigator.mediaSession.setActionHandler('seekforward', function() {}); + navigator.mediaSession.setActionHandler('previoustrack', function() {}); + navigator.mediaSession.setActionHandler('nexttrack', function() {}); + } + } + + getCallForRoom(roomId: string) { + return this.calls[roomId] || null; + } + + getAnyActiveCall() { + const roomsWithCalls = Object.keys(this.calls); + for (let i = 0; i < roomsWithCalls.length; i++) { + if (this.calls[roomsWithCalls[i]] && + this.calls[roomsWithCalls[i]].call_state !== "ended") { + return this.calls[roomsWithCalls[i]]; + } + } + return null; + } + + play(audioId) { + // TODO: Attach an invisible element for this instead + // which listens? + const audio = document.getElementById(audioId) as HTMLMediaElement; + if (audio) { + const playAudio = async () => { + try { + // This still causes the chrome debugger to break on promise rejection if + // the promise is rejected, even though we're catching the exception. + await audio.play(); + } catch (e) { + // This is usually because the user hasn't interacted with the document, + // or chrome doesn't think so and is denying the request. Not sure what + // we can really do here... + // https://github.com/vector-im/element-web/issues/7657 + console.log("Unable to play audio clip", e); + } + }; + if (this.audioPromises[audioId]) { + this.audioPromises[audioId] = this.audioPromises[audioId].then(() => { + audio.load(); + return playAudio(); + }); + } else { + this.audioPromises[audioId] = playAudio(); + } + } + } + + pause(audioId) { + // TODO: Attach an invisible element for this instead + // which listens? + const audio = document.getElementById(audioId) as HTMLMediaElement; + if (audio) { + if (this.audioPromises[audioId]) { + this.audioPromises[audioId] = this.audioPromises[audioId].then(() => audio.pause()); + } else { + // pause doesn't actually return a promise, but might as well do this for symmetry with play(); + this.audioPromises[audioId] = audio.pause(); + } + } + } + + private setCallListeners(call) { + call.on("error", (err) => { + console.error("Call error:", err); + if ( + MatrixClientPeg.get().getTurnServers().length === 0 && + SettingsStore.getValue("fallbackICEServerAllowed") === null + ) { + this.showICEFallbackPrompt(); + return; + } + + Modal.createTrackedDialog('Call Failed', '', ErrorDialog, { + title: _t('Call Failed'), + description: err.message, + }); + }); + call.on("hangup", () => { + this.setCallState(undefined, call.roomId, "ended"); + }); + // map web rtc states to dummy UI state + // ringing|ringback|connected|ended|busy|stop_ringback|stop_ringing + call.on("state", (newState, oldState) => { + if (newState === "ringing") { + this.setCallState(call, call.roomId, "ringing"); + this.pause("ringbackAudio"); + } else if (newState === "invite_sent") { + this.setCallState(call, call.roomId, "ringback"); + this.play("ringbackAudio"); + } else if (newState === "ended" && oldState === "connected") { + this.setCallState(undefined, call.roomId, "ended"); + this.pause("ringbackAudio"); + this.play("callendAudio"); + } else if (newState === "ended" && oldState === "invite_sent" && + (call.hangupParty === "remote" || + (call.hangupParty === "local" && call.hangupReason === "invite_timeout") + )) { + this.setCallState(call, call.roomId, "busy"); + this.pause("ringbackAudio"); + this.play("busyAudio"); + Modal.createTrackedDialog('Call Handler', 'Call Timeout', ErrorDialog, { + title: _t('Call Timeout'), + description: _t('The remote side failed to pick up') + '.', + }); + } else if (oldState === "invite_sent") { + this.setCallState(call, call.roomId, "stop_ringback"); + this.pause("ringbackAudio"); + } else if (oldState === "ringing") { + this.setCallState(call, call.roomId, "stop_ringing"); + this.pause("ringbackAudio"); + } else if (newState === "connected") { + this.setCallState(call, call.roomId, "connected"); + this.pause("ringbackAudio"); + } + }); + } + + private setCallState(call, roomId, status) { + console.log( + `Call state in ${roomId} changed to ${status} (${call ? call.call_state : "-"})`, + ); + this.calls[roomId] = call; + + if (status === "ringing") { + this.play("ringAudio"); + } else if (call && call.call_state === "ringing") { + this.pause("ringAudio"); + } + + if (call) { + call.call_state = status; + } + dis.dispatch({ + action: 'call_state', + room_id: roomId, + state: status, + }); + } + + private showICEFallbackPrompt() { + const cli = MatrixClientPeg.get(); + const code = sub => {sub}; + Modal.createTrackedDialog('No TURN servers', '', QuestionDialog, { + title: _t("Call failed due to misconfigured server"), + description:
+

{_t( + "Please ask the administrator of your homeserver " + + "(%(homeserverDomain)s) to configure a TURN server in " + + "order for calls to work reliably.", + { homeserverDomain: cli.getDomain() }, { code }, + )}

+

{_t( + "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.", + null, { code }, + )}

+
, + button: _t('Try using turn.matrix.org'), + cancelButton: _t('OK'), + onFinished: (allow) => { + SettingsStore.setValue("fallbackICEServerAllowed", null, SettingLevel.DEVICE, allow); + cli.setFallbackICEServerAllowed(allow); + }, + }, null, true); + } + + private onAction = (payload) => { + const placeCall = (newCall) => { + this.setCallListeners(newCall); + if (payload.type === 'voice') { + newCall.placeVoiceCall(); + } else if (payload.type === 'video') { + newCall.placeVideoCall( + payload.remote_element, + payload.local_element, + ); + } else if (payload.type === 'screensharing') { + const screenCapErrorString = PlatformPeg.get().screenCaptureErrorString(); + if (screenCapErrorString) { + this.setCallState(undefined, newCall.roomId, "ended"); + console.log("Can't capture screen: " + screenCapErrorString); + Modal.createTrackedDialog('Call Handler', 'Unable to capture screen', ErrorDialog, { + title: _t('Unable to capture screen'), + description: screenCapErrorString, + }); + return; + } + newCall.placeScreenSharingCall( + payload.remote_element, + payload.local_element, + ); + } else { + console.error("Unknown conf call type: %s", payload.type); + } + } + + 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, { + title: _t('VoIP is unsupported'), + description: _t('You cannot place VoIP calls in this browser.'), + }); + return; + } + + const room = MatrixClientPeg.get().getRoom(payload.room_id); + if (!room) { + console.error("Room %s does not exist.", payload.room_id); + return; + } + + const members = room.getJoinedMembers(); + if (members.length <= 1) { + Modal.createTrackedDialog('Call Handler', 'Cannot place call with self', ErrorDialog, { + description: _t('You cannot place a call with yourself.'), + }); + return; + } else if (members.length === 2) { + console.info("Place %s call in %s", payload.type, payload.room_id); + const call = Matrix.createNewMatrixCall(MatrixClientPeg.get(), payload.room_id); + placeCall(call); + } else { // > 2 + dis.dispatch({ + action: "place_conference_call", + room_id: payload.room_id, + type: payload.type, + remote_element: payload.remote_element, + local_element: payload.local_element, + }); + } + } + break; + case 'place_conference_call': + console.info("Place conference call in %s", payload.room_id); + this.startCallApp(payload.room_id, payload.type); + 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; + this.setCallListeners(call); + this.setCallState(call, call.roomId, "ringing"); + } + break; + case 'hangup': + if (!this.calls[payload.room_id]) { + return; // no call to hangup + } + this.calls[payload.room_id].hangup(); + this.setCallState(null, payload.room_id, "ended"); + break; + case 'answer': + if (!this.calls[payload.room_id]) { + return; // no call to answer + } + this.calls[payload.room_id].answer(); + this.setCallState(this.calls[payload.room_id], payload.room_id, "connected"); + dis.dispatch({ + action: "view_room", + room_id: payload.room_id, + }); + break; + } + } + + private async startCallApp(roomId, type) { + dis.dispatch({ + action: 'appsDrawer', + show: true, + }); + + const room = MatrixClientPeg.get().getRoom(roomId); + const currentJitsiWidgets = WidgetUtils.getRoomWidgetsOfType(room, WidgetType.JITSI); + + if (WidgetEchoStore.roomHasPendingWidgetsOfType(roomId, currentJitsiWidgets, WidgetType.JITSI)) { + Modal.createTrackedDialog('Call already in progress', '', ErrorDialog, { + title: _t('Call in Progress'), + description: _t('A call is currently being placed!'), + }); + return; + } + + if (currentJitsiWidgets.length > 0) { + console.warn( + "Refusing to start conference call widget in " + roomId + + " a conference call widget is already present", + ); + + if (WidgetUtils.canUserModifyWidgets(roomId)) { + Modal.createTrackedDialog('Already have Jitsi Widget', '', QuestionDialog, { + title: _t('End Call'), + description: _t('Remove the group call from the room?'), + button: _t('End Call'), + cancelButton: _t('Cancel'), + onFinished: (endCall) => { + if (endCall) { + WidgetUtils.setRoomWidget(roomId, currentJitsiWidgets[0].getContent()['id']); + } + }, + }); + } else { + Modal.createTrackedDialog('Already have Jitsi Widget', '', ErrorDialog, { + title: _t('Call in Progress'), + description: _t("You don't have permission to remove the call from the room"), + }); + } + return; + } + + const jitsiDomain = Jitsi.getInstance().preferredDomain; + const jitsiAuth = await Jitsi.getInstance().getJitsiAuth(); + let confId; + if (jitsiAuth === 'openidtoken-jwt') { + // Create conference ID from room ID + // For compatibility with Jitsi, use base32 without padding. + // More details here: + // https://github.com/matrix-org/prosody-mod-auth-matrix-user-verification + confId = base32.stringify(Buffer.from(roomId), { pad: false }); + } else { + // Create a random human readable conference ID + confId = `JitsiConference${generateHumanReadableId()}`; + } + + let widgetUrl = WidgetUtils.getLocalJitsiWrapperUrl({auth: jitsiAuth}); + + // TODO: Remove URL hacks when the mobile clients eventually support v2 widgets + const parsedUrl = new URL(widgetUrl); + parsedUrl.search = ''; // set to empty string to make the URL class use searchParams instead + parsedUrl.searchParams.set('confId', confId); + widgetUrl = parsedUrl.toString(); + + const widgetData = { + conferenceId: confId, + isAudioOnly: type === 'voice', + domain: jitsiDomain, + auth: jitsiAuth, + }; + + const widgetId = ( + 'jitsi_' + + MatrixClientPeg.get().credentials.userId + + '_' + + Date.now() + ); + + WidgetUtils.setRoomWidget(roomId, widgetId, WidgetType.JITSI, widgetUrl, 'Jitsi', widgetData).then(() => { + console.log('Jitsi widget added'); + }).catch((e) => { + if (e.errcode === 'M_FORBIDDEN') { + Modal.createTrackedDialog('Call Failed', '', ErrorDialog, { + title: _t('Permission Required'), + description: _t("You do not have permission to start a conference call in this room"), + }); + } + console.error(e); + }); + } +} diff --git a/src/Rooms.js b/src/Rooms.js index 218e970f35..3da2b9bc14 100644 --- a/src/Rooms.js +++ b/src/Rooms.js @@ -26,58 +26,6 @@ export function getDisplayAliasForRoom(room) { return room.getCanonicalAlias() || room.getAltAliases()[0]; } -/** - * If the room contains only two members including the logged-in user, - * return the other one. Otherwise, return null. - */ -export function getOnlyOtherMember(room, myUserId) { - if (room.currentState.getJoinedMemberCount() === 2) { - return room.getJoinedMembers().filter(function(m) { - return m.userId !== myUserId; - })[0]; - } - - return null; -} - -function _isConfCallRoom(room, myUserId, conferenceHandler) { - if (!conferenceHandler) return false; - - const myMembership = room.getMyMembership(); - if (myMembership != "join") { - return false; - } - - const otherMember = getOnlyOtherMember(room, myUserId); - if (!otherMember) { - return false; - } - - if (conferenceHandler.isConferenceUser(otherMember.userId)) { - return true; - } - - return false; -} - -// Cache whether a room is a conference call. Assumes that rooms will always -// either will or will not be a conference call room. -const isConfCallRoomCache = { - // $roomId: bool -}; - -export function isConfCallRoom(room, myUserId, conferenceHandler) { - if (isConfCallRoomCache[room.roomId] !== undefined) { - return isConfCallRoomCache[room.roomId]; - } - - const result = _isConfCallRoom(room, myUserId, conferenceHandler); - - isConfCallRoomCache[room.roomId] = result; - - return result; -} - export function looksLikeDirectMessageRoom(room, myUserId) { const myMembership = room.getMyMembership(); const me = room.getMember(myUserId); diff --git a/src/TextForEvent.js b/src/TextForEvent.js index a76c1f59e6..f9cda23650 100644 --- a/src/TextForEvent.js +++ b/src/TextForEvent.js @@ -14,7 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. */ import {MatrixClientPeg} from './MatrixClientPeg'; -import CallHandler from './CallHandler'; import { _t } from './languageHandler'; import * as Roles from './Roles'; import {isValid3pidInvite} from "./RoomInvite"; @@ -29,7 +28,6 @@ function textForMemberEvent(ev) { const prevContent = ev.getPrevContent(); const content = ev.getContent(); - const ConferenceHandler = CallHandler.getConferenceHandler(); const reason = content.reason ? (_t('Reason') + ': ' + content.reason) : ''; switch (content.membership) { case 'invite': { @@ -44,11 +42,7 @@ function textForMemberEvent(ev) { return _t('%(targetName)s accepted an invitation.', {targetName}); } } else { - if (ConferenceHandler && ConferenceHandler.isConferenceUser(ev.getStateKey())) { - return _t('%(senderName)s requested a VoIP conference.', {senderName}); - } else { - return _t('%(senderName)s invited %(targetName)s.', {senderName, targetName}); - } + return _t('%(senderName)s invited %(targetName)s.', {senderName, targetName}); } } case 'ban': @@ -85,17 +79,11 @@ function textForMemberEvent(ev) { } } else { if (!ev.target) console.warn("Join message has no target! -- " + ev.getContent().state_key); - if (ConferenceHandler && ConferenceHandler.isConferenceUser(ev.getStateKey())) { - return _t('VoIP conference started.'); - } else { - return _t('%(targetName)s joined the room.', {targetName}); - } + return _t('%(targetName)s joined the room.', {targetName}); } case 'leave': if (ev.getSender() === ev.getStateKey()) { - if (ConferenceHandler && ConferenceHandler.isConferenceUser(ev.getStateKey())) { - return _t('VoIP conference finished.'); - } else if (prevContent.membership === "invite") { + if (prevContent.membership === "invite") { return _t('%(targetName)s rejected the invitation.', {targetName}); } else { return _t('%(targetName)s left the room.', {targetName}); diff --git a/src/VectorConferenceHandler.js b/src/VectorConferenceHandler.js deleted file mode 100644 index c10bc659ae..0000000000 --- a/src/VectorConferenceHandler.js +++ /dev/null @@ -1,135 +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. -*/ - -import {createNewMatrixCall as jsCreateNewMatrixCall, Room} from "matrix-js-sdk"; -import CallHandler from './CallHandler'; -import {MatrixClientPeg} from "./MatrixClientPeg"; - -// FIXME: this is Element specific code, but will be removed shortly when we -// switch over to Jitsi entirely for video conferencing. - -// FIXME: This currently forces Element to try to hit the matrix.org AS for -// conferencing. This is bad because it prevents people running their own ASes -// from being used. This isn't permanent and will be customisable in the future: -// see the proposal at docs/conferencing.md for more info. -const USER_PREFIX = "fs_"; -const DOMAIN = "matrix.org"; - -export function ConferenceCall(matrixClient, groupChatRoomId) { - this.client = matrixClient; - this.groupRoomId = groupChatRoomId; - this.confUserId = getConferenceUserIdForRoom(this.groupRoomId); -} - -ConferenceCall.prototype.setup = function() { - const self = this; - return this._joinConferenceUser().then(function() { - return self._getConferenceUserRoom(); - }).then(function(room) { - // return a call for *this* room to be placed. We also tack on - // confUserId to speed up lookups (else we'd need to loop every room - // looking for a 1:1 room with this conf user ID!) - const call = jsCreateNewMatrixCall(self.client, room.roomId); - call.confUserId = self.confUserId; - call.groupRoomId = self.groupRoomId; - return call; - }); -}; - -ConferenceCall.prototype._joinConferenceUser = function() { - // Make sure the conference user is in the group chat room - const groupRoom = this.client.getRoom(this.groupRoomId); - if (!groupRoom) { - return Promise.reject("Bad group room ID"); - } - const member = groupRoom.getMember(this.confUserId); - if (member && member.membership === "join") { - return Promise.resolve(); - } - return this.client.invite(this.groupRoomId, this.confUserId); -}; - -ConferenceCall.prototype._getConferenceUserRoom = function() { - // Use an existing 1:1 with the conference user; else make one - const rooms = this.client.getRooms(); - let confRoom = null; - for (let i = 0; i < rooms.length; i++) { - const confUser = rooms[i].getMember(this.confUserId); - if (confUser && confUser.membership === "join" && - rooms[i].getJoinedMemberCount() === 2) { - confRoom = rooms[i]; - break; - } - } - if (confRoom) { - return Promise.resolve(confRoom); - } - return this.client.createRoom({ - preset: "private_chat", - invite: [this.confUserId], - }).then(function(res) { - return new Room(res.room_id, null, MatrixClientPeg.get().getUserId()); - }); -}; - -/** - * Check if this user ID is in fact a conference bot. - * @param {string} userId The user ID to check. - * @return {boolean} True if it is a conference bot. - */ -export function isConferenceUser(userId) { - if (userId.indexOf("@" + USER_PREFIX) !== 0) { - return false; - } - const base64part = userId.split(":")[0].substring(1 + USER_PREFIX.length); - if (base64part) { - const decoded = new Buffer(base64part, "base64").toString(); - // ! $STUFF : $STUFF - return /^!.+:.+/.test(decoded); - } - return false; -} - -export function getConferenceUserIdForRoom(roomId) { - // abuse browserify's core node Buffer support (strip padding ='s) - const base64RoomId = new Buffer(roomId).toString("base64").replace(/=/g, ""); - return "@" + USER_PREFIX + base64RoomId + ":" + DOMAIN; -} - -export function createNewMatrixCall(client, roomId) { - const confCall = new ConferenceCall( - client, roomId, - ); - return confCall.setup(); -} - -export function getConferenceCallForRoom(roomId) { - // search for a conference 1:1 call for this group chat room ID - const activeCall = CallHandler.getAnyActiveCall(); - if (activeCall && activeCall.confUserId) { - const thisRoomConfUserId = getConferenceUserIdForRoom( - roomId, - ); - if (thisRoomConfUserId === activeCall.confUserId) { - return activeCall; - } - } - return null; -} - -// TODO: Document this. -export const slot = 'conference'; diff --git a/src/components/structures/LoggedInView.tsx b/src/components/structures/LoggedInView.tsx index 81b8da2cad..4dc2080895 100644 --- a/src/components/structures/LoggedInView.tsx +++ b/src/components/structures/LoggedInView.tsx @@ -85,7 +85,6 @@ interface IProps { threepidInvite?: IThreepidInvite; roomOobData?: object; currentRoomId: string; - ConferenceHandler?: object; collapseLhs: boolean; config: { piwik: { @@ -637,7 +636,6 @@ class LoggedInView extends React.Component { viaServers={this.props.viaServers} key={this.props.currentRoomId || 'roomview'} disabled={this.props.middleDisabled} - ConferenceHandler={this.props.ConferenceHandler} resizeNotifier={this.props.resizeNotifier} />; break; diff --git a/src/components/structures/MatrixChat.tsx b/src/components/structures/MatrixChat.tsx index dcb497f6dc..69309d5efa 100644 --- a/src/components/structures/MatrixChat.tsx +++ b/src/components/structures/MatrixChat.tsx @@ -148,7 +148,6 @@ interface IRoomInfo { interface IProps { // TODO type things better config: Record; serverConfig?: ValidatedServerConfig; - ConferenceHandler?: any; onNewScreen: (screen: string, replaceLast: boolean) => void; enableGuest?: boolean; // the queryParams extracted from the [real] query-string of the URI diff --git a/src/components/structures/RoomView.tsx b/src/components/structures/RoomView.tsx index 039d36a8de..11ed5d5783 100644 --- a/src/components/structures/RoomView.tsx +++ b/src/components/structures/RoomView.tsx @@ -70,7 +70,6 @@ import PinnedEventsPanel from "../views/rooms/PinnedEventsPanel"; import AuxPanel from "../views/rooms/AuxPanel"; import RoomHeader from "../views/rooms/RoomHeader"; import TintableSvg from "../views/elements/TintableSvg"; -import type * as ConferenceHandler from '../../VectorConferenceHandler'; import {XOR} from "../../@types/common"; import { IThreepidInvite } from "../../stores/ThreepidInviteStore"; @@ -85,8 +84,6 @@ if (DEBUG) { } interface IProps { - ConferenceHandler?: ConferenceHandler; - threepidInvite: IThreepidInvite, // Any data about the room that would normally come from the homeserver @@ -182,7 +179,6 @@ export interface IState { matrixClientIsReady: boolean; showUrlPreview?: boolean; e2eStatus?: E2EStatus; - displayConfCallNotification?: boolean; rejecting?: boolean; rejectError?: Error; } @@ -489,8 +485,6 @@ export default class RoomView extends React.Component { callState: callState, }); - this.updateConfCallNotification(); - window.addEventListener('beforeunload', this.onPageUnload); if (this.props.resizeNotifier) { this.props.resizeNotifier.on("middlePanelResized", this.onResize); @@ -724,10 +718,6 @@ export default class RoomView extends React.Component { callState = call.call_state; } - // possibly remove the conf call notification if we're now in - // the conf - this.updateConfCallNotification(); - this.setState({ callState: callState, }); @@ -1024,9 +1014,6 @@ export default class RoomView extends React.Component { // rate limited because a power level change will emit an event for every member in the room. private updateRoomMembers = rateLimitedFunc((dueToMember) => { - // a member state changed in this room - // refresh the conf call notification state - this.updateConfCallNotification(); this.updateDMState(); let memberCountInfluence = 0; @@ -1055,30 +1042,6 @@ export default class RoomView extends React.Component { this.setState({isAlone: joinedOrInvitedMemberCount === 1}); } - private updateConfCallNotification() { - const room = this.state.room; - if (!room || !this.props.ConferenceHandler) { - return; - } - const confMember = room.getMember( - this.props.ConferenceHandler.getConferenceUserIdForRoom(room.roomId), - ); - - if (!confMember) { - return; - } - const confCall = this.props.ConferenceHandler.getConferenceCallForRoom(confMember.roomId); - - // A conf call notification should be displayed if there is an ongoing - // conf call but this cilent isn't a part of it. - this.setState({ - displayConfCallNotification: ( - (!confCall || confCall.call_state === "ended") && - confMember.membership === "join" - ), - }); - } - private updateDMState() { const room = this.state.room; if (room.getMyMembership() != "join") { @@ -1687,7 +1650,7 @@ export default class RoomView extends React.Component { if (!this.state.room) { return null; } - return CallHandler.getCallForRoom(this.state.room.roomId); + return CallHandler.sharedInstance().getCallForRoom(this.state.room.roomId); } // this has to be a proper method rather than an unnamed function, @@ -1940,9 +1903,7 @@ export default class RoomView extends React.Component { room={this.state.room} fullHeight={false} userId={this.context.credentials.userId} - conferenceHandler={this.props.ConferenceHandler} draggingFile={this.state.draggingFile} - displayConfCallNotification={this.state.displayConfCallNotification} maxHeight={this.state.auxPanelMaxHeight} showApps={this.state.showApps} hideAppsDrawer={false} diff --git a/src/components/views/rooms/AuxPanel.js b/src/components/views/rooms/AuxPanel.js index f2211dba5c..b7ed457a74 100644 --- a/src/components/views/rooms/AuxPanel.js +++ b/src/components/views/rooms/AuxPanel.js @@ -39,15 +39,9 @@ export default class AuxPanel extends React.Component { showApps: PropTypes.bool, // Render apps hideAppsDrawer: PropTypes.bool, // Do not display apps drawer and content (may still be rendered) - // Conference Handler implementation - conferenceHandler: PropTypes.object, - // set to true to show the file drop target draggingFile: PropTypes.bool, - // set to true to show the 'active conf call' banner - displayConfCallNotification: PropTypes.bool, - // maxHeight attribute for the aux panel and the video // therein maxHeight: PropTypes.number, @@ -161,39 +155,9 @@ export default class AuxPanel extends React.Component { ); } - let conferenceCallNotification = null; - if (this.props.displayConfCallNotification) { - let supportedText = ''; - let joinNode; - if (!MatrixClientPeg.get().supportsVoip()) { - supportedText = _t(" (unsupported)"); - } else { - joinNode = ( - { _t( - "Join as voice or video.", - {}, - { - 'voiceText': (sub) => { this.onConferenceNotificationClick(event, 'voice');}} href="#">{ sub }, - 'videoText': (sub) => { this.onConferenceNotificationClick(event, 'video');}} href="#">{ sub }, - }, - ) } - ); - } - // XXX: the translation here isn't great: appending ' (unsupported)' is likely to not make sense in many languages, - // but there are translations for this in the languages we do have so I'm leaving it for now. - conferenceCallNotification = ( -
- { _t("Ongoing conference call%(supportedText)s.", {supportedText: supportedText}) } -   - { joinNode } -
- ); - } - const callView = ( @@ -276,7 +240,6 @@ export default class AuxPanel extends React.Component { { appsDrawer } { fileDropTarget } { callView } - { conferenceCallNotification } { this.props.children } ); diff --git a/src/components/views/rooms/MemberList.js b/src/components/views/rooms/MemberList.js index 40b3b042b1..ae122a3783 100644 --- a/src/components/views/rooms/MemberList.js +++ b/src/components/views/rooms/MemberList.js @@ -24,7 +24,6 @@ import {isValid3pidInvite} from "../../../RoomInvite"; import rate_limited_func from "../../../ratelimitedfunc"; import {MatrixClientPeg} from "../../../MatrixClientPeg"; import * as sdk from "../../../index"; -import CallHandler from "../../../CallHandler"; import {CommunityPrototypeStore} from "../../../stores/CommunityPrototypeStore"; import BaseCard from "../right_panel/BaseCard"; import {RightPanelPhases} from "../../../stores/RightPanelStorePhases"; @@ -233,15 +232,10 @@ export default class MemberList extends React.Component { } roomMembers() { - const ConferenceHandler = CallHandler.getConferenceHandler(); - const allMembers = this.getMembersWithUser(); const filteredAndSortedMembers = allMembers.filter((m) => { return ( m.membership === 'join' || m.membership === 'invite' - ) && ( - !ConferenceHandler || - (ConferenceHandler && !ConferenceHandler.isConferenceUser(m.userId)) ); }); filteredAndSortedMembers.sort(this.memberSort); diff --git a/src/components/views/rooms/MessageComposer.js b/src/components/views/rooms/MessageComposer.js index 81c2ae7a33..e6cd686e3c 100644 --- a/src/components/views/rooms/MessageComposer.js +++ b/src/components/views/rooms/MessageComposer.js @@ -87,7 +87,7 @@ VideoCallButton.propTypes = { function HangupButton(props) { const AccessibleButton = sdk.getComponent('elements.AccessibleButton'); const onHangupClick = () => { - const call = CallHandler.getCallForRoom(props.roomId); + const call = CallHandler.sharedInstance().getCallForRoom(props.roomId); if (!call) { return; } diff --git a/src/components/views/voip/CallContainer.tsx b/src/components/views/voip/CallContainer.tsx index 18a9c098d6..51925cb147 100644 --- a/src/components/views/voip/CallContainer.tsx +++ b/src/components/views/voip/CallContainer.tsx @@ -17,7 +17,6 @@ limitations under the License. import React from 'react'; import IncomingCallBox from './IncomingCallBox'; import CallPreview from './CallPreview'; -import * as VectorConferenceHandler from '../../../VectorConferenceHandler'; interface IProps { @@ -31,7 +30,7 @@ export default class CallContainer extends React.PureComponent { public render() { return
- +
; } } diff --git a/src/components/views/voip/CallPreview.tsx b/src/components/views/voip/CallPreview.tsx index 4352fc95e4..9acbece8b3 100644 --- a/src/components/views/voip/CallPreview.tsx +++ b/src/components/views/voip/CallPreview.tsx @@ -26,10 +26,6 @@ import PersistentApp from "../elements/PersistentApp"; import SettingsStore from "../../../settings/SettingsStore"; interface IProps { - // A Conference Handler implementation - // Must have a function signature: - // getConferenceCallForRoom(roomId: string): MatrixCall - ConferenceHandler: any; } interface IState { @@ -47,7 +43,7 @@ export default class CallPreview extends React.Component { this.state = { roomId: RoomViewStore.getRoomId(), - activeCall: CallHandler.getAnyActiveCall(), + activeCall: CallHandler.sharedInstance().getAnyActiveCall(), }; } @@ -77,14 +73,14 @@ export default class CallPreview extends React.Component { // may hide the global CallView if the call it is tracking is dead case 'call_state': this.setState({ - activeCall: CallHandler.getAnyActiveCall(), + activeCall: CallHandler.sharedInstance().getAnyActiveCall(), }); break; } }; private onCallViewClick = () => { - const call = CallHandler.getAnyActiveCall(); + const call = CallHandler.sharedInstance().getAnyActiveCall(); if (call) { dis.dispatch({ action: 'view_room', @@ -94,7 +90,7 @@ export default class CallPreview extends React.Component { }; public render() { - const callForRoom = CallHandler.getCallForRoom(this.state.roomId); + const callForRoom = CallHandler.sharedInstance().getCallForRoom(this.state.roomId); const showCall = ( this.state.activeCall && this.state.activeCall.call_state === 'connected' && @@ -106,7 +102,6 @@ export default class CallPreview extends React.Component { ); diff --git a/src/components/views/voip/CallView.tsx b/src/components/views/voip/CallView.tsx index 1d3a62984a..2ab291ae86 100644 --- a/src/components/views/voip/CallView.tsx +++ b/src/components/views/voip/CallView.tsx @@ -31,11 +31,6 @@ interface IProps { // room; if not, we will show any active call. room?: Room; - // A Conference Handler implementation - // Must have a function signature: - // getConferenceCallForRoom(roomId: string): MatrixCall - ConferenceHandler?: any; - // maxHeight style attribute for the video panel maxVideoHeight?: number; @@ -96,14 +91,13 @@ export default class CallView extends React.Component { if (this.props.room) { const roomId = this.props.room.roomId; - call = CallHandler.getCallForRoom(roomId) || - (this.props.ConferenceHandler ? this.props.ConferenceHandler.getConferenceCallForRoom(roomId) : null); + call = CallHandler.sharedInstance().getCallForRoom(roomId); if (this.call) { this.setState({ call: call }); } } else { - call = CallHandler.getAnyActiveCall(); + 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, @@ -115,20 +109,19 @@ export default class CallView extends React.Component { } if (call) { - call.setLocalVideoElement(this.getVideoView().getLocalVideoElement()); - call.setRemoteVideoElement(this.getVideoView().getRemoteVideoElement()); - // always use a separate element for audio stream playback. - // this is to let us move CallView around the DOM without interrupting remote audio - // during playback, by having the audio rendered by a top-level