diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000000..880331a09e --- /dev/null +++ b/.editorconfig @@ -0,0 +1,23 @@ +# Copyright 2017 Aviral Dasgupta +# +# 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. + +root = true + +[*] +charset=utf-8 +end_of_line = lf +insert_final_newline = true +indent_style = space +indent_size = 4 +trim_trailing_whitespace = true diff --git a/AUTHORS.rst b/AUTHORS.rst index c08ad5e64b..68c61afbae 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -10,3 +10,6 @@ include: * Florent VIOLLEAU (https://github.com/floviolleau) Improve README.md for a better understanding of installation instructions + +* Michael Telatynski (https://github.com/t3chguy) + Improved consistency of inverted elements in dark theme across browsers diff --git a/CHANGELOG.md b/CHANGELOG.md index 659a3742c6..a2ed314978 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,122 @@ +Changes in [0.9.8](https://github.com/vector-im/riot-web/releases/tag/v0.9.8) (2017-04-12) +========================================================================================== +[Full Changelog](https://github.com/vector-im/riot-web/compare/v0.9.8-rc.3...v0.9.8) + + * No changes + +Changes in [0.9.8-rc.3](https://github.com/vector-im/riot-web/releases/tag/v0.9.8-rc.3) (2017-04-11) +==================================================================================================== +[Full Changelog](https://github.com/vector-im/riot-web/compare/v0.9.8-rc.2...v0.9.8-rc.3) + + * Make the clear cache button work on desktop + [\#3598](https://github.com/vector-im/riot-web/pull/3598) + +Changes in [0.9.8-rc.2](https://github.com/vector-im/riot-web/releases/tag/v0.9.8-rc.2) (2017-04-10) +==================================================================================================== +[Full Changelog](https://github.com/vector-im/riot-web/compare/v0.9.8-rc.1...v0.9.8-rc.2) + + * Redacted events bg: black lozenge -> torn paper + [\#3596](https://github.com/vector-im/riot-web/pull/3596) + * Add 'app' parameter to rageshake report + [\#3594](https://github.com/vector-im/riot-web/pull/3594) + +Changes in [0.9.8-rc.1](https://github.com/vector-im/riot-web/releases/tag/v0.9.8-rc.1) (2017-04-07) +==================================================================================================== +[Full Changelog](https://github.com/vector-im/riot-web/compare/v0.9.7...v0.9.8-rc.1) + + * Add support for indexeddb sync in webworker + [\#3578](https://github.com/vector-im/riot-web/pull/3578) + * Add CSS to make Emote sender cursor : pointer + [\#3574](https://github.com/vector-im/riot-web/pull/3574) + * Remove rageshake server + [\#3565](https://github.com/vector-im/riot-web/pull/3565) + * Adjust CSS for matrix-org/matrix-react-sdk#789 + [\#3566](https://github.com/vector-im/riot-web/pull/3566) + * Fix tests to reflect recent changes + [\#3537](https://github.com/vector-im/riot-web/pull/3537) + * Do not assume getTs will return comparable integer + [\#3536](https://github.com/vector-im/riot-web/pull/3536) + * Rename ReactPerf to Perf + [\#3535](https://github.com/vector-im/riot-web/pull/3535) + * Don't show phone number as target for email notifs + [\#3530](https://github.com/vector-im/riot-web/pull/3530) + * Fix people section again + [\#3458](https://github.com/vector-im/riot-web/pull/3458) + * dark theme invert inconsistent across browsers + [\#3479](https://github.com/vector-im/riot-web/pull/3479) + * CSS for adding phone number in UserSettings + [\#3451](https://github.com/vector-im/riot-web/pull/3451) + * Support for phone number registration/signin, mk2 + [\#3426](https://github.com/vector-im/riot-web/pull/3426) + * Confirm redactions with a dialog + [\#3470](https://github.com/vector-im/riot-web/pull/3470) + * Better CSS for redactions + [\#3453](https://github.com/vector-im/riot-web/pull/3453) + * Fix the people section + [\#3448](https://github.com/vector-im/riot-web/pull/3448) + * Merge the two RoomTile context menus into one + [\#3395](https://github.com/vector-im/riot-web/pull/3395) + * Refactor screen set after login + [\#3385](https://github.com/vector-im/riot-web/pull/3385) + * CSS for redacted EventTiles + [\#3379](https://github.com/vector-im/riot-web/pull/3379) + * Height:100% for welcome pages on Safari + [\#3340](https://github.com/vector-im/riot-web/pull/3340) + * `view_room` dispatch from `onClick` RoomTile + [\#3376](https://github.com/vector-im/riot-web/pull/3376) + * Hide statusAreaBox_line entirely when inCall + [\#3350](https://github.com/vector-im/riot-web/pull/3350) + * Set padding-bottom: 0px for .mx_Dialog spinner + [\#3351](https://github.com/vector-im/riot-web/pull/3351) + * Support InteractiveAuth based registration + [\#3333](https://github.com/vector-im/riot-web/pull/3333) + * Expose notification option for username/MXID + [\#3334](https://github.com/vector-im/riot-web/pull/3334) + * Float the toggle in the top right of MELS + [\#3190](https://github.com/vector-im/riot-web/pull/3190) + * More aggressive rageshake log culling + [\#3311](https://github.com/vector-im/riot-web/pull/3311) + * Don't overflow directory network options + [\#3282](https://github.com/vector-im/riot-web/pull/3282) + * CSS for ban / kick reason prompt + [\#3250](https://github.com/vector-im/riot-web/pull/3250) + * Allow forgetting rooms you're banned from + [\#3246](https://github.com/vector-im/riot-web/pull/3246) + * Fix icon paths in manifest + [\#3245](https://github.com/vector-im/riot-web/pull/3245) + * Fix broken tests caused by adding IndexedDB support + [\#3242](https://github.com/vector-im/riot-web/pull/3242) + * CSS for un-ban button in RoomSettings + [\#3227](https://github.com/vector-im/riot-web/pull/3227) + * Remove z-index property on avatar initials + [\#3239](https://github.com/vector-im/riot-web/pull/3239) + * Reposition certain icons in the status bar + [\#3233](https://github.com/vector-im/riot-web/pull/3233) + * CSS for kick/ban confirmation dialog + [\#3224](https://github.com/vector-im/riot-web/pull/3224) + * Style for split-out interactive auth + [\#3217](https://github.com/vector-im/riot-web/pull/3217) + * Use the teamToken threaded through from react sdk + [\#3196](https://github.com/vector-im/riot-web/pull/3196) + * rageshake: Add file server with basic auth + [\#3169](https://github.com/vector-im/riot-web/pull/3169) + * Fix bug with home icon not appearing when logged in as team member + [\#3162](https://github.com/vector-im/riot-web/pull/3162) + * Add ISSUE_TEMPLATE + [\#2836](https://github.com/vector-im/riot-web/pull/2836) + * Store bug reports in separate directories + [\#3150](https://github.com/vector-im/riot-web/pull/3150) + * Quick and dirty support for custom welcome pages. + [\#2575](https://github.com/vector-im/riot-web/pull/2575) + * RTS Welcome Pages + [\#3103](https://github.com/vector-im/riot-web/pull/3103) + * rageshake: Abide by Go standards + [\#3149](https://github.com/vector-im/riot-web/pull/3149) + * Bug report server script + [\#3072](https://github.com/vector-im/riot-web/pull/3072) + * Bump olm version + [\#3125](https://github.com/vector-im/riot-web/pull/3125) + Changes in [0.9.7](https://github.com/vector-im/riot-web/releases/tag/v0.9.7) (2017-02-04) ========================================================================================== [Full Changelog](https://github.com/vector-im/riot-web/compare/v0.9.7-rc.3...v0.9.7) diff --git a/README.md b/README.md index a5456c1dcb..2d7ab81b8a 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,9 @@ released version of Riot: as desired. See below for details. 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 + 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 over https. @@ -64,6 +67,18 @@ to build. (cd node_modules/matrix-js-sdk && npm install) (cd node_modules/matrix-react-sdk && npm install) ``` + Whenever you git pull on riot-web you will also probably need to force an update + to these dependencies - the easiest way is probably: + ``` + rm -rf node_modules/matrjx-{js,react}-sdk && npm i + (cd node_modules/matrix-js-sdk && npm install) + (cd node_modules/matrix-react-sdk && npm install) + ``` + However, we recommend setting up a proper development environment (see "Setting + up a development environment" below) if you want to run your own copy of the + `develop` branch, as it makes it much easier to keep these dependencies + up-to-date. Or just use https://riot.im/develop - the continuous integration + release of the develop branch. 1. Configure the app by copying `config.sample.json` to `config.json` and modifying it (see below for details) 1. `npm run dist` to build a tarball to deploy. Untaring this file will give @@ -114,7 +129,8 @@ built it yourself. To run as a desktop app: -1. Follow the instructions in 'Building From Source' above +1. Follow the instructions in 'Building From Source' above, but run + `npm run build` instead of `npm run dist` (since we don't need the tarball). 2. Install electron and run it: ``` diff --git a/electron/riot.im/config.json b/electron/riot.im/config.json index e129e5bfb5..c5bc65e1ea 100644 --- a/electron/riot.im/config.json +++ b/electron/riot.im/config.json @@ -5,6 +5,7 @@ "brand": "Riot", "integrations_ui_url": "https://scalar.vector.im/", "integrations_rest_url": "https://scalar.vector.im/api", + "bug_report_endpoint_url": "https://riot.im/bugreports/submit", "enableLabs": true, "roomDirectory": { "servers": [ diff --git a/package.json b/package.json index 155523af6c..8bdb2ba0f4 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "riot-web", "productName": "Riot", "main": "electron/src/electron-main.js", - "version": "0.9.7", + "version": "0.9.8", "description": "A feature-rich client for Matrix.org", "author": "Vector Creations Ltd.", "repository": { @@ -62,8 +62,8 @@ "gfm.css": "^1.1.1", "highlight.js": "^9.0.0", "linkifyjs": "^2.1.3", - "matrix-js-sdk": "0.7.5", - "matrix-react-sdk": "0.8.6", + "matrix-js-sdk": "0.7.6", + "matrix-react-sdk": "0.8.7", "modernizr": "^3.1.0", "q": "^1.4.1", "react": "^15.4.0", @@ -96,7 +96,7 @@ "css-raw-loader": "^0.1.1", "electron-builder": "^11.2.4", "electron-builder-squirrel-windows": "^11.2.1", - "emojione": "^2.2.3", + "emojione": "^2.2.7", "eslint": "^3.14.0", "eslint-config-google": "^0.7.1", "eslint-plugin-flowtype": "^2.30.0", @@ -138,7 +138,7 @@ "build": { "appId": "im.riot.app", "category": "Network", - "electronVersion": "1.4.14", + "electronVersion": "1.6.2", "//asar=false": "https://github.com/electron-userland/electron-builder/issues/675", "asar": false, "dereference": true, diff --git a/res/media/ring.mp3 b/res/media/ring.mp3 index 3c3cdde3f9..36200cd89d 100644 Binary files a/res/media/ring.mp3 and b/res/media/ring.mp3 differ diff --git a/res/media/ring.ogg b/res/media/ring.ogg index de49b8ae6f..708213bfac 100644 Binary files a/res/media/ring.ogg and b/res/media/ring.ogg differ diff --git a/res/vector-icons/manifest.json b/res/vector-icons/manifest.json index 2a34a2d2c2..feab1753cb 100644 --- a/res/vector-icons/manifest.json +++ b/res/vector-icons/manifest.json @@ -2,37 +2,37 @@ "name": "Riot", "icons": [ { - "src": "\/icons\/android-chrome-36x36.png", + "src": "android-chrome-36x36.png", "sizes": "36x36", "type": "image\/png", "density": "0.75" }, { - "src": "\/icons\/android-chrome-48x48.png", + "src": "android-chrome-48x48.png", "sizes": "48x48", "type": "image\/png", "density": "1.0" }, { - "src": "\/icons\/android-chrome-72x72.png", + "src": "android-chrome-72x72.png", "sizes": "72x72", "type": "image\/png", "density": "1.5" }, { - "src": "\/icons\/android-chrome-96x96.png", + "src": "android-chrome-96x96.png", "sizes": "96x96", "type": "image\/png", "density": "2.0" }, { - "src": "\/icons\/android-chrome-144x144.png", + "src": "android-chrome-144x144.png", "sizes": "144x144", "type": "image\/png", "density": "3.0" }, { - "src": "\/icons\/android-chrome-192x192.png", + "src": "android-chrome-192x192.png", "sizes": "192x192", "type": "image\/png", "density": "4.0" diff --git a/scripts/jenkins.sh b/scripts/jenkins.sh index 0f4fac2513..0d441cdd76 100755 --- a/scripts/jenkins.sh +++ b/scripts/jenkins.sh @@ -2,7 +2,7 @@ set -e -export NVM_DIR="/home/jenkins/.nvm" +export NVM_DIR="$HOME/.nvm" [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" nvm use 6 @@ -11,13 +11,18 @@ set -x npm install # apparently npm 3.10.3 on node 6.4.0 doesn't upgrade #develop target with npm install unless explicitly asked. -npm install matrix-react-sdk matrix-js-sdk +npm install matrix-react-sdk matrix-js-sdk olm # install olm. A naive 'npm i ./olm/olm-*.tgz' fails because it uses the url # from our package.json (or even matrix-js-sdk's) in preference. -tar -C olm -xz < olm/olm-*.tgz -rm -r node_modules/olm -cp -r olm/package node_modules/olm +# +# disabled for now, to avoid the annoying scenario of a release doing something +# different to /develop. Instead, add it to the 'npm install' list above. +# -- rav 2016/02/03 +#tar -C olm -xz < olm/olm-*.tgz +#rm -r node_modules/olm +#cp -r olm/package node_modules/olm + # we may be using dev branches of js-sdk and react-sdk, in which case we need to build them (cd node_modules/matrix-js-sdk && npm install) diff --git a/src/component-index.js b/src/component-index.js index 456f8176fc..2b67aa15e5 100644 --- a/src/component-index.js +++ b/src/component-index.js @@ -30,6 +30,8 @@ import structures$BottomLeftMenu from './components/structures/BottomLeftMenu'; structures$BottomLeftMenu && (module.exports.components['structures.BottomLeftMenu'] = structures$BottomLeftMenu); import structures$CompatibilityPage from './components/structures/CompatibilityPage'; structures$CompatibilityPage && (module.exports.components['structures.CompatibilityPage'] = structures$CompatibilityPage); +import structures$HomePage from './components/structures/HomePage'; +structures$HomePage && (module.exports.components['structures.HomePage'] = structures$HomePage); import structures$LeftPanel from './components/structures/LeftPanel'; structures$LeftPanel && (module.exports.components['structures.LeftPanel'] = structures$LeftPanel); import structures$RightPanel from './components/structures/RightPanel'; @@ -44,10 +46,8 @@ import structures$ViewSource from './components/structures/ViewSource'; structures$ViewSource && (module.exports.components['structures.ViewSource'] = structures$ViewSource); import views$context_menus$MessageContextMenu from './components/views/context_menus/MessageContextMenu'; views$context_menus$MessageContextMenu && (module.exports.components['views.context_menus.MessageContextMenu'] = views$context_menus$MessageContextMenu); -import views$context_menus$NotificationStateContextMenu from './components/views/context_menus/NotificationStateContextMenu'; -views$context_menus$NotificationStateContextMenu && (module.exports.components['views.context_menus.NotificationStateContextMenu'] = views$context_menus$NotificationStateContextMenu); -import views$context_menus$RoomTagContextMenu from './components/views/context_menus/RoomTagContextMenu'; -views$context_menus$RoomTagContextMenu && (module.exports.components['views.context_menus.RoomTagContextMenu'] = views$context_menus$RoomTagContextMenu); +import views$context_menus$RoomTileContextMenu from './components/views/context_menus/RoomTileContextMenu'; +views$context_menus$RoomTileContextMenu && (module.exports.components['views.context_menus.RoomTileContextMenu'] = views$context_menus$RoomTileContextMenu); import views$dialogs$BugReportDialog from './components/views/dialogs/BugReportDialog'; views$dialogs$BugReportDialog && (module.exports.components['views.dialogs.BugReportDialog'] = views$dialogs$BugReportDialog); import views$dialogs$ChangelogDialog from './components/views/dialogs/ChangelogDialog'; diff --git a/src/components/structures/BottomLeftMenu.js b/src/components/structures/BottomLeftMenu.js index 1e352fa12a..f378cac628 100644 --- a/src/components/structures/BottomLeftMenu.js +++ b/src/components/structures/BottomLeftMenu.js @@ -27,12 +27,14 @@ module.exports = React.createClass({ propTypes: { collapsed: React.PropTypes.bool.isRequired, + teamToken: React.PropTypes.string, }, getInitialState: function() { return({ directoryHover : false, roomsHover : false, + homeHover: false, peopleHover : false, settingsHover : false, }); @@ -63,6 +65,19 @@ module.exports = React.createClass({ this.setState({ roomsHover: false }); }, + // Home button events + onHomeClick: function() { + dis.dispatch({ action: 'view_home_page' }); + }, + + onHomeMouseEnter: function() { + this.setState({ homeHover: true }); + }, + + onHomeMouseLeave: function() { + this.setState({ homeHover: false }); + }, + // People events onPeopleClick: function() { dis.dispatch({ action: 'view_create_chat' }); @@ -99,9 +114,21 @@ module.exports = React.createClass({ render: function() { var TintableSvg = sdk.getComponent('elements.TintableSvg'); + + var homeButton; + if (this.props.teamToken) { + homeButton = ( + + + { this.getLabel("Welcome page", this.state.homeHover) } + + ); + } + return (
+ { homeButton } { this.getLabel("Start chat", this.state.peopleHover) } diff --git a/src/components/structures/HomePage.js b/src/components/structures/HomePage.js new file mode 100644 index 0000000000..8d44c90a2e --- /dev/null +++ b/src/components/structures/HomePage.js @@ -0,0 +1,40 @@ +/* +Copyright 2016 OpenMarket Ltd +Copyright 2017 Vector Creations Ltd + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +'use strict'; + +import React from 'react'; +import MatrixClientPeg from 'matrix-react-sdk/lib/MatrixClientPeg'; +import sdk from 'matrix-react-sdk'; + +module.exports = React.createClass({ + displayName: 'HomePage', + + propTypes: { + teamServerUrl: React.PropTypes.string.isRequired, + teamToken: React.PropTypes.string.isRequired, + collapsedRhs: React.PropTypes.bool, + }, + + render: function() { + return ( +
+