From 237084da7866432321ac52fcc7de74e8ec6c1075 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Sat, 11 Apr 2020 23:46:58 +0100 Subject: [PATCH 01/36] wrap node-qrcode in a React FC and use it for ShareDialog instead of qrcode-react Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- package.json | 2 +- res/css/views/dialogs/_ShareDialog.scss | 9 +- src/components/views/dialogs/ShareDialog.js | 4 +- src/components/views/elements/QRCode.tsx | 50 +++++ yarn.lock | 214 ++------------------ 5 files changed, 77 insertions(+), 202 deletions(-) create mode 100644 src/components/views/elements/QRCode.tsx diff --git a/package.json b/package.json index 616f3f541e..02ec206ee3 100644 --- a/package.json +++ b/package.json @@ -86,7 +86,6 @@ "project-name-generator": "^2.1.7", "prop-types": "^15.5.8", "qrcode": "^1.4.4", - "qrcode-react": "^0.1.16", "qs": "^6.6.0", "react": "^16.9.0", "react-addons-css-transition-group": "15.6.2", @@ -118,6 +117,7 @@ "@babel/register": "^7.7.4", "@peculiar/webcrypto": "^1.0.22", "@types/classnames": "^2.2.10", + "@types/qrcode": "^1.3.4", "@types/react": "16.9", "babel-eslint": "^10.0.3", "babel-jest": "^24.9.0", diff --git a/res/css/views/dialogs/_ShareDialog.scss b/res/css/views/dialogs/_ShareDialog.scss index 9a2f67dea3..3c984bbd1b 100644 --- a/res/css/views/dialogs/_ShareDialog.scss +++ b/res/css/views/dialogs/_ShareDialog.scss @@ -64,12 +64,15 @@ limitations under the License. .mx_ShareDialog_qrcode_container { float: left; - background-color: #ffffff; - padding: 5px; // makes qr code more readable in dark theme - border-radius: 5px; height: 256px; width: 256px; margin-right: 64px; + + img { + width: 100%; + height: 100%; + border-radius: 8px; + } } .mx_ShareDialog_social_container { diff --git a/src/components/views/dialogs/ShareDialog.js b/src/components/views/dialogs/ShareDialog.js index 1bc9decd39..a2554c3dcf 100644 --- a/src/components/views/dialogs/ShareDialog.js +++ b/src/components/views/dialogs/ShareDialog.js @@ -19,7 +19,7 @@ import PropTypes from 'prop-types'; import {Room, User, Group, RoomMember, MatrixEvent} from 'matrix-js-sdk'; import * as sdk from '../../../index'; import { _t } from '../../../languageHandler'; -import QRCode from 'qrcode-react'; +import QRCode from "../elements/QRCode"; import {RoomPermalinkCreator, makeGroupPermalink, makeUserPermalink} from "../../../utils/permalinks/Permalinks"; import * as ContextMenu from "../../structures/ContextMenu"; import {toRightOf} from "../../structures/ContextMenu"; @@ -213,7 +213,7 @@ export default class ShareDialog extends React.Component {
- +
{ diff --git a/src/components/views/elements/QRCode.tsx b/src/components/views/elements/QRCode.tsx new file mode 100644 index 0000000000..5e5db8cf93 --- /dev/null +++ b/src/components/views/elements/QRCode.tsx @@ -0,0 +1,50 @@ +/* +Copyright 2020 The Matrix.org Foundation C.I.C. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +import * as React from "react"; +import {toDataURL, QRCodeSegment, QRCodeToDataURLOptions} from "qrcode"; + +import {_t} from "../../../languageHandler"; +import Spinner from "./Spinner"; + +interface IProps extends QRCodeToDataURLOptions { + data: string | QRCodeSegment[]; +} + +const defaultOptions: QRCodeToDataURLOptions = { + errorCorrectionLevel: 'L', // we want it as trivial-looking as possible +}; + +const QRCode: React.FC = ({data, ...options}) => { + const [dataUri, setUri] = React.useState(null); + React.useEffect(() => { + let cancelled = false; + toDataURL(data, {...defaultOptions, ...options}).then(uri => { + if (cancelled) return; + setUri(uri); + }); + return () => { + cancelled = true; + }; + }, [data, options]); + + + return
+ { dataUri ? {_t("QR: } +
; +}; + +export default QRCode; diff --git a/yarn.lock b/yarn.lock index 538a049bff..05716ae985 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1267,6 +1267,13 @@ resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.3.tgz#2ab0d5da2e5815f94b0b9d4b95d1e5f243ab2ca7" integrity sha512-KfRL3PuHmqQLOG+2tGpRO26Ctg+Cq1E01D2DMriKEATHgWLfeNDmq9e29Q9WIky0dQ3NPkd1mzYH8Lm936Z9qw== +"@types/qrcode@^1.3.4": + version "1.3.4" + resolved "https://registry.yarnpkg.com/@types/qrcode/-/qrcode-1.3.4.tgz#984d97bb72caa558d470158701081ccb712f616b" + integrity sha512-aILE5yvKaqQXlY0YPMEYwK/KwdD43fwQTyagj0ffBBTQj8h//085Zp8LUrOnZ9FT69x64f5UgDo0EueY4BPAdg== + dependencies: + "@types/node" "*" + "@types/react@16.9": version "16.9.32" resolved "https://registry.yarnpkg.com/@types/react/-/react-16.9.32.tgz#f6368625b224604148d1ddf5920e4fefbd98d383" @@ -1496,11 +1503,6 @@ abab@^2.0.0: resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.3.tgz#623e2075e02eb2d3f2475e49f99c91846467907a" integrity sha512-tsFzPpcttalNjFBCFMqsKYQcWxxen1pgJR56by//QwvJc4/OUS3kPOOttx2tSIfjsylB0pYu7f5D3K1RCxUnUg== -abbrev@1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" - integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== - acorn-globals@^4.1.0: version "4.3.4" resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-4.3.4.tgz#9fa1926addc11c97308c4e66d7add0d40c3272e7" @@ -1634,19 +1636,11 @@ anymatch@~3.1.1: normalize-path "^3.0.0" picomatch "^2.0.4" -aproba@^1.0.3, aproba@^1.1.1: +aproba@^1.1.1: version "1.2.0" resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" integrity sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw== -are-we-there-yet@~1.1.2: - version "1.1.5" - resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz#4b35c2944f062a8bfcda66410760350fe9ddfc21" - integrity sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w== - dependencies: - delegates "^1.0.0" - readable-stream "^2.0.6" - argparse@^1.0.7: version "1.0.10" resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" @@ -2553,11 +2547,6 @@ console-browserify@^1.1.0: resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.2.0.tgz#67063cef57ceb6cf4993a2ab3a55840ae8c49336" integrity sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA== -console-control-strings@^1.0.0, console-control-strings@~1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" - integrity sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4= - constants-browserify@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75" @@ -2803,7 +2792,7 @@ debug@^2.2.0, debug@^2.3.3: dependencies: ms "2.0.0" -debug@^3.1.0, debug@^3.2.6: +debug@^3.1.0: version "3.2.6" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== @@ -2879,11 +2868,6 @@ delayed-stream@~1.0.0: resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk= -delegates@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" - integrity sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o= - des.js@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/des.js/-/des.js-1.0.1.tgz#5382142e1bdc53f85d86d53e5f4aa7deb91e0843" @@ -2897,11 +2881,6 @@ detect-file@^1.0.0: resolved "https://registry.yarnpkg.com/detect-file/-/detect-file-1.0.0.tgz#f0d66d03672a825cb1b73bdb3fe62310c8e552b7" integrity sha1-8NZtA2cqglyxtzvbP+YjEMjlUrc= -detect-libc@^1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" - integrity sha1-+hN8S9aY7fVc1c0CrFWfkaTEups= - detect-newline@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-2.1.0.tgz#f41f1c10be4b00e87b5f13da680759f2c5bfd3e2" @@ -3916,13 +3895,6 @@ from2@^2.1.0: inherits "^2.0.1" readable-stream "^2.0.0" -fs-minipass@^1.2.5: - version "1.2.7" - resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.7.tgz#ccff8570841e7fe4265693da88936c55aed7f7c7" - integrity sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA== - dependencies: - minipass "^2.6.0" - fs-readdir-recursive@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz#e32fc030a2ccee44a6b5371308da54be0b397d27" @@ -3985,20 +3957,6 @@ fuse.js@^2.2.0: resolved "https://registry.yarnpkg.com/fuse.js/-/fuse.js-2.7.4.tgz#96e420fde7ef011ac49c258a621314fe576536f9" integrity sha1-luQg/efvARrEnCWKYhMU/ldlNvk= -gauge@~2.7.3: - version "2.7.4" - resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" - integrity sha1-LANAXHU4w51+s3sxcCLjJfsBi/c= - dependencies: - aproba "^1.0.3" - console-control-strings "^1.0.0" - has-unicode "^2.0.0" - object-assign "^4.1.0" - signal-exit "^3.0.0" - string-width "^1.0.1" - strip-ansi "^3.0.1" - wide-align "^1.1.0" - gensync@^1.0.0-beta.1: version "1.0.0-beta.1" resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.1.tgz#58f4361ff987e5ff6e1e7a210827aa371eaac269" @@ -4196,11 +4154,6 @@ has-symbols@^1.0.0, has-symbols@^1.0.1: resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.1.tgz#9f5214758a44196c406d9bd76cebf81ec2dd31e8" integrity sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg== -has-unicode@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" - integrity sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk= - has-value@^0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f" @@ -4388,7 +4341,7 @@ humanize-ms@^1.2.1: dependencies: ms "^2.0.0" -iconv-lite@0.4.24, iconv-lite@^0.4.24, iconv-lite@^0.4.4, iconv-lite@~0.4.13: +iconv-lite@0.4.24, iconv-lite@^0.4.24, iconv-lite@~0.4.13: version "0.4.24" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== @@ -4405,13 +4358,6 @@ iferr@^0.1.5: resolved "https://registry.yarnpkg.com/iferr/-/iferr-0.1.5.tgz#c60eed69e6d8fdb6b3104a1fcbca1c192dc5b501" integrity sha1-xg7taebY/bazEEofy8ocGS3FtQE= -ignore-walk@^3.0.1: - version "3.0.3" - resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-3.0.3.tgz#017e2447184bfeade7c238e4aefdd1e8f95b1e37" - integrity sha512-m7o6xuOaT1aqheYHKf8W6J5pYH85ZI9w077erOzLje3JsB1gkafkAhHHY19dqjulgIZHFm32Cp5uNZgcQqdJKw== - dependencies: - minimatch "^3.0.4" - ignore@^4.0.3, ignore@^4.0.6: version "4.0.6" resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" @@ -5975,21 +5921,6 @@ minimist@^1.1.1, minimist@^1.2.0, minimist@^1.2.5, "minimist@~ 1.2.0": resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== -minipass@^2.6.0, minipass@^2.8.6, minipass@^2.9.0: - version "2.9.0" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.9.0.tgz#e713762e7d3e32fed803115cf93e04bca9fcc9a6" - integrity sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg== - dependencies: - safe-buffer "^5.1.2" - yallist "^3.0.0" - -minizlib@^1.2.1: - version "1.3.3" - resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.3.3.tgz#2290de96818a34c29551c8a8d301216bd65a861d" - integrity sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q== - dependencies: - minipass "^2.9.0" - mississippi@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/mississippi/-/mississippi-3.0.0.tgz#ea0a3291f97e0b5e8776b363d5f0a12d94c67022" @@ -6014,7 +5945,7 @@ mixin-deep@^1.2.0: for-in "^1.0.2" is-extendable "^1.0.1" -mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@^0.5.3: +mkdirp@^0.5.1, mkdirp@^0.5.3: version "0.5.5" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ== @@ -6091,15 +6022,6 @@ nearley@^2.7.10: randexp "0.4.6" semver "^5.4.1" -needle@^2.2.1: - version "2.4.1" - resolved "https://registry.yarnpkg.com/needle/-/needle-2.4.1.tgz#14af48732463d7475696f937626b1b993247a56a" - integrity sha512-x/gi6ijr4B7fwl6WYL9FwlCvRQKGlUNvnceho8wxkwXqN8jvVmmmATTmZPRRG7b/yC1eode26C2HO9jl78Du9g== - dependencies: - debug "^3.2.6" - iconv-lite "^0.4.4" - sax "^1.2.4" - neo-async@^2.5.0, neo-async@^2.6.1: version "2.6.1" resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.1.tgz#ac27ada66167fa8849a6addd837f6b189ad2081c" @@ -6177,35 +6099,11 @@ node-notifier@^5.4.2: shellwords "^0.1.1" which "^1.3.0" -node-pre-gyp@*: - version "0.14.0" - resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.14.0.tgz#9a0596533b877289bcad4e143982ca3d904ddc83" - integrity sha512-+CvDC7ZttU/sSt9rFjix/P05iS43qHCOOGzcr3Ry99bXG7VX953+vFyEuph/tfqoYu8dttBkE86JSKBO2OzcxA== - dependencies: - detect-libc "^1.0.2" - mkdirp "^0.5.1" - needle "^2.2.1" - nopt "^4.0.1" - npm-packlist "^1.1.6" - npmlog "^4.0.2" - rc "^1.2.7" - rimraf "^2.6.1" - semver "^5.3.0" - tar "^4.4.2" - node-releases@^1.1.53: version "1.1.53" resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.53.tgz#2d821bfa499ed7c5dffc5e2f28c88e78a08ee3f4" integrity sha512-wp8zyQVwef2hpZ/dJH7SfSrIPD6YoJz6BDQDpGEkcA0s3LpAQoxBIYmfIq6QAhC1DhwsyCgTaTTcONwX8qzCuQ== -nopt@^4.0.1: - version "4.0.3" - resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.3.tgz#a375cad9d02fd921278d954c2254d5aa57e15e48" - integrity sha512-CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg== - dependencies: - abbrev "1" - osenv "^0.1.4" - normalize-package-data@^2.3.2, normalize-package-data@^2.3.4: version "2.5.0" resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" @@ -6238,27 +6136,6 @@ normalize-selector@^0.2.0: resolved "https://registry.yarnpkg.com/normalize-selector/-/normalize-selector-0.2.0.tgz#d0b145eb691189c63a78d201dc4fdb1293ef0c03" integrity sha1-0LFF62kRicY6eNIB3E/bEpPvDAM= -npm-bundled@^1.0.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.1.1.tgz#1edd570865a94cdb1bc8220775e29466c9fb234b" - integrity sha512-gqkfgGePhTpAEgUsGEgcq1rqPXA+tv/aVBlgEzfXwA1yiUJF7xtEt3CtVwOjNYQOVknDk0F20w58Fnm3EtG0fA== - dependencies: - npm-normalize-package-bin "^1.0.1" - -npm-normalize-package-bin@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz#6e79a41f23fd235c0623218228da7d9c23b8f6e2" - integrity sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA== - -npm-packlist@^1.1.6: - version "1.4.8" - resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.4.8.tgz#56ee6cc135b9f98ad3d51c1c95da22bbb9b2ef3e" - integrity sha512-5+AZgwru5IevF5ZdnFglB5wNlHG1AOOuw28WhUq8/8emhBmLv6jX5by4WJCh7lW0uSYZYS6DXqIsyZVIXRZU9A== - dependencies: - ignore-walk "^3.0.1" - npm-bundled "^1.0.1" - npm-normalize-package-bin "^1.0.1" - npm-run-path@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" @@ -6266,16 +6143,6 @@ npm-run-path@^2.0.0: dependencies: path-key "^2.0.0" -npmlog@^4.0.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" - integrity sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg== - dependencies: - are-we-there-yet "~1.1.2" - console-control-strings "~1.1.0" - gauge "~2.7.3" - set-blocking "~2.0.0" - nth-check@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-1.0.2.tgz#b2bd295c37e3dd58a3bf0700376663ba4d9cf05c" @@ -6425,11 +6292,6 @@ os-browserify@^0.3.0: resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.3.0.tgz#854373c7f5c2315914fc9bfc6bd8238fdda1ec27" integrity sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc= -os-homedir@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" - integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M= - os-locale@^3.0.0, os-locale@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-3.1.0.tgz#a802a6ee17f24c10483ab9935719cef4ed16bf1a" @@ -6439,19 +6301,11 @@ os-locale@^3.0.0, os-locale@^3.1.0: lcid "^2.0.0" mem "^4.0.0" -os-tmpdir@^1.0.0, os-tmpdir@~1.0.2: +os-tmpdir@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= -osenv@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.5.tgz#85cdfafaeb28e8677f416e287592b5f3f49ea410" - integrity sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g== - dependencies: - os-homedir "^1.0.0" - os-tmpdir "^1.0.0" - p-defer@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-defer/-/p-defer-1.0.0.tgz#9f6eb182f6c9aa8cd743004a7d4f96b196b0fb0c" @@ -7006,18 +6860,6 @@ pvutils@latest: resolved "https://registry.yarnpkg.com/pvutils/-/pvutils-1.0.17.tgz#ade3c74dfe7178944fe44806626bd2e249d996bf" integrity sha512-wLHYUQxWaXVQvKnwIDWFVKDJku9XDCvyhhxoq8dc5MFdIlRenyPI9eSfEtcvgHgD7FlvCyGAlWgOzRnZD99GZQ== -qr.js@0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/qr.js/-/qr.js-0.0.0.tgz#cace86386f59a0db8050fa90d9b6b0e88a1e364f" - integrity sha1-ys6GOG9ZoNuAUPqQ2baw6IoeNk8= - -qrcode-react@^0.1.16: - version "0.1.16" - resolved "https://registry.yarnpkg.com/qrcode-react/-/qrcode-react-0.1.16.tgz#d064999d510ffc3e55a9ca3ffcf6c203c69f1517" - integrity sha512-FK+QCfFqCQMSxUE1byzglERJQkwKqXYvYMCS+/Ad2zACJOfoHkHHtRqsQQPji7lfb1y1qCXLvL+3eP1hAfg8Ng== - dependencies: - qr.js "0.0.0" - qrcode@^1.4.4: version "1.4.4" resolved "https://registry.yarnpkg.com/qrcode/-/qrcode-1.4.4.tgz#f0c43568a7e7510a55efc3b88d9602f71963ea83" @@ -7096,7 +6938,7 @@ randomfill@^1.0.3: randombytes "^2.0.5" safe-buffer "^5.1.0" -rc@1.2.8, rc@^1.2.7, rc@^1.2.8: +rc@1.2.8, rc@^1.2.8: version "1.2.8" resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw== @@ -7254,7 +7096,7 @@ read-pkg@^4.0.1: parse-json "^4.0.0" pify "^3.0.0" -"readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.6, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.3, readable-stream@^2.3.6, readable-stream@~2.3.6: +"readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.3, readable-stream@^2.3.6, readable-stream@~2.3.6: version "2.3.7" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== @@ -7614,7 +7456,7 @@ rimraf@2.6.3: dependencies: glob "^7.1.3" -rimraf@^2.4.3, rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.3: +rimraf@^2.4.3, rimraf@^2.5.4, rimraf@^2.6.3: version "2.7.1" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== @@ -7776,7 +7618,7 @@ serialize-javascript@^2.1.2: resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-2.1.2.tgz#ecec53b0e0317bdc95ef76ab7074b7384785fa61" integrity sha512-rs9OggEUF0V4jUSecXazOYsLfu7OGK2qIn3c7IPBiffz32XniEp/TX9Xmc9LQfK2nQ2QKHvZ2oygKUGU0lG4jQ== -set-blocking@^2.0.0, set-blocking@~2.0.0: +set-blocking@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= @@ -8112,7 +7954,7 @@ string-width@^1.0.1: is-fullwidth-code-point "^1.0.0" strip-ansi "^3.0.0" -"string-width@^1.0.2 || 2", string-width@^2.0.0, string-width@^2.1.0, string-width@^2.1.1: +string-width@^2.0.0, string-width@^2.1.0, string-width@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== @@ -8393,19 +8235,6 @@ tapable@^1.0.0, tapable@^1.1.3: resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.1.3.tgz#a1fccc06b58db61fd7a45da2da44f5f3a3e67ba2" integrity sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA== -tar@^4.4.2: - version "4.4.13" - resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.13.tgz#43b364bc52888d555298637b10d60790254ab525" - integrity sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA== - dependencies: - chownr "^1.1.1" - fs-minipass "^1.2.5" - minipass "^2.8.6" - minizlib "^1.2.1" - mkdirp "^0.5.0" - safe-buffer "^5.1.2" - yallist "^3.0.3" - terser-webpack-plugin@^1.4.3: version "1.4.3" resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-1.4.3.tgz#5ecaf2dbdc5fb99745fd06791f46fc9ddb1c9a7c" @@ -9128,13 +8957,6 @@ which@^1.2.14, which@^1.2.9, which@^1.3.0, which@^1.3.1: dependencies: isexe "^2.0.0" -wide-align@^1.1.0: - version "1.1.3" - resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457" - integrity sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA== - dependencies: - string-width "^1.0.2 || 2" - word-wrap@~1.2.3: version "1.2.3" resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" @@ -9219,7 +9041,7 @@ xtend@^4.0.0, xtend@^4.0.1, xtend@~4.0.1: resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b" integrity sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w== -yallist@^3.0.0, yallist@^3.0.2, yallist@^3.0.3: +yallist@^3.0.2: version "3.1.1" resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== From 610fab7857d32ab9af557eae8fac1a1211d02713 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Sat, 11 Apr 2020 23:53:24 +0100 Subject: [PATCH 02/36] i18n and delint Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/components/views/elements/QRCode.tsx | 2 +- src/i18n/strings/en_EN.json | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/views/elements/QRCode.tsx b/src/components/views/elements/QRCode.tsx index 5e5db8cf93..9c867058c0 100644 --- a/src/components/views/elements/QRCode.tsx +++ b/src/components/views/elements/QRCode.tsx @@ -43,7 +43,7 @@ const QRCode: React.FC = ({data, ...options}) => { return
- { dataUri ? {_t("QR: } + { dataUri ? {_t("QR : }
; }; diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index ae8ed90402..832b53e67c 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -1482,6 +1482,7 @@ "%(oneUser)smade no changes %(count)s times|one": "%(oneUser)smade no changes", "Power level": "Power level", "Custom level": "Custom level", + "QR Code": "QR Code", "Unable to load event that was replied to, it either does not exist or you do not have permission to view it.": "Unable to load event that was replied to, it either does not exist or you do not have permission to view it.", "In reply to ": "In reply to ", "Room alias": "Room alias", From 7c9a9b223acfb225e800b6fb878e5d917077a561 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stanislav=20Luke=C5=A1?= Date: Mon, 11 May 2020 17:01:36 +0000 Subject: [PATCH 03/36] Translated using Weblate (Czech) Currently translated at 93.5% (2154 of 2303 strings) Translation: Riot Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/riot-web/matrix-react-sdk/cs/ --- src/i18n/strings/cs.json | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/cs.json b/src/i18n/strings/cs.json index 4de5084106..d08ac6c0f5 100644 --- a/src/i18n/strings/cs.json +++ b/src/i18n/strings/cs.json @@ -2237,5 +2237,14 @@ "Waiting for you to accept on your other session…": "Čekáme na vaše přijetí v druhé relaci…", "Almost there! Is your other session showing the same shield?": "Téměř hotovo! Je vaše druhá relace také ověřená?", "Almost there! Is %(displayName)s showing the same shield?": "Téměř hotovo! Je relace %(displayName)s také ověřená?", - "You've successfully verified %(deviceName)s (%(deviceId)s)!": "Ověřili jste %(deviceName)s (%(deviceId)s)!" + "You've successfully verified %(deviceName)s (%(deviceId)s)!": "Ověřili jste %(deviceName)s (%(deviceId)s)!", + "If you cancel now, you won't complete your operation.": "Pokud teď akci stornujete, nebudete jí moci dokončit.", + "Review where you’re logged in": "Zobrazit kde jste přihlášení", + "New login. Was this you?": "Nové přihlášní. Jste to vy?", + "%(name)s is requesting verification": "%(name)s žádá o ověření", + "Failed to set topic": "Nepovedlo se nastavit téma", + "Command failed": "Příkaz selhal", + "Could not find user in room": "Nepovedlo se najít uživatele v místnosti", + "Please supply a widget URL or embed code": "Zadejte prosím URL widgetu nebo jeho kód", + "Send a bug report with logs": "Zaslat hlášení o chybě" } From 49375436480f04c6df0395b2199a4afe7226b282 Mon Sep 17 00:00:00 2001 From: Tirifto Date: Mon, 11 May 2020 16:11:46 +0000 Subject: [PATCH 04/36] Translated using Weblate (Esperanto) Currently translated at 100.0% (2303 of 2303 strings) Translation: Riot Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/riot-web/matrix-react-sdk/eo/ --- src/i18n/strings/eo.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/i18n/strings/eo.json b/src/i18n/strings/eo.json index 5e63974d12..4d270260fc 100644 --- a/src/i18n/strings/eo.json +++ b/src/i18n/strings/eo.json @@ -489,7 +489,7 @@ "Skip": "Preterpasi", "An error occurred: %(error_string)s": "Okazis eraro: %(error_string)s", "This will be your account name on the homeserver, or you can pick a different server.": "Tio ĉi estos la nomo de via konto sur la hejmservilo , aŭ vi povas elekti alian servilon.", - "Blacklist": "Malpermesi legadon de ĉifritaj mesaĝoj", + "Blacklist": "Malpermesi malĉifradon", "Unverify": "Malkontroli", "If you already have a Matrix account you can log in instead.": "Se vi jam havas Matrix-konton, vi povas saluti anstataŭe.", "Private Chat": "Privata babilo", @@ -664,7 +664,7 @@ "File to import": "Enportota dosiero", "Import": "Enporti", "Deleting a widget removes it for all users in this room. Are you sure you want to delete this widget?": "Forigo de fenestraĵo efektiviĝos por ĉiuj uzantoj en ĉi tiu ĉambro. Ĉu vi certe volas ĝin forigi?", - "Unblacklist": "Repermesi legadon de ĉifritaj mesaĝoj", + "Unblacklist": "Repermesi malĉifradon", "none": "neniu", "The version of Riot.im": "Tiu ĉi versio de Riot.im", "Your language of choice": "Via preferata lingvo", @@ -883,7 +883,7 @@ "Language and region": "Lingvo kaj regiono", "Theme": "Haŭto", "General": "Ĝenerala", - "In reply to ": "Respondante al ", + "In reply to ": "Responde al ", "Share Message": "Diskonigi", "Whether or not you're logged in (we don't record your username)": "Ĉu vi salutis aŭ ne (ni ne registras vian uzantonomon)", "You do not have permission to start a conference call in this room": "Vi ne havas permeson komenci grupvokon en ĉi tiu ĉambro", From dba98e17da693b4c4a4277059fed1cb6b905542e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Priit=20J=C3=B5er=C3=BC=C3=BCt?= Date: Mon, 11 May 2020 19:30:04 +0000 Subject: [PATCH 05/36] Translated using Weblate (Estonian) Currently translated at 44.5% (1024 of 2303 strings) Translation: Riot Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/riot-web/matrix-react-sdk/et/ --- src/i18n/strings/et.json | 71 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 68 insertions(+), 3 deletions(-) diff --git a/src/i18n/strings/et.json b/src/i18n/strings/et.json index e2d4e93e43..95096a080d 100644 --- a/src/i18n/strings/et.json +++ b/src/i18n/strings/et.json @@ -238,7 +238,7 @@ "Remove %(name)s from the directory?": "Eemalda %(name)s kataloogist?", "Remove from Directory": "Eemalda kataloogist", "remove %(name)s from the directory.": "eemalda %(name)s kataloogist.", - "You seem to be uploading files, are you sure you want to quit?": "Tundub, et sa parasjagu laed faile üles, kas sa kindlasti soovid väljuda?", + "You seem to be uploading files, are you sure you want to quit?": "Tundub, et sa parasjagu laed faile üles. Kas sa kindlasti soovid väljuda?", "Failed to set direct chat tag": "Otsevestluse sildi lisamine ei õnnestunud", "Failed to remove tag %(tagName)s from room": "Sildi %(tagName)s eemaldamine jututoast ebaõnnestus", "Calls": "Kõned", @@ -543,7 +543,7 @@ "Start a conversation with someone using their name, username (like ) or email address.": "Alusta vestlust kasutades teise osapoole nime, kasutajanime (näiteks ) või e-posti aadressi.", "Go": "Mine", "Your message wasn't sent because this homeserver has hit its Monthly Active User Limit. Please contact your service administrator to continue using the service.": "Sinu sõnumit ei saadetud, kuna see koduserver on saavutanud igakuise aktiivsete kasutajate piiri. Teenuse kasutamiseks palun võta ühendust serveri haldajaga.", - "Add room": "LIsa jututuba", + "Add room": "Lisa jututuba", "%(senderName)s invited %(targetName)s.": "%(senderName)s kutsus vestlema kasutajat %(targetName)s.", "%(targetName)s joined the room.": "%(targetName)s liitus jututoaga.", "%(senderName)s answered the call.": "%(senderName)s vastas kõnele.", @@ -961,5 +961,70 @@ "Previous/next room or DM": "Eelmine/järgmine otsevestlus või jututuba", "Toggle the top left menu": "Lülita ülemine vasak menüü sisse/välja", "Activate selected button": "Aktiveeri valitud nupp", - "Toggle right panel": "Lülita parem paan sisse/välja" + "Toggle right panel": "Lülita parem paan sisse/välja", + "%(count)s of your messages have not been sent.|other": "Mõned sinu sõnumid on saatmata.", + "%(count)s of your messages have not been sent.|one": "Sinu sõnum on saatmata.", + "You seem to be in a call, are you sure you want to quit?": "Tundub, et sul parasjagu on kõne pooleli. Kas sa kindlasti soovid väljuda?", + "Unknown room %(roomId)s": "Tundmatu jututuba %(roomId)s", + "Room": "Jututuba", + "Failed to reject invite": "Kutse tagasilükkamine ei õnnestunud", + "Tried to load a specific point in this room's timeline, but you do not have permission to view the message in question.": "Üritasin laadida teatud hetke selle jututoa ajajoonelt, kuid sul ei ole õigusi selle sõnumi nägemiseks.", + "Failed to load timeline position": "Asukoha laadimine ajajoonel ei õnnestunud", + " (1/%(totalCount)s)": " (1/%(totalCount)s)", + "Guest": "Külaline", + "Uploading %(filename)s and %(count)s others|other": "Laen üles %(filename)s ning %(count)s muud faili", + "Uploading %(filename)s and %(count)s others|zero": "Laen üles %(filename)s", + "Uploading %(filename)s and %(count)s others|one": "Laen üles %(filename)s ning veel %(count)s faili", + "Verify this login": "Verifitseeri see sisselogimissessioon", + "Session verified": "Sessioon on verifitseeritud", + "Failed to send email": "E-kirja saatmine ebaõnnestus", + "The email address linked to your account must be entered.": "Sa pead sisestama oma kontoga seotud e-posti aadressi.", + "A new password must be entered.": "Palun sisesta uus salasõna.", + "New passwords must match each other.": "Uued salasõnad peavad omavahel klappima.", + "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.": "Salasõna muutmine tühistab kõik läbiva krüptimise võtmed sinu kõikides sessioonides ning seega muutub kogu sinu vestluste ajalugu loetamatuks. Palun kindlasti kas sea üles võtmete varundamine või ekspordi mõnest muust sessioonist jututubade võtmed enne senise salasõna tühistamist.", + "Your Matrix account on %(serverName)s": "Sinu Matrix'i konto serveris %(serverName)s", + "Your Matrix account on ": "Sinu Matrix'i kasutajakonto serveris ", + "This homeserver does not support login using email address.": "See koduserver ei võimalda e-posti aadressi kasutamist sisselogimisel.", + "Please contact your service administrator to continue using this service.": "Jätkamaks selle teenuse kasutamist palun võta ühendust oma teenuse haldajaga.", + "This account has been deactivated.": "See kasutajakonto on deaktiveeritud.", + "Incorrect username and/or password.": "Vigane kasutajanimi ja/või salasõna.", + "Please note you are logging into the %(hs)s server, not matrix.org.": "Sa kasutad sisselogimiseks serverit %(hs)s, mitte aga matrix.org'i.", + "Failed to perform homeserver discovery": "Koduserveri leidmine ebaõnnestus", + "The phone number entered looks invalid": "Sisestatud telefoninumber tundub vigane", + "This homeserver doesn't offer any login flows which are supported by this client.": "See koduserver ei paku ühtegi sisselogimislahendust, mida see klient toetab.", + "Error: Problem communicating with the given homeserver.": "Viga: Suhtlusel koduserveriga tekkis probleem.", + "Can't connect to homeserver via HTTP when an HTTPS URL is in your browser bar. Either use HTTPS or enable unsafe scripts.": "Kui aadressiribal on HTTPS-aadress, siis HTTP-protokolli kasutades ei saa ühendust koduserveriga. Palun pruugi HTTPS-protokolli või luba brauseris ebaturvaliste skriptide kasutamine.", + "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.": "Ei sa ühendust koduserveriga. Palun kontrolli, et sinu koduserveri SSL sertifikaat oleks usaldusväärne ning mõni brauseri lisamoodul ei blokeeri päringuid.", + "Syncing...": "Sünkroniseerin...", + "Signing In...": "Login sisse...", + "Create account": "Loo kasutajakonto", + "Failed to fetch avatar URL": "Ei õnnestunud laadida profiilipildi ehk avatari aadressi", + "Upload an avatar:": "Lae üles profiilipilt ehk avatar:", + "Unable to query for supported registration methods.": "Ei õnnestunud pärida toetatud registreerimismeetodite loendit.", + "Registration has been disabled on this homeserver.": "Väline registreerimine ei ole selles koduserveris kasutusel.", + "This server does not support authentication with a phone number.": "See server ei toeta autentimist telefoninumbri alusel.", + "Your new account (%(newAccountId)s) is registered, but you're already logged into a different account (%(loggedInUserId)s).": "Sinu uus kasutajakonto (%(newAccountId)s) on registreeritud, kuid sa jube oled sisse loginud teise kasutajakontoga (%(loggedInUserId)s).", + "Continue with previous account": "Jätka senise konto kasutamist", + "Log in to your new account.": "Logi sisse oma uuele kasutajakontole.", + "Registration Successful": "Registreerimine õnnestus", + "Create your account": "Loo endale konto", + "Confirm your identity by verifying this login from one of your other sessions, granting it access to encrypted messages.": "Kinnita oma isikusamasust verifitseerides seda sisselogimissessiooni mõnest oma muust sessioonist. Sellega tagad ka ligipääsu krüptitud sõnumitele.", + "This requires the latest Riot on your other devices:": "Selleks on sul vaja muudes seadmetes kõige uuemat Riot'i versiooni:", + "You're signed out": "Sa oled loginud välja", + "Clear personal data": "Kustuta privaatsed andmed", + "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.": "Hoiatus: Sinu privaatsed andmed (sealhulgas krüptimisvõtmed) on jätkuvalt salvestatud selles sessioonis. Eemalda nad, kui oled lõpetanud selle sessiooni kasutamise või soovid sisse logida muu kasutajakontoga.", + "Commands": "Käsud", + "Results from DuckDuckGo": "Otsingutulemused DuckDuckGo saidist", + "DuckDuckGo Results": "DuckDuckGo otsingutulemused", + "Emoji": "Emoji", + "Notify the whole room": "Teavita kogu jututuba", + "Users": "Kasutajad", + "unknown device": "tundmatu seade", + "NOT verified": "EI OLE verifitseeritud", + "verified": "verifitseeritud", + "Verification": "Verifitseerimine", + "Ed25519 fingerprint": "Ed25519 sõrmejälg", + "User ID": "Kasutajatunnus", + "Algorithm": "Algoritm", + "unencrypted": "krüptimata" } From 1f603090bee9e19b8bd6c7d853e4f6c61280713a Mon Sep 17 00:00:00 2001 From: Samu Voutilainen Date: Tue, 12 May 2020 04:38:12 +0000 Subject: [PATCH 06/36] Translated using Weblate (Finnish) Currently translated at 90.7% (2088 of 2303 strings) Translation: Riot Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/riot-web/matrix-react-sdk/fi/ --- src/i18n/strings/fi.json | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/fi.json b/src/i18n/strings/fi.json index 8135462d60..e8eef891be 100644 --- a/src/i18n/strings/fi.json +++ b/src/i18n/strings/fi.json @@ -2157,5 +2157,15 @@ "Syncing...": "Synkronoidaan...", "Signing In...": "Kirjaudutaan sisään...", "If you've joined lots of rooms, this might take a while": "Jos olet liittynyt moniin huoneisiin, tässä voi kestää hetken", - "Use your other device to continue…": "Jatka toisella laitteellasi…" + "Use your other device to continue…": "Jatka toisella laitteellasi…", + "Click the button below to confirm adding this email address.": "Klikkaa alapuolella olevaa painiketta lisätäksesi tämän sähköpostiosoitteen.", + "Click the button below to confirm adding this phone number.": "Klikkaa alapuolella olevaa painiketta lisätäksesi tämän puhelinnumeron.", + "If you cancel now, you won't complete your operation.": "Jos peruutat, toimintoa ei suoriteta loppuun.", + "Review where you’re logged in": "Tarkasta missä olet sisäänkirjautuneena", + "New login. Was this you?": "Uusi sisäänkirjautuminen. Olitko se sinä?", + "%(name)s is requesting verification": "%(name)s pyytää varmennusta", + "Sends a message as html, without interpreting it as markdown": "Lähettää viestin HTML-muodossa, tulkitsematta sitä Markdowniksi", + "Please supply a widget URL or embed code": "Anna sovelman osoite tai upotettava koodinpätkä", + "You signed in to a new session without verifying it:": "Olet kirjautunut uuteen istuntoon varmentamatta sitä:", + "Verify your other session using one of the options below.": "Varmenna toinen istuntosi käyttämällä yhtä seuraavista tavoista." } From ca30cf7ac9a38452ed79972fa536d968959fadbf Mon Sep 17 00:00:00 2001 From: Iria_kuro Date: Mon, 11 May 2020 11:10:34 +0000 Subject: [PATCH 07/36] Translated using Weblate (Korean) Currently translated at 76.1% (1752 of 2303 strings) Translation: Riot Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/riot-web/matrix-react-sdk/ko/ --- src/i18n/strings/ko.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/i18n/strings/ko.json b/src/i18n/strings/ko.json index 4271864216..cb8fb17da3 100644 --- a/src/i18n/strings/ko.json +++ b/src/i18n/strings/ko.json @@ -523,7 +523,7 @@ "Invite to this room": "이 방에 초대", "You cannot delete this message. (%(code)s)": "이 메시지를 삭제할 수 없습니다. (%(code)s)", "Thursday": "목요일", - "I understand the risks and wish to continue": "위험을 인지하고 계속하고 싶습니다", + "I understand the risks and wish to continue": "위험하다는 것을 이해했으며 계속하고 싶습니다", "Back": "돌아가기", "Failed to change settings": "설정 변경 실패", "Show message in desktop notification": "컴퓨터 알림에서 내용 보이기", @@ -1799,5 +1799,7 @@ "Session already verified!": "이미 검증된 세션입니다!", "WARNING: Session already verified, but keys do NOT MATCH!": "경고: 이미 검증된 세션이지만 키가 일치하지 않습니다!", "WARNING: KEY VERIFICATION FAILED! The signing key for %(userId)s and session %(deviceId)s is \"%(fprint)s\" which does not match the provided key \"%(fingerprint)s\". This could mean your communications are being intercepted!": "경고: 키 검증 실패! 제공된 키인 \"%(fingerprint)s\"가 사용자 %(userId)s와 %(deviceId)s 세션의 서명 키인 \"%(fprint)s\"와 일치하지 않습니다. 이는 통신이 탈취되고 있는 중일 수도 있다는 뜻입니다!", - "The signing key you provided matches the signing key you received from %(userId)s's session %(deviceId)s. Session marked as verified.": "사용자 %(userId)s의 세션 %(deviceId)s에서 받은 서명 키와 당신이 제공한 서명 키가 일치합니다. 세션이 검증되었습니다." + "The signing key you provided matches the signing key you received from %(userId)s's session %(deviceId)s. Session marked as verified.": "사용자 %(userId)s의 세션 %(deviceId)s에서 받은 서명 키와 당신이 제공한 서명 키가 일치합니다. 세션이 검증되었습니다.", + "Show more": "더 보기", + "Changing password will currently reset any end-to-end encryption keys on all sessions, making encrypted chat history unreadable, unless you first export your room keys and re-import them afterwards. In future this will be improved.": "비밀번호를 변경한다면 방의 암호화 키를 내보낸 후 다시 가져오지 않는 이상 모든 종단간 암호화 키는 초기화 될 것이고, 암호화된 대화 내역은 읽을 수 없게 될 것입니다. 이 문제는 추후에 개선될 것입니다." } From 8a1b38163583d4bfe0d36510e83cecfc23fc7533 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Tue, 12 May 2020 14:29:11 +0200 Subject: [PATCH 08/36] remove UI for upgrading 4S to sym enc --- src/DeviceListener.js | 8 ------- .../views/settings/CrossSigningPanel.js | 8 ------- .../views/toasts/SetupEncryptionToast.js | 24 ------------------- 3 files changed, 40 deletions(-) diff --git a/src/DeviceListener.js b/src/DeviceListener.js index d2ba8219db..27caba971e 100644 --- a/src/DeviceListener.js +++ b/src/DeviceListener.js @@ -225,14 +225,6 @@ export default class DeviceListener { }); } } - } else if (await cli.secretStorageKeyNeedsUpgrade()) { - ToastStore.sharedInstance().addOrReplaceToast({ - key: THIS_DEVICE_TOAST_KEY, - title: _t("Encryption upgrade available"), - icon: "verification_warning", - props: {kind: 'upgrade_ssss'}, - component: sdk.getComponent("toasts.SetupEncryptionToast"), - }); } else { // cross-signing is ready, and we don't need to upgrade encryption ToastStore.sharedInstance().dismissToast(THIS_DEVICE_TOAST_KEY); diff --git a/src/components/views/settings/CrossSigningPanel.js b/src/components/views/settings/CrossSigningPanel.js index cb04d2a018..c2c16615be 100644 --- a/src/components/views/settings/CrossSigningPanel.js +++ b/src/components/views/settings/CrossSigningPanel.js @@ -36,7 +36,6 @@ export default class CrossSigningPanel extends React.PureComponent { userSigningPrivateKeyCached: false, sessionBackupKeyCached: false, secretStorageKeyInAccount: false, - secretStorageKeyNeedsUpgrade: null, }; } @@ -88,7 +87,6 @@ export default class CrossSigningPanel extends React.PureComponent { const homeserverSupportsCrossSigning = await cli.doesServerSupportUnstableFeature("org.matrix.e2e_cross_signing"); const crossSigningReady = await cli.isCrossSigningReady(); - const secretStorageKeyNeedsUpgrade = await cli.secretStorageKeyNeedsUpgrade(); this.setState({ crossSigningPublicKeysOnDevice, @@ -100,7 +98,6 @@ export default class CrossSigningPanel extends React.PureComponent { secretStorageKeyInAccount, homeserverSupportsCrossSigning, crossSigningReady, - secretStorageKeyNeedsUpgrade, }); } @@ -150,7 +147,6 @@ export default class CrossSigningPanel extends React.PureComponent { secretStorageKeyInAccount, homeserverSupportsCrossSigning, crossSigningReady, - secretStorageKeyNeedsUpgrade, } = this.state; let errorSection; @@ -259,10 +255,6 @@ export default class CrossSigningPanel extends React.PureComponent { {_t("Homeserver feature support:")} {homeserverSupportsCrossSigning ? _t("exists") : _t("not found")} - - {_t("Secret Storage key format:")} - {secretStorageKeyNeedsUpgrade ? _t("outdated") : _t("up to date")} - {errorSection} diff --git a/src/components/views/toasts/SetupEncryptionToast.js b/src/components/views/toasts/SetupEncryptionToast.js index 75fd55378c..b5510e85b6 100644 --- a/src/components/views/toasts/SetupEncryptionToast.js +++ b/src/components/views/toasts/SetupEncryptionToast.js @@ -17,7 +17,6 @@ limitations under the License. import React from 'react'; import PropTypes from 'prop-types'; import Modal from '../../../Modal'; -import { MatrixClientPeg } from '../../../MatrixClientPeg'; import * as sdk from "../../../index"; import { _t } from '../../../languageHandler'; import DeviceListener from '../../../DeviceListener'; @@ -31,7 +30,6 @@ export default class SetupEncryptionToast extends React.PureComponent { 'set_up_encryption', 'verify_this_session', 'upgrade_encryption', - 'upgrade_ssss', ]).isRequired, }; @@ -39,24 +37,6 @@ export default class SetupEncryptionToast extends React.PureComponent { DeviceListener.sharedInstance().dismissEncryptionSetup(); }; - async _waitForCompletion() { - if (this.props.kind === 'upgrade_ssss') { - return new Promise(resolve => { - const recheck = async () => { - const needsUpgrade = await MatrixClientPeg.get().secretStorageKeyNeedsUpgrade(); - if (!needsUpgrade) { - MatrixClientPeg.get().removeListener('accountData', recheck); - resolve(); - } - }; - MatrixClientPeg.get().on('accountData', recheck); - recheck(); - }); - } else { - return; - } - } - _onSetupClick = async () => { if (this.props.kind === "verify_this_session") { Modal.createTrackedDialog('Verify session', 'Verify session', SetupEncryptionDialog, @@ -68,7 +48,6 @@ export default class SetupEncryptionToast extends React.PureComponent { ); try { await accessSecretStorage(); - await this._waitForCompletion(); } finally { modal.close(); } @@ -82,8 +61,6 @@ export default class SetupEncryptionToast extends React.PureComponent { return _t('Verify yourself & others to keep your chats safe'); case 'verify_this_session': return _t('Other users may not trust it'); - case 'upgrade_ssss': - return _t('Update your secure storage'); } } @@ -92,7 +69,6 @@ export default class SetupEncryptionToast extends React.PureComponent { case 'set_up_encryption': return _t('Set up'); case 'upgrade_encryption': - case 'upgrade_ssss': return _t('Upgrade'); case 'verify_this_session': return _t('Verify'); From b3c641184ba5b66706b808fa34088e91cd1b4d90 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Tue, 12 May 2020 14:54:49 +0200 Subject: [PATCH 09/36] remove obsolete strings --- src/i18n/strings/en_EN.json | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index a24b2bde73..1d86947177 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -566,7 +566,6 @@ "Review": "Review", "Verify yourself & others to keep your chats safe": "Verify yourself & others to keep your chats safe", "Other users may not trust it": "Other users may not trust it", - "Update your secure storage": "Update your secure storage", "Set up": "Set up", "Upgrade": "Upgrade", "Verify": "Verify", @@ -618,9 +617,6 @@ "in account data": "in account data", "Homeserver feature support:": "Homeserver feature support:", "exists": "exists", - "Secret Storage key format:": "Secret Storage key format:", - "outdated": "outdated", - "up to date": "up to date", "Your homeserver does not support session management.": "Your homeserver does not support session management.", "Unable to load session list": "Unable to load session list", "Confirm deleting these sessions by using Single Sign On to prove your identity.|other": "Confirm deleting these sessions by using Single Sign On to prove your identity.", From c0632d01956bfc39fa2aac3b7618550b47272ccb Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Tue, 12 May 2020 17:17:17 -0600 Subject: [PATCH 10/36] Acquire a new session before enacting deactivation Fixes https://github.com/vector-im/riot-web/issues/13645 Every time the checkbox value changes we acquire a new session now. This avoids us asking the server to change its direction partway through the request. This causes a bit of UI jerk as the dialog goes from auth -> loading -> auth, however it's better than the alternative of reworking the entire UIA structure to support the `authData` dict changing. Originally this commit consisted of a `disabled` flag on the `InteractiveAuth` component which carried through to the stage's component, however it turns out that stack doesn't respect changes to the `authData` prop, which means the session ID we eventually send down is wrong (`erase: false` instead of the one with `erase: true`). Therefore, we do some logic to ensure we remount `InteractiveAuth` completely. Further work in this area is described in https://github.com/vector-im/riot-web/issues/13646 --- .../views/dialogs/DeactivateAccountDialog.js | 46 ++++++++++++------- 1 file changed, 30 insertions(+), 16 deletions(-) diff --git a/src/components/views/dialogs/DeactivateAccountDialog.js b/src/components/views/dialogs/DeactivateAccountDialog.js index b269ec2fdb..d84042011d 100644 --- a/src/components/views/dialogs/DeactivateAccountDialog.js +++ b/src/components/views/dialogs/DeactivateAccountDialog.js @@ -34,6 +34,7 @@ export default class DeactivateAccountDialog extends React.Component { shouldErase: false, errStr: null, authData: null, // for UIA + authEnabled: true, // see usages for information // A few strings that are passed to InteractiveAuth for design or are displayed // next to the InteractiveAuth component. @@ -42,21 +43,7 @@ export default class DeactivateAccountDialog extends React.Component { continueKind: null, }; - MatrixClientPeg.get().deactivateAccount(null, false).then(r => { - // If we got here, oops. The server didn't require any auth. - // Our application lifecycle will catch the error and do the logout bits. - // We'll try to log something in an vain attempt to record what happened (storage - // is also obliterated on logout). - console.warn("User's account got deactivated without confirmation: Server had no auth"); - this.setState({errStr: _t("Server did not require any authentication")}); - }).catch(e => { - if (e && e.httpStatus === 401 && e.data) { - // Valid UIA response - this.setState({authData: e.data}); - } else { - this.setState({errStr: _t("Server did not return valid authentication information.")}); - } - }); + this._initAuth(/* shouldErase= */false); } _onStagePhaseChange = (stage, phase) => { @@ -124,13 +111,40 @@ export default class DeactivateAccountDialog extends React.Component { _onEraseFieldChange = (ev) => { this.setState({ shouldErase: ev.target.checked, + + // Disable the auth form because we're going to have to reinitialize the auth + // information. We do this because we can't modify the parameters in the UIA + // session, and the user will have selected something which changes the request. + // Therefore, we throw away the last auth session and try a new one. + authEnabled: false, }); + + // As mentioned above, set up for auth again to get updated UIA session info + this._initAuth(/* shouldErase= */ev.target.checked); }; _onCancel() { this.props.onFinished(false); } + _initAuth(shouldErase) { + MatrixClientPeg.get().deactivateAccount(null, shouldErase).then(r => { + // If we got here, oops. The server didn't require any auth. + // Our application lifecycle will catch the error and do the logout bits. + // We'll try to log something in an vain attempt to record what happened (storage + // is also obliterated on logout). + console.warn("User's account got deactivated without confirmation: Server had no auth"); + this.setState({errStr: _t("Server did not require any authentication")}); + }).catch(e => { + if (e && e.httpStatus === 401 && e.data) { + // Valid UIA response + this.setState({authData: e.data, authEnabled: true}); + } else { + this.setState({errStr: _t("Server did not return valid authentication information.")}); + } + }); + }; + render() { const BaseDialog = sdk.getComponent('views.dialogs.BaseDialog'); @@ -142,7 +156,7 @@ export default class DeactivateAccountDialog extends React.Component { } let auth =
{_t("Loading...")}
; - if (this.state.authData) { + if (this.state.authData && this.state.authEnabled) { auth = (
{this.state.bodyText} From 5e86dc2d60cf0a3b9bbfef6baabc23aafb2cccb6 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Tue, 12 May 2020 17:20:11 -0600 Subject: [PATCH 11/36] Update i18n strings --- src/i18n/strings/en_EN.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index b2fe409aa5..30e033bb43 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -1589,13 +1589,13 @@ "You've previously used a newer version of Riot on %(host)s. To use this version again with end to end encryption, you will need to sign out and back in again. ": "You've previously used a newer version of Riot on %(host)s. To use this version again with end to end encryption, you will need to sign out and back in again. ", "Incompatible Database": "Incompatible Database", "Continue With Encryption Disabled": "Continue With Encryption Disabled", - "Server did not require any authentication": "Server did not require any authentication", - "Server did not return valid authentication information.": "Server did not return valid authentication information.", "Confirm your account deactivation by using Single Sign On to prove your identity.": "Confirm your account deactivation by using Single Sign On to prove your identity.", "Are you sure you want to deactivate your account? This is irreversible.": "Are you sure you want to deactivate your account? This is irreversible.", "Confirm account deactivation": "Confirm account deactivation", "To continue, please enter your password:": "To continue, please enter your password:", "There was a problem communicating with the server. Please try again.": "There was a problem communicating with the server. Please try again.", + "Server did not require any authentication": "Server did not require any authentication", + "Server did not return valid authentication information.": "Server did not return valid authentication information.", "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.": "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.", "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.": "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.", "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.": "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.", From 6d90a9d1a31170e497609eee9519ffd12ceff0af Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Tue, 12 May 2020 17:20:26 -0600 Subject: [PATCH 12/36] Appease the linter --- src/components/views/dialogs/DeactivateAccountDialog.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/views/dialogs/DeactivateAccountDialog.js b/src/components/views/dialogs/DeactivateAccountDialog.js index d84042011d..ffef2a30c7 100644 --- a/src/components/views/dialogs/DeactivateAccountDialog.js +++ b/src/components/views/dialogs/DeactivateAccountDialog.js @@ -143,7 +143,7 @@ export default class DeactivateAccountDialog extends React.Component { this.setState({errStr: _t("Server did not return valid authentication information.")}); } }); - }; + } render() { const BaseDialog = sdk.getComponent('views.dialogs.BaseDialog'); From d8b6b7b976607d697125b4bdfa5c30b2912edf1c Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Wed, 13 May 2020 06:24:04 +0100 Subject: [PATCH 13/36] Pass screenAfterLogin through SSO in the callback url Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/BasePlatform.js | 14 ++++++-------- src/components/structures/MatrixChat.tsx | 9 ++++++++- src/components/structures/auth/Login.js | 7 +++++-- src/components/structures/auth/SoftLogout.js | 4 +++- src/components/views/auth/Welcome.js | 3 ++- src/components/views/elements/SSOButton.js | 5 +++-- 6 files changed, 27 insertions(+), 15 deletions(-) diff --git a/src/BasePlatform.js b/src/BasePlatform.js index 7214031586..8a950dc2e3 100644 --- a/src/BasePlatform.js +++ b/src/BasePlatform.js @@ -167,13 +167,9 @@ export default class BasePlatform { setLanguage(preferredLangs: string[]) {} - getSSOCallbackUrl(hsUrl: string, isUrl: string): URL { + getSSOCallbackUrl(hsUrl: string, isUrl: string, fragmentAfterLogin: string): URL { const url = new URL(window.location.href); - // XXX: at this point, the fragment will always be #/login, which is no - // use to anyone. Ideally, we would get the intended fragment from - // MatrixChat.screenAfterLogin so that you could follow #/room links etc - // through an SSO login. - url.hash = ""; + url.hash = fragmentAfterLogin || ""; url.searchParams.set("homeserver", hsUrl); url.searchParams.set("identityServer", isUrl); return url; @@ -183,9 +179,11 @@ export default class BasePlatform { * Begin Single Sign On flows. * @param {MatrixClient} mxClient the matrix client using which we should start the flow * @param {"sso"|"cas"} loginType the type of SSO it is, CAS/SSO. + * @param {string} fragmentAfterLogin the hash to pass to the app during sso callback. */ - startSingleSignOn(mxClient: MatrixClient, loginType: "sso"|"cas") { - const callbackUrl = this.getSSOCallbackUrl(mxClient.getHomeserverUrl(), mxClient.getIdentityServerUrl()); + startSingleSignOn(mxClient: MatrixClient, loginType: "sso" | "cas", fragmentAfterLogin: string) { + const callbackUrl = this.getSSOCallbackUrl(mxClient.getHomeserverUrl(), mxClient.getIdentityServerUrl(), + fragmentAfterLogin); window.location.href = mxClient.getSsoLoginUrl(callbackUrl.toString(), loginType); // redirect to SSO } diff --git a/src/components/structures/MatrixChat.tsx b/src/components/structures/MatrixChat.tsx index 3929711406..8ff8abb190 100644 --- a/src/components/structures/MatrixChat.tsx +++ b/src/components/structures/MatrixChat.tsx @@ -1973,6 +1973,11 @@ export default class MatrixChat extends React.PureComponent { render() { // console.log(`Rendering MatrixChat with view ${this.state.view}`); + let fragmentAfterLogin = ""; + if (this.props.initialScreenAfterLogin) { + fragmentAfterLogin = `/${this.props.initialScreenAfterLogin.screen}`; + } + let view; if (this.state.view === Views.LOADING) { @@ -2052,7 +2057,7 @@ export default class MatrixChat extends React.PureComponent { } } else if (this.state.view === Views.WELCOME) { const Welcome = sdk.getComponent('auth.Welcome'); - view = ; + view = ; } else if (this.state.view === Views.REGISTER) { const Registration = sdk.getComponent('structures.auth.Registration'); view = ( @@ -2091,6 +2096,7 @@ export default class MatrixChat extends React.PureComponent { defaultDeviceDisplayName={this.props.defaultDeviceDisplayName} onForgotPasswordClick={this.onForgotPasswordClick} onServerConfigChange={this.onServerConfigChange} + fragmentAfterLogin={fragmentAfterLogin} {...this.getServerProperties()} /> ); @@ -2100,6 +2106,7 @@ export default class MatrixChat extends React.PureComponent { ); } else { diff --git a/src/components/structures/auth/Login.js b/src/components/structures/auth/Login.js index 5d3cb69417..e65a223bd6 100644 --- a/src/components/structures/auth/Login.js +++ b/src/components/structures/auth/Login.js @@ -355,7 +355,8 @@ export default createReactClass({ ev.preventDefault(); ev.stopPropagation(); const ssoKind = step === 'm.login.sso' ? 'sso' : 'cas'; - PlatformPeg.get().startSingleSignOn(this._loginLogic.createTemporaryClient(), ssoKind); + PlatformPeg.get().startSingleSignOn(this._loginLogic.createTemporaryClient(), ssoKind, + this.props.fragmentAfterLogin); } else { // Don't intercept - just go through to the register page this.onRegisterClick(ev); @@ -628,7 +629,9 @@ export default createReactClass({ + loginType={loginType} + fragmentAfterLogin={this.props.fragmentAfterLogin} + />
); }, diff --git a/src/components/structures/auth/SoftLogout.js b/src/components/structures/auth/SoftLogout.js index 08ab7e8a61..ede1041f8a 100644 --- a/src/components/structures/auth/SoftLogout.js +++ b/src/components/structures/auth/SoftLogout.js @@ -244,7 +244,9 @@ export default class SoftLogout extends React.Component {

{introText}

+ loginType={this.state.loginView === LOGIN_VIEW.CAS ? "cas" : "sso"} + fragmentAfterLogin={this.props.fragmentAfterLogin} + />
); } diff --git a/src/components/views/auth/Welcome.js b/src/components/views/auth/Welcome.js index 7cbcf65d3c..91ba368f70 100644 --- a/src/components/views/auth/Welcome.js +++ b/src/components/views/auth/Welcome.js @@ -45,7 +45,8 @@ export default class Welcome extends React.PureComponent { idBaseUrl: isUrl, }); const plaf = PlatformPeg.get(); - const callbackUrl = plaf.getSSOCallbackUrl(tmpClient.getHomeserverUrl(), tmpClient.getIdentityServerUrl()); + const callbackUrl = plaf.getSSOCallbackUrl(tmpClient.getHomeserverUrl(), tmpClient.getIdentityServerUrl(), + this.props.fragmentAfterLogin); return ( diff --git a/src/components/views/elements/SSOButton.js b/src/components/views/elements/SSOButton.js index 3e0757924b..1126ae3cd7 100644 --- a/src/components/views/elements/SSOButton.js +++ b/src/components/views/elements/SSOButton.js @@ -21,9 +21,9 @@ import PlatformPeg from "../../../PlatformPeg"; import AccessibleButton from "./AccessibleButton"; import {_t} from "../../../languageHandler"; -const SSOButton = ({matrixClient, loginType, ...props}) => { +const SSOButton = ({matrixClient, loginType, fragmentAfterLogin, ...props}) => { const onClick = () => { - PlatformPeg.get().startSingleSignOn(matrixClient, loginType); + PlatformPeg.get().startSingleSignOn(matrixClient, loginType, fragmentAfterLogin); }; return ( @@ -36,6 +36,7 @@ const SSOButton = ({matrixClient, loginType, ...props}) => { SSOButton.propTypes = { matrixClient: PropTypes.object.isRequired, // does not use context as may use a temporary client loginType: PropTypes.oneOf(["sso", "cas"]), // defaults to "sso" in base-apis + fragmentAfterLogin: PropTypes.string, }; export default SSOButton; From 52e3c97f8c9a2032fe92b2b4bb5fc68c0f6957b5 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@googlemail.com> Date: Wed, 13 May 2020 06:36:14 +0100 Subject: [PATCH 14/36] Revert "ImageView make clicking off it easier" --- res/css/views/elements/_ImageView.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/res/css/views/elements/_ImageView.scss b/res/css/views/elements/_ImageView.scss index 983ef074f2..0a4ed2a194 100644 --- a/res/css/views/elements/_ImageView.scss +++ b/res/css/views/elements/_ImageView.scss @@ -37,7 +37,7 @@ limitations under the License. order: 2; /* min-width hack needed for FF */ min-width: 0px; - max-height: 90%; + height: 90%; flex: 15 15 0; display: flex; align-items: center; From 73a6fed1e32594bd7fad4c98684bbc76cbd44978 Mon Sep 17 00:00:00 2001 From: tleydxdy Date: Tue, 12 May 2020 23:11:03 +0000 Subject: [PATCH 15/36] Translated using Weblate (Chinese (Simplified)) Currently translated at 61.7% (1424 of 2307 strings) Translation: Riot Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/riot-web/matrix-react-sdk/zh_Hans/ --- src/i18n/strings/zh_Hans.json | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/zh_Hans.json b/src/i18n/strings/zh_Hans.json index 4eff773d1c..dc3cc6d176 100644 --- a/src/i18n/strings/zh_Hans.json +++ b/src/i18n/strings/zh_Hans.json @@ -1443,5 +1443,30 @@ "Verifies a user, session, and pubkey tuple": "验证用户、会话和公钥元组", "Unknown (user, session) pair:": "未知(用户、会话)对:", "Session already verified!": "会话已验证!", - "WARNING: Session already verified, but keys do NOT MATCH!": "警告:会话已验证,但密钥不匹配!" + "WARNING: Session already verified, but keys do NOT MATCH!": "警告:会话已验证,但密钥不匹配!", + "WARNING: KEY VERIFICATION FAILED! The signing key for %(userId)s and session %(deviceId)s is \"%(fprint)s\" which does not match the provided key \"%(fingerprint)s\". This could mean your communications are being intercepted!": "警告:密钥验证失败!%(userId)s 的会话 %(deviceId)s 的签名密钥为 %(fprint)s,与提供的密钥 %(fingerprint)s 不符。这可能表示您的通讯已被截获!", + "The signing key you provided matches the signing key you received from %(userId)s's session %(deviceId)s. Session marked as verified.": "您提供的签名密钥与您从 %(userId)s 的会话 %(deviceId)s 获取的一致。该会话被标为已验证。", + "Sends the given message coloured as a rainbow": "以彩虹色发送给定消息", + "Sends the given emote coloured as a rainbow": "以彩虹色发送给定表情符号", + "Displays list of commands with usages and descriptions": "显示指令清单与其描述和用法", + "Displays information about a user": "显示关于用户的信息", + "Send a bug report with logs": "发送带日志的错误报告", + "Opens chat with the given user": "与指定用户发起聊天", + "Sends a message to the given user": "向指定用户发消息", + "%(senderName)s made no change.": "%(senderName)s 未做出变更。", + "%(senderDisplayName)s changed the room name from %(oldRoomName)s to %(newRoomName)s.": "%(senderDisplayName)s 将聊天室名称从 %(oldRoomName)s 改为 %(newRoomName)s。", + "%(senderName)s added the alternative addresses %(addresses)s for this room.|other": "%(senderName)s 为此聊天室添加备用地址 %(addresses)s。", + "%(senderName)s added the alternative addresses %(addresses)s for this room.|one": "%(senderName)s 为此聊天室添加了备用地址 %(addresses)s。", + "%(senderName)s removed the alternative addresses %(addresses)s for this room.|other": "%(senderName)s 为此聊天室移除了备用地址 %(addresses)s。", + "%(senderName)s removed the alternative addresses %(addresses)s for this room.|one": "%(senderName)s 为此聊天室移除了备用地址 %(addresses)s。", + "%(senderName)s changed the alternative addresses for this room.": "%(senderName)s 更改了此聊天室的备用地址。", + "%(senderName)s changed the main and alternative addresses for this room.": "%(senderName)s 更改了此聊天室的主地址与备用地址。", + "%(senderName)s changed the addresses for this room.": "%(senderName)s 更改了此聊天室的地址。", + "%(senderName)s placed a voice call.": "%(senderName)s 发起了语音通话。", + "%(senderName)s placed a voice call. (not supported by this browser)": "%(senderName)s 发起了语音通话。(此浏览器不支持)", + "%(senderName)s placed a video call.": "%(senderName)s 发起了视频通话。", + "%(senderName)s placed a video call. (not supported by this browser)": "%(senderName)s 发起了视频通话。(此浏览器不支持)", + "%(senderName)s removed the rule banning users matching %(glob)s": "%(senderName)s 移除了禁止匹配 %(glob)s 的用户的规则", + "%(senderName)s removed the rule banning servers matching %(glob)s": "%(senderName)s 移除了禁止匹配 %(glob)s 的服务器的规则", + "%(senderName)s removed a ban rule matching %(glob)s": "%(senderName)s 移除了禁止匹配 %(glob)s 的规则" } From 52dec0cc8d871f271f7433036007d015e59f1eb8 Mon Sep 17 00:00:00 2001 From: Jeff Huang Date: Wed, 13 May 2020 03:42:53 +0000 Subject: [PATCH 16/36] Translated using Weblate (Chinese (Traditional)) Currently translated at 100.0% (2307 of 2307 strings) Translation: Riot Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/riot-web/matrix-react-sdk/zh_Hant/ --- src/i18n/strings/zh_Hant.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/zh_Hant.json b/src/i18n/strings/zh_Hant.json index ba8ffa0fcb..257b245e1c 100644 --- a/src/i18n/strings/zh_Hant.json +++ b/src/i18n/strings/zh_Hant.json @@ -2421,5 +2421,9 @@ "Verify your other session using one of the options below.": "使用下方的其中一個選項來驗證您其他的工作階段。", "Invite someone using their name, username (like ), email address or share this room.": "使用某人的名字、使用者名稱(如 )、電子郵件地址或分享此聊天室來邀請他們。", "Message deleted": "訊息已刪除", - "Message deleted by %(name)s": "訊息已被 %(name)s 刪除" + "Message deleted by %(name)s": "訊息已被 %(name)s 刪除", + "Opens chat with the given user": "開啟與指定使用者的聊天", + "Sends a message to the given user": "傳送訊息給指定的使用者", + "Waiting for your other session to verify…": "正在等待您的其他工作階段進行驗證……", + "You've successfully verified your device!": "您已成功驗證您的裝置!" } From 42eb36d6287d0bc0c3ffd3e51f3292b83c9cd397 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stanislav=20Luke=C5=A1?= Date: Tue, 12 May 2020 17:30:23 +0000 Subject: [PATCH 17/36] Translated using Weblate (Czech) Currently translated at 95.2% (2197 of 2307 strings) Translation: Riot Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/riot-web/matrix-react-sdk/cs/ --- src/i18n/strings/cs.json | 45 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/cs.json b/src/i18n/strings/cs.json index d08ac6c0f5..3b018204c0 100644 --- a/src/i18n/strings/cs.json +++ b/src/i18n/strings/cs.json @@ -2246,5 +2246,48 @@ "Command failed": "Příkaz selhal", "Could not find user in room": "Nepovedlo se najít uživatele v místnosti", "Please supply a widget URL or embed code": "Zadejte prosím URL widgetu nebo jeho kód", - "Send a bug report with logs": "Zaslat hlášení o chybě" + "Send a bug report with logs": "Zaslat hlášení o chybě", + "You signed in to a new session without verifying it:": "Přihlásili jste se do nové relace, ale neoveřili jste ji:", + "Verify your other session using one of the options below.": "Ověřte ostatní relací jedním z následujících způsobů.", + "Enable cross-signing to verify per-user instead of per-session": "Povolit cross-signing - ověřování uživatelů místo oveřování jednotlivých relací", + "Keep recovery passphrase in memory for this session": "V této relaci si heslo pro obnovení zálohy zapamatovat", + "Click the button below to confirm deleting these sessions.|other": "Zmáčknutím tlačítka potvrdíte smazání těchto relací.", + "Click the button below to confirm deleting these sessions.|one": "Zmáčknutím tlačítka potvrdíte smazání této relace.", + "Delete sessions|other": "Smazat relace", + "Delete sessions|one": "Smazat relaci", + "Where you’re logged in": "Kde jste přihlášení", + "You've successfully verified your device!": "Úspěšně jste ověřili vaše zařízení!", + "Start verification again from the notification.": "Začít proces ověření znovu pomocí notifikace.", + "Start verification again from their profile.": "Začít proces ověření znovu z jejich profilu.", + "Verification timed out.": "Ověření vypršelo.", + "You cancelled verification on your other session.": "Na druhé relace jste proces ověření zrušili.", + "%(displayName)s cancelled verification.": "%(displayName)s zrušil/a proces ověření.", + "You cancelled verification.": "Zrušili jste proces ověření.", + "Message deleted": "Zpráva smazána", + "Message deleted by %(name)s": "Zpráva smazána uživatelem %(name)s", + "Can't load this message": "Tuto zprávu nelze načíst", + "Submit logs": "Odeslat záznamy o chybě", + "Looks good": "To vypadá dobře", + "Can't find this server or its room list": "Server nebo jeho seznam místností se nepovedlo nalézt", + "All rooms": "Všechny místnosti", + "Your server": "Váš server", + "Are you sure you want to remove %(serverName)s": "Opravdu chcete odstranit %(serverName)s", + "Remove server": "Odstranit server", + "Matrix": "Matrix", + "Add a new server": "Přidat nový server", + "Enter the name of a new server you want to explore.": "Zadejte jméno serveru, který si chcete prohlédnout.", + "Server name": "Jméno serveru", + "Add a new server...": "Přidat nový server...", + "%(networkName)s rooms": "místnosti v %(networkName)s", + "Matrix rooms": "místnosti na Matrixu", + "Reminder: Your browser is unsupported, so your experience may be unpredictable.": "Připomínka: Váš prohlížeč není oficiálně podporován, tak se může Riot chovat nepředvídatelně.", + "Enable end-to-end encryption": "Povolit E2E šifrování", + "You can’t disable this later. Bridges & most bots won’t work yet.": "Už to v budoucnu nepůjde vypnout. Většina botů a propojení zatím nefunguje.", + "Server did not require any authentication": "Server nevyžadoval žádné ověření", + "Server did not return valid authentication information.": "Server neposkytl platné informace o ověření.", + "Confirm your account deactivation by using Single Sign On to prove your identity.": "Potvrďte deaktivaci účtu použtím Jednotného přihlášení.", + "Are you sure you want to deactivate your account? This is irreversible.": "Opravdu chcete deaktivovat účet? Je to nevratné.", + "Confirm account deactivation": "Potvrďte deaktivaci účtu", + "There was a problem communicating with the server. Please try again.": "Došlo k potížím při komunikaci se serverem. Zkuste to prosím znovu.", + "Start a conversation with someone using their name, username (like ) or email address.": "Začněte s někým konverzovat za pomocí jména, přihlašovacího jména (jako ) nebo emailu." } From 1cfdf7e56fc3b2f3a4efc8867c8906d3731541b4 Mon Sep 17 00:00:00 2001 From: Tirifto Date: Tue, 12 May 2020 17:22:31 +0000 Subject: [PATCH 18/36] Translated using Weblate (Esperanto) Currently translated at 100.0% (2307 of 2307 strings) Translation: Riot Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/riot-web/matrix-react-sdk/eo/ --- src/i18n/strings/eo.json | 38 +++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/src/i18n/strings/eo.json b/src/i18n/strings/eo.json index 4d270260fc..9e8641a6e9 100644 --- a/src/i18n/strings/eo.json +++ b/src/i18n/strings/eo.json @@ -70,7 +70,7 @@ "Unable to create widget.": "Ne povas krei fenestraĵon.", "Failed to send request.": "Malsukcesis sendi peton.", "This room is not recognised.": "Ĉi tiu ĉambro ne estas rekonita.", - "Power level must be positive integer.": "Nivelo de potenco devas esti entjero pozitiva.", + "Power level must be positive integer.": "Povnivelo devas esti entjero pozitiva.", "You are not in this room.": "Vi ne estas en tiu ĉi ĉambro.", "You do not have permission to do that in this room.": "Vi ne havas permeson fari tion en tiu ĉambro.", "Missing room_id in request": "En peto mankas room_id", @@ -122,7 +122,7 @@ "%(senderName)s made future room history visible to anyone.": "%(senderName)s videbligis estontan historion de la ĉambro al ĉiuj.", "%(senderName)s made future room history visible to unknown (%(visibility)s).": "%(senderName)s videbligis estontan historion de la ĉambro al nekonata (%(visibility)s).", "%(userId)s from %(fromPowerLevel)s to %(toPowerLevel)s": "%(userId)s de %(fromPowerLevel)s al %(toPowerLevel)s", - "%(senderName)s changed the power level of %(powerLevelDiffText)s.": "%(senderName)s ŝanĝis la potencan nivelon de %(powerLevelDiffText)s.", + "%(senderName)s changed the power level of %(powerLevelDiffText)s.": "%(senderName)s ŝanĝis la povnivelon de %(powerLevelDiffText)s.", "%(senderName)s changed the pinned messages for the room.": "%(senderName)s ŝanĝis la fiksitajn mesaĝojn de la ĉambro.", "%(widgetName)s widget modified by %(senderName)s": "Fenestraĵon %(widgetName)s ŝanĝis %(senderName)s", "%(widgetName)s widget added by %(senderName)s": "Fenestraĵon %(widgetName)s aldonis %(senderName)s", @@ -212,8 +212,8 @@ "Failed to ban user": "Malsukcesis forbari uzanton", "Failed to mute user": "Malsukcesis silentigi uzanton", "Failed to toggle moderator status": "Malsukcesis baskuligi estrecon", - "Failed to change power level": "Malsukcesis ŝanĝi nivelon de potenco", - "You will not be able to undo this change as you are promoting the user to have the same power level as yourself.": "Tiun ĉi ŝanĝon vi ne povos fareblos, ĉar vi donas al la uzanto la saman nivelon de potenco, kiun havas vi mem.", + "Failed to change power level": "Malsukcesis ŝanĝi povnivelon", + "You will not be able to undo this change as you are promoting the user to have the same power level as yourself.": "Tiun ĉi ŝanĝon vi ne povos malfari, ĉar vi donas al la uzanto la saman povnivelon, kiun havas vi mem.", "Are you sure?": "Ĉu vi certas?", "Unignore": "Reatenti", "Ignore": "Malatenti", @@ -233,7 +233,7 @@ "and %(count)s others...|one": "kaj unu alia…", "Invited": "Invititaj", "Filter room members": "Filtri ĉambranojn", - "%(userName)s (power %(powerLevelNumber)s)": "%(userName)s (potenco je %(powerLevelNumber)s)", + "%(userName)s (power %(powerLevelNumber)s)": "%(userName)s (povnivelo je %(powerLevelNumber)s)", "Attachment": "Aldonaĵo", "Hangup": "Fini vokon", "Voice call": "Voĉvoko", @@ -275,7 +275,7 @@ "Search": "Serĉi", "Community Invites": "Komunumaj invitoj", "Invites": "Invitoj", - "Favourites": "Ŝatataj", + "Favourites": "Elstarigitaj", "Rooms": "Ĉambroj", "Low priority": "Malpli gravaj", "Historical": "Estintaj", @@ -291,7 +291,7 @@ "Banned users": "Forbaritaj uzantoj", "This room is not accessible by remote Matrix servers": "Ĉi tiu ĉambro ne atingeblas por foraj serviloj de Matrix", "Leave room": "Eliri ĉambron", - "Favourite": "Ŝatata", + "Favourite": "Elstarigi", "Guests cannot join this room even if explicitly invited.": "Gastoj ne povas aliĝi ĉi tiun ĉambron eĉ kun malimplica invito.", "Click here to fix": "Klaku ĉi tie por riparo", "Who can access this room?": "Kiu povas aliri ĉi tiun ĉambron?", @@ -509,7 +509,7 @@ "Failed to remove the room from the summary of %(groupId)s": "Malsukcesis forigi la ĉambron de la superrigardo de %(groupId)s", "The room '%(roomName)s' could not be removed from the summary.": "Ĉambro ;%(roomName)s' ne forigeblas de la superrigardo.", "Add users to the community summary": "Aldoni uzantojn al la komunuma superrigardo", - "Who would you like to add to this summary?": "Kiun vi ŝatus aldoni al tiu ĉi superrigardo?", + "Who would you like to add to this summary?": "Kiun vi volas aldoni al tiu ĉi superrigardo?", "Failed to add the following users to the summary of %(groupId)s:": "Malsukcesis aldoni la jenajn uzantojn al la superrigardo de %(groupId)s:", "Add a User": "Aldoni uzanton", "Failed to remove a user from the summary of %(groupId)s": "Malsukcesis forigi uzanton de la superrigardo de %(groupId)s", @@ -550,7 +550,7 @@ "Connectivity to the server has been lost.": "Konekto al la servilo perdiĝis.", "Sent messages will be stored until your connection has returned.": "Senditaj mesaĝoj konserviĝos ĝis via konekto refunkcios.", "Active call": "Aktiva voko", - "There's no one else here! Would you like to invite others or stop warning about the empty room?": "Neniu alia ĉeestas! Ĉu vi ŝatus inviti aliajnĉesigi avertadon pri la malplena ĉambro?", + "There's no one else here! Would you like to invite others or stop warning about the empty room?": "Neniu alia ĉeestas! Ĉu vi volas inviti aliajnĉesigi avertadon pri la malplena ĉambro?", "You seem to be uploading files, are you sure you want to quit?": "Ŝajne vi alŝutas dosierojn nun; ĉu vi tamen volas foriri?", "You seem to be in a call, are you sure you want to quit?": "Ŝajne vi vokas nun; ĉu vi tamen volas foriri?", "Search failed": "Serĉo malsukcesis", @@ -621,7 +621,7 @@ "This server does not support authentication with a phone number.": "Ĉi tiu servilo ne subtenas aŭtentikigon per telefona numero.", "Displays action": "Montras agon", "Bans user with given id": "Forbaras uzanton kun la donita identigilo", - "Define the power level of a user": "Difini la potencan nivelon de uzanto", + "Define the power level of a user": "Difini la povnivelon de uzanto", "Deops user with given id": "Senestrigas uzanton kun donita identigilo", "Invites user with given id to current room": "Invitas uzanton per identigilo al la nuna ĉambro", "Joins room with given alias": "Aliĝas al ĉambro per kromnomo", @@ -1477,7 +1477,7 @@ "Demote yourself?": "Ĉu malrangaltigi vin mem?", "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.": "Vi ne povos malfari tiun ŝanĝon, ĉar vi malrangaltigas vin mem; se vi estas la lasta povohava uzanto en la ĉambro, estos neeble vian povon rehavi.", "Demote": "Malrangaltigi", - "Power level": "Povonivelo", + "Power level": "Povnivelo", "Use two-way text verification": "Uzi duflankan tekstan kontrolon", "Upgrading this room requires closing down the current instance of the room and creating a new room in its place. To give room members the best possible experience, we will:": "Gradaltigo de ĉi tiu ĉambro bezonas fermi ĝin, kaj krei novan por anstataŭi ĝin. Por plejbonigi sperton de la ĉambranoj, ni:", "Invalid homeserver discovery response": "Nevalida eltrova respondo de hejmservilo", @@ -1571,10 +1571,10 @@ "Always show the window menu bar": "Ĉiam montri la fenestran menubreton", "Upgrade the room": "Gradaltigi la ĉambron", "Enable room encryption": "Ŝalti ĉifradon de la ĉambro", - "Error changing power level requirement": "Eraris ŝanĝo de postulo de potenconivelo", - "An error occurred changing the room's power level requirements. Ensure you have sufficient permissions and try again.": "Eraris ŝanĝo de la postuloj de la ĉambro pri potenconivelo. Certigu, ke vi havas sufiĉajn permesojn, kaj reprovu.", - "Error changing power level": "Eraris ŝanĝo de potenconivelo", - "An error occurred changing the user's power level. Ensure you have sufficient permissions and try again.": "Eraris ŝanĝo de potenconivelo de la uzanto. Certigu, ke vi havas sufiĉajn permesojn, kaj reprovu.", + "Error changing power level requirement": "Eraris ŝanĝo de postulo de povnivelo", + "An error occurred changing the room's power level requirements. Ensure you have sufficient permissions and try again.": "Eraris ŝanĝo de la postuloj de la ĉambro pri povnivelo. Certigu, ke vi havas sufiĉajn permesojn, kaj reprovu.", + "Error changing power level": "Eraris ŝanĝo de povnivelo", + "An error occurred changing the user's power level. Ensure you have sufficient permissions and try again.": "Eraris ŝanĝo de povnivelo de la uzanto. Certigu, ke vi havas sufiĉajn permesojn, kaj reprovu.", "Remove %(email)s?": "Ĉu forigi %(email)s?", "Remove %(phone)s?": "Ĉu forigi %(phone)s?", "No recent messages by %(user)s found": "Neniuj freŝaj mesaĝoj de %(user)s troviĝis", @@ -1965,7 +1965,7 @@ "Use an Integration Manager (%(serverName)s) to manage bots, widgets, and sticker packs.": "Uzu kunigilon (%(serverName)s) por administrado de robotoj, fenestraĵoj, kaj glumarkaroj.", "Use an Integration Manager to manage bots, widgets, and sticker packs.": "Uzu kunigilon por administrado de robotoj, fenestraĵoj, kaj glumarkaroj.", "Manage integrations": "Administri kunigojn", - "Integration Managers receive configuration data, and can modify widgets, send room invites, and set power levels on your behalf.": "Kunigiloj ricevas agordajn datumojn, kaj povas modifi fenestraĵojn, sendi invitojn al ĉambroj, kaj vianome agordi nivelojn de potenco.", + "Integration Managers receive configuration data, and can modify widgets, send room invites, and set power levels on your behalf.": "Kunigiloj ricevas agordajn datumojn, kaj povas modifi fenestraĵojn, sendi invitojn al ĉambroj, kaj vianome agordi povnivelojn.", "Your password was successfully changed. You will not receive push notifications on other sessions until you log back in to them": "Via pasvorto sukcese ŝanĝiĝis. Vi ne ricevados pasivajn sciigojn en aliaj salutaĵoj, ĝis vi ilin resalutos", "Error downloading theme information.": "Eraris elŝuto de informoj pri haŭto.", "Theme added!": "Haŭto aldoniĝis!", @@ -2396,5 +2396,9 @@ "Cancel replying to a message": "Nuligi respondon al mesaĝo", "Invite someone using their name, username (like ), email address or share this room.": "Invitu iun per ĝia nomo, uzantonomo (kiel ), retpoŝtadreso, aŭ kunhavigu la ĉambron.", "Message deleted": "Mesaĝo foriĝis", - "Message deleted by %(name)s": "Mesaĝon forigis %(name)s" + "Message deleted by %(name)s": "Mesaĝon forigis %(name)s", + "Opens chat with the given user": "Malfermas babilon kun la uzanto", + "Sends a message to the given user": "Sendas mesaĝon al la uzanto", + "Waiting for your other session to verify…": "Atendante kontrolon de via alia salutaĵo…", + "You've successfully verified your device!": "Vi sukcese kontrolis vian aparaton!" } From cad0f38d4d147e88ecfb5d2dc26d33c98e22740f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Priit=20J=C3=B5er=C3=BC=C3=BCt?= Date: Tue, 12 May 2020 21:37:12 +0000 Subject: [PATCH 19/36] Translated using Weblate (Estonian) Currently translated at 45.0% (1037 of 2307 strings) Translation: Riot Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/riot-web/matrix-react-sdk/et/ --- src/i18n/strings/et.json | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/et.json b/src/i18n/strings/et.json index 95096a080d..cda3a5e76d 100644 --- a/src/i18n/strings/et.json +++ b/src/i18n/strings/et.json @@ -1026,5 +1026,18 @@ "Ed25519 fingerprint": "Ed25519 sõrmejälg", "User ID": "Kasutajatunnus", "Algorithm": "Algoritm", - "unencrypted": "krüptimata" + "unencrypted": "krüptimata", + "Terms and Conditions": "Kasutustingimused", + "Logout": "Logi välja", + "Your Communities": "Sinu kogukonnad", + "Error whilst fetching joined communities": "Viga nende kogukondade laadimisel, millega sa oled liitunud", + "You have no visible notifications": "Sul ei ole nähtavaid teavitusi", + "Riot failed to get the protocol list from the homeserver. The homeserver may be too old to support third party networks.": "Riot'il ei õnnestunud koduserverist laadida toetatud protokollide loendit. Toetamaks kolmandate osapoolte võrke võib koduserver olla liiga vana.", + "Riot failed to get the public room list.": "Riot'il ei õnnestunud laadida avalike jututubade loendit.", + "The homeserver may be unavailable or overloaded.": "Koduserver pole kas saadaval või on üle koormatud.", + "Room not found": "Jututuba ei leidunud", + "Preview": "Eelvaade", + "View": "Näita", + "Message not sent due to unknown sessions being present": "Sõnum on saatmata, sest jutuoas on tundmatud sessioonid", + "You can't send any messages until you review and agree to our terms and conditions.": "Sa ei saa saata ühtego sõnumit enne, kui oled läbi lugenud ja nõustunud meie kasutustingimustega." } From be61968dcaa3b1f0b30581a98e8dbfd55738fcbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20C?= Date: Wed, 13 May 2020 07:19:39 +0000 Subject: [PATCH 20/36] Translated using Weblate (French) Currently translated at 100.0% (2307 of 2307 strings) Translation: Riot Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/riot-web/matrix-react-sdk/fr/ --- src/i18n/strings/fr.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/fr.json b/src/i18n/strings/fr.json index 1756ff57ad..7546385bf6 100644 --- a/src/i18n/strings/fr.json +++ b/src/i18n/strings/fr.json @@ -2422,5 +2422,9 @@ "Verify your other session using one of the options below.": "Vérifiez votre autre session en utilisant une des options ci-dessous.", "Invite someone using their name, username (like ), email address or share this room.": "Invitez quelqu’un en utilisant leur nom, leur nom d’utilisateur (comme ), leur adresse e-mail ou partagez ce salon.", "Message deleted": "Message supprimé", - "Message deleted by %(name)s": "Message supprimé par %(name)s" + "Message deleted by %(name)s": "Message supprimé par %(name)s", + "Opens chat with the given user": "Ouvre une discussion avec l’utilisateur fourni", + "Sends a message to the given user": "Envoie un message à l’utilisateur fourni", + "Waiting for your other session to verify…": "En attente de la vérification depuis votre autre session…", + "You've successfully verified your device!": "Vous avez bien vérifié votre appareil !" } From d11923e2e3d3f4189d8848349f0ec1073ea8f91e Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Wed, 13 May 2020 10:38:32 +0100 Subject: [PATCH 21/36] Add new keyboard shortcuts for jump to unread and upload file Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/accessibility/KeyboardShortcuts.tsx | 41 +++++++++++++++---- src/components/structures/RoomView.js | 14 ++++++- src/components/views/rooms/MessageComposer.js | 13 +++++- 3 files changed, 57 insertions(+), 11 deletions(-) diff --git a/src/accessibility/KeyboardShortcuts.tsx b/src/accessibility/KeyboardShortcuts.tsx index bcbf3d6810..f527ab4a14 100644 --- a/src/accessibility/KeyboardShortcuts.tsx +++ b/src/accessibility/KeyboardShortcuts.tsx @@ -34,6 +34,7 @@ export enum Categories { CALLS = "Calls", COMPOSER = "Composer", ROOM_LIST = "Room List", + ROOM = "Room", AUTOCOMPLETE = "Autocomplete", } @@ -142,6 +143,34 @@ const shortcuts: Record = { }, ], + [Categories.ROOM]: [ + { + keybinds: [{ + key: Key.PAGE_UP, + }, { + key: Key.PAGE_DOWN, + }], + description: _td("Scroll up/down in the timeline"), + }, { + keybinds: [{ + key: Key.ESCAPE, + }], + description: _td("Dismiss read marker and jump to bottom"), + }, { + keybinds: [{ + modifiers: [Modifiers.SHIFT], + key: Key.PAGE_UP, + }], + description: _td("Jump to oldest unread message"), + }, { + keybinds: [{ + modifiers: [CMD_OR_CTRL, Modifiers.SHIFT], + key: Key.U, + }], + description: _td("Upload a file"), + } + ], + [Categories.ROOM_LIST]: [ { keybinds: [{ @@ -181,13 +210,6 @@ const shortcuts: Record = { [Categories.NAVIGATION]: [ { - keybinds: [{ - key: Key.PAGE_UP, - }, { - key: Key.PAGE_DOWN, - }], - description: _td("Scroll up/down in the timeline"), - }, { keybinds: [{ modifiers: [Modifiers.ALT, Modifiers.SHIFT], key: Key.ARROW_UP, @@ -257,10 +279,11 @@ const shortcuts: Record = { const categoryOrder = [ Categories.COMPOSER, - Categories.CALLS, - Categories.ROOM_LIST, Categories.AUTOCOMPLETE, + Categories.ROOM, + Categories.ROOM_LIST, Categories.NAVIGATION, + Categories.CALLS, ]; interface IModal { diff --git a/src/components/structures/RoomView.js b/src/components/structures/RoomView.js index f53929df4a..e413c33efa 100644 --- a/src/components/structures/RoomView.js +++ b/src/components/structures/RoomView.js @@ -41,7 +41,7 @@ import * as ObjectUtils from '../../ObjectUtils'; import * as Rooms from '../../Rooms'; import eventSearch from '../../Searching'; -import {isOnlyCtrlOrCmdKeyEvent, Key} from '../../Keyboard'; +import {isOnlyCtrlOrCmdIgnoreShiftKeyEvent, isOnlyCtrlOrCmdKeyEvent, Key} from '../../Keyboard'; import MainSplit from './MainSplit'; import RightPanel from './RightPanel'; @@ -588,6 +588,18 @@ export default createReactClass({ handled = true; } break; + case Key.PAGE_UP: + if (!ev.altKey && !ev.ctrlKey && ev.shiftKey && !ev.metaKey) { + this.jumpToReadMarker(); + handled = true; + } + break; + case Key.U.toUpperCase(): + if (isOnlyCtrlOrCmdIgnoreShiftKeyEvent(ev) && ev.shiftKey) { + dis.dispatch({ action: "upload_file" }) + handled = true; + } + break; } if (handled) { diff --git a/src/components/views/rooms/MessageComposer.js b/src/components/views/rooms/MessageComposer.js index 4749742a7d..1142e91057 100644 --- a/src/components/views/rooms/MessageComposer.js +++ b/src/components/views/rooms/MessageComposer.js @@ -114,8 +114,19 @@ class UploadButton extends React.Component { this.onUploadFileInputChange = this.onUploadFileInputChange.bind(this); this._uploadInput = createRef(); + this._dispatcherRef = dis.register(this.onAction); } + componentWillUnmount() { + dis.unregister(this._dispatcherRef); + } + + onAction = payload => { + if (payload.action === "upload_file") { + this.onUploadClick(); + } + }; + onUploadClick(ev) { if (MatrixClientPeg.get().isGuest()) { dis.dispatch({action: 'require_registration'}); @@ -128,7 +139,7 @@ class UploadButton extends React.Component { if (ev.target.files.length === 0) return; // take a copy so we can safely reset the value of the form control - // (Note it is a FileList: we can't use slice or sesnible iteration). + // (Note it is a FileList: we can't use slice or sensible iteration). const tfiles = []; for (let i = 0; i < ev.target.files.length; ++i) { tfiles.push(ev.target.files[i]); From 0e05e6db86467c730b853c8f8d7009f2a28d8e85 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Wed, 13 May 2020 10:40:23 +0100 Subject: [PATCH 22/36] i18n Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/i18n/strings/en_EN.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index b2fe409aa5..d469103897 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -2284,13 +2284,16 @@ "Cancel replying to a message": "Cancel replying to a message", "Toggle microphone mute": "Toggle microphone mute", "Toggle video on/off": "Toggle video on/off", + "Scroll up/down in the timeline": "Scroll up/down in the timeline", + "Dismiss read marker and jump to bottom": "Dismiss read marker and jump to bottom", + "Jump to oldest unread message": "Jump to oldest unread message", + "Upload a file": "Upload a file", "Jump to room search": "Jump to room search", "Navigate up/down in the room list": "Navigate up/down in the room list", "Select room from the room list": "Select room from the room list", "Collapse room list section": "Collapse room list section", "Expand room list section": "Expand room list section", "Clear room list filter field": "Clear room list filter field", - "Scroll up/down in the timeline": "Scroll up/down in the timeline", "Previous/next unread room or DM": "Previous/next unread room or DM", "Previous/next room or DM": "Previous/next room or DM", "Toggle the top left menu": "Toggle the top left menu", From 226e4b297a7c79923b0466b2a82ff2c91d87d5bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stanislav=20Luke=C5=A1?= Date: Wed, 13 May 2020 18:22:38 +0000 Subject: [PATCH 23/36] Translated using Weblate (Czech) Currently translated at 95.4% (2201 of 2307 strings) Translation: Riot Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/riot-web/matrix-react-sdk/cs/ --- src/i18n/strings/cs.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/cs.json b/src/i18n/strings/cs.json index 3b018204c0..181a692b73 100644 --- a/src/i18n/strings/cs.json +++ b/src/i18n/strings/cs.json @@ -2289,5 +2289,9 @@ "Are you sure you want to deactivate your account? This is irreversible.": "Opravdu chcete deaktivovat účet? Je to nevratné.", "Confirm account deactivation": "Potvrďte deaktivaci účtu", "There was a problem communicating with the server. Please try again.": "Došlo k potížím při komunikaci se serverem. Zkuste to prosím znovu.", - "Start a conversation with someone using their name, username (like ) or email address.": "Začněte s někým konverzovat za pomocí jména, přihlašovacího jména (jako ) nebo emailu." + "Start a conversation with someone using their name, username (like ) or email address.": "Začněte s někým konverzovat za pomocí jména, přihlašovacího jména (jako ) nebo emailu.", + "Opens chat with the given user": "Otevře konverzaci s tímto uživatelem", + "Sends a message to the given user": "Pošle zprávu danému uživateli", + "Waiting for your other session to verify…": "Čekáme na ověření od vaší druhé relace…", + "Verify all your sessions to ensure your account & messages are safe": "Ověřte všechny své relace, abyste zaručili, že jsou vaše zprávy a účet bezpečné" } From 62fee732429fde3e2656dd7e3943c3ada6736507 Mon Sep 17 00:00:00 2001 From: Jeff Huang Date: Thu, 14 May 2020 03:15:43 +0000 Subject: [PATCH 24/36] Translated using Weblate (Chinese (Traditional)) Currently translated at 100.0% (2312 of 2312 strings) Translation: Riot Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/riot-web/matrix-react-sdk/zh_Hant/ --- src/i18n/strings/zh_Hant.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/zh_Hant.json b/src/i18n/strings/zh_Hant.json index 257b245e1c..0ca6cfc586 100644 --- a/src/i18n/strings/zh_Hant.json +++ b/src/i18n/strings/zh_Hant.json @@ -2425,5 +2425,10 @@ "Opens chat with the given user": "開啟與指定使用者的聊天", "Sends a message to the given user": "傳送訊息給指定的使用者", "Waiting for your other session to verify…": "正在等待您的其他工作階段進行驗證……", - "You've successfully verified your device!": "您已成功驗證您的裝置!" + "You've successfully verified your device!": "您已成功驗證您的裝置!", + "To continue, use Single Sign On to prove your identity.": "要繼續,使用單一登入系統來證明您的身份。", + "Confirm to continue": "確認以繼續", + "Click the button below to confirm your identity.": "點擊下方按鈕以確認您的身份。", + "Confirm encryption setup": "確認加密設定", + "Click the button below to confirm setting up encryption.": "點擊下方按鈕以確認設定加密。" } From 5672ff577bb635574d086a4572599dbc8839ac02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Priit=20J=C3=B5er=C3=BC=C3=BCt?= Date: Thu, 14 May 2020 07:00:39 +0000 Subject: [PATCH 25/36] Translated using Weblate (Estonian) Currently translated at 46.7% (1080 of 2312 strings) Translation: Riot Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/riot-web/matrix-react-sdk/et/ --- src/i18n/strings/et.json | 45 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/et.json b/src/i18n/strings/et.json index cda3a5e76d..88301258a5 100644 --- a/src/i18n/strings/et.json +++ b/src/i18n/strings/et.json @@ -1039,5 +1039,48 @@ "Preview": "Eelvaade", "View": "Näita", "Message not sent due to unknown sessions being present": "Sõnum on saatmata, sest jutuoas on tundmatud sessioonid", - "You can't send any messages until you review and agree to our terms and conditions.": "Sa ei saa saata ühtego sõnumit enne, kui oled läbi lugenud ja nõustunud meie kasutustingimustega." + "You can't send any messages until you review and agree to our terms and conditions.": "Sa ei saa saata ühtego sõnumit enne, kui oled läbi lugenud ja nõustunud meie kasutustingimustega.", + "Couldn't load page": "Lehe laadimine ei õnnestunud", + "You must register to use this functionality": "Selle funktsionaalsuse kasutamiseks pead sa registreeruma", + "

HTML for your community's page

\n

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

\n

\n You can even use 'img' tags\n

\n": "

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

\n

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

\n

\n Pildite lisaminseks võid sa isegi kasutada img-märgendit\n

\n", + "Add to summary": "Lisa kokkuvõtte lehele", + "Add a Room": "Lisa jututuba", + "The room '%(roomName)s' could not be removed from the summary.": "Valitud %(roomName)s jututoa eemaldamine koondinfost ei õnnestunud.", + "Add users to the community summary": "Lisa kasutajad kogukonna kokkuvõtte lehele", + "Who would you like to add to this summary?": "Keda sa sooviksid lisada siia kokkuvõtte lehele?", + "Failed to add the following users to the summary of %(groupId)s:": "Järgnevate kasutajate lisamine %(groupId)s kogukonna koondinfo lehele ei õnnestunud:", + "Add a User": "Lisa kasutaja", + "The user '%(displayName)s' could not be removed from the summary.": "Kasutaja %(displayName)s eemaldamine koondinfo lehelt ei õnnestunud.", + "Failed to upload image": "Pildi üleslaadimine ei õnnestunud", + "Failed to update community": "Kogukonna uuendamine ei õnnestunud", + "Unable to accept invite": "Ei saanud kutset vastu võtta", + "Unable to join community": "Ei õnnetunud liituda kogukonnaga", + "You are an administrator of this community. You will not be able to rejoin without an invite from another administrator.": "Sa oled selle kogukonna haldur. Sa ei saa uuesti liituda ilma kutseta mõnelt teiselt administraatori õigustes liikmelt.", + "Leave Community": "Lahku kogukonnast", + "Leave %(groupName)s?": "Lahku %(groupName)s kogukonnast?", + "Unable to leave community": "Kogukonnast lahkumine ei õnnestunud", + "Community Settings": "Kogukonna seadistused", + "Want more than a community? Get your own server": "Soovid enamat kui kogukond? Pane üles oma server", + "Changes made to your community name and avatar might not be seen by other users for up to 30 minutes.": "Oma kogukonnas tehtud nime ja avatari muudatused ei pruugi teistele näha olla kuni 30 minuti jooksul.", + "Featured Users:": "Esiletõstetud kasutajad:", + "%(inviter)s has invited you to join this community": "%(inviter)s on kutsunud sind kogukonna liikmeks", + "Join this community": "Liitu selle kogukonnaga", + "Leave this community": "Lahku sellest kogukonnast", + "You are an administrator of this community": "Sa oled selle kogukonna haldur", + "You are a member of this community": "Sa oled kogukonna liige", + "Who can join this community?": "Kes võib liituda selle kogukonnaga?", + "Everyone": "Kes iganes soovib", + "Your community hasn't got a Long Description, a HTML page to show to community members.
Click here to open settings and give it one!": "Sinu kogukonnal on puudu pikk kirjeldus, mis pole muud kui lihtne HTML-leht, mida kuvatakse liikmetele.
Klõpsi siia ja loo selline leht!", + "Long Description (HTML)": "Pikk kirjeldus (HTML)", + "Upload avatar": "Lae üles profiilipilt ehk avatar", + "Description": "Kirjeldus", + "Community %(groupId)s not found": "%(groupId)s kogukonda ei leidunud", + "This homeserver does not support communities": "See koduserver ei toeta kogukondade funktsionaalsust", + "Failed to load %(groupId)s": "%(groupId)s kogukonna laadimine ei õnnestunud", + "Welcome to %(appName)s": "Tere tulemast %(appName)s kasutajaks", + "Liberate your communication": "Vabasta oma suhtlus", + "Send a Direct Message": "Saada otsesõnum", + "Are you sure you want to leave the room '%(roomName)s'?": "Kas oled kindel, et soovid lahkuda jututoast '%(roomName)s'?", + "Unknown error": "Teadmata viga", + "To continue using the %(homeserverDomain)s homeserver you must review and agree to our terms and conditions.": "Selleka et jätkata koduserveri %(homeserverDomain)s kasutamist sa pead üle vaatama ja nõustuma meie kasutamistingimustega." } From 1af2bdbc0ec7cddaa45edc131da66f24269d5724 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20C?= Date: Thu, 14 May 2020 06:10:18 +0000 Subject: [PATCH 26/36] Translated using Weblate (French) Currently translated at 100.0% (2312 of 2312 strings) Translation: Riot Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/riot-web/matrix-react-sdk/fr/ --- src/i18n/strings/fr.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/fr.json b/src/i18n/strings/fr.json index 7546385bf6..3fac2168a2 100644 --- a/src/i18n/strings/fr.json +++ b/src/i18n/strings/fr.json @@ -2426,5 +2426,10 @@ "Opens chat with the given user": "Ouvre une discussion avec l’utilisateur fourni", "Sends a message to the given user": "Envoie un message à l’utilisateur fourni", "Waiting for your other session to verify…": "En attente de la vérification depuis votre autre session…", - "You've successfully verified your device!": "Vous avez bien vérifié votre appareil !" + "You've successfully verified your device!": "Vous avez bien vérifié votre appareil !", + "To continue, use Single Sign On to prove your identity.": "Pour continuer, utilisez l’authentification unique pour prouver votre identité.", + "Confirm to continue": "Confirmer pour continuer", + "Click the button below to confirm your identity.": "Cliquez sur le bouton ci-dessous pour confirmer votre identité.", + "Confirm encryption setup": "Confirmer la configuration du chiffrement", + "Click the button below to confirm setting up encryption.": "Cliquez sur le bouton ci-dessous pour confirmer la configuration du chiffrement." } From 9869ae4672c55679c8bee62f6505db5aeeec05ca Mon Sep 17 00:00:00 2001 From: Imre Kristoffer Eilertsen Date: Thu, 14 May 2020 07:32:33 +0000 Subject: [PATCH 27/36] =?UTF-8?q?Translated=20using=20Weblate=20(Norwegian?= =?UTF-8?q?=20Bokm=C3=A5l)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently translated at 57.6% (1332 of 2312 strings) Translation: Riot Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/riot-web/matrix-react-sdk/nb_NO/ --- src/i18n/strings/nb_NO.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/nb_NO.json b/src/i18n/strings/nb_NO.json index 147584ed00..59182a0249 100644 --- a/src/i18n/strings/nb_NO.json +++ b/src/i18n/strings/nb_NO.json @@ -1341,5 +1341,6 @@ "You're done!": "Du har gjort alt klart!", "Enter a recovery passphrase...": "Skriv inn en gjenopprettingspassfrase …", "Please enter your recovery passphrase a second time to confirm.": "Skriv inn gjenopprettingspassfrasen din en andre gang for å bekrefte.", - "Repeat your recovery passphrase...": "Gjenta gjenopprettingspassfrasen din …" + "Repeat your recovery passphrase...": "Gjenta gjenopprettingspassfrasen din …", + "Other users may not trust it": "Andre brukere kan kanskje mistro den" } From d1c6f3099c0fbcbb8e2d94f19660a99d8a378c2b Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Thu, 14 May 2020 11:20:06 +0100 Subject: [PATCH 28/36] move styling to QRCode scss Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- res/css/_components.scss | 1 + res/css/views/dialogs/_ShareDialog.scss | 6 ------ res/css/views/elements/_QRCode.scss | 21 +++++++++++++++++++++ 3 files changed, 22 insertions(+), 6 deletions(-) create mode 100644 res/css/views/elements/_QRCode.scss diff --git a/res/css/_components.scss b/res/css/_components.scss index 428a28ac3a..c05e2cabc6 100644 --- a/res/css/_components.scss +++ b/res/css/_components.scss @@ -108,6 +108,7 @@ @import "./views/elements/_ManageIntegsButton.scss"; @import "./views/elements/_PowerSelector.scss"; @import "./views/elements/_ProgressBar.scss"; +@import "./views/elements/_QRCode.scss"; @import "./views/elements/_ReplyThread.scss"; @import "./views/elements/_ResizeHandle.scss"; @import "./views/elements/_RichText.scss"; diff --git a/res/css/views/dialogs/_ShareDialog.scss b/res/css/views/dialogs/_ShareDialog.scss index 3c984bbd1b..e08469ec6d 100644 --- a/res/css/views/dialogs/_ShareDialog.scss +++ b/res/css/views/dialogs/_ShareDialog.scss @@ -67,12 +67,6 @@ limitations under the License. height: 256px; width: 256px; margin-right: 64px; - - img { - width: 100%; - height: 100%; - border-radius: 8px; - } } .mx_ShareDialog_social_container { diff --git a/res/css/views/elements/_QRCode.scss b/res/css/views/elements/_QRCode.scss new file mode 100644 index 0000000000..96d9114b54 --- /dev/null +++ b/res/css/views/elements/_QRCode.scss @@ -0,0 +1,21 @@ +/* +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_QRCode { + img { + border-radius: 8px; + } +} From 4c7d7032755f7a3e144efe696e5e60279b876fdf Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Thu, 14 May 2020 11:20:27 +0100 Subject: [PATCH 29/36] Reuse QRCode for VerificationQRCode and specify widths Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/components/views/dialogs/ShareDialog.tsx | 2 +- src/components/views/elements/QRCode.tsx | 9 ++--- .../elements/crypto/VerificationQRCode.js | 36 ++++--------------- 3 files changed, 13 insertions(+), 34 deletions(-) diff --git a/src/components/views/dialogs/ShareDialog.tsx b/src/components/views/dialogs/ShareDialog.tsx index 3924fd42ec..271f754fd2 100644 --- a/src/components/views/dialogs/ShareDialog.tsx +++ b/src/components/views/dialogs/ShareDialog.tsx @@ -221,7 +221,7 @@ export default class ShareDialog extends React.PureComponent {
- +
{ socials.map((social) => ( diff --git a/src/components/views/elements/QRCode.tsx b/src/components/views/elements/QRCode.tsx index 9c867058c0..f70ab48fa3 100644 --- a/src/components/views/elements/QRCode.tsx +++ b/src/components/views/elements/QRCode.tsx @@ -16,19 +16,21 @@ limitations under the License. import * as React from "react"; import {toDataURL, QRCodeSegment, QRCodeToDataURLOptions} from "qrcode"; +import classNames from "classnames"; import {_t} from "../../../languageHandler"; import Spinner from "./Spinner"; interface IProps extends QRCodeToDataURLOptions { data: string | QRCodeSegment[]; + className?: string; } const defaultOptions: QRCodeToDataURLOptions = { errorCorrectionLevel: 'L', // we want it as trivial-looking as possible }; -const QRCode: React.FC = ({data, ...options}) => { +const QRCode: React.FC = ({data, className, ...options}) => { const [dataUri, setUri] = React.useState(null); React.useEffect(() => { let cancelled = false; @@ -39,10 +41,9 @@ const QRCode: React.FC = ({data, ...options}) => { return () => { cancelled = true; }; - }, [data, options]); + }, [JSON.stringify(data), options]); - - return
+ return
{ dataUri ? {_t("QR : }
; }; diff --git a/src/components/views/elements/crypto/VerificationQRCode.js b/src/components/views/elements/crypto/VerificationQRCode.js index 08cd0c772e..3bbfb004c6 100644 --- a/src/components/views/elements/crypto/VerificationQRCode.js +++ b/src/components/views/elements/crypto/VerificationQRCode.js @@ -17,8 +17,7 @@ limitations under the License. import React from "react"; import PropTypes from "prop-types"; import {replaceableComponent} from "../../../../utils/replaceableComponent"; -import Spinner from "../Spinner"; -import * as QRCode from "qrcode"; +import QRCode from "../QRCode"; @replaceableComponent("views.elements.crypto.VerificationQRCode") export default class VerificationQRCode extends React.PureComponent { @@ -26,33 +25,12 @@ export default class VerificationQRCode extends React.PureComponent { qrCodeData: PropTypes.object.isRequired, }; - constructor(props) { - super(props); - this.state = { - dataUri: null, - }; - this.generateQrCode(); - } - - componentDidUpdate(prevProps): void { - if (JSON.stringify(this.props) === JSON.stringify(prevProps)) return; // No prop change - - this.generateQRCode(); - } - - async generateQrCode() { - // Now actually assemble the QR code's data URI - const uri = await QRCode.toDataURL([{data: this.props.qrCodeData.buffer, mode: 'byte'}], { - errorCorrectionLevel: 'L', // we want it as trivial-looking as possible - }); - this.setState({dataUri: uri}); - } - render() { - if (!this.state.dataUri) { - return
; - } - - return ; + return ( + + ); } } From edba204408483ad41db5abaeb04768e945a233a5 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Thu, 14 May 2020 13:04:30 +0100 Subject: [PATCH 30/36] accept and linkify local domains like those from mDNS Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/linkify-matrix.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/linkify-matrix.js b/src/linkify-matrix.js index ee9f703136..77c62ce84d 100644 --- a/src/linkify-matrix.js +++ b/src/linkify-matrix.js @@ -44,7 +44,7 @@ function matrixLinkify(linkify) { const S_HASH = S_START.jump(TT.POUND); const S_HASH_NAME = new linkify.parser.State(); const S_HASH_NAME_COLON = new linkify.parser.State(); - const S_HASH_NAME_COLON_DOMAIN = new linkify.parser.State(); + const S_HASH_NAME_COLON_DOMAIN = new linkify.parser.State(ROOMALIAS); const S_HASH_NAME_COLON_DOMAIN_DOT = new linkify.parser.State(); const S_ROOMALIAS = new linkify.parser.State(ROOMALIAS); const S_ROOMALIAS_COLON = new linkify.parser.State(); @@ -92,7 +92,7 @@ function matrixLinkify(linkify) { const S_AT = S_START.jump(TT.AT); const S_AT_NAME = new linkify.parser.State(); const S_AT_NAME_COLON = new linkify.parser.State(); - const S_AT_NAME_COLON_DOMAIN = new linkify.parser.State(); + const S_AT_NAME_COLON_DOMAIN = new linkify.parser.State(USERID); const S_AT_NAME_COLON_DOMAIN_DOT = new linkify.parser.State(); const S_USERID = new linkify.parser.State(USERID); const S_USERID_COLON = new linkify.parser.State(); @@ -138,7 +138,7 @@ function matrixLinkify(linkify) { const S_PLUS = S_START.jump(TT.PLUS); const S_PLUS_NAME = new linkify.parser.State(); const S_PLUS_NAME_COLON = new linkify.parser.State(); - const S_PLUS_NAME_COLON_DOMAIN = new linkify.parser.State(); + const S_PLUS_NAME_COLON_DOMAIN = new linkify.parser.State(GROUPID); const S_PLUS_NAME_COLON_DOMAIN_DOT = new linkify.parser.State(); const S_GROUPID = new linkify.parser.State(GROUPID); const S_GROUPID_COLON = new linkify.parser.State(); From 822b4b4fff2260a3be35c8afc0f54065f8d15298 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stanislav=20Luke=C5=A1?= Date: Thu, 14 May 2020 10:50:35 +0000 Subject: [PATCH 31/36] Translated using Weblate (Czech) Currently translated at 95.2% (2198 of 2308 strings) Translation: Riot Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/riot-web/matrix-react-sdk/cs/ --- src/i18n/strings/cs.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/cs.json b/src/i18n/strings/cs.json index 181a692b73..ddd5e5521b 100644 --- a/src/i18n/strings/cs.json +++ b/src/i18n/strings/cs.json @@ -2293,5 +2293,6 @@ "Opens chat with the given user": "Otevře konverzaci s tímto uživatelem", "Sends a message to the given user": "Pošle zprávu danému uživateli", "Waiting for your other session to verify…": "Čekáme na ověření od vaší druhé relace…", - "Verify all your sessions to ensure your account & messages are safe": "Ověřte všechny své relace, abyste zaručili, že jsou vaše zprávy a účet bezpečné" + "Verify all your sessions to ensure your account & messages are safe": "Ověřte všechny své relace, abyste zaručili, že jsou vaše zprávy a účet bezpečné", + "Verify the new login accessing your account: %(name)s": "Ověřte nové přihlášení na váš účet: %(name)s" } From 72e5e2e4b9f61be669532b38f56b169ccfbd8866 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Priit=20J=C3=B5er=C3=BC=C3=BCt?= Date: Thu, 14 May 2020 08:22:14 +0000 Subject: [PATCH 32/36] Translated using Weblate (Estonian) Currently translated at 46.8% (1079 of 2308 strings) Translation: Riot Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/riot-web/matrix-react-sdk/et/ --- src/i18n/strings/et.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/i18n/strings/et.json b/src/i18n/strings/et.json index 88301258a5..948055c35a 100644 --- a/src/i18n/strings/et.json +++ b/src/i18n/strings/et.json @@ -6,7 +6,7 @@ "Failed to verify email address: make sure you clicked the link in the email": "E-posti aadressi kontrollimine ei õnnestunud: palun vaata, et sa kindlasti klõpsisid saabunud kirjas olnud viidet", "The platform you're on": "Sinu kasutatav arvutisüsteem", "The version of Riot": "Riot'i versioon", - "Whether or not you're logged in (we don't record your username)": "Kas sa oled sisseloginud või mitte (me ei salvesta sinu kasutajanime)", + "Whether or not you're logged in (we don't record your username)": "Kas sa oled sisseloginud või mitte (me ei salvesta sinu kasutajanime)", "Your language of choice": "Sinu keelevalik", "Your homeserver's URL": "Sinu koduserveri aadress", "e.g. ": "näiteks ", From 91134601f6317fee286bfd94b560614de5b6e4d1 Mon Sep 17 00:00:00 2001 From: random Date: Thu, 14 May 2020 10:23:04 +0000 Subject: [PATCH 33/36] Translated using Weblate (Italian) Currently translated at 100.0% (2308 of 2308 strings) Translation: Riot Web/matrix-react-sdk Translate-URL: https://translate.riot.im/projects/riot-web/matrix-react-sdk/it/ --- src/i18n/strings/it.json | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/it.json b/src/i18n/strings/it.json index d891a06687..e79db1b061 100644 --- a/src/i18n/strings/it.json +++ b/src/i18n/strings/it.json @@ -2417,5 +2417,14 @@ "Verify your other session using one of the options below.": "Verifica la tua altra sessione usando una delle opzioni sotto.", "Invite someone using their name, username (like ), email address or share this room.": "Invita qualcuno usando il suo nome, nome utente (come ), indirizzo email o condividi questa stanza.", "Message deleted": "Messaggio eliminato", - "Message deleted by %(name)s": "Messaggio eliminato da %(name)s" + "Message deleted by %(name)s": "Messaggio eliminato da %(name)s", + "Opens chat with the given user": "Apre una chat con l'utente specificato", + "Sends a message to the given user": "Invia un messaggio all'utente specificato", + "Waiting for your other session to verify…": "In attesa che la tua altra sessione verifichi…", + "You've successfully verified your device!": "Hai verificato correttamente il tuo dispositivo!", + "To continue, use Single Sign On to prove your identity.": "Per continuare, usa Single Sign On per provare la tua identità.", + "Confirm to continue": "Conferma per continuare", + "Click the button below to confirm your identity.": "Clicca il pulsante sotto per confermare la tua identità.", + "Confirm encryption setup": "Conferma impostazione cifratura", + "Click the button below to confirm setting up encryption.": "Clicca il pulsante sotto per confermare l'impostazione della cifratura." } From e241da3af0d153d6b20b8de2d85c66f306419ffa Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Thu, 14 May 2020 15:35:38 +0100 Subject: [PATCH 34/36] Fix diff wrong route offsets because of skipping a node insert Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/utils/MessageDiffUtils.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/utils/MessageDiffUtils.js b/src/utils/MessageDiffUtils.js index de0d8fdc89..7398173fdd 100644 --- a/src/utils/MessageDiffUtils.js +++ b/src/utils/MessageDiffUtils.js @@ -77,8 +77,6 @@ function findRefNodes(root, route, isAddition) { const end = isAddition ? route.length - 1 : route.length; for (let i = 0; i < end; ++i) { refParentNode = refNode; - // Lists don't have appropriate child nodes we can use. - if (!refNode.childNodes[route[i]]) continue; refNode = refNode.childNodes[route[i]]; } return {refNode, refParentNode}; @@ -190,10 +188,11 @@ function renderDifferenceInDOM(originalRootNode, diff, diffMathPatch) { break; } case "addTextElement": { - if (diff.value !== "\n") { - const insNode = wrapInsertion(stringAsTextNode(diff.value)); - insertBefore(refParentNode, refNode, insNode); - } + // XXX: sometimes diffDOM says insert a newline when there shouldn't be one + // but we must insert the node anyway so that we don't break the route child IDs. + // See https://github.com/fiduswriter/diffDOM/issues/100 + const insNode = wrapInsertion(stringAsTextNode(diff.value !== "\n" ? diff.value : "")); + insertBefore(refParentNode, refNode, insNode); break; } // e.g. when changing a the href of a link, From cae28b48d6ed5de74e676e2a216637f5e73619d7 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Thu, 14 May 2020 09:43:34 -0600 Subject: [PATCH 35/36] Remove debugging that causes email addresses to load forever This was left in by accident for https://github.com/matrix-org/matrix-react-sdk/pull/4557 --- .../views/settings/tabs/user/GeneralUserSettingsTab.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/views/settings/tabs/user/GeneralUserSettingsTab.js b/src/components/views/settings/tabs/user/GeneralUserSettingsTab.js index 867982ad2b..0f82ce3a32 100644 --- a/src/components/views/settings/tabs/user/GeneralUserSettingsTab.js +++ b/src/components/views/settings/tabs/user/GeneralUserSettingsTab.js @@ -348,7 +348,7 @@ export default class GeneralUserSettingsTab extends React.Component { // For newer homeservers with separate 3PID add and bind methods (MSC2290), // there is no such concern, so we can always show the HS account 3PIDs. if (this.state.haveIdServer || this.state.serverSupportsSeparateAddAndBind === true) { - const emails = this.state.loading3pids || true + const emails = this.state.loading3pids ? : Date: Fri, 15 May 2020 13:32:12 +0100 Subject: [PATCH 36/36] Make email auth component fail better if server claims email isn't validated https://github.com/matrix-org/synapse/issues/7512 means that (at least) sometimes after clicking on the email validation link and being redirected to riot, the server will claim the email identity auth stage is still incomplete. This meant that we displayed the email identity UIA component but with an empty email address, because we don't know that in the new session. Work around this by assuming that if the email UIA component is being displayed but we don't have an email address input, the link has been clicked and we're just waiting for the poll. Also don't fire off an initial register request if we're already mid-UI-auth, because that's confusing and unnecessary. Also also remove unused requestingToken state. Fixes https://github.com/vector-im/riot-web/issues/13434 --- src/components/structures/auth/Registration.js | 13 +++++++++---- .../views/auth/InteractiveAuthEntryComponents.js | 14 +++++++------- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/src/components/structures/auth/Registration.js b/src/components/structures/auth/Registration.js index 7818496e71..a25b532447 100644 --- a/src/components/structures/auth/Registration.js +++ b/src/components/structures/auth/Registration.js @@ -243,10 +243,15 @@ export default createReactClass({ }); }; try { - await this._makeRegisterRequest({}); - // This should never succeed since we specified an empty - // auth object. - console.log("Expecting 401 from register request but got success!"); + // We do the first registration request ourselves to discover whether we need to + // do SSO instead. If we've already started the UI Auth process though, we don't + // need to. + if (!this.state.doingUIAuth) { + await this._makeRegisterRequest({}); + // This should never succeed since we specified an empty + // auth object. + console.log("Expecting 401 from register request but got success!"); + } } catch (e) { if (e.httpStatus === 401) { this.setState({ diff --git a/src/components/views/auth/InteractiveAuthEntryComponents.js b/src/components/views/auth/InteractiveAuthEntryComponents.js index 327451be17..655452fcee 100644 --- a/src/components/views/auth/InteractiveAuthEntryComponents.js +++ b/src/components/views/auth/InteractiveAuthEntryComponents.js @@ -412,14 +412,14 @@ export const EmailIdentityAuthEntry = createReactClass({ this.props.onPhaseChange(DEFAULT_PHASE); }, - getInitialState: function() { - return { - requestingToken: false, - }; - }, - render: function() { - if (this.state.requestingToken) { + // This component is now only displayed once the token has been requested, + // so we know the email has been sent. It can also get loaded after the user + // has clicked the validation link if the server takes a while to propagate + // the validation internally. If we're in the session spawned from clicking + // the validation link, we won't know the email address, so if we don't have it, + // assume that the link has been clicked and the server will realise when we poll. + if (this.props.inputs.emailAddress === undefined) { const Loader = sdk.getComponent("elements.Spinner"); return ; } else {