From aade0d557d2ac7e9f90a987d02241fc912a014bf Mon Sep 17 00:00:00 2001 From: Valentin Sundermann Date: Tue, 20 Jun 2017 20:50:18 +0200 Subject: [PATCH 01/19] Fix key url in readme The URL for the signing key changed and hence pointed to a wrong direction. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 89f2148f5..b42ed8b98 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ released version of Riot: 1. Enter the URL into your browser and log into Riot! Releases are signed by PGP, and can be checked against the public key -at https://riot.im/packages/keys/riot-master.asc +at https://riot.im/packages/keys/riot.asc Note that Chrome does not allow microphone or webcam access for sites served over http (except localhost), so for working VoIP you will need to serve Riot From efa156b53ae93e7ba5c157f9d5567f87e1d284cb Mon Sep 17 00:00:00 2001 From: Hubert Chathi Date: Sun, 23 Jul 2017 23:02:29 -0400 Subject: [PATCH 02/19] tweak compact theme - add some comments - decrease size of info events and MELS (#4363.2) - reduce spacing between paragraphs, lists, etc (#4363.3 & 4) Signed-off-by: Hubert Chathi --- .../elements/_MemberEventListSummary.scss | 13 +++++++++- .../views/rooms/_EventTile.scss | 24 +++++++++++++++---- 2 files changed, 31 insertions(+), 6 deletions(-) diff --git a/src/skins/vector/css/matrix-react-sdk/views/elements/_MemberEventListSummary.scss b/src/skins/vector/css/matrix-react-sdk/views/elements/_MemberEventListSummary.scss index 1025052be..02ecb5d84 100644 --- a/src/skins/vector/css/matrix-react-sdk/views/elements/_MemberEventListSummary.scss +++ b/src/skins/vector/css/matrix-react-sdk/views/elements/_MemberEventListSummary.scss @@ -50,11 +50,22 @@ limitations under the License. } .mx_MatrixChat_useCompactLayout { + .mx_MemberEventListSummary { + font-size: 13px; + .mx_EventTile_line { + line-height: 20px; + } + } + .mx_MemberEventListSummary_line { line-height: 22px; } .mx_MemberEventListSummary_toggle { - margin-top: 2px; + margin-top: 3px; + } + + .mx_TextualEvent.mx_MemberEventListSummary_summary { + font-size: 13px; } } diff --git a/src/skins/vector/css/matrix-react-sdk/views/rooms/_EventTile.scss b/src/skins/vector/css/matrix-react-sdk/views/rooms/_EventTile.scss index cf148603c..df9b6845b 100644 --- a/src/skins/vector/css/matrix-react-sdk/views/rooms/_EventTile.scss +++ b/src/skins/vector/css/matrix-react-sdk/views/rooms/_EventTile.scss @@ -396,7 +396,15 @@ limitations under the License. } .mx_EventTile.mx_EventTile_info { + // same as the padding for non-compact .mx_EventTile.mx_EventTile_info padding-top: 0px; + font-size: 13px; + .mx_EventTile_line { + line-height: 20px; + } + .mx_EventTile_avatar { + top: 4px; + } } .mx_EventTile .mx_SenderProfile { @@ -404,6 +412,7 @@ limitations under the License. } .mx_EventTile.mx_EventTile_emote { + // add a bit more space for emotes so that avatars don't collide padding-top: 8px; .mx_EventTile_avatar { top: 2px; @@ -431,10 +440,6 @@ limitations under the License. top: 2px; } - .mx_EventTile.mx_EventTile_info .mx_EventTile_avatar { - top: 5px; - } - .mx_EventTile_e2eIcon { top: 7px; } @@ -448,12 +453,21 @@ limitations under the License. } .mx_EventTile_continuation .mx_EventTile_readAvatars, - .mx_EventTile_info .mx_EventTile_readAvatars, .mx_EventTile_emote .mx_EventTile_readAvatars { top: 5px; } + .mx_EventTile_info .mx_EventTile_readAvatars { + top: 4px; + } + .mx_RoomView_MessageList h2 { margin-top: 6px; } + + .mx_EventTile_content .markdown-body { + p, ul, ol, dl, blockquote, pre, table { + margin-bottom: 4px; // 1/4 of the non-compact margin-bottom + } + } } From 93a3c896a4ebdeeeeb2bf72cfef71ee54fb7f3c9 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Thu, 27 Jul 2017 17:45:02 +0100 Subject: [PATCH 03/19] un-i18n Modal Analytics Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/components/structures/RoomDirectory.js | 14 +++++++------- src/components/structures/RoomSubList.js | 2 +- .../views/context_menus/MessageContextMenu.js | 8 ++++---- .../views/context_menus/RoomTileContextMenu.js | 8 ++++---- src/components/views/elements/ImageView.js | 4 ++-- src/components/views/globals/NewVersionBar.js | 4 ++-- src/components/views/globals/PasswordNagBar.js | 2 +- src/components/views/rooms/DNDRoomTile.js | 6 +++--- src/components/views/settings/Notifications.js | 10 +++++----- 9 files changed, 29 insertions(+), 29 deletions(-) diff --git a/src/components/structures/RoomDirectory.js b/src/components/structures/RoomDirectory.js index ea3aa5a29..fd870a979 100644 --- a/src/components/structures/RoomDirectory.js +++ b/src/components/structures/RoomDirectory.js @@ -82,7 +82,7 @@ module.exports = React.createClass({ return; } const ErrorDialog = sdk.getComponent("dialogs.ErrorDialog"); - Modal.createDialog(ErrorDialog, { + Modal.createTrackedDialog('Failed to get protocol list from Home Server', err.toString(), ErrorDialog, { title: _t('Failed to get protocol list from Home Server'), description: _t('The Home Server may be too old to support third party networks'), }); @@ -178,7 +178,7 @@ module.exports = React.createClass({ this.setState({ loading: false }); console.error("Failed to get publicRooms: %s", JSON.stringify(err)); var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog"); - Modal.createDialog(ErrorDialog, { + Modal.createTrackedDialog('Failed to get public room list', err.toString(), ErrorDialog, { title: _t('Failed to get public room list'), description: ((err && err.message) ? err.message : _t('The server may be unavailable or overloaded')) }); @@ -206,7 +206,7 @@ module.exports = React.createClass({ desc = _t('Remove %(name)s from the directory?', {name: name}); } - Modal.createDialog(QuestionDialog, { + Modal.createTrackedDialog('Remove from Directory', '', QuestionDialog, { title: _t('Remove from Directory'), description: desc, onFinished: (should_delete) => { @@ -227,7 +227,7 @@ module.exports = React.createClass({ modal.close(); this.refreshRoomList(); console.error("Failed to " + step + ": " + err); - Modal.createDialog(ErrorDialog, { + Modal.createTrackedDialog('Remove from Directory Error', err.toString(), ErrorDialog, { title: _t('Error'), description: ((err && err.message) ? err.message : _t('The server may be unavailable or overloaded')) }); @@ -316,7 +316,7 @@ module.exports = React.createClass({ const fields = protocolName ? this._getFieldsForThirdPartyLocation(alias, this.protocols[protocolName], instance) : null; if (!fields) { const ErrorDialog = sdk.getComponent("dialogs.ErrorDialog"); - Modal.createDialog(ErrorDialog, { + Modal.createTrackedDialog('Unable to join network', '', ErrorDialog, { title: _t('Unable to join network'), description: _t('Riot does not know how to join a room on this network'), }); @@ -327,14 +327,14 @@ module.exports = React.createClass({ this.showRoomAlias(resp[0].alias); } else { const ErrorDialog = sdk.getComponent("dialogs.ErrorDialog"); - Modal.createDialog(ErrorDialog, { + Modal.createTrackedDialog('Room not found', '', ErrorDialog, { title: _t('Room not found'), description: _t('Couldn\'t find a matching Matrix room'), }); } }, (e) => { const ErrorDialog = sdk.getComponent("dialogs.ErrorDialog"); - Modal.createDialog(ErrorDialog, { + Modal.createTrackedDialog('Fetching third party location failed', e.toString(), ErrorDialog, { title: _t('Fetching third party location failed'), description: _t('Unable to look up room ID from server'), }); diff --git a/src/components/structures/RoomSubList.js b/src/components/structures/RoomSubList.js index 17febe02c..faf2499e2 100644 --- a/src/components/structures/RoomSubList.js +++ b/src/components/structures/RoomSubList.js @@ -514,7 +514,7 @@ var RoomSubList = React.createClass({ }).fail(function(err) { var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog"); console.error("Failed to add tag " + self.props.tagName + " to room" + err); - Modal.createDialog(ErrorDialog, { + Modal.createTrackedDialog('Failed to add tag to room', err.toString(), ErrorDialog, { title: _t('Failed to add tag %(tagName)s to room', {tagName: self.props.tagName}), description: ((err && err.message) ? err.message : _t('Operation failed')), }); diff --git a/src/components/views/context_menus/MessageContextMenu.js b/src/components/views/context_menus/MessageContextMenu.js index 2064cede0..ef87dcb94 100644 --- a/src/components/views/context_menus/MessageContextMenu.js +++ b/src/components/views/context_menus/MessageContextMenu.js @@ -72,7 +72,7 @@ module.exports = React.createClass({ onViewSourceClick: function() { const ViewSource = sdk.getComponent('structures.ViewSource'); - Modal.createDialog(ViewSource, { + Modal.createTrackedDialog('View Event Source', '', ViewSource, { content: this.props.mxEvent.event, }, 'mx_Dialog_viewsource'); this.closeMenu(); @@ -80,7 +80,7 @@ module.exports = React.createClass({ onViewClearSourceClick: function() { const ViewSource = sdk.getComponent('structures.ViewSource'); - Modal.createDialog(ViewSource, { + Modal.createTrackedDialog('View Clear Event Source', '', ViewSource, { // FIXME: _clearEvent is private content: this.props.mxEvent._clearEvent, }, 'mx_Dialog_viewsource'); @@ -89,7 +89,7 @@ module.exports = React.createClass({ onRedactClick: function() { const ConfirmRedactDialog = sdk.getComponent("dialogs.ConfirmRedactDialog"); - Modal.createDialog(ConfirmRedactDialog, { + Modal.createTrackedDialog('Confirm Redact Dialog', '', ConfirmRedactDialog, { onFinished: (proceed) => { if (!proceed) return; @@ -99,7 +99,7 @@ module.exports = React.createClass({ const ErrorDialog = sdk.getComponent("dialogs.ErrorDialog"); // display error message stating you couldn't delete this. const code = e.errcode || e.statusCode; - Modal.createDialog(ErrorDialog, { + Modal.createTrackedDialog('You cannot delete this message', e.toString(), ErrorDialog, { title: _t('Error'), description: _t('You cannot delete this message. (%(code)s)', {code: code}) }); diff --git a/src/components/views/context_menus/RoomTileContextMenu.js b/src/components/views/context_menus/RoomTileContextMenu.js index 4d08e8332..3f3154c19 100644 --- a/src/components/views/context_menus/RoomTileContextMenu.js +++ b/src/components/views/context_menus/RoomTileContextMenu.js @@ -70,7 +70,7 @@ module.exports = React.createClass({ }; }).fail(function(err) { var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog"); - Modal.createDialog(ErrorDialog, { + Modal.createTrackedDialog('Failed to remove tag from room 1', err.toString(), ErrorDialog, { title: _t('Failed to remove tag %(tagName)s from room', {tagName: tagNameOff}), description: ((err && err.message) ? err.message : _t('Operation failed')), }); @@ -87,7 +87,7 @@ module.exports = React.createClass({ }; }).fail(function(err) { var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog"); - Modal.createDialog(ErrorDialog, { + Modal.createTrackedDialog('Failed to remove tag from room 2', err.toString(), ErrorDialog, { title: _t('Failed to remove tag %(tagName)s from room', {tagName: tagNameOn}), description: ((err && err.message) ? err.message : _t('Operation failed')), }); @@ -148,7 +148,7 @@ module.exports = React.createClass({ }; }, (err) => { var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog"); - Modal.createDialog(ErrorDialog, { + Modal.createTrackedDialog('Failed to set Direct Message status of room', err.toString(), ErrorDialog, { title: _t('Failed to set Direct Message status of room'), description: ((err && err.message) ? err.message : _t('Operation failed')), }); @@ -187,7 +187,7 @@ module.exports = React.createClass({ }, function(err) { var errCode = err.errcode || "unknown error code"; var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog"); - Modal.createDialog(ErrorDialog, { + Modal.createTrackedDialog('Failed to forget room', err.toString(), ErrorDialog, { title: _t('Failed to forget room %(errCode)s', {errCode: errCode}), description: ((err && err.message) ? err.message : _t('Operation failed')), }); diff --git a/src/components/views/elements/ImageView.js b/src/components/views/elements/ImageView.js index f9404eacd..968037747 100644 --- a/src/components/views/elements/ImageView.js +++ b/src/components/views/elements/ImageView.js @@ -66,7 +66,7 @@ module.exports = React.createClass({ onRedactClick: function() { const ConfirmRedactDialog = sdk.getComponent("dialogs.ConfirmRedactDialog"); - Modal.createDialog(ConfirmRedactDialog, { + Modal.createTrackedDialog('Confirm Redact Dialog', 'Image View', ConfirmRedactDialog, { onFinished: (proceed) => { if (!proceed) return; var self = this; @@ -76,7 +76,7 @@ module.exports = React.createClass({ var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog"); // display error message stating you couldn't delete this. var code = e.errcode || e.statusCode; - Modal.createDialog(ErrorDialog, { + Modal.createTrackedDialog('You cannot delete this image.', e.toString(), ErrorDialog, { title: _t('Error'), description: _t('You cannot delete this image. (%(code)s)', {code: code}) }); diff --git a/src/components/views/globals/NewVersionBar.js b/src/components/views/globals/NewVersionBar.js index d25fa3a6f..f56d1a51b 100644 --- a/src/components/views/globals/NewVersionBar.js +++ b/src/components/views/globals/NewVersionBar.js @@ -40,7 +40,7 @@ export default React.createClass({ displayReleaseNotes: function(releaseNotes) { const QuestionDialog = sdk.getComponent('dialogs.QuestionDialog'); - Modal.createDialog(QuestionDialog, { + Modal.createTrackedDialog('Display release notes', '', QuestionDialog, { title: _t("What's New"), description:
{releaseNotes}
, button: _t("Update"), @@ -54,7 +54,7 @@ export default React.createClass({ displayChangelog: function() { const ChangelogDialog = sdk.getComponent('dialogs.ChangelogDialog'); - Modal.createDialog(ChangelogDialog, { + Modal.createTrackedDialog('Display Changelog', '', ChangelogDialog, { version: this.props.version, newVersion: this.props.newVersion, onFinished: (update) => { diff --git a/src/components/views/globals/PasswordNagBar.js b/src/components/views/globals/PasswordNagBar.js index 873cefe16..bf71fa2c2 100644 --- a/src/components/views/globals/PasswordNagBar.js +++ b/src/components/views/globals/PasswordNagBar.js @@ -25,7 +25,7 @@ import { _t, _tJsx } from 'matrix-react-sdk/lib/languageHandler'; export default React.createClass({ onUpdateClicked: function() { const SetPasswordDialog = sdk.getComponent('dialogs.SetPasswordDialog'); - Modal.createDialog(SetPasswordDialog, { + Modal.createTrackedDialog('Set Password Dialog', 'Password Nag Bar', SetPasswordDialog, { onFinished: (passwordChanged) => { if (!passwordChanged) { return; diff --git a/src/components/views/rooms/DNDRoomTile.js b/src/components/views/rooms/DNDRoomTile.js index 2f521028c..ee4f70363 100644 --- a/src/components/views/rooms/DNDRoomTile.js +++ b/src/components/views/rooms/DNDRoomTile.js @@ -89,7 +89,7 @@ var roomTileSource = { }, (err) => { const ErrorDialog = sdk.getComponent("dialogs.ErrorDialog"); console.error("Failed to set direct chat tag " + err); - Modal.createDialog(ErrorDialog, { + Modal.createTrackedDialog('Failed to set direct chat tag', err.toString(), ErrorDialog, { title: _t('Failed to set direct chat tag'), description: ((err && err.message) ? err.message : _t('Operation failed')), }); @@ -114,7 +114,7 @@ var roomTileSource = { }).fail(function(err) { var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog"); console.error("Failed to remove tag " + prevTag + " from room: " + err); - Modal.createDialog(ErrorDialog, { + Modal.createTrackedDialog('Failed to remove tag from room', err.toString(), ErrorDialog, { title: _t('Failed to remove tag %(tagName)s from room', {tagName: prevTag}), description: ((err && err.message) ? err.message : _t('Operation failed')), }); @@ -133,7 +133,7 @@ var roomTileSource = { MatrixClientPeg.get().setRoomTag(item.room.roomId, newTag, newOrder).catch(function(err) { var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog"); console.error("Failed to add tag " + newTag + " to room: " + err); - Modal.createDialog(ErrorDialog, { + Modal.createTrackedDialog('Failed to add tag to room', err.toString(), ErrorDialog, { title: _t('Failed to add tag %(tagName)s to room', {tagName: newTag}), description: ((err && err.message) ? err.message : _t('Operation failed')), }); diff --git a/src/components/views/settings/Notifications.js b/src/components/views/settings/Notifications.js index 451a28b8e..1ca63e1e8 100644 --- a/src/components/views/settings/Notifications.js +++ b/src/components/views/settings/Notifications.js @@ -131,7 +131,7 @@ module.exports = React.createClass({ this._refreshFromServer(); }, (error) => { var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog"); - Modal.createDialog(ErrorDialog, { + Modal.createTrackedDialog('Error saving email notification preferences', error.toString(), ErrorDialog, { title: _t('Error saving email notification preferences'), description: _t('An error occurred whilst saving your email notification preferences.'), }); @@ -175,7 +175,7 @@ module.exports = React.createClass({ } var TextInputDialog = sdk.getComponent("dialogs.TextInputDialog"); - Modal.createDialog(TextInputDialog, { + Modal.createTrackedDialog('Keywords Dialog', '', TextInputDialog, { title: _t('Keywords'), description: _t('Enter keywords separated by a comma:'), button: _t('OK'), @@ -241,7 +241,7 @@ module.exports = React.createClass({ }, function(error) { var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog"); console.error("Failed to change settings: " + error); - Modal.createDialog(ErrorDialog, { + Modal.createTrackedDialog('Failed to change settings', error.toString(), ErrorDialog, { title: _t('Failed to change settings'), description: ((error && error.message) ? error.message : _t('Operation failed')), onFinished: self._refreshFromServer @@ -311,7 +311,7 @@ module.exports = React.createClass({ }, function(error) { var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog"); console.error("Can't update user notification settings: " + error); - Modal.createDialog(ErrorDialog, { + Modal.createTrackedDialog('Can\'t update user notifcation settings', error.toString(), ErrorDialog, { title: _t('Can\'t update user notification settings'), description: ((error && error.message) ? error.message : _t('Operation failed')), onFinished: self._refreshFromServer @@ -353,7 +353,7 @@ module.exports = React.createClass({ var onError = function(error) { var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog"); console.error("Failed to update keywords: " + error); - Modal.createDialog(ErrorDialog, { + Modal.createTrackedDialog('Failed to update keywords', error.toString(), ErrorDialog, { title: _t('Failed to update keywords'), description: ((error && error.message) ? error.message : _t('Operation failed')), onFinished: self._refreshFromServer From af85f18eae78d95614195c97ff8f9c66bdf940cc Mon Sep 17 00:00:00 2001 From: Richard Lewis Date: Tue, 1 Aug 2017 17:30:22 +0100 Subject: [PATCH 04/19] Styling tweaks --- .../vector/css/matrix-react-sdk/views/rooms/_AppsDrawer.scss | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/skins/vector/css/matrix-react-sdk/views/rooms/_AppsDrawer.scss b/src/skins/vector/css/matrix-react-sdk/views/rooms/_AppsDrawer.scss index 73c59c6ef..75064d932 100644 --- a/src/skins/vector/css/matrix-react-sdk/views/rooms/_AppsDrawer.scss +++ b/src/skins/vector/css/matrix-react-sdk/views/rooms/_AppsDrawer.scss @@ -188,7 +188,7 @@ form.mx_Custom_Widget_Form div { } .mx_AppPermissionWarningImage img { - width: 150px; + width: 100px; } .mx_AppPermissionWarningText { @@ -199,6 +199,7 @@ form.mx_Custom_Widget_Form div { .mx_AppPermissionWarningTextLabel { font-weight: bold; + display: block; } .mx_AppPermissionWarningTextURL { From 2f99a4883f1c12cf2131ce3db10bdeb56257a731 Mon Sep 17 00:00:00 2001 From: Luke Barnard Date: Wed, 2 Aug 2017 11:52:47 +0100 Subject: [PATCH 05/19] Update draft-js from 0.8.1 to 0.10.1 Hopefully to fix #4675 and friends --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2b1d6e82d..87f76cd2f 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ "bluebird": "^3.5.0", "browser-request": "^0.3.3", "classnames": "^2.1.2", - "draft-js": "^0.8.1", + "draft-js": "^0.10.1", "extract-text-webpack-plugin": "^0.9.1", "favico.js": "^0.3.10", "filesize": "3.5.6", From a6d51588308261ff65055e48d8ecf108fe6b88e8 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Thu, 3 Aug 2017 15:03:50 +0100 Subject: [PATCH 06/19] electron support for mouse forward/back buttons in Windows Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- electron_app/src/electron-main.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/electron_app/src/electron-main.js b/electron_app/src/electron-main.js index 99e14b744..ce5ac3841 100644 --- a/electron_app/src/electron-main.js +++ b/electron_app/src/electron-main.js @@ -228,6 +228,17 @@ electron.app.on('ready', () => { } }); + if (process.platform === 'win32') { + // Handle forward/backward mouse buttons in Windows + mainWindow.on('app-command', (e, cmd) => { + if (cmd === 'browser-backward' && mainWindow.webContents.canGoBack()) { + mainWindow.webContents.goBack(); + } else if (cmd === 'browser-forward' && mainWindow.webContents.canGoForward()) { + mainWindow.webContents.goForward(); + } + }); + } + webContentsHandler(mainWindow.webContents); mainWindowState.manage(mainWindow); }); From 8ca2af0fe72d2d40137596bbf3252042d40c3268 Mon Sep 17 00:00:00 2001 From: Luke Barnard Date: Thu, 3 Aug 2017 15:22:52 +0100 Subject: [PATCH 07/19] Update draft-js from 0.10.1 to 0.11.0-alpha (see https://github.com/matrix-org/matrix-react-sdk/pull/1269) --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 87f76cd2f..fb4facb4e 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ "bluebird": "^3.5.0", "browser-request": "^0.3.3", "classnames": "^2.1.2", - "draft-js": "^0.10.1", + "draft-js": "^0.11.0-alpha", "extract-text-webpack-plugin": "^0.9.1", "favico.js": "^0.3.10", "filesize": "3.5.6", From fb69ac33a06db6db2c38f81c46d395879c415410 Mon Sep 17 00:00:00 2001 From: Jordan Moran Meyers Date: Sat, 5 Aug 2017 15:50:47 -0500 Subject: [PATCH 08/19] update gitignore to allow .idea directory to exist in subdirs --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 060ca6e93..2ad05012a 100644 --- a/.gitignore +++ b/.gitignore @@ -14,6 +14,6 @@ npm-debug.log electron/dist electron/pub -/.idea +**/.idea /config.json /src/component-index.js From 9c3c1b760899abb6c1a5ce0832e9c98aabece746 Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Tue, 8 Aug 2017 09:42:38 +0100 Subject: [PATCH 09/19] Make webpack exit non-zero on error Pass `--bail` to webpack, so that if we can't find a module, we bail out rather than deploy a broken version to /develop. https://github.com/webpack/webpack/issues/708 is somewhat relevant. --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 2b1d6e82d..db4935f13 100644 --- a/package.json +++ b/package.json @@ -31,8 +31,8 @@ "build:res": "node scripts/copy-res.js", "build:modernizr": "modernizr -c .modernizr.json -d src/vector/modernizr.js", "build:compile": "npm run reskindex && babel --source-maps -d lib src", - "build:bundle": "cross-env NODE_ENV=production webpack -p --progress", - "build:bundle:dev": "webpack --optimize-occurence-order --progress", + "build:bundle": "cross-env NODE_ENV=production webpack -p --progress --bail", + "build:bundle:dev": "webpack --optimize-occurence-order --progress --bail", "build:electron": "npm run clean && npm run build && npm run install:electron && build -wml --ia32 --x64", "build": "npm run reskindex && npm run build:res && npm run build:bundle", "build:dev": "npm run reskindex && npm run build:res && npm run build:bundle:dev", From 7b024751d1a9dc2f2737fd7b1e618ee0b8ad650d Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Tue, 8 Aug 2017 09:43:40 +0100 Subject: [PATCH 10/19] fetch-develop-deps: avoid breaking js-sdk do `npm i` in react-sdk *before* symlinking js-sdk, to avoid moving a load of deps from js-sdk to react-sdk and hence breaking the build. --- scripts/fetch-develop.deps.sh | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/scripts/fetch-develop.deps.sh b/scripts/fetch-develop.deps.sh index 4fa1a4a22..e2d40341a 100755 --- a/scripts/fetch-develop.deps.sh +++ b/scripts/fetch-develop.deps.sh @@ -49,42 +49,47 @@ function dodep() { [ "$curbranch" != 'develop' ] && clone $org $repo develop } || return $? - ( - cd $repo - echo "$repo set to branch "`git rev-parse --abbrev-ref HEAD` - ) + echo "$repo set to branch "`git -C "$repo" rev-parse --abbrev-ref HEAD` mkdir -p node_modules rm -r "node_modules/$repo" 2>/dev/null || true ln -sv "../$repo" node_modules/ + + ( + cd $repo + npm install + ) } +############################## + echo -en 'travis_fold:start:matrix-js-sdk\r' echo 'Setting up matrix-js-sdk' dodep matrix-org matrix-js-sdk -( - cd node_modules/matrix-js-sdk - npm install -) echo -en 'travis_fold:end:matrix-js-sdk\r' +############################## + echo -en 'travis_fold:start:matrix-react-sdk\r' echo 'Setting up matrix-react-sdk' dodep matrix-org matrix-react-sdk -mkdir -p node_modules/matrix-react-sdk/node_modules +# replace the version of js-sdk that got pulled into react-sdk with a symlink +# to our version. Make sure to do this *after* doing 'npm i' in react-sdk, +# otherwise npm helpfully moves another-json from matrix-js-sdk/node_modules +# into matrix-react-sdk/node_modules. +# +# (note this matches the instructions in the README.) +rm -r node_modules/matrix-react-sdk/node_modules/matrix-js-sdk ln -s ../../matrix-js-sdk node_modules/matrix-react-sdk/node_modules/ -( - cd node_modules/matrix-react-sdk - npm install -) - echo -en 'travis_fold:end:matrix-react-sdk\r' +############################## + # Link the reskindex binary in place: if we used npm link, # npm would do this for us, but we don't because we'd have # to define the npm prefix somewhere so it could put the From c31f66aed51c7f0c0e13252a0bc15602d9d51335 Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Tue, 8 Aug 2017 09:47:03 +0100 Subject: [PATCH 11/19] Jenkins.sh: only fetch head of dependency branches --- scripts/jenkins.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/jenkins.sh b/scripts/jenkins.sh index 4f2e94056..7b5b4c8e2 100755 --- a/scripts/jenkins.sh +++ b/scripts/jenkins.sh @@ -8,8 +8,11 @@ nvm use 6 set -x -# check out corresponding branches of dependencies -`dirname $0`/fetch-develop.deps.sh +# check out corresponding branches of dependencies. +# +# clone the deps with depth 1: we know we will only ever need that one +# commit. +`dirname $0`/fetch-develop.deps.sh --depth 1 npm install From 274fc348687ee347be705c2dd4ad558e1fcca13c Mon Sep 17 00:00:00 2001 From: Luke Barnard Date: Tue, 8 Aug 2017 11:14:52 +0100 Subject: [PATCH 12/19] Adjust CSS for optional avatars in pills codep matrix-org/matrix-react-sdk#1277 --- .../css/matrix-react-sdk/views/avatars/_BaseAvatar.scss | 1 + .../vector/css/matrix-react-sdk/views/elements/_RichText.scss | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/skins/vector/css/matrix-react-sdk/views/avatars/_BaseAvatar.scss b/src/skins/vector/css/matrix-react-sdk/views/avatars/_BaseAvatar.scss index 106f0cde7..320efda04 100644 --- a/src/skins/vector/css/matrix-react-sdk/views/avatars/_BaseAvatar.scss +++ b/src/skins/vector/css/matrix-react-sdk/views/avatars/_BaseAvatar.scss @@ -20,6 +20,7 @@ limitations under the License. .mx_BaseAvatar_initial { position: absolute; + left: 0px; color: $avatar-initial-color; text-align: center; speak: none; diff --git a/src/skins/vector/css/matrix-react-sdk/views/elements/_RichText.scss b/src/skins/vector/css/matrix-react-sdk/views/elements/_RichText.scss index 55faab847..8825c98e3 100644 --- a/src/skins/vector/css/matrix-react-sdk/views/elements/_RichText.scss +++ b/src/skins/vector/css/matrix-react-sdk/views/elements/_RichText.scss @@ -8,6 +8,7 @@ display: inline-block; height: 20px; line-height: 20px; + padding-left: 5px; } /* More specific to override `.markdown-body a` color */ @@ -35,9 +36,8 @@ .mx_UserPill .mx_BaseAvatar, .mx_RoomPill .mx_BaseAvatar { position: relative; + left: -3px; top: 2px; - margin-left: 2px; - margin-right: 2px; } .mx_Markdown_BOLD { From a3525f411d8dcad499e107d132e63f8aa1617dea Mon Sep 17 00:00:00 2001 From: Marcel Date: Tue, 8 Aug 2017 19:22:07 +0200 Subject: [PATCH 13/19] Fix typo with scripts/fetch-develop-deps.sh in Building From Source scripts/fetch-develop-deps.sh vs scripts/fetch-develop.deps.sh --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 89f2148f5..337db0e43 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ to build. 1. If you're using the `develop` branch, install the develop versions of the dependencies, as the released ones will be too old: ``` - scripts/fetch-develop-deps.sh + scripts/fetch-develop.deps.sh ``` Whenever you git pull on riot-web you will also probably need to force an update to these dependencies - the simplest way is to re-run the script, but you can also From df33d402853dd6997cbd91df4a32267824ba7580 Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Tue, 8 Aug 2017 19:04:25 +0100 Subject: [PATCH 14/19] Enable karma-sourcemap-loader This turns (some) stacktraces back into something useful, so that unpicking test failures is vaguely tractable --- karma.conf.js | 2 +- package.json | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/karma.conf.js b/karma.conf.js index d834987e8..824fd2150 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -84,7 +84,7 @@ module.exports = function (config) { // available preprocessors: // https://npmjs.org/browse/keyword/karma-preprocessor preprocessors: { - '{src,test}/**/*.js': ['webpack'], + '{src,test}/**/*.js': ['webpack', 'sourcemap'], }, // test results reporter to use diff --git a/package.json b/package.json index 3f31a3aca..60ee2aecd 100644 --- a/package.json +++ b/package.json @@ -119,6 +119,7 @@ "karma-cli": "^0.1.2", "karma-junit-reporter": "^0.4.1", "karma-mocha": "^0.2.2", + "karma-sourcemap-loader": "^0.3.7", "karma-webpack": "^1.7.0", "matrix-mock-request": "^1.2.0", "matrix-react-test-utils": "^0.2.0", From 06ef674597ec5219dc2e73e0e1d560771a9d10fb Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Tue, 8 Aug 2017 19:05:58 +0100 Subject: [PATCH 15/19] Enable fancy karma reporters cargo-cult luke's stuff from react-sdk --- karma.conf.js | 14 ++++++++++++-- package.json | 5 ++++- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/karma.conf.js b/karma.conf.js index 824fd2150..3b415b1ae 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -88,9 +88,19 @@ module.exports = function (config) { }, // test results reporter to use - // possible values: 'dots', 'progress' // available reporters: https://npmjs.org/browse/keyword/karma-reporter - reporters: ['progress', 'junit'], + reporters: ['logcapture', 'spec', 'junit', 'summary'], + + specReporter: { + suppressErrorSummary: false, // do print error summary + suppressFailed: false, // do print information about failed tests + suppressPassed: false, // do print information about passed tests + showSpecTiming: true, // print the time elapsed for each spec + }, + + client: { + captureLogs: true, + }, // web server port port: 9876, diff --git a/package.json b/package.json index 60ee2aecd..bb35ce899 100644 --- a/package.json +++ b/package.json @@ -114,12 +114,15 @@ "fs-extra": "^0.30.0", "html-webpack-plugin": "^2.24.0", "json-loader": "^0.5.3", - "karma": "^0.13.22", + "karma": "^1.7.0", "karma-chrome-launcher": "^0.2.3", "karma-cli": "^0.1.2", "karma-junit-reporter": "^0.4.1", + "karma-logcapture-reporter": "0.0.1", "karma-mocha": "^0.2.2", "karma-sourcemap-loader": "^0.3.7", + "karma-spec-reporter": "0.0.31", + "karma-summary-reporter": "^1.3.3", "karma-webpack": "^1.7.0", "matrix-mock-request": "^1.2.0", "matrix-react-test-utils": "^0.2.0", From 57f82c3c9e855e6ae3a293fa24ee83145e9e958b Mon Sep 17 00:00:00 2001 From: Luke Barnard Date: Thu, 10 Aug 2017 10:18:37 +0100 Subject: [PATCH 16/19] Quote using innerText codep matrix-org/matrix-react-sdk#1289 --- .../views/context_menus/MessageContextMenu.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/components/views/context_menus/MessageContextMenu.js b/src/components/views/context_menus/MessageContextMenu.js index 2064cede0..5646be49f 100644 --- a/src/components/views/context_menus/MessageContextMenu.js +++ b/src/components/views/context_menus/MessageContextMenu.js @@ -134,10 +134,9 @@ module.exports = React.createClass({ }, onQuoteClick: function() { - console.log(this.props.mxEvent); dis.dispatch({ action: 'quote', - event: this.props.mxEvent, + text: this.props.eventTileOps.getInnerText(), }); this.closeMenu(); }, @@ -153,6 +152,7 @@ module.exports = React.createClass({ let unhidePreviewButton; let permalinkButton; let externalURLButton; + let quoteButton; if (eventStatus === 'not_sent') { resendButton = ( @@ -221,11 +221,13 @@ module.exports = React.createClass({ ); - const quoteButton = ( -
- { _t('Quote') } -
- ); + if (this.props.eventTileOps && this.props.eventTileOps.getInnerText) { + quoteButton = ( +
+ { _t('Quote') } +
+ ); + } // Bridges can provide a 'external_url' to link back to the source. if( typeof(this.props.mxEvent.event.content.external_url) === "string") { From aae751533969352acaa736c771416d7a86201554 Mon Sep 17 00:00:00 2001 From: Marcel Date: Thu, 10 Aug 2017 14:29:41 +0200 Subject: [PATCH 17/19] Add Login Page LanguageDropdown CSS (#4767) --- .../matrix-react-sdk/structures/login/_Login.scss | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/skins/vector/css/matrix-react-sdk/structures/login/_Login.scss b/src/skins/vector/css/matrix-react-sdk/structures/login/_Login.scss index 805c817a2..7faab6e7b 100644 --- a/src/skins/vector/css/matrix-react-sdk/structures/login/_Login.scss +++ b/src/skins/vector/css/matrix-react-sdk/structures/login/_Login.scss @@ -265,3 +265,16 @@ limitations under the License. margin: 3px; vertical-align: top; } + +.mx_Login_language { + margin-left: auto; + margin-right: auto; + min-width: 60%; +} + +.mx_Login_language_div { + display: flex; + margin-top: 12px; + margin-bottom: 12px; +} + From 9c5ceb677592a28cf69dc6f1156ff35b88b20eb8 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Thu, 10 Aug 2017 13:56:01 +0100 Subject: [PATCH 18/19] don't track error messages Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/components/structures/RoomDirectory.js | 6 +++--- src/components/structures/RoomSubList.js | 2 +- src/components/views/context_menus/RoomTileContextMenu.js | 8 ++++---- src/components/views/rooms/DNDRoomTile.js | 6 +++--- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/components/structures/RoomDirectory.js b/src/components/structures/RoomDirectory.js index fd870a979..e160b780c 100644 --- a/src/components/structures/RoomDirectory.js +++ b/src/components/structures/RoomDirectory.js @@ -82,7 +82,7 @@ module.exports = React.createClass({ return; } const ErrorDialog = sdk.getComponent("dialogs.ErrorDialog"); - Modal.createTrackedDialog('Failed to get protocol list from Home Server', err.toString(), ErrorDialog, { + Modal.createTrackedDialog('Failed to get protocol list from Home Server', '', ErrorDialog, { title: _t('Failed to get protocol list from Home Server'), description: _t('The Home Server may be too old to support third party networks'), }); @@ -178,7 +178,7 @@ module.exports = React.createClass({ this.setState({ loading: false }); console.error("Failed to get publicRooms: %s", JSON.stringify(err)); var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog"); - Modal.createTrackedDialog('Failed to get public room list', err.toString(), ErrorDialog, { + Modal.createTrackedDialog('Failed to get public room list', '', ErrorDialog, { title: _t('Failed to get public room list'), description: ((err && err.message) ? err.message : _t('The server may be unavailable or overloaded')) }); @@ -227,7 +227,7 @@ module.exports = React.createClass({ modal.close(); this.refreshRoomList(); console.error("Failed to " + step + ": " + err); - Modal.createTrackedDialog('Remove from Directory Error', err.toString(), ErrorDialog, { + Modal.createTrackedDialog('Remove from Directory Error', '', ErrorDialog, { title: _t('Error'), description: ((err && err.message) ? err.message : _t('The server may be unavailable or overloaded')) }); diff --git a/src/components/structures/RoomSubList.js b/src/components/structures/RoomSubList.js index afbde3989..7c6b16229 100644 --- a/src/components/structures/RoomSubList.js +++ b/src/components/structures/RoomSubList.js @@ -514,7 +514,7 @@ var RoomSubList = React.createClass({ }).catch(function(err) { var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog"); console.error("Failed to add tag " + self.props.tagName + " to room" + err); - Modal.createTrackedDialog('Failed to add tag to room', err.toString(), ErrorDialog, { + Modal.createTrackedDialog('Failed to add tag to room', '', ErrorDialog, { title: _t('Failed to add tag %(tagName)s to room', {tagName: self.props.tagName}), description: ((err && err.message) ? err.message : _t('Operation failed')), }); diff --git a/src/components/views/context_menus/RoomTileContextMenu.js b/src/components/views/context_menus/RoomTileContextMenu.js index e6bccb0a3..c9ded5f46 100644 --- a/src/components/views/context_menus/RoomTileContextMenu.js +++ b/src/components/views/context_menus/RoomTileContextMenu.js @@ -70,7 +70,7 @@ module.exports = React.createClass({ }; }).catch(function(err) { var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog"); - Modal.createTrackedDialog('Failed to remove tag from room 1', err.toString(), ErrorDialog, { + Modal.createTrackedDialog('Failed to remove tag from room 1', '', ErrorDialog, { title: _t('Failed to remove tag %(tagName)s from room', {tagName: tagNameOff}), description: ((err && err.message) ? err.message : _t('Operation failed')), }); @@ -87,7 +87,7 @@ module.exports = React.createClass({ }; }).catch(function(err) { var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog"); - Modal.createTrackedDialog('Failed to remove tag from room 2', err.toString(), ErrorDialog, { + Modal.createTrackedDialog('Failed to remove tag from room 2', '', ErrorDialog, { title: _t('Failed to remove tag %(tagName)s from room', {tagName: tagNameOn}), description: ((err && err.message) ? err.message : _t('Operation failed')), }); @@ -148,7 +148,7 @@ module.exports = React.createClass({ }; }, (err) => { var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog"); - Modal.createTrackedDialog('Failed to set Direct Message status of room', err.toString(), ErrorDialog, { + Modal.createTrackedDialog('Failed to set Direct Message status of room', '', ErrorDialog, { title: _t('Failed to set Direct Message status of room'), description: ((err && err.message) ? err.message : _t('Operation failed')), }); @@ -187,7 +187,7 @@ module.exports = React.createClass({ }, function(err) { var errCode = err.errcode || "unknown error code"; var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog"); - Modal.createTrackedDialog('Failed to forget room', err.toString(), ErrorDialog, { + Modal.createTrackedDialog('Failed to forget room', '', ErrorDialog, { title: _t('Failed to forget room %(errCode)s', {errCode: errCode}), description: ((err && err.message) ? err.message : _t('Operation failed')), }); diff --git a/src/components/views/rooms/DNDRoomTile.js b/src/components/views/rooms/DNDRoomTile.js index 9ef934f8e..430906d21 100644 --- a/src/components/views/rooms/DNDRoomTile.js +++ b/src/components/views/rooms/DNDRoomTile.js @@ -89,7 +89,7 @@ var roomTileSource = { }, (err) => { const ErrorDialog = sdk.getComponent("dialogs.ErrorDialog"); console.error("Failed to set direct chat tag " + err); - Modal.createTrackedDialog('Failed to set direct chat tag', err.toString(), ErrorDialog, { + Modal.createTrackedDialog('Failed to set direct chat tag', '', ErrorDialog, { title: _t('Failed to set direct chat tag'), description: ((err && err.message) ? err.message : _t('Operation failed')), }); @@ -114,7 +114,7 @@ var roomTileSource = { }).catch(function(err) { var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog"); console.error("Failed to remove tag " + prevTag + " from room: " + err); - Modal.createTrackedDialog('Failed to remove tag from room', err.toString(), ErrorDialog, { + Modal.createTrackedDialog('Failed to remove tag from room', '', ErrorDialog, { title: _t('Failed to remove tag %(tagName)s from room', {tagName: prevTag}), description: ((err && err.message) ? err.message : _t('Operation failed')), }); @@ -133,7 +133,7 @@ var roomTileSource = { MatrixClientPeg.get().setRoomTag(item.room.roomId, newTag, newOrder).catch(function(err) { var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog"); console.error("Failed to add tag " + newTag + " to room: " + err); - Modal.createTrackedDialog('Failed to add tag to room', err.toString(), ErrorDialog, { + Modal.createTrackedDialog('Failed to add tag to room', '', ErrorDialog, { title: _t('Failed to add tag %(tagName)s to room', {tagName: newTag}), description: ((err && err.message) ? err.message : _t('Operation failed')), }); From 4c6836bc3f67addd6b6668203ba115505f8ab64e Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Thu, 10 Aug 2017 15:13:30 +0100 Subject: [PATCH 19/19] don't track error messages .2 Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/components/structures/RoomDirectory.js | 2 +- src/components/views/context_menus/MessageContextMenu.js | 2 +- src/components/views/elements/ImageView.js | 2 +- src/components/views/settings/Notifications.js | 8 ++++---- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/components/structures/RoomDirectory.js b/src/components/structures/RoomDirectory.js index e160b780c..cd9ac565a 100644 --- a/src/components/structures/RoomDirectory.js +++ b/src/components/structures/RoomDirectory.js @@ -334,7 +334,7 @@ module.exports = React.createClass({ } }, (e) => { const ErrorDialog = sdk.getComponent("dialogs.ErrorDialog"); - Modal.createTrackedDialog('Fetching third party location failed', e.toString(), ErrorDialog, { + Modal.createTrackedDialog('Fetching third party location failed', '', ErrorDialog, { title: _t('Fetching third party location failed'), description: _t('Unable to look up room ID from server'), }); diff --git a/src/components/views/context_menus/MessageContextMenu.js b/src/components/views/context_menus/MessageContextMenu.js index ef87dcb94..a0381245c 100644 --- a/src/components/views/context_menus/MessageContextMenu.js +++ b/src/components/views/context_menus/MessageContextMenu.js @@ -99,7 +99,7 @@ module.exports = React.createClass({ const ErrorDialog = sdk.getComponent("dialogs.ErrorDialog"); // display error message stating you couldn't delete this. const code = e.errcode || e.statusCode; - Modal.createTrackedDialog('You cannot delete this message', e.toString(), ErrorDialog, { + Modal.createTrackedDialog('You cannot delete this message', '', ErrorDialog, { title: _t('Error'), description: _t('You cannot delete this message. (%(code)s)', {code: code}) }); diff --git a/src/components/views/elements/ImageView.js b/src/components/views/elements/ImageView.js index 968037747..e70a5d3be 100644 --- a/src/components/views/elements/ImageView.js +++ b/src/components/views/elements/ImageView.js @@ -76,7 +76,7 @@ module.exports = React.createClass({ var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog"); // display error message stating you couldn't delete this. var code = e.errcode || e.statusCode; - Modal.createTrackedDialog('You cannot delete this image.', e.toString(), ErrorDialog, { + Modal.createTrackedDialog('You cannot delete this image.', '', ErrorDialog, { title: _t('Error'), description: _t('You cannot delete this image. (%(code)s)', {code: code}) }); diff --git a/src/components/views/settings/Notifications.js b/src/components/views/settings/Notifications.js index 1ca63e1e8..a58b5d580 100644 --- a/src/components/views/settings/Notifications.js +++ b/src/components/views/settings/Notifications.js @@ -131,7 +131,7 @@ module.exports = React.createClass({ this._refreshFromServer(); }, (error) => { var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog"); - Modal.createTrackedDialog('Error saving email notification preferences', error.toString(), ErrorDialog, { + Modal.createTrackedDialog('Error saving email notification preferences', '', ErrorDialog, { title: _t('Error saving email notification preferences'), description: _t('An error occurred whilst saving your email notification preferences.'), }); @@ -241,7 +241,7 @@ module.exports = React.createClass({ }, function(error) { var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog"); console.error("Failed to change settings: " + error); - Modal.createTrackedDialog('Failed to change settings', error.toString(), ErrorDialog, { + Modal.createTrackedDialog('Failed to change settings', '', ErrorDialog, { title: _t('Failed to change settings'), description: ((error && error.message) ? error.message : _t('Operation failed')), onFinished: self._refreshFromServer @@ -311,7 +311,7 @@ module.exports = React.createClass({ }, function(error) { var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog"); console.error("Can't update user notification settings: " + error); - Modal.createTrackedDialog('Can\'t update user notifcation settings', error.toString(), ErrorDialog, { + Modal.createTrackedDialog('Can\'t update user notifcation settings', '', ErrorDialog, { title: _t('Can\'t update user notification settings'), description: ((error && error.message) ? error.message : _t('Operation failed')), onFinished: self._refreshFromServer @@ -353,7 +353,7 @@ module.exports = React.createClass({ var onError = function(error) { var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog"); console.error("Failed to update keywords: " + error); - Modal.createTrackedDialog('Failed to update keywords', error.toString(), ErrorDialog, { + Modal.createTrackedDialog('Failed to update keywords', '', ErrorDialog, { title: _t('Failed to update keywords'), description: ((error && error.message) ? error.message : _t('Operation failed')), onFinished: self._refreshFromServer