Skip to content

Commit 0788826

Browse files
committed
Merge branches 'develop' and 't3chguy/updating_stuff' of github.com:vector-im/riot-web into t3chguy/updating_stuff
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> # Conflicts: # electron_app/src/tray.js
2 parents 67a9b65 + a9c8429 commit 0788826

11 files changed

Lines changed: 58 additions & 43 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
Changes in [0.11.4](https://github.com/vector-im/riot-web/releases/tag/v0.11.4) (2017-06-22)
2+
============================================================================================
3+
[Full Changelog](https://github.com/vector-im/riot-web/compare/v0.11.3...v0.11.4)
4+
5+
* Update matrix-js-sdk and react-sdk to fix a regression where the
6+
background indexedb worker was disabled, failures to open indexeddb
7+
causing the app to fail to start, a race when starting that could break
8+
switching to rooms, and the inability to invite users with mixed case
9+
usernames.
10+
111
Changes in [0.11.3](https://github.com/vector-im/riot-web/releases/tag/v0.11.3) (2017-06-20)
212
============================================================================================
313
[Full Changelog](https://github.com/vector-im/riot-web/compare/v0.11.2...v0.11.3)

‎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.11.3",
5+
"version": "0.11.4",
66
"description": "A feature-rich client for Matrix.org",
77
"author": "Vector Creations Ltd.",
88
"dependencies": {

‎electron_app/src/tray.js‎

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -54,33 +54,38 @@ exports.create = function(config) {
5454
},
5555
]);
5656

57-
trayIcon = new Tray(config.icon_path);
57+
const defaultIcon = nativeImage.createFromPath(config.icon_path);
58+
59+
trayIcon = new Tray(defaultIcon);
5860
trayIcon.setToolTip(config.brand);
5961
trayIcon.setContextMenu(contextMenu);
6062
trayIcon.on('click', toggleWin);
6163

6264
let lastFavicon = null;
6365
global.mainWindow.webContents.on('page-favicon-updated', async function(ev, favicons) {
64-
let newFavicon = config.icon_path;
65-
if (favicons && favicons.length > 0 && favicons[0].startsWith('data:')) {
66-
newFavicon = favicons[0];
66+
if (!favicons || favicons.length <= 0 || !favicons[0].startsWith('data:')) {
67+
if (lastFavicon !== null) {
68+
win.setIcon(defaultIcon);
69+
trayIcon.setImage(defaultIcon);
70+
lastFavicon = null;
71+
}
72+
return;
6773
}
6874

6975
// No need to change, shortcut
70-
if (newFavicon === lastFavicon) return;
71-
lastFavicon = newFavicon;
72-
73-
// if its not default we have to construct into nativeImage
74-
if (newFavicon !== config.icon_path) {
75-
newFavicon = nativeImage.createFromDataURL(favicons[0]);
76-
77-
if (process.platform === 'win32') {
78-
try {
79-
const icoPath = path.join(app.getPath('temp'), 'win32_riot_icon.ico')
80-
const icoBuf = await pngToIco(newFavicon.toPNG());
81-
fs.writeFileSync(icoPath, icoBuf);
82-
newFavicon = icoPath;
83-
} catch (e) {console.error(e);}
76+
if (favicons[0] === lastFavicon) return;
77+
lastFavicon = favicons[0];
78+
79+
let newFavicon = nativeImage.createFromDataURL(favicons[0]);
80+
81+
// Windows likes ico's too much.
82+
if (process.platform === 'win32') {
83+
try {
84+
const icoPath = path.join(app.getPath('temp'), 'win32_riot_icon.ico');
85+
fs.writeFileSync(icoPath, await pngToIco(newFavicon.toPNG()));
86+
newFavicon = nativeImage.createFromPath(icoPath);
87+
} catch (e) {
88+
console.error("Failed to make win32 ico", e);
8489
}
8590
}
8691

‎package.json‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "riot-web",
33
"productName": "Riot",
44
"main": "electron_app/src/electron-main.js",
5-
"version": "0.11.3",
5+
"version": "0.11.4",
66
"description": "A feature-rich client for Matrix.org",
77
"author": "Vector Creations Ltd.",
88
"repository": {
@@ -65,8 +65,8 @@
6565
"gfm.css": "^1.1.1",
6666
"highlight.js": "^9.0.0",
6767
"linkifyjs": "^2.1.3",
68-
"matrix-js-sdk": "0.7.12",
69-
"matrix-react-sdk": "0.9.6",
68+
"matrix-js-sdk": "0.7.13",
69+
"matrix-react-sdk": "0.9.7",
7070
"modernizr": "^3.1.0",
7171
"pako": "^1.0.5",
7272
"q": "^1.4.1",

‎src/components/views/elements/ImageView.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ module.exports = React.createClass({
158158
var eventRedact;
159159
if(showEventMeta) {
160160
eventRedact = (<div className="mx_ImageView_button" onClick={this.onRedactClick}>
161-
{ _t('Redact') }
161+
{ _t('Remove') }
162162
</div>);
163163
}
164164

‎src/components/views/globals/PasswordNagBar.js‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import React from 'react';
2020
import sdk from 'matrix-react-sdk';
2121
import Modal from 'matrix-react-sdk/lib/Modal';
2222
import dis from 'matrix-react-sdk/lib/dispatcher';
23-
import { _t } from 'matrix-react-sdk/lib/languageHandler';
23+
import { _t, _tJsx } from 'matrix-react-sdk/lib/languageHandler';
2424

2525
export default React.createClass({
2626
onUpdateClicked: function() {
@@ -49,7 +49,11 @@ export default React.createClass({
4949
alt="Warning"
5050
/>
5151
<div className="mx_MatrixToolbar_content">
52-
{ _t("To return to your account in future you need to <u>set a password</u>") }
52+
{ _tJsx(
53+
"To return to your account in future you need to <u>set a password</u>",
54+
/<u>(.*?)<\/u>/,
55+
(sub) => { return <u>{ sub }</u>; },
56+
) }
5357
</div>
5458
<button className="mx_MatrixToolbar_action">
5559
{ _t("Set Password") }

‎src/i18n/strings/en_EN.json‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@
9898
"Please Register": "Please Register",
9999
"powered by Matrix": "powered by Matrix",
100100
"Quote": "Quote",
101-
"Redact": "Redact",
102101
"Reject": "Reject",
103102
"Remove %(name)s from the directory?": "Remove %(name)s from the directory?",
104103
"Remove": "Remove",
@@ -204,5 +203,5 @@
204203
"You have successfully set a password and an email address!": "You have successfully set a password and an email address!",
205204
"Remember, you can always set an email address in user settings if you change your mind.": "Remember, you can always set an email address in user settings if you change your mind.",
206205
"To return to your account in future you need to <u>set a password</u>": "To return to your account in future you need to <u>set a password</u>",
207-
"Set Password"
206+
"Set Password": "Set Password"
208207
}

‎src/i18n/strings/en_US.json‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@
9696
"Please Register": "Please Register",
9797
"powered by Matrix": "powered by Matrix",
9898
"Quote": "Quote",
99-
"Redact": "Redact",
10099
"Reject": "Reject",
101100
"Remove %(name)s from the directory?": "Remove %(name)s from the directory?",
102101
"Remove": "Remove",

‎src/skins/vector/css/matrix-react-sdk/structures/_UserSettings.scss‎

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -103,18 +103,12 @@ limitations under the License.
103103
}
104104

105105
.mx_UserSettings_passwordWarning {
106-
padding: 6px;
107-
background-color: #76cfa6;
108-
border-radius: 3px;
109-
color: #fff;
106+
/* To move the "Sign out" button out of the way */
107+
clear: both;
108+
color: $warning-color;
110109
margin-bottom: 5px;
111110
}
112111

113-
.mx_UserSettings_passwordWarning_icon {
114-
vertical-align: -6px;
115-
margin-right: 3px;
116-
}
117-
118112
.mx_UserSettings_importExportButtons {
119113
padding-top: 10px;
120114
padding-left: 40px;

‎test/app-tests/loading.js‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ describe('loading:', function () {
7070
});
7171
});
7272

73-
afterEach(async function() {
73+
afterEach(async function () {
74+
console.log(`${Date.now()}: loading: afterEach`);
7475
if (parentDiv) {
7576
ReactDOM.unmountComponentAtNode(parentDiv);
7677
parentDiv.remove();
@@ -83,6 +84,7 @@ describe('loading:', function () {
8384
// clear the indexeddbs so we can start from a clean slate next time.
8485
await test_utils.deleteIndexedDB('matrix-js-sdk:crypto');
8586
await test_utils.deleteIndexedDB('matrix-js-sdk:riot-web-sync');
87+
console.log(`${Date.now()}: loading: afterEach complete`);
8688
});
8789

8890
/* simulate the load process done by index.js
@@ -614,7 +616,6 @@ describe('loading:', function () {
614616
matrixChat, sdk.getComponent('structures.login.Login'));
615617

616618
httpBackend.when('POST', '/login').check(function(req) {
617-
console.log(req);
618619
expect(req.data.type).toEqual('m.login.password');
619620
expect(req.data.identifier.type).toEqual('m.id.user');
620621
expect(req.data.identifier.user).toEqual('user');

0 commit comments

Comments
 (0)