Skip to content

Commit 3bcd852

Browse files
committed
Merge branch 'develop' into matthew/dharma
2 parents 3c6d87b + 25c0656 commit 3bcd852

19 files changed

Lines changed: 461 additions & 238 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,77 @@
1+
Changes in [0.15.7](https://github.com/vector-im/riot-web/releases/tag/v0.15.7) (2018-07-09)
2+
============================================================================================
3+
[Full Changelog](https://github.com/vector-im/riot-web/compare/v0.15.7-rc.2...v0.15.7)
4+
5+
* No changes since rc.2
6+
7+
Changes in [0.15.7-rc.2](https://github.com/vector-im/riot-web/releases/tag/v0.15.7-rc.2) (2018-07-06)
8+
======================================================================================================
9+
[Full Changelog](https://github.com/vector-im/riot-web/compare/v0.15.7-rc.1...v0.15.7-rc.2)
10+
11+
* Update react-sdk and js-sdk
12+
13+
Changes in [0.15.7-rc.1](https://github.com/vector-im/riot-web/releases/tag/v0.15.7-rc.1) (2018-07-04)
14+
======================================================================================================
15+
[Full Changelog](https://github.com/vector-im/riot-web/compare/v0.15.6...v0.15.7-rc.1)
16+
17+
* add override for colour of room tile text within memberinfo (unreadable)
18+
[\#6889](https://github.com/vector-im/riot-web/pull/6889)
19+
20+
Changes in [0.15.6](https://github.com/vector-im/riot-web/releases/tag/v0.15.6) (2018-06-29)
21+
============================================================================================
22+
[Full Changelog](https://github.com/vector-im/riot-web/compare/v0.15.6-rc.2...v0.15.6)
23+
24+
* Pull in bug fixes from react-sdk
25+
26+
Changes in [0.15.6-rc.2](https://github.com/vector-im/riot-web/releases/tag/v0.15.6-rc.2) (2018-06-22)
27+
======================================================================================================
28+
[Full Changelog](https://github.com/vector-im/riot-web/compare/v0.15.6-rc.1...v0.15.6-rc.2)
29+
30+
* Update to react-sdk rc.2 for fix to slash commands
31+
32+
Changes in [0.15.6-rc.1](https://github.com/vector-im/riot-web/releases/tag/v0.15.6-rc.1) (2018-06-21)
33+
======================================================================================================
34+
[Full Changelog](https://github.com/vector-im/riot-web/compare/v0.15.5...v0.15.6-rc.1)
35+
36+
* Update from Weblate.
37+
[\#6915](https://github.com/vector-im/riot-web/pull/6915)
38+
* [electron] Fix desktop app --hidden flag
39+
[\#6805](https://github.com/vector-im/riot-web/pull/6805)
40+
41+
Changes in [0.15.5](https://github.com/vector-im/riot-web/releases/tag/v0.15.5) (2018-06-12)
42+
============================================================================================
43+
[Full Changelog](https://github.com/vector-im/riot-web/compare/v0.15.5-rc.1...v0.15.5)
44+
45+
* No changes since rc.1
46+
47+
Changes in [0.15.5-rc.1](https://github.com/vector-im/riot-web/releases/tag/v0.15.5-rc.1) (2018-06-06)
48+
======================================================================================================
49+
[Full Changelog](https://github.com/vector-im/riot-web/compare/v0.15.4...v0.15.5-rc.1)
50+
51+
* Update from Weblate.
52+
[\#6846](https://github.com/vector-im/riot-web/pull/6846)
53+
54+
Changes in [0.15.4](https://github.com/vector-im/riot-web/releases/tag/v0.15.4) (2018-05-25)
55+
============================================================================================
56+
[Full Changelog](https://github.com/vector-im/riot-web/compare/v0.15.4-rc.1...v0.15.4)
57+
58+
* Add cookie policy link to desktop app config
59+
60+
Changes in [0.15.4-rc.1](https://github.com/vector-im/riot-web/releases/tag/v0.15.4-rc.1) (2018-05-24)
61+
======================================================================================================
62+
[Full Changelog](https://github.com/vector-im/riot-web/compare/v0.15.3...v0.15.4-rc.1)
63+
64+
* Update from Weblate.
65+
[\#6792](https://github.com/vector-im/riot-web/pull/6792)
66+
* Hide URL options for e2e blob: URL images
67+
[\#6765](https://github.com/vector-im/riot-web/pull/6765)
68+
* Fix right click menu in electron
69+
[\#6763](https://github.com/vector-im/riot-web/pull/6763)
70+
* Update to electron 2.0.1
71+
[\#6764](https://github.com/vector-im/riot-web/pull/6764)
72+
* Add instructions for changing translated strings
73+
[\#6528](https://github.com/vector-im/riot-web/pull/6528)
74+
175
Changes in [0.15.3](https://github.com/vector-im/riot-web/releases/tag/v0.15.3) (2018-05-18)
276
============================================================================================
377
[Full Changelog](https://github.com/vector-im/riot-web/compare/v0.15.2...v0.15.3)

‎config.sample.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"brand": "Riot",
99
"integrations_ui_url": "https://scalar.vector.im/",
1010
"integrations_rest_url": "https://scalar.vector.im/api",
11+
"integrations_jitsi_widget_url": "https://scalar.vector.im/api/widgets/jitsi.html",
1112
"bug_report_endpoint_url": "https://riot.im/bugreports/submit",
1213
"features": {
1314
"feature_groups": "labs",

‎electron_app/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "riot-web",
33
"productName": "Riot",
44
"main": "src/electron-main.js",
5-
"version": "0.15.3",
5+
"version": "0.15.7",
66
"description": "A feature-rich client for Matrix.org",
77
"author": "Vector Creations Ltd.",
88
"dependencies": {

‎electron_app/riot.im/config.json‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
},
1919
"piwik": {
2020
"url": "https://piwik.riot.im/",
21-
"siteId": 1
21+
"siteId": 1,
22+
"policyUrl": "https://matrix.org/docs/guides/riot_im_cookie_policy"
2223
},
2324
"enable_presence_by_hs_url": {
2425
"https://matrix.org": false

‎electron_app/src/electron-main.js‎

Lines changed: 49 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const checkSquirrelHooks = require('./squirrelhooks');
2323
if (checkSquirrelHooks()) return;
2424

2525
const argv = require('minimist')(process.argv);
26-
const electron = require('electron');
26+
const {app, ipcMain, powerSaveBlocker, BrowserWindow, Menu} = require('electron');
2727
const AutoLaunch = require('auto-launch');
2828

2929
const tray = require('./tray');
@@ -33,8 +33,8 @@ const updater = require('./updater');
3333

3434
const windowStateKeeper = require('electron-window-state');
3535

36-
if (argv.profile) {
37-
electron.app.setPath('userData', `${electron.app.getPath('userData')}-${argv.profile}`);
36+
if (argv['profile']) {
37+
app.setPath('userData', `${app.getPath('userData')}-${argv['profile']}`);
3838
}
3939

4040
let vectorConfig = {};
@@ -62,14 +62,14 @@ process.on('uncaughtException', function(error) {
6262
});
6363

6464
let focusHandlerAttached = false;
65-
electron.ipcMain.on('setBadgeCount', function(ev, count) {
66-
electron.app.setBadgeCount(count);
67-
if (count === 0) {
65+
ipcMain.on('setBadgeCount', function(ev, count) {
66+
app.setBadgeCount(count);
67+
if (count === 0 && mainWindow) {
6868
mainWindow.flashFrame(false);
6969
}
7070
});
7171

72-
electron.ipcMain.on('loudNotification', function() {
72+
ipcMain.on('loudNotification', function() {
7373
if (process.platform === 'win32' && mainWindow && !mainWindow.isFocused() && !focusHandlerAttached) {
7474
mainWindow.flashFrame(true);
7575
mainWindow.once('focus', () => {
@@ -81,26 +81,29 @@ electron.ipcMain.on('loudNotification', function() {
8181
});
8282

8383
let powerSaveBlockerId;
84-
electron.ipcMain.on('app_onAction', function(ev, payload) {
84+
ipcMain.on('app_onAction', function(ev, payload) {
8585
switch (payload.action) {
8686
case 'call_state':
87-
if (powerSaveBlockerId && electron.powerSaveBlocker.isStarted(powerSaveBlockerId)) {
87+
if (powerSaveBlockerId && powerSaveBlocker.isStarted(powerSaveBlockerId)) {
8888
if (payload.state === 'ended') {
89-
electron.powerSaveBlocker.stop(powerSaveBlockerId);
89+
powerSaveBlocker.stop(powerSaveBlockerId);
9090
}
9191
} else {
9292
if (payload.state === 'connected') {
93-
powerSaveBlockerId = electron.powerSaveBlocker.start('prevent-display-sleep');
93+
powerSaveBlockerId = powerSaveBlocker.start('prevent-display-sleep');
9494
}
9595
}
9696
break;
9797
}
9898
});
9999

100100

101-
electron.app.commandLine.appendSwitch('--enable-usermedia-screen-capturing');
101+
app.commandLine.appendSwitch('--enable-usermedia-screen-capturing');
102+
103+
const shouldQuit = app.makeSingleInstance((commandLine, workingDirectory) => {
104+
// If other instance launched with --hidden then skip showing window
105+
if (commandLine.includes('--hidden')) return;
102106

103-
const shouldQuit = electron.app.makeSingleInstance((commandLine, workingDirectory) => {
104107
// Someone tried to run a second instance, we should focus our window.
105108
if (mainWindow) {
106109
if (!mainWindow.isVisible()) mainWindow.show();
@@ -111,7 +114,7 @@ const shouldQuit = electron.app.makeSingleInstance((commandLine, workingDirector
111114

112115
if (shouldQuit) {
113116
console.log('Other instance detected: exiting');
114-
electron.app.exit();
117+
app.exit();
115118
}
116119

117120

@@ -136,7 +139,7 @@ const settings = {
136139
},
137140
};
138141

139-
electron.ipcMain.on('settings_get', async function(ev) {
142+
ipcMain.on('settings_get', async function(ev) {
140143
const data = {};
141144

142145
try {
@@ -145,34 +148,37 @@ electron.ipcMain.on('settings_get', async function(ev) {
145148
}));
146149

147150
ev.sender.send('settings', data);
148-
} catch(e) { console.error(e); }
151+
} catch (e) {
152+
console.error(e);
153+
}
149154
});
150155

151-
electron.ipcMain.on('settings_set', function(ev, key, value) {
156+
ipcMain.on('settings_set', function(ev, key, value) {
152157
console.log(key, value);
153158
if (settings[key] && settings[key].set) {
154159
settings[key].set(value);
155160
}
156161
});
157162

158-
electron.app.on('ready', () => {
159-
160-
if (argv.devtools) {
163+
app.on('ready', () => {
164+
if (argv['devtools']) {
161165
try {
162-
const { default: installExtension, REACT_DEVELOPER_TOOLS, REACT_PERF } = require('electron-devtools-installer');
163-
installExtension(REACT_DEVELOPER_TOOLS)
166+
const { default: installExt, REACT_DEVELOPER_TOOLS, REACT_PERF } = require('electron-devtools-installer');
167+
installExt(REACT_DEVELOPER_TOOLS)
164168
.then((name) => console.log(`Added Extension: ${name}`))
165169
.catch((err) => console.log('An error occurred: ', err));
166-
installExtension(REACT_PERF)
170+
installExt(REACT_PERF)
167171
.then((name) => console.log(`Added Extension: ${name}`))
168172
.catch((err) => console.log('An error occurred: ', err));
169-
} catch(e) {console.log(e);}
173+
} catch (e) {
174+
console.log(e);
175+
}
170176
}
171177

172178

173-
if (vectorConfig.update_base_url) {
174-
console.log(`Starting auto update with base URL: ${vectorConfig.update_base_url}`);
175-
updater.start(vectorConfig.update_base_url);
179+
if (vectorConfig['update_base_url']) {
180+
console.log(`Starting auto update with base URL: ${vectorConfig['update_base_url']}`);
181+
updater.start(vectorConfig['update_base_url']);
176182
} else {
177183
console.log('No update_base_url is defined: auto update is disabled');
178184
}
@@ -185,7 +191,7 @@ electron.app.on('ready', () => {
185191
defaultHeight: 768,
186192
});
187193

188-
mainWindow = global.mainWindow = new electron.BrowserWindow({
194+
mainWindow = global.mainWindow = new BrowserWindow({
189195
icon: iconPath,
190196
show: false,
191197
autoHideMenuBar: true,
@@ -196,7 +202,7 @@ electron.app.on('ready', () => {
196202
height: mainWindowState.height,
197203
});
198204
mainWindow.loadURL(`file://${__dirname}/../../webapp/index.html`);
199-
electron.Menu.setApplicationMenu(vectorMenu);
205+
Menu.setApplicationMenu(vectorMenu);
200206

201207
// explicitly hide because setApplicationMenu on Linux otherwise shows...
202208
// https://github.com/electron/electron/issues/9621
@@ -208,11 +214,16 @@ electron.app.on('ready', () => {
208214
brand: vectorConfig.brand || 'Riot',
209215
});
210216

211-
if (!argv.hidden) {
212-
mainWindow.once('ready-to-show', () => {
217+
mainWindow.once('ready-to-show', () => {
218+
mainWindowState.manage(mainWindow);
219+
220+
if (!argv['hidden']) {
213221
mainWindow.show();
214-
});
215-
}
222+
} else {
223+
// hide here explicitly because window manage above sometimes shows it
224+
mainWindow.hide();
225+
}
226+
});
216227

217228
mainWindow.on('closed', () => {
218229
mainWindow = global.mainWindow = null;
@@ -240,18 +251,17 @@ electron.app.on('ready', () => {
240251
}
241252

242253
webContentsHandler(mainWindow.webContents);
243-
mainWindowState.manage(mainWindow);
244254
});
245255

246-
electron.app.on('window-all-closed', () => {
247-
electron.app.quit();
256+
app.on('window-all-closed', () => {
257+
app.quit();
248258
});
249259

250-
electron.app.on('activate', () => {
260+
app.on('activate', () => {
251261
mainWindow.show();
252262
});
253263

254-
electron.app.on('before-quit', () => {
264+
app.on('before-quit', () => {
255265
global.appQuitting = true;
256266
if (mainWindow) {
257267
mainWindow.webContents.send('before-quit');
@@ -262,4 +272,4 @@ electron.app.on('before-quit', () => {
262272
// installer uses for the shortcut icon.
263273
// This makes notifications work on windows 8.1 (and is
264274
// a noop on other platforms).
265-
electron.app.setAppUserModelId('com.squirrel.riot-web.Riot');
275+
app.setAppUserModelId('com.squirrel.riot-web.Riot');

0 commit comments

Comments
 (0)