Skip to content

Commit 0c7c31e

Browse files
committed
Merge branch 'master' into rav/issue_template
2 parents 0442258 + dc1a0c5 commit 0c7c31e

132 files changed

Lines changed: 2628 additions & 954 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.eslintignore‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
src/vector/modernizr.js
2+
src/component-index.js

‎.eslintrc.js‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
extends: ["./node_modules/matrix-react-sdk/.eslintrc.js"],
3+
}

‎.travis.yml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ node_js:
33
- 6 # node v6, to match jenkins
44
install:
55
- npm install
6-
- (cd node_modules/matrix-react-sdk && npm run build)
6+
- (cd node_modules/matrix-js-sdk && npm install)
7+
- (cd node_modules/matrix-react-sdk && npm install)

‎CHANGELOG.md‎

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,135 @@
1+
Changes in [0.9.7](https://github.com/vector-im/riot-web/releases/tag/v0.9.7) (2017-02-04)
2+
==========================================================================================
3+
[Full Changelog](https://github.com/vector-im/riot-web/compare/v0.9.7-rc.3...v0.9.7)
4+
5+
* Update to matrix-js-sdk 0.7.5 (no changes from 0.7.5-rc.3)
6+
* Update to matrix-react-sdk 0.8.6 (no changes from 0.8.6-rc.3)
7+
8+
Changes in [0.9.7-rc.3](https://github.com/vector-im/riot-web/releases/tag/v0.9.7-rc.3) (2017-02-03)
9+
====================================================================================================
10+
[Full Changelog](https://github.com/vector-im/riot-web/compare/v0.9.7-rc.2...v0.9.7-rc.3)
11+
* Update to latest Olm to fix key import/export and use of megolm sessions
12+
created on more recent versions
13+
* Update to latest matrix-react-sdk and matrix-js-sdk to fix e2e device
14+
handling
15+
16+
Changes in [0.9.7-rc.2](https://github.com/vector-im/riot-web/releases/tag/v0.9.7-rc.2) (2017-02-03)
17+
====================================================================================================
18+
[Full Changelog](https://github.com/vector-im/riot-web/compare/v0.9.7-rc.1...v0.9.7-rc.2)
19+
20+
* Update matrix-js-sdk to get new device change
21+
notifications interface for more reliable e2e crypto
22+
23+
Changes in [0.9.7-rc.1](https://github.com/vector-im/riot-web/releases/tag/v0.9.7-rc.1) (2017-02-03)
24+
====================================================================================================
25+
[Full Changelog](https://github.com/vector-im/riot-web/compare/v0.9.6...v0.9.7-rc.1)
26+
27+
* Better user interface for screen readers and keyboard navigation
28+
[\#2946](https://github.com/vector-im/riot-web/pull/2946)
29+
* Allow mxc: URLs for icons in the NetworkDropdown
30+
[\#3118](https://github.com/vector-im/riot-web/pull/3118)
31+
* make TopRightMenu more intuitive
32+
[\#3117](https://github.com/vector-im/riot-web/pull/3117)
33+
* Handle icons with width > height
34+
[\#3110](https://github.com/vector-im/riot-web/pull/3110)
35+
* Fix jenkins build
36+
[\#3105](https://github.com/vector-im/riot-web/pull/3105)
37+
* Add CSS for a support box in login
38+
[\#3081](https://github.com/vector-im/riot-web/pull/3081)
39+
* Allow a custom login logo to be displayed on login
40+
[\#3082](https://github.com/vector-im/riot-web/pull/3082)
41+
* Fix the width of input fields within login/reg box
42+
[\#3080](https://github.com/vector-im/riot-web/pull/3080)
43+
* Set BaseAvatar_image bg colour = #fff
44+
[\#3057](https://github.com/vector-im/riot-web/pull/3057)
45+
* only recalculate favicon if it changes
46+
[\#3067](https://github.com/vector-im/riot-web/pull/3067)
47+
* CSS tweak for email address lookup
48+
[\#3064](https://github.com/vector-im/riot-web/pull/3064)
49+
* Glue the dialog to rageshake: honour sendLogs flag.
50+
[\#3061](https://github.com/vector-im/riot-web/pull/3061)
51+
* Don't use hash-named directory for dev server
52+
[\#3049](https://github.com/vector-im/riot-web/pull/3049)
53+
* Implement bug reporting logic
54+
[\#3000](https://github.com/vector-im/riot-web/pull/3000)
55+
* Add css for bug report dialog
56+
[\#3045](https://github.com/vector-im/riot-web/pull/3045)
57+
* Increase the max-height of the expanded status bar
58+
[\#3043](https://github.com/vector-im/riot-web/pull/3043)
59+
* Hopefully, fix intermittent test failure
60+
[\#3040](https://github.com/vector-im/riot-web/pull/3040)
61+
* CSS for 'searching known users'
62+
[\#2971](https://github.com/vector-im/riot-web/pull/2971)
63+
* Animate status bar max-height and margin-top
64+
[\#2981](https://github.com/vector-im/riot-web/pull/2981)
65+
* Add eslint config
66+
[\#3032](https://github.com/vector-im/riot-web/pull/3032)
67+
* Re-position typing avatars relative to "is typing"
68+
[\#3030](https://github.com/vector-im/riot-web/pull/3030)
69+
* CSS for avatars that appear when users are typing
70+
[\#2998](https://github.com/vector-im/riot-web/pull/2998)
71+
* Add StartupWMClass
72+
[\#3001](https://github.com/vector-im/riot-web/pull/3001)
73+
* Fix link to image for event options menu
74+
[\#3002](https://github.com/vector-im/riot-web/pull/3002)
75+
* Make riot desktop single instance
76+
[\#2999](https://github.com/vector-im/riot-web/pull/2999)
77+
* Add electron tray icon
78+
[\#2997](https://github.com/vector-im/riot-web/pull/2997)
79+
* Fixes to electron desktop notifs
80+
[\#2994](https://github.com/vector-im/riot-web/pull/2994)
81+
* Auto-hide the electron menu bar
82+
[\#2975](https://github.com/vector-im/riot-web/pull/2975)
83+
* A couple of tweaks to the karma config
84+
[\#2987](https://github.com/vector-im/riot-web/pull/2987)
85+
* Deploy script
86+
[\#2974](https://github.com/vector-im/riot-web/pull/2974)
87+
* Use the postcss-webpack-loader
88+
[\#2990](https://github.com/vector-im/riot-web/pull/2990)
89+
* Switch CSS to using postcss, and implement a dark theme.
90+
[\#2973](https://github.com/vector-im/riot-web/pull/2973)
91+
* Update redeploy script to keep old bundles
92+
[\#2969](https://github.com/vector-im/riot-web/pull/2969)
93+
* Include current version in update check explicitly
94+
[\#2967](https://github.com/vector-im/riot-web/pull/2967)
95+
* Add another layer of directory to webpack chunks
96+
[\#2966](https://github.com/vector-im/riot-web/pull/2966)
97+
* Fix links to fonts and images from CSS
98+
[\#2965](https://github.com/vector-im/riot-web/pull/2965)
99+
* Put parent build hash in webpack output filenames
100+
[\#2961](https://github.com/vector-im/riot-web/pull/2961)
101+
* update README to point to new names/locations
102+
[\#2846](https://github.com/vector-im/riot-web/pull/2846)
103+
104+
Changes in [0.9.6](https://github.com/vector-im/riot-web/releases/tag/v0.9.6) (2017-01-16)
105+
==========================================================================================
106+
[Full Changelog](https://github.com/vector-im/riot-web/compare/v0.9.6-rc.1...v0.9.6)
107+
108+
* Update to matrix-js-sdk 0.9.6 for video calling fix
109+
110+
Changes in [0.9.6-rc.1](https://github.com/vector-im/riot-web/releases/tag/v0.9.6-rc.1) (2017-01-13)
111+
====================================================================================================
112+
[Full Changelog](https://github.com/vector-im/riot-web/compare/v0.9.5...v0.9.6-rc.1)
113+
114+
* Build the js-sdk in the CI script
115+
[\#2920](https://github.com/vector-im/riot-web/pull/2920)
116+
* Hopefully fix Windows shortcuts
117+
[\#2917](https://github.com/vector-im/riot-web/pull/2917)
118+
* Update README now the js-sdk has a transpile step
119+
[\#2921](https://github.com/vector-im/riot-web/pull/2921)
120+
* Use the role for 'toggle dev tools'
121+
[\#2915](https://github.com/vector-im/riot-web/pull/2915)
122+
* Enable screen sharing easter-egg in desktop app
123+
[\#2909](https://github.com/vector-im/riot-web/pull/2909)
124+
* make electron send email validation URLs with a nextlink of riot.im
125+
[\#2808](https://github.com/vector-im/riot-web/pull/2808)
126+
* add Debian Stretch install steps to readme
127+
[\#2809](https://github.com/vector-im/riot-web/pull/2809)
128+
* Update desktop build instructions fixes #2792
129+
[\#2793](https://github.com/vector-im/riot-web/pull/2793)
130+
* CSS for the delete threepid button
131+
[\#2784](https://github.com/vector-im/riot-web/pull/2784)
132+
1133
Changes in [0.9.5](https://github.com/vector-im/riot-web/releases/tag/v0.9.5) (2016-12-24)
2134
==========================================================================================
3135
[Full Changelog](https://github.com/vector-im/riot-web/compare/v0.9.4...v0.9.5)

‎README.md‎

Lines changed: 31 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ https://riot.im/develop for those who like living dangerously.
1414
To host your own copy of Riot, the quickest bet is to use a pre-built
1515
released version of Riot:
1616

17-
1. Download the latest version from https://github.com/vector-im/vector-web/releases
17+
1. Download the latest version from https://github.com/vector-im/riot-web/releases
1818
1. Untar the tarball on your web server
1919
1. Move (or symlink) the vector-x.x.x directory to an appropriate name
2020
1. If desired, copy `config.sample.json` to `config.json` and edit it
@@ -44,7 +44,7 @@ access to Riot (or other apps) due to sharing the same domain.
4444

4545
We have put some coarse mitigations into place to try to protect against this
4646
situation, but it's still not good practice to do it in the first place. See
47-
https://github.com/vector-im/vector-web/issues/1977 for more details.
47+
https://github.com/vector-im/riot-web/issues/1977 for more details.
4848

4949
Building From Source
5050
====================
@@ -53,13 +53,17 @@ Riot is a modular webapp built with modern ES6 and requires a npm build system
5353
to build.
5454

5555
1. Install or update `node.js` so that your `npm` is at least at version `2.0.0`
56-
1. Clone the repo: `git clone https://github.com/vector-im/vector-web.git`
57-
1. Switch to the vector-web directory: `cd vector-web`
56+
1. Clone the repo: `git clone https://github.com/vector-im/riot-web.git`
57+
1. Switch to the riot-web directory: `cd riot-web`
5858
1. Install the prerequisites: `npm install`
5959
1. If you are using the `develop` branch of vector-web, you will probably need
60-
to rebuild one of the dependencies, due to
61-
https://github.com/npm/npm/issues/3055: `(cd node_modules/matrix-react-sdk
62-
&& npm install)`
60+
to rebuild some of the dependencies, due to
61+
https://github.com/npm/npm/issues/3055:
62+
63+
```
64+
(cd node_modules/matrix-js-sdk && npm install)
65+
(cd node_modules/matrix-react-sdk && npm install)
66+
```
6367
1. Configure the app by copying `config.sample.json` to `config.json` and
6468
modifying it (see below for details)
6569
1. `npm run dist` to build a tarball to deploy. Untaring this file will give
@@ -105,16 +109,18 @@ Running as a Desktop app
105109
========================
106110

107111
Riot can also be run as a desktop app, wrapped in electron. You can download a
108-
pre-built version from https://riot.im/download/desktop/ or, if you prefer,
112+
pre-built version from https://riot.im/desktop.html or, if you prefer,
109113
built it yourself.
110114

111115
To run as a desktop app:
112-
```
113-
npm install
114-
npm install electron
115-
npm run build
116-
node_modules/.bin/electron .
117-
```
116+
117+
1. Follow the instructions in 'Building From Source' above
118+
2. Install electron and run it:
119+
120+
```
121+
npm install electron
122+
node_modules/.bin/electron .
123+
```
118124

119125
To build packages, use electron-builder. This is configured to output:
120126
* dmg + zip for macOS
@@ -137,11 +143,9 @@ npm run build:electron
137143

138144
For other packages, use electron-builder manually. For example, to build a package
139145
for 64 bit Linux:
140-
```
141-
npm install
142-
npm run build
143-
node_modules/.bin/build -l --x64
144-
```
146+
147+
1. Follow the instructions in 'Building From Source' above
148+
2. `node_modules/.bin/build -l --x64`
145149

146150
All electron packages go into `electron/dist/`
147151

@@ -175,13 +179,13 @@ the `component-index.js` for the app (used in future for skinning)
175179
development on Riot forcing `matrix-react-sdk` to move fast at the expense of
176180
maintaining a clear abstraction between the two.** Hacking on Riot inevitably
177181
means hacking equally on `matrix-react-sdk`, and there are bits of
178-
`matrix-react-sdk` behaviour incorrectly residing in the `vector-web` project
182+
`matrix-react-sdk` behaviour incorrectly residing in the `riot-web` project
179183
(e.g. matrix-react-sdk specific CSS), and a bunch of Riot specific behaviour
180184
in the `matrix-react-sdk` (grep for `vector` / `riot`). This separation problem will be
181185
solved asap once development on Riot (and thus matrix-react-sdk) has
182186
stabilised. Until then, the two projects should basically be considered as a
183187
single unit. In particular, `matrix-react-sdk` issues are currently filed
184-
against `vector-web` in github.
188+
against `riot-web` in github.
185189

186190
Please note that Riot is intended to run correctly without access to the public
187191
internet. So please don't depend on resources (JS libs, CSS, images, fonts)
@@ -216,8 +220,8 @@ Then similarly with `matrix-react-sdk`:
216220

217221
Finally, build and start Riot itself:
218222

219-
1. `git clone git@github.com:vector-im/vector-web.git`
220-
1. `cd vector-web`
223+
1. `git clone git@github.com:vector-im/riot-web.git`
224+
1. `cd riot-web`
221225
1. `git checkout develop`
222226
1. `npm install`
223227
1. `rm -r node_modules/matrix-js-sdk; ln -s ../../matrix-js-sdk node_modules/`
@@ -241,10 +245,10 @@ Finally, build and start Riot itself:
241245
disables caching, so do NOT use it in production.
242246
1. Open http://127.0.0.1:8080/ in your browser to see your newly built Riot.
243247
244-
When you make changes to `matrix-react-sdk`, you will need to run `npm run
245-
build` in the relevant directory. You can do this automatically by instead
246-
running `npm start` in the directory, to start a development builder which
247-
will watch for changes to the files and rebuild automatically.
248+
When you make changes to `matrix-react-sdk` or `matrix-js-sdk`, you will need
249+
to run `npm run build` in the relevant directory. You can do this automatically
250+
by instead running `npm start` in the directory, to start a development builder
251+
which will watch for changes to the files and rebuild automatically.
248252
249253
If you add or remove any components from the Riot skin, you will need to rebuild
250254
the skin's index by running, `npm run reskindex`.

‎config.sample.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"brand": "Riot",
55
"integrations_ui_url": "https://scalar.vector.im/",
66
"integrations_rest_url": "https://scalar.vector.im/api",
7+
"bug_report_endpoint_url": "https://vector.im/bugs",
78
"enableLabs": true,
89
"roomDirectory": {
910
"servers": [

‎docs/theming.md‎

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
Theming Riot
2+
============
3+
4+
Themes are a very basic way of providing simple alternative look & feels to the
5+
riot-web app via CSS & custom imagery.
6+
7+
They are *NOT* co be confused with 'skins', which describe apps which sit on top
8+
of matrix-react-sdk - e.g. in theory Riot itself is a react-sdk skin.
9+
As of Jan 2017, skins are not fully supported; riot is the only available skin.
10+
11+
To define a theme for Riot:
12+
13+
1. Pick a name, e.g. `teal`. at time of writing we have `light` and `dark`.
14+
2. Fork `src/skins/vector/css/themes/dark.scss` to be teal.scss
15+
3. Fork `src/skins/vector/css/themes/_base.scss` to be _teal.scss
16+
4. Override variables in _teal.scss as desired. You may wish to delete ones
17+
which don't differ from _base.scss, to make it clear which are being
18+
overridden. If every single colour is being changed (as per _dark.scss)
19+
then you might as well keep them all.
20+
5. Add the theme to the list of entrypoints in webpack.config.js
21+
6. Add the theme to the list of themes in matrix-react-sdk's UserSettings.js
22+
7. Sit back and admire your handywork.
23+
24+
In future, the assets for a theme will probably be gathered together into a
25+
single directory tree.

‎electron/src/electron-main.js‎

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ if (check_squirrel_hooks()) return;
2626
const electron = require('electron');
2727
const url = require('url');
2828

29+
const tray = require('./tray');
30+
2931
const VectorMenu = require('./vectormenu');
3032

3133
let vectorConfig = {};
@@ -112,7 +114,16 @@ function startAutoUpdate(update_base_url) {
112114
// 204 No Content. On windows it takes a base path and looks for
113115
// files under that path.
114116
if (process.platform == 'darwin') {
115-
electron.autoUpdater.setFeedURL(update_base_url + 'macos/');
117+
// include the current version in the URL we hit. Electron doesn't add
118+
// it anywhere (apart from the User-Agent) so it's up to us. We could
119+
// (and previously did) just use the User-Agent, but this doesn't
120+
// rely on NSURLConnection setting the User-Agent to what we expect,
121+
// and also acts as a convenient cache-buster to ensure that when the
122+
// app updates it always gets a fresh value to avoid update-looping.
123+
electron.autoUpdater.setFeedURL(
124+
update_base_url +
125+
'macos/?localVersion=' + encodeURIComponent(electron.app.getVersion())
126+
);
116127
} else if (process.platform == 'win32') {
117128
electron.autoUpdater.setFeedURL(update_base_url + 'win32/' + process.arch + '/');
118129
} else {
@@ -148,6 +159,21 @@ process.on('uncaughtException', function (error) {
148159

149160
electron.ipcMain.on('install_update', installUpdate);
150161

162+
electron.app.commandLine.appendSwitch('--enable-usermedia-screen-capturing');
163+
164+
const shouldQuit = electron.app.makeSingleInstance((commandLine, workingDirectory) => {
165+
// Someone tried to run a second instance, we should focus our window.
166+
if (mainWindow) {
167+
if (!mainWindow.isVisible()) mainWindow.show();
168+
if (mainWindow.isMinimized()) mainWindow.restore();
169+
mainWindow.focus();
170+
}
171+
});
172+
173+
if (shouldQuit) {
174+
electron.app.quit()
175+
}
176+
151177
electron.app.on('ready', () => {
152178
if (vectorConfig.update_base_url) {
153179
console.log("Starting auto update with base URL: " + vectorConfig.update_base_url);
@@ -164,18 +190,25 @@ electron.app.on('ready', () => {
164190
icon: icon_path,
165191
width: 1024, height: 768,
166192
show: false,
193+
autoHideMenuBar: true,
167194
});
168195
mainWindow.loadURL(`file://${__dirname}/../../webapp/index.html`);
169196
electron.Menu.setApplicationMenu(VectorMenu);
170197

198+
// Create trayIcon icon
199+
tray.create(mainWindow, {
200+
icon_path: icon_path,
201+
brand: vectorConfig.brand || 'Riot'
202+
});
203+
171204
mainWindow.once('ready-to-show', () => {
172205
mainWindow.show();
173206
});
174207
mainWindow.on('closed', () => {
175208
mainWindow = null;
176209
});
177210
mainWindow.on('close', (e) => {
178-
if (process.platform == 'darwin' && !appQuitting) {
211+
if (!appQuitting && (tray.hasTray() || process.platform == 'darwin')) {
179212
// On Mac, closing the window just hides it
180213
// (this is generally how single-window Mac apps
181214
// behave, eg. Mail.app)

0 commit comments

Comments
 (0)