Compare commits

...

73 Commits

Author SHA1 Message Date
RiotRobot 2574841bf4 v1.5.7 2020-01-13 13:14:12 +00:00
RiotRobot fd6b6dc597 Prepare changelog for v1.5.7 2020-01-13 13:14:12 +00:00
RiotRobot 54a88a94b7 v1.5.7 2020-01-13 13:12:56 +00:00
RiotRobot 057f78fadc released react-sdk & js-dk 2020-01-13 13:12:29 +00:00
David Baker b4f210d68f Merge pull request #11830 from vector-im/dbkr/feature-presence-indicator_rel
Enable and document presence in room list feature flag
2020-01-13 12:41:56 +00:00
J. Ryan Stinnett 2471b803e8 Enable and document presence in room list feature flag
Part of https://github.com/vector-im/riot-web/issues/11799
2020-01-13 12:38:46 +00:00
RiotRobot f7637a0df7 v1.5.7-rc.2 2020-01-08 11:25:06 +00:00
RiotRobot 275b0555bd Prepare changelog for v1.5.7-rc.2 2020-01-08 11:25:05 +00:00
RiotRobot 5d636baae3 v1.5.7-rc.2 2020-01-08 11:23:46 +00:00
RiotRobot a1b14751e5 bump to matrix-react-sdk rc.2 2020-01-08 11:22:50 +00:00
RiotRobot 5f1ef6dfb8 v1.5.7-rc.1 2020-01-06 16:26:46 +00:00
RiotRobot 14620a5763 Prepare changelog for v1.5.7-rc.1 2020-01-06 16:26:45 +00:00
RiotRobot 66b40d8c61 v1.5.7-rc.1 2020-01-06 16:25:40 +00:00
RiotRobot 1de2fe5e27 Merge remote-tracking branch 'origin/develop' into release-v1.5.7 2020-01-06 16:22:33 +00:00
David Baker 52ca0908e2 Fix the build
Run `yarn install` in the js-sdkc and react-sdk installs. We were
avoiding this before due to using babel dependencies from riot-web
ro build js-sdk, which worked as long as the installed babel versions
and plugins were identical. js-sdk has now been upgraded to babel 7
and so that no longer worked.

This will probably cause react-sdk & js-sdk to be built an
unnecessary number of times.
2020-01-06 14:55:38 +00:00
RiotRobot f7618e3c73 react-sdk & js-sdk rc.1 2020-01-06 14:05:47 +00:00
David Baker 8b3df0d793 Bump electron version 2020-01-06 13:09:10 +00:00
David Baker 1f1c8d07c3 Merge pull request #11784 from RiotTranslateBot/weblate-riot-web-riot-web
Update from Weblate
2020-01-06 10:29:38 +00:00
Weblate 06dc5aa410 Merge branch 'origin/develop' into Weblate. 2020-01-06 00:03:33 +00:00
Travis Ralston 83e5ebafd7 Merge pull request #11778 from vector-im/hs/feature_bridge_state
Add docs for feature_bridge_state flag
2020-01-05 17:03:27 -07:00
Will Hunt 50fe3109c0 Add feature_bridge_state 2020-01-05 15:47:14 +00:00
Will Hunt d7607df1b1 Add feature_bridge_state to config 2020-01-05 15:42:09 +00:00
Weblate 23e9c16ced Merge branch 'origin/develop' into Weblate. 2020-01-03 17:30:38 +00:00
Travis Ralston 024c019c5b Merge pull request #11758 from vector-im/travis/ftue/user-lists/1-initial
Add docs for feature_ftue_dms flag
2020-01-03 10:30:32 -07:00
Travis Ralston 514e9b754a Add FTUE User Lists to develop config 2020-01-03 10:25:09 -07:00
Travis Ralston 16e384172c Add docs for feature_ftue_dms flag
This should hopefully be short-lived.

For https://github.com/matrix-org/matrix-react-sdk/pull/3792
2020-01-02 17:44:58 -07:00
Weblate 9b8819eb08 Merge branch 'origin/develop' into Weblate. 2020-01-02 15:51:13 +00:00
Travis Ralston b0255683e9 Merge pull request #11721 from vector-im/travis/fix-version
Fix version file for Docker images
2020-01-02 08:51:05 -07:00
catborise 7a285ead7e Translated using Weblate (Turkish)
Currently translated at 100.0% (23 of 23 strings)

Translation: Riot Web/riot-web
Translate-URL: https://translate.riot.im/projects/riot-web/riot-web/tr/
2019-12-28 20:47:40 +00:00
Valeh Farzaliyev e25fee6f99 Translated using Weblate (Azerbaijani)
Currently translated at 100.0% (23 of 23 strings)

Translation: Riot Web/riot-web
Translate-URL: https://translate.riot.im/projects/riot-web/riot-web/az/
2019-12-25 22:29:58 +00:00
Valeh Farzaliyev 01f14a7211 Translated using Weblate (Azerbaijani)
Currently translated at 100.0% (23 of 23 strings)

Translation: Riot Web/riot-web
Translate-URL: https://translate.riot.im/projects/riot-web/riot-web/az/
2019-12-25 22:29:33 +00:00
Valeh Farzaliyev e993eee97c Translated using Weblate (Azerbaijani)
Currently translated at 100.0% (23 of 23 strings)

Translation: Riot Web/riot-web
Translate-URL: https://translate.riot.im/projects/riot-web/riot-web/az/
2019-12-25 22:28:51 +00:00
Valeh Farzaliyev 7744dcc508 Translated using Weblate (Azerbaijani)
Currently translated at 100.0% (23 of 23 strings)

Translation: Riot Web/riot-web
Translate-URL: https://translate.riot.im/projects/riot-web/riot-web/az/
2019-12-25 22:28:21 +00:00
Valeh Farzaliyev f98ac9dda1 Translated using Weblate (Azerbaijani)
Currently translated at 100.0% (23 of 23 strings)

Translation: Riot Web/riot-web
Translate-URL: https://translate.riot.im/projects/riot-web/riot-web/az/
2019-12-25 22:27:48 +00:00
Valeh Farzaliyev af76adf866 Translated using Weblate (Azerbaijani)
Currently translated at 100.0% (23 of 23 strings)

Translation: Riot Web/riot-web
Translate-URL: https://translate.riot.im/projects/riot-web/riot-web/az/
2019-12-25 22:27:25 +00:00
ferhad.necef 1c0bb1101b Translated using Weblate (Azerbaijani)
Currently translated at 100.0% (23 of 23 strings)

Translation: Riot Web/riot-web
Translate-URL: https://translate.riot.im/projects/riot-web/riot-web/az/
2019-12-25 22:27:25 +00:00
Travis Ralston 3389f7afc9 Fix version file for Docker images
Fixes https://github.com/vector-im/riot-web/issues/11642
2019-12-24 18:34:40 -07:00
catborise 262b5a56ca Translated using Weblate (Turkish)
Currently translated at 95.7% (22 of 23 strings)

Translation: Riot Web/riot-web
Translate-URL: https://translate.riot.im/projects/riot-web/riot-web/tr/
2019-12-22 14:47:13 +00:00
XoseM 15bded694b Translated using Weblate (Galician)
Currently translated at 100.0% (23 of 23 strings)

Translation: Riot Web/riot-web
Translate-URL: https://translate.riot.im/projects/riot-web/riot-web/gl/
2019-12-22 14:47:12 +00:00
Michael Telatynski 443d3812d1 Merge pull request #11690 from vector-im/t3chguy/context_menu_accelerators
Add accelerators to context menu options like cut&paste in electron
2019-12-19 19:27:24 +00:00
Damir Jelić 6ead268ef0 electron-main: Provide a better error message if Seshat isn't installed.
This closes #11637.
2019-12-19 12:45:32 +01:00
Michael Telatynski 5fbe74e20d Add accelerators to context menu options like cut&paste in electron 2019-12-19 11:16:33 +00:00
David Baker 7f451d2635 Merge pull request #11672 from RiotTranslateBot/weblate-riot-web-riot-web
Update from Weblate
2019-12-16 10:02:14 +00:00
Weblate ecb386017f Merge branch 'origin/develop' into Weblate. 2019-12-13 14:56:59 +00:00
Michael Telatynski 4be0ff7095 Merge pull request #11662 from vector-im/t3chguy/remove_bluebird_import
Remove babel-plugin-transform-async-to-bluebird
2019-12-13 14:56:52 +00:00
Michael Telatynski 6f06716954 Regenerate yarn.lock 2019-12-13 13:10:30 +00:00
Michael Telatynski f6db2ed8dd Remove babel-plugin-transform-async-to-bluebird 2019-12-13 13:08:29 +00:00
Weblate b537016bfb Merge branch 'origin/develop' into Weblate. 2019-12-12 17:36:51 +00:00
Travis Ralston e5fcbd1b05 Merge pull request #11658 from vector-im/travis/official-support
Clarify which versions of what we support
2019-12-12 10:36:44 -07:00
Travis Ralston b23318be8d Clarify which versions of what we support 2019-12-12 10:34:22 -07:00
Weblate 65c8c8b52a Merge branch 'origin/develop' into Weblate. 2019-12-11 15:57:29 +00:00
J. Ryan Stinnett 0930424406 Further attempt to flip to develop 2019-12-11 15:56:59 +00:00
Weblate 4ae5559a59 Merge branch 'origin/develop' into Weblate. 2019-12-11 10:37:51 +00:00
Ganzo DG df3517d7bf Translated using Weblate (Mongolian)
Currently translated at 100.0% (23 of 23 strings)

Translation: Riot Web/riot-web
Translate-URL: https://translate.riot.im/projects/riot-web/riot-web/mn/
2019-12-11 10:37:50 +00:00
J. Ryan Stinnett dd9eda8f97 Flip back to develop 2019-12-11 10:37:36 +00:00
J. Ryan Stinnett eb42793ad5 Remove bluebird transform as regular dep 2019-12-11 10:36:24 +00:00
Ganzo DG a30ad77d10 Added translation using Weblate (Mongolian) 2019-12-11 05:05:09 +00:00
David Baker 26eff8d372 Merge pull request #11631 from vector-im/dbkr/remove_origin_migrator
Remove the code that calls the origin migrator
2019-12-09 15:18:20 +00:00
David Baker 685c1ba276 Revert accidental commit 2019-12-09 15:02:00 +00:00
David Baker 04402b325a Remove more origin migrator bits 2019-12-09 15:01:10 +00:00
David Baker bd57ff793f Remove rest of the origin migrator 2019-12-09 14:54:36 +00:00
David Baker 33284302b9 try & explain better 2019-12-09 13:44:42 +00:00
David Baker 89d622b8b2 Remove the code that calls the origin migrator
This will have done its job now, everyone's had long enough to
install a newer version of Riot and migrate to the new origin.

Laves the code on the backend that handles it for the time being,
as per comment.
2019-12-09 11:57:43 +00:00
RiotRobot b7f6d7b102 Merge branch 'master' into develop 2019-12-09 11:43:27 +00:00
David Baker 7776b19339 Merge pull request #11617 from vector-im/dbkr/yarn_upgrade_dec19_2
yarn upgrade
2019-12-06 16:12:28 +00:00
David Baker 60467ffd02 yarn upgrade
attempt 2
2019-12-06 15:58:44 +00:00
David Baker 364e79c673 Merge pull request #11616 from vector-im/dbkr/why_are_you_still_here_draft_js
Remove draft-js dependency
2019-12-06 15:55:24 +00:00
David Baker c063cec4d7 remove draft CSS reference 2019-12-06 13:44:51 +00:00
David Baker e2b1a86a29 Remove draft-js dependency
...which for some reason was still kicking around
2019-12-06 13:33:30 +00:00
J. Ryan Stinnett 1d49544238 Remove bluebird transform as regular dep 2019-12-06 12:39:29 +00:00
J. Ryan Stinnett 70d2adb9e2 Move extract-text-webpack-plugin to dev dep 2019-12-06 12:36:58 +00:00
J. Ryan Stinnett 8ad1bd1501 Move bluebird transform to a dev dependency 2019-12-04 16:02:55 +00:00
David Baker f93b7a1675 Add transform-async-to-bluebird
Add babel plugin until the js-sdk stop using bluebird, since we
force-recompile the js-sdk so we need the plugin installed for that
to work (and it's a devDependency on js-sdk so doesn't otherwise get
installed).
2019-12-04 14:25:21 +00:00
23 changed files with 684 additions and 1110 deletions
+42
View File
@@ -1,3 +1,45 @@
Changes in [1.5.7](https://github.com/vector-im/riot-web/releases/tag/v1.5.7) (2020-01-13)
==========================================================================================
[Full Changelog](https://github.com/vector-im/riot-web/compare/v1.5.7-rc.2...v1.5.7)
* Enable and document presence in room list feature flag
[\#11830](https://github.com/vector-im/riot-web/pull/11830)
Changes in [1.5.7-rc.2](https://github.com/vector-im/riot-web/releases/tag/v1.5.7-rc.2) (2020-01-08)
====================================================================================================
[Full Changelog](https://github.com/vector-im/riot-web/compare/v1.5.7-rc.1...v1.5.7-rc.2)
* Update to react-sdk rc.2 to fix build
Changes in [1.5.7-rc.1](https://github.com/vector-im/riot-web/releases/tag/v1.5.7-rc.1) (2020-01-06)
====================================================================================================
[Full Changelog](https://github.com/vector-im/riot-web/compare/v1.5.6...v1.5.7-rc.1)
* Update from Weblate
[\#11784](https://github.com/vector-im/riot-web/pull/11784)
* Add docs for feature_bridge_state flag
[\#11778](https://github.com/vector-im/riot-web/pull/11778)
* Add docs for feature_ftue_dms flag
[\#11758](https://github.com/vector-im/riot-web/pull/11758)
* Fix version file for Docker images
[\#11721](https://github.com/vector-im/riot-web/pull/11721)
* Add accelerators to context menu options like cut&paste in electron
[\#11690](https://github.com/vector-im/riot-web/pull/11690)
* electron-main: Provide a better error message if Seshat isn't installed.
[\#11691](https://github.com/vector-im/riot-web/pull/11691)
* Update from Weblate
[\#11672](https://github.com/vector-im/riot-web/pull/11672)
* Remove babel-plugin-transform-async-to-bluebird
[\#11662](https://github.com/vector-im/riot-web/pull/11662)
* Clarify which versions of what we support
[\#11658](https://github.com/vector-im/riot-web/pull/11658)
* Remove the code that calls the origin migrator
[\#11631](https://github.com/vector-im/riot-web/pull/11631)
* yarn upgrade
[\#11617](https://github.com/vector-im/riot-web/pull/11617)
* Remove draft-js dependency
[\#11616](https://github.com/vector-im/riot-web/pull/11616)
Changes in [1.5.6](https://github.com/vector-im/riot-web/releases/tag/v1.5.6) (2019-12-09)
==========================================================================================
[Full Changelog](https://github.com/vector-im/riot-web/compare/v1.5.6-rc.1...v1.5.6)
+3 -2
View File
@@ -3,8 +3,9 @@ Riot
Riot (formerly known as Vector) is a Matrix web client built using the [Matrix React SDK](https://github.com/matrix-org/matrix-react-sdk).
Riot is officially supported on the web in modern versions of Chrome, Firefox, and Safari. Other browsers may work, however
official support is not provided. For accessing Riot on an Android or iOS device, check out [riot-android](https://github.com/vector-im/riot-android)
Riot is officially supported on the web in the last 2 major versions of Chrome, Firefox, and Safari. For Riot on Desktop (electron),
only the officially published app is supported. Other browsers and packages may work, however official support is not provided.
For accessing Riot on an Android or iOS device, check out [riot-android](https://github.com/vector-im/riot-android)
and [riot-ios](https://github.com/vector-im/riot-ios) - riot-web does not support mobile devices.
Getting Started
+19
View File
@@ -81,3 +81,22 @@ that downloads, stores, and indexes room messages for E2E encrypted rooms.
The existing search will transparently work for encrypted rooms just like it
does for non-encrypted.
## New DM invite dialog (`feature_ftue_dms`)
An improved dialog for inviting users. Once finished, this will replace both the
DM creation dialog and the 'invite user' dialog. This is a work in progress and
as such not all functionality may be present until the feature replaces today's
UX.
## Bridge info tab (`feature_bridge_state`)
Adds a "Bridge Info" tab to the Room Settings dialog, if a compatible bridge is
present in the room. The Bridge info tab pulls information from the `m.bridge` state event ([MSC2346](https://github.com/matrix-org/matrix-doc/pull/2346)). Since the feature is based upon a MSC, most
bridges are not expected to be compatible, and users should not rely on this
tab as the single source of truth just yet.
## Presence indicator in room list (`feature_presence_in_room_list`)
This adds a presence indicator in the room list next to DM rooms where the other
person is online.
+1 -1
View File
@@ -2,7 +2,7 @@
"name": "riot-web",
"productName": "Riot",
"main": "src/electron-main.js",
"version": "1.5.6",
"version": "1.5.7",
"description": "A feature-rich client for Matrix.org",
"author": "New Vector Ltd.",
"dependencies": {
+6 -19
View File
@@ -35,7 +35,6 @@ const tray = require('./tray');
const vectorMenu = require('./vectormenu');
const webContentsHandler = require('./webcontents-handler');
const updater = require('./updater');
const { migrateFromOldOrigin } = require('./originMigrator');
const windowStateKeeper = require('electron-window-state');
const Store = require('electron-store');
@@ -48,7 +47,11 @@ let Seshat = null;
try {
Seshat = require('matrix-seshat');
} catch (e) {
console.warn("seshat unavailable", e);
if (e.code === "MODULE_NOT_FOUND") {
console.log("Seshat isn't installed, event indexing is disabled.");
} else {
console.warn("Seshat unexpected error:", e);
}
}
if (argv["help"]) {
@@ -64,11 +67,6 @@ if (argv["help"]) {
app.exit();
}
// boolean flag set whilst we are doing one-time origin migration
// We only serve the origin migration script while we're actually
// migrating to mitigate any risk of it being used maliciously.
let migratingOrigin = false;
if (argv['profile-dir']) {
app.setPath('userData', argv['profile-dir']);
} else if (argv['profile']) {
@@ -231,11 +229,6 @@ ipcMain.on('ipcCall', async function(ev, payload) {
mainWindow.focus();
}
break;
case 'origin_migrate':
migratingOrigin = true;
await migrateFromOldOrigin();
migratingOrigin = false;
break;
case 'getConfig':
ret = vectorConfig;
break;
@@ -477,13 +470,7 @@ app.on('ready', () => {
let baseDir;
// first part of the path determines where we serve from
if (migratingOrigin && target[1] === 'origin_migrator_dest') {
// the origin migrator destination page
// (only the destination script needs to come from the
// custom protocol: the source part is loaded from a
// file:// as that's the origin we're migrating from).
baseDir = __dirname + "/../../origin_migrator/dest";
} else if (target[1] === 'webapp') {
if (target[1] === 'webapp') {
baseDir = __dirname + "/../../webapp";
} else {
callback({error: -6}); // FILE_NOT_FOUND
-72
View File
@@ -1,72 +0,0 @@
/*
Copyright 2018 New Vector Ltd
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
const { BrowserWindow, ipcMain } = require('electron');
const path = require('path');
async function migrateFromOldOrigin() {
console.log("Attempting to migrate data between origins");
// We can use the same preload script: we just need ipcRenderer exposed
const preloadScript = path.normalize(`${__dirname}/preload.js`);
await new Promise(resolve => {
const migrateWindow = new BrowserWindow({
show: false,
webPreferences: {
preload: preloadScript,
nodeIntegration: false,
sandbox: true,
enableRemoteModule: false,
webgl: false,
},
});
const onOriginMigrationComplete = (e, success, sentSummary, storedSummary) => {
// we use once but we'll only get one of these events,
// so remove the listener for the other one
ipcMain.removeListener('origin_migration_nodata', onOriginMigrationNoData);
if (success) {
console.log("Origin migration completed successfully!");
} else {
console.error("Origin migration failed!");
}
console.error("Data sent", sentSummary);
console.error("Data stored", storedSummary);
migrateWindow.close();
resolve();
};
const onOriginMigrationNoData = (e, success, sentSummary, storedSummary) => {
ipcMain.removeListener('origin_migration_complete', onOriginMigrationComplete);
console.log("No session to migrate from old origin");
migrateWindow.close();
resolve();
};
ipcMain.once('origin_migration_complete', onOriginMigrationComplete);
ipcMain.once('origin_migration_nodata', onOriginMigrationNoData);
// Normalise the path because in the distribution, __dirname will be inside the
// electron asar.
const sourcePagePath = path.normalize(__dirname + '/../../origin_migrator/source.html');
console.log("Loading path: " + sourcePagePath);
migrateWindow.loadURL('file://' + sourcePagePath);
});
}
module.exports = {
migrateFromOldOrigin,
};
+8 -4
View File
@@ -56,7 +56,7 @@ function onLinkContextMenu(ev, params) {
let addSaveAs = false;
if (params.mediaType && params.mediaType === 'image' && !url.startsWith('file://')) {
popupMenu.append(new MenuItem({
label: 'Copy image',
label: '&Copy image',
click() {
if (url.startsWith('data:')) {
clipboard.writeImage(nativeImage.createFromDataURL(url));
@@ -76,14 +76,14 @@ function onLinkContextMenu(ev, params) {
// Special-case e-mail URLs to strip the `mailto:` like modern browsers do
if (url.startsWith(MAILTO_PREFIX)) {
popupMenu.append(new MenuItem({
label: 'Copy email address',
label: 'Copy email &address',
click() {
clipboard.writeText(url.substr(MAILTO_PREFIX.length));
},
}));
} else {
popupMenu.append(new MenuItem({
label: 'Copy link address',
label: 'Copy link &address',
click() {
clipboard.writeText(url);
},
@@ -93,7 +93,7 @@ function onLinkContextMenu(ev, params) {
if (addSaveAs) {
popupMenu.append(new MenuItem({
label: 'Save image as...',
label: 'Sa&ve image as...',
click() {
const targetFileName = params.titleText || "image.png";
const filePath = dialog.showSaveDialog({
@@ -128,18 +128,22 @@ function onLinkContextMenu(ev, params) {
function _CutCopyPasteSelectContextMenus(params) {
return [{
role: 'cut',
label: 'Cu&t',
enabled: params.editFlags.canCut,
}, {
role: 'copy',
label: '&Copy',
enabled: params.editFlags.canCopy,
}, {
role: 'paste',
label: '&Paste',
enabled: params.editFlags.canPaste,
}, {
role: 'pasteandmatchstyle',
enabled: params.editFlags.canPaste,
}, {
role: 'selectall',
label: "Select &All",
enabled: params.editFlags.canSelectAll,
}];
}
File diff suppressed because one or more lines are too long
-6
View File
@@ -1,6 +0,0 @@
<html>
<body>
<script src="browser-matrix.min.js"></script>
<script src="dest.js"></script>
</body>
</html>
-125
View File
@@ -1,125 +0,0 @@
/*
Copyright 2018 New Vector Ltd
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
const SOURCE_ORIGIN = 'file://';
const IndexedDBCryptoStore = window.matrixcs.IndexedDBCryptoStore;
const cryptoStore = new IndexedDBCryptoStore(window.indexedDB, 'matrix-js-sdk:crypto');
let accountStored = 0;
let sessionsStored = 0;
let inboundGroupSessionsStored = 0;
let deviceDataStored = 0;
let roomsStored = 0;
let localStorageKeysStored = 0;
const promises = [];
async function onMessage(e) {
if (e.origin !== SOURCE_ORIGIN) return;
const data = e.data.data; // bleh, naming clash
switch (e.data.cmd) {
case 'init':
// start with clean stores before we migrate data in
window.localStorage.clear();
await cryptoStore.deleteAllData();
e.source.postMessage({
cmd: 'initOK',
}, SOURCE_ORIGIN);
break;
case 'storeAccount':
promises.push(cryptoStore.doTxn(
'readwrite', [IndexedDBCryptoStore.STORE_ACCOUNT],
(txn) => {
cryptoStore.storeAccount(txn, data);
},
).then(() => {
++accountStored;
}));
break;
case 'storeSessions':
promises.push(cryptoStore.doTxn(
'readwrite', [IndexedDBCryptoStore.STORE_SESSIONS],
(txn) => {
for (const sess of data) {
cryptoStore.storeEndToEndSession(sess.deviceKey, sess.sessionId, sess, txn);
}
},
).then(() => {
sessionsStored += data.length;
}));
break;
case 'storeInboundGroupSessions':
promises.push(cryptoStore.doTxn(
'readwrite', [IndexedDBCryptoStore.STORE_INBOUND_GROUP_SESSIONS],
(txn) => {
for (const sess of data) {
cryptoStore.addEndToEndInboundGroupSession(
sess.senderKey, sess.sessionId, sess.sessionData, txn,
);
}
},
).then(() => {
inboundGroupSessionsStored += data.length;
}));
break;
case 'storeDeviceData':
promises.push(cryptoStore.doTxn(
'readwrite', [IndexedDBCryptoStore.STORE_DEVICE_DATA],
(txn) => {
cryptoStore.storeEndToEndDeviceData(data, txn);
},
).then(() => {
++deviceDataStored;
}));
break;
case 'storeRooms':
promises.push(cryptoStore.doTxn(
'readwrite', [IndexedDBCryptoStore.STORE_ROOMS],
(txn) => {
for (const [roomId, roomInfo] of Object.entries(data)) {
cryptoStore.storeEndToEndRoom(roomId, roomInfo, txn);
}
},
).then(() => {
++roomsStored;
}));
break;
case 'storeLocalStorage':
window.localStorage.setItem(data.key, data.val);
++localStorageKeysStored;
break;
case 'getSummary':
await Promise.all(promises);
e.source.postMessage({
cmd: 'summary',
data: {
accountStored,
sessionsStored,
inboundGroupSessionsStored,
deviceDataStored,
roomsStored,
localStorageKeysStored,
},
}, SOURCE_ORIGIN);
break;
}
}
window.addEventListener('message', onMessage);
-7
View File
@@ -1,7 +0,0 @@
<html>
<body>
<script src="dest/browser-matrix.min.js"></script>
<script src="source.js"></script>
<iframe name="dest" src="vector://vector/origin_migrator_dest/dest.html" onload="doMigrate()"></iframe>
</body>
</html>
-210
View File
@@ -1,210 +0,0 @@
/*
Copyright 2018 New Vector Ltd
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
const TARGET_ORIGIN = 'vector://vector';
const BATCH_SIZE = 500;
let destFrame;
let initResolver = null;
let getSummaryResolver = null;
function onMessage(e) {
if (e.origin !== TARGET_ORIGIN) return;
if (e.data.cmd === 'initOK' && initResolver) {
initResolver();
initResolver = null;
} else if (e.data.cmd === 'summary' && getSummaryResolver) {
getSummaryResolver(e.data.data);
getSummaryResolver = null;
}
}
async function initDestFrame() {
return new Promise(resolve => {
initResolver = resolve;
destFrame.postMessage({
cmd: 'init',
}, TARGET_ORIGIN);
});
}
async function getSummary() {
return new Promise(resolve => {
getSummaryResolver = resolve;
destFrame.postMessage({
cmd: 'getSummary',
}, TARGET_ORIGIN);
});
}
async function doMigrate() {
let accountSent = 0;
let sessionsSent = 0;
let inboundGroupSessionsSent = 0;
let deviceDataSent = 0;
let roomsSent = 0;
let localStorageKeysSent = 0;
if (!window.ipcRenderer) {
console.error("ipcRenderer not found");
return;
}
if (window.localStorage.getItem('mx_user_id') === null) {
window.ipcRenderer.send("origin_migration_nodata");
return;
}
destFrame = window.parent.frames.dest;
await initDestFrame();
const IndexedDBCryptoStore = window.matrixcs.IndexedDBCryptoStore;
const cryptoStore = new IndexedDBCryptoStore(window.indexedDB, 'matrix-js-sdk:crypto');
await cryptoStore.doTxn(
'readonly', [IndexedDBCryptoStore.STORE_ACCOUNT],
(txn) => {
cryptoStore.getAccount(txn, (account) => {
destFrame.postMessage({
cmd: 'storeAccount',
data: account,
}, TARGET_ORIGIN);
++accountSent;
});
},
);
await cryptoStore.doTxn(
'readonly', [IndexedDBCryptoStore.STORE_SESSIONS],
(txn) => {
let sessBatch = [];
cryptoStore.getAllEndToEndSessions(txn, (sessInfo) => {
if (sessInfo) {
++sessionsSent;
sessBatch.push(sessInfo);
}
if (sessBatch.length >= BATCH_SIZE || sessInfo === null) {
destFrame.postMessage({
cmd: 'storeSessions',
data: sessBatch,
}, TARGET_ORIGIN);
sessBatch = [];
}
});
},
);
await cryptoStore.doTxn(
'readonly', [IndexedDBCryptoStore.STORE_INBOUND_GROUP_SESSIONS],
(txn) => {
let sessBatch = [];
cryptoStore.getAllEndToEndInboundGroupSessions(txn, (sessInfo) => {
if (sessInfo) {
++inboundGroupSessionsSent;
sessBatch.push(sessInfo);
}
if (sessBatch.length >= BATCH_SIZE || sessInfo === null) {
destFrame.postMessage({
cmd: 'storeInboundGroupSessions',
data: sessBatch,
}, TARGET_ORIGIN);
sessBatch = [];
}
});
},
);
await cryptoStore.doTxn(
'readonly', [IndexedDBCryptoStore.STORE_DEVICE_DATA],
(txn) => {
cryptoStore.getEndToEndDeviceData(txn, (deviceData) => {
destFrame.postMessage({
cmd: 'storeDeviceData',
data: deviceData,
}, TARGET_ORIGIN);
++deviceDataSent;
});
},
);
await cryptoStore.doTxn(
'readonly', [IndexedDBCryptoStore.STORE_ROOMS],
(txn) => {
cryptoStore.getEndToEndRooms(txn, (rooms) => {
destFrame.postMessage({
cmd: 'storeRooms',
data: rooms,
}, TARGET_ORIGIN);
++roomsSent;
});
},
);
// we don't bother migrating;
// * sync data (we can just initialsync again)
// * logs
// * key requests (worst case they'll just be re-sent)
// * sessions needing backup (feature isn't available on Electron)
for (let i = 0; i < window.localStorage.length; ++i) {
const key = window.localStorage.key(i);
const val = window.localStorage.getItem(key);
destFrame.postMessage({
cmd: 'storeLocalStorage',
data: { key, val },
}, TARGET_ORIGIN);
++localStorageKeysSent;
}
const summary = await getSummary();
let success = false;
if (
summary.accountStored === accountSent &&
summary.sessionsStored === sessionsSent &&
summary.inboundGroupSessionsStored === inboundGroupSessionsSent &&
summary.deviceDataStored === deviceDataSent &&
summary.roomsStored === roomsSent &&
summary.localStorageKeysStored === localStorageKeysSent
) {
success = true;
window.localStorage.clear();
await cryptoStore.deleteAllData();
// we don't bother migrating them, but also blow away the sync & logs db,
// otherwise they'll just hang about taking up space
await new Promise(resolve => {
const req = window.indexedDB.deleteDatabase('matrix-js-sdk:riot-web-sync');
req.onsuccess = resolve;
req.onerror = resolve;
});
await new Promise(resolve => {
const req = window.indexedDB.deleteDatabase('logs');
req.onsuccess = resolve;
req.onerror = resolve;
});
}
window.ipcRenderer.send("origin_migration_complete", success, {
accountSent, sessionsSent, inboundGroupSessionsSent,
deviceDataSent, roomsSent, localStorageKeysSent,
}, summary);
}
window.addEventListener('message', onMessage);
+7 -9
View File
@@ -2,7 +2,7 @@
"name": "riot-web",
"productName": "Riot",
"main": "electron_app/src/electron-main.js",
"version": "1.5.6",
"version": "1.5.7",
"description": "A feature-rich client for Matrix.org",
"author": "New Vector Ltd.",
"repository": {
@@ -31,6 +31,7 @@
"i18n": "matrix-gen-i18n",
"prunei18n": "matrix-prune-i18n",
"diff-i18n": "cp src/i18n/strings/en_EN.json src/i18n/strings/en_EN_orig.json && yarn i18n && node scripts/compare-file.js src/i18n/strings/en_EN_orig.json src/i18n/strings/en_EN.json",
"postinstall": "node scripts/yarn-sub.js matrix-js-sdk install && node scripts/yarn-sub.js matrix-react-sdk install",
"build:res": "node scripts/copy-res.js",
"build:modernizr": "modernizr -c .modernizr.json -d src/vector/modernizr.js",
"build:compile": "yarn reskindex && babel --source-maps -d lib src",
@@ -64,18 +65,15 @@
"test-multi": "karma start"
},
"dependencies": {
"babel-plugin-transform-async-to-bluebird": "^1.1.1",
"babel-polyfill": "^6.26.0",
"babel-runtime": "^6.26.0",
"browser-request": "^0.3.3",
"draft-js": "^0.11.0-alpha",
"extract-text-webpack-plugin": "^4.0.0-beta.0",
"favico.js": "^0.3.10",
"gemini-scrollbar": "github:matrix-org/gemini-scrollbar#91e1e566",
"gfm.css": "^1.1.2",
"highlight.js": "^9.13.1",
"matrix-js-sdk": "2.4.6",
"matrix-react-sdk": "1.7.5",
"matrix-js-sdk": "3.0.0",
"matrix-react-sdk": "1.7.6",
"modernizr": "^3.6.0",
"olm": "https://packages.matrix.org/npm/olm/olm-3.1.4.tgz",
"postcss-easings": "^2.0.0",
@@ -120,6 +118,7 @@
"eslint-plugin-react": "^7.11.1",
"eslint-plugin-react-hooks": "^2.2.0",
"expect": "^1.16.0",
"extract-text-webpack-plugin": "^4.0.0-beta.0",
"file-loader": "^3.0.1",
"fs-extra": "^0.30.0",
"html-webpack-plugin": "^3.2.0",
@@ -156,7 +155,7 @@
},
"build": {
"appId": "im.riot.app",
"electronVersion": "7.1.3",
"electronVersion": "7.1.7",
"files": [
"node_modules/**",
"src/**"
@@ -166,8 +165,7 @@
"from": "electron_app/img",
"to": "img"
},
"webapp/**/*",
"origin_migrator/**/*"
"webapp/**/*"
],
"linux": {
"target": "deb",
+4 -1
View File
@@ -21,7 +21,10 @@
"feature_mjolnir": "labs",
"feature_dm_verification": "labs",
"feature_cross_signing": "labs",
"feature_event_indexing": "labs"
"feature_event_indexing": "labs",
"feature_ftue_dms": "labs",
"feature_bridge_state": "labs",
"feature_presence_in_room_list": "labs"
},
"welcomeUserId": "@riot-bot:matrix.org",
"piwik": {
+4 -2
View File
@@ -2,14 +2,16 @@
set -ex
TAG=$(git describe --dirty --tags)
TAG=$(git describe --tags)
BRANCH=$(git rev-parse --abbrev-ref HEAD)
DIST_VERSION=$TAG
# If the branch comes out as HEAD then we're probably checked out to a tag, so if the thing is *not*
# coming out as HEAD then we're on a branch. When we're on a branch, we want to resolve ourselves to
# a few SHAs rather than a version.
if [ $BRANCH != 'HEAD' ]
# Docker Hub doesn't always check out the tag and sometimes checks out the branch, so we should look
# for an appropriately tagged branch as well (heads/v1.2.3).
if [ $BRANCH != 'HEAD' && $BRANCH != 'heads/v*' ]
then
REACT_SHA=$(cd node_modules/matrix-react-sdk; git rev-parse --short=12 HEAD)
JSSDK_SHA=$(cd node_modules/matrix-js-sdk; git rev-parse --short=12 HEAD)
+13 -5
View File
@@ -2,7 +2,7 @@
"Riot Desktop on %(platformName)s": "%(platformName)s-da Riot Desktop",
"Unknown device": "Naməlum qurğu",
"You need to be using HTTPS to place a screen-sharing call.": "İş stolunun birgə istifadəsi üçün HTTPS-dan istifadə tələb olunur.",
"Your Riot configuration contains invalid JSON. Please correct the problem and reload the page.": "Riot konfiqurasiyanızda yanlış JSON var. Lütfən, xətanı düzəldin və səhifəni yeniləyin",
"Your Riot configuration contains invalid JSON. Please correct the problem and reload the page.": "Riot konfiqurasiyanızda yanlış JSON var. Lütfən, xətanı düzəldin və səhifəni yeniləyin.",
"Invalid JSON": "Yanlış JSON",
"Sign In": "Daxil ol",
"Create Account": "Hesab Aç",
@@ -10,8 +10,16 @@
"Chat with Riot Bot": "Riot Bot-la söhbət edin",
"Explore rooms": "Otaqları kəşf edin",
"Your Riot is misconfigured": "Riot yanlış quraşdırılıb",
"Unexpected error preparing the app. See console for details.": "Proqramı başladarkən gözlənilməz xəta. Ətraflı məlumat üçün konsola baxın.",
"Invalid configuration: can only specify one of default_server_config, default_server_name, or default_hs_url.": "Yanlış konfiqurasiya: default_server_config, default_server_name, və ya default_hs_url-dən yalnız birini təyin etməlisiniz.",
"Invalid configuration: no default server specified.": "Yanlış konfiqurasiya: ilkin server təyin edilməyib.",
"%(appName)s via %(browserName)s on %(osName)s": "%(osName)s-da %(browserName)s ilə %(appName)s"
"Unexpected error preparing the app. See console for details.": "Proqramın başlanmasında gözlənilməz xəta. İzah üçün konsola baxın",
"Invalid configuration: can only specify one of default_server_config, default_server_name, or default_hs_url.": "Yanlış konfiqurasiya: bunlardan yalnız birini təyin edin - default_server_config, default_server_name, və ya default_hs_url.",
"Invalid configuration: no default server specified.": "Yanlış konfiqurasiya: ilkin server təyin edilməyib",
"%(appName)s via %(browserName)s on %(osName)s": "%(osName)s-da %(browserName)s ilə %(appName)s",
"The message from the parser is: %(message)s": "Sözügedən mesaj: %(message)s",
"powered by Matrix": "Matrix tərəfindən təchiz edilmişdir",
"Custom Server Options": "Fərdi Server Seçimləri",
"You can use the custom server options to sign into other Matrix servers by specifying a different homeserver URL. This allows you to use Riot with an existing Matrix account on a different homeserver.": "Fərqli server URL-ni təyin etməklə digər Matrix serverlərinə daxil olmaq üçün fərdi server seçimlərini istifadə edə bilərsiniz. Bu sizə başqa serverdə qaldırılmış mövcud Matrix hesabınızla Riot-u işlətməyə imkan verir.",
"Dismiss": "Nəzərə almayın",
"Room Directory": "Otaq kataloqu",
"Welcome to Riot.im": "Riot.im-ə xoş gəlmişsiniz",
"Decentralised, encrypted chat &amp; collaboration powered by [matrix]": "[matrix] tərəfindən təchiz edilmiş mərkəziləşdirilməmiş, şifrələnmiş çat və əməkdaşlıq platforması"
}
+8 -1
View File
@@ -14,5 +14,12 @@
"Create Account": "Crear conta",
"Need help?": "¿Precisas axuda?",
"Explore rooms": "Explorar salas",
"Room Directory": "Directorio de salas"
"Room Directory": "Directorio de salas",
"Your Riot configuration contains invalid JSON. Please correct the problem and reload the page.": "A configuración de Riot contén JSON non válido. Corrixe o problema e recarga a páxina.",
"The message from the parser is: %(message)s": "A mensaxe desde o intérprete é: %(message)s",
"Invalid JSON": "JSON non válido",
"Your Riot is misconfigured": "Riot está mal configurado",
"Unexpected error preparing the app. See console for details.": "Fallo non agardado ao preparar a app. Detalles na consola.",
"Invalid configuration: can only specify one of default_server_config, default_server_name, or default_hs_url.": "Configuración non válida: só se pode indicar un de default_server_config, default_server_name, ou default_hs_url.",
"Invalid configuration: no default server specified.": "Configuración non válida: non se indicou servidor por omisión."
}
+25
View File
@@ -0,0 +1,25 @@
{
"Your Riot configuration contains invalid JSON. Please correct the problem and reload the page.": "Таны Риот тохиргоо буруу ЖСОН агуулж байна. Зөв болгоод, хуудсыг ахин дуудна уу.",
"The message from the parser is: %(message)s": "Парсераас ирсэн мессеж нь: %(message)s",
"Invalid JSON": "Буруу ЖСОН",
"Your Riot is misconfigured": "Таны РИОТ тохиргоо буруу",
"Unexpected error preparing the app. See console for details.": "Апп бэлдэх үед гарах ёсгүй алдаа. Дэлгэрэнгүйг консолоос харна уу.",
"Invalid configuration: can only specify one of default_server_config, default_server_name, or default_hs_url.": "Буруу тохиргоо: default_server_config, default_server_name, эсвэл default_hs_url утгын зөвхөн аль нэгийг л зааж болно.",
"Invalid configuration: no default server specified.": "Буруу тохиргоо: Өгөгдсөл серверийг зааж өгөөгүй байна.",
"Riot Desktop on %(platformName)s": "%(platformName)s дээрх Риот Десктоп",
"Unknown device": "Үл мэдэгдэх төхөөрөмж",
"%(appName)s via %(browserName)s on %(osName)s": "%(osName)s дээр %(browserName)s -ээр дамжсан %(appName)s",
"You need to be using HTTPS to place a screen-sharing call.": "Та дэлгэц хуваалцах дуудлага хийхдээ HTTPS ашиглах ёстой.",
"powered by Matrix": "Matrix - Ивээв",
"Custom Server Options": "Кастом серверийн сонголтууд",
"You can use the custom server options to sign into other Matrix servers by specifying a different homeserver URL. This allows you to use Riot with an existing Matrix account on a different homeserver.": "Та кастом серверийн сонголтууд ашиглан серверийн хаягийг зааж, өөр сервер рүү нэвтэрч болно. Энэ нь танд Риотыг одоо байгаа матрикс аккаунтаараа өөр сервер дээр ашиглах боломж олгоно.",
"Dismiss": "Орхих",
"Welcome to Riot.im": "Riot.im -д тавтай морил",
"Decentralised, encrypted chat &amp; collaboration powered by [matrix]": "Төвлөрсөн бус, нууцлалтай чат &amp; хамтын ажиллагааг [matrix] - ивээв",
"Sign In": "Нэвтрэх",
"Create Account": "Хэрэглэгч үүсгэх",
"Need help?": "Тусламж хэрэгтэй юу?",
"Chat with Riot Bot": "Риот боттой чатлах",
"Explore rooms": "Өрөөнүүд үзэх",
"Room Directory": "Өрөөний директор"
}
+9 -2
View File
@@ -2,7 +2,7 @@
"%(appName)s via %(browserName)s on %(osName)s": "%(osName)s işletim sisteminde %(browserName)s ile %(appName)s",
"Custom Server Options": "Özelleştirilebilir Sunucu Seçenekleri",
"Dismiss": "Kapat",
"powered by Matrix": "Matrix'den besleniyor",
"powered by Matrix": "Matrix tarafından destekleniyor",
"Riot Desktop on %(platformName)s": "%(platformName)s platformunda Riot Masaüstü",
"Unknown device": "Bilinmeyen aygıt",
"You need to be using HTTPS to place a screen-sharing call.": "Ekran paylaşımlı arama yapmak için HTTPS kullanıyor olmalısınız.",
@@ -14,5 +14,12 @@
"Create Account": "Kayıt Ol",
"Need help?": "Yardıma mı ihtiyacın var?",
"Explore rooms": "Odaları keşfet",
"Room Directory": "Oda Dizini"
"Room Directory": "Oda Dizini",
"Your Riot configuration contains invalid JSON. Please correct the problem and reload the page.": "Riot yapılandırmanız geçersiz JSON ifadesi içermektedir. Lütfen problemi düzeltin ve sayfayı yenileyin.",
"Invalid JSON": "Geçersiz JSON",
"Your Riot is misconfigured": "Rioutunuz hatalı yapılandırılmış",
"Unexpected error preparing the app. See console for details.": "Uygulamayı hazırlarken beklenmeyen hata oluştu. Lütfen detaylar için konsola bakınız.",
"Invalid configuration: can only specify one of default_server_config, default_server_name, or default_hs_url.": "Geçersiz yapılandırma: default_server_config, default_server_name, yada default_hs_url den sadece birisi seçilebilir.",
"Invalid configuration: no default server specified.": "Geçersiz yapılandırma: varsayılan sunucu seçilmemiş.",
"The message from the parser is: %(message)s": "Ayrıştırıcıdan gelen mesaj: %(message)s"
}
-9
View File
@@ -23,7 +23,6 @@ limitations under the License.
require('gemini-scrollbar/gemini-scrollbar.css');
require('gfm.css/gfm.css');
require('highlight.js/styles/github.css');
require('draft-js/dist/Draft.css');
import olmWasmPath from 'olm/olm.wasm';
@@ -192,14 +191,6 @@ async function loadApp() {
console.log("Using Electron platform");
const plaf = new ElectronPlatform();
PlatformPeg.set(plaf);
// Electron only: see if we need to do a one-time data
// migration
if (window.localStorage.getItem('mx_user_id') === null) {
console.log("Migrating session from old origin...");
await plaf.migrateFromOldOrigin();
console.log("Origin migration complete");
}
} else {
console.log("Using Web platform");
PlatformPeg.set(new WebPlatform());
-4
View File
@@ -355,10 +355,6 @@ export default class ElectronPlatform extends VectorBasePlatform {
window.location.reload(false);
}
async migrateFromOldOrigin() {
return this._ipcCall('origin_migrate');
}
async _ipcCall(name, ...args) {
const ipcCallId = ++this._nextIpcCallId;
return new Promise((resolve, reject) => {
@@ -173,12 +173,4 @@ export default class VectorBasePlatform extends BasePlatform {
getDefaultDeviceDisplayName(): string {
return _t("Unknown device");
}
/**
* Migrate account data from a previous origin
* Used only for the electron app
*/
async migrateFromOldOrigin() {
return false;
}
}
+535 -604
View File
File diff suppressed because it is too large Load Diff