mirror of
https://github.com/element-hq/element-web
synced 2024-11-29 12:58:53 +03:00
Merge remote-tracking branch 'origin/develop' into release-v0.8.1
This commit is contained in:
commit
1006d50a0d
6 changed files with 17 additions and 13 deletions
|
@ -63,7 +63,7 @@ export default class BasePlatform {
|
||||||
requestNotificationPermission() : Promise<string> {
|
requestNotificationPermission() : Promise<string> {
|
||||||
}
|
}
|
||||||
|
|
||||||
displayNotification(title: string, msg: string, avatarUrl: string) {
|
displayNotification(title: string, msg: string, avatarUrl: string, room: Object) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -73,7 +73,7 @@ var Notifier = {
|
||||||
ev.sender, 40, 40, 'crop'
|
ev.sender, 40, 40, 'crop'
|
||||||
) : null;
|
) : null;
|
||||||
|
|
||||||
const notif = plaf.displayNotification(title, msg, avatarUrl);
|
const notif = plaf.displayNotification(title, msg, avatarUrl, room);
|
||||||
|
|
||||||
// if displayNotification returns non-null, the platform supports
|
// if displayNotification returns non-null, the platform supports
|
||||||
// clearing notifications later, so keep track of this.
|
// clearing notifications later, so keep track of this.
|
||||||
|
|
|
@ -292,12 +292,15 @@ const onMessage = function(event) {
|
||||||
event.origin = event.originalEvent.origin;
|
event.origin = event.originalEvent.origin;
|
||||||
}
|
}
|
||||||
|
|
||||||
// check it is from the integrations UI URL (remove trailing spaces)
|
// Check that the integrations UI URL starts with the origin of the event
|
||||||
|
// This means the URL could contain a path (like /develop) and still be used
|
||||||
|
// to validate event origins, which do not specify paths.
|
||||||
|
// (See https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage)
|
||||||
|
//
|
||||||
|
// All strings start with the empty string, so for sanity return if the length
|
||||||
|
// of the event origin is 0.
|
||||||
let url = SdkConfig.get().integrations_ui_url;
|
let url = SdkConfig.get().integrations_ui_url;
|
||||||
if (url.endsWith("/")) {
|
if (event.origin.length === 0 || !url.startsWith(event.origin)) {
|
||||||
url = url.substr(0, url.length - 1);
|
|
||||||
}
|
|
||||||
if (url !== event.origin) {
|
|
||||||
return; // don't log this - debugging APIs like to spam postMessage which floods the log otherwise
|
return; // don't log this - debugging APIs like to spam postMessage which floods the log otherwise
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -402,6 +402,9 @@ module.exports = React.createClass({
|
||||||
q.finally(fillPromise, () => {
|
q.finally(fillPromise, () => {
|
||||||
this._pendingFillRequests[dir] = false;
|
this._pendingFillRequests[dir] = false;
|
||||||
}).then((hasMoreResults) => {
|
}).then((hasMoreResults) => {
|
||||||
|
if (this.unmounted) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
// Unpaginate once filling is complete
|
// Unpaginate once filling is complete
|
||||||
this._checkUnfillState(!backwards);
|
this._checkUnfillState(!backwards);
|
||||||
|
|
||||||
|
|
|
@ -338,17 +338,15 @@ module.exports = React.createClass({
|
||||||
},
|
},
|
||||||
|
|
||||||
_renderCryptoInfo: function() {
|
_renderCryptoInfo: function() {
|
||||||
var client = MatrixClientPeg.get();
|
const client = MatrixClientPeg.get();
|
||||||
var deviceId = client.deviceId;
|
const deviceId = client.deviceId;
|
||||||
var identityKey = client.getDeviceEd25519Key() || "<not supported>";
|
const identityKey = client.getDeviceEd25519Key() || "<not supported>";
|
||||||
|
|
||||||
var myDevice = client.getStoredDevicesForUser(MatrixClientPeg.get().credentials.userId)[0];
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<h3>Cryptography</h3>
|
<h3>Cryptography</h3>
|
||||||
<div className="mx_UserSettings_section mx_UserSettings_cryptoSection">
|
<div className="mx_UserSettings_section mx_UserSettings_cryptoSection">
|
||||||
<ul>
|
<ul>
|
||||||
<li><label>Device name:</label> <span>{ myDevice.getDisplayName() }</span></li>
|
|
||||||
<li><label>Device ID:</label> <span><code>{deviceId}</code></span></li>
|
<li><label>Device ID:</label> <span><code>{deviceId}</code></span></li>
|
||||||
<li><label>Device key:</label> <span><code><b>{identityKey}</b></code></span></li>
|
<li><label>Device key:</label> <span><code><b>{identityKey}</b></code></span></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -89,7 +89,7 @@ export default class DirectorySearchBox extends React.Component {
|
||||||
|
|
||||||
return <span className={classnames(searchbox_classes)}>
|
return <span className={classnames(searchbox_classes)}>
|
||||||
<div className="mx_DirectorySearchBox_container">
|
<div className="mx_DirectorySearchBox_container">
|
||||||
<input type="text" value={this.state.value}
|
<input type="text" name="dirsearch" value={this.state.value}
|
||||||
className="mx_DirectorySearchBox_input"
|
className="mx_DirectorySearchBox_input"
|
||||||
ref={this._collectInput}
|
ref={this._collectInput}
|
||||||
onChange={this._onChange} onKeyUp={this._onKeyUp}
|
onChange={this._onChange} onKeyUp={this._onKeyUp}
|
||||||
|
|
Loading…
Reference in a new issue