Merge commit 'd7b3a24' into rav/roomview_works
This commit is contained in:
commit
21850d7e2f
3 changed files with 38 additions and 4 deletions
|
@ -129,11 +129,30 @@ module.exports = React.createClass({displayName: 'Login',
|
|||
if (!errCode && err.httpStatus) {
|
||||
errCode = "HTTP " + err.httpStatus;
|
||||
}
|
||||
this.setState({
|
||||
errorText: (
|
||||
"Error: Problem communicating with the given homeserver " +
|
||||
|
||||
var errorText = "Error: Problem communicating with the given homeserver " +
|
||||
(errCode ? "(" + errCode + ")" : "")
|
||||
)
|
||||
|
||||
if (err.cors === 'rejected') {
|
||||
if (window.location.protocol === 'https:' &&
|
||||
(this.state.enteredHomeserverUrl.startsWith("http:") ||
|
||||
!this.state.enteredHomeserverUrl.startsWith("http")))
|
||||
{
|
||||
errorText = <span>
|
||||
Can't connect to homeserver via HTTP when using a vector served by HTTPS.
|
||||
Either use HTTPS or <a href='https://www.google.com/search?&q=enable%20unsafe%20scripts'>enable unsafe scripts</a>
|
||||
</span>;
|
||||
}
|
||||
else {
|
||||
errorText = <span>
|
||||
Can't connect to homeserver - please check your connectivity and ensure
|
||||
your <a href={ this.state.enteredHomeserverUrl }>homeserver's SSL certificate</a> is trusted.
|
||||
</span>;
|
||||
}
|
||||
}
|
||||
|
||||
this.setState({
|
||||
errorText: errorText
|
||||
});
|
||||
},
|
||||
|
||||
|
|
|
@ -111,6 +111,14 @@ module.exports = React.createClass({
|
|||
shouldHighlight: function() {
|
||||
var actions = MatrixClientPeg.get().getPushActionsForEvent(this.props.mxEvent);
|
||||
if (!actions || !actions.tweaks) { return false; }
|
||||
|
||||
// don't show self-highlights from another of our clients
|
||||
if (this.props.mxEvent.sender &&
|
||||
this.props.mxEvent.sender.userId === MatrixClientPeg.get().credentials.userId)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return actions.tweaks.highlight;
|
||||
},
|
||||
|
||||
|
|
|
@ -291,6 +291,13 @@ module.exports = React.createClass({
|
|||
}
|
||||
}
|
||||
|
||||
// slightly ugly hack to offset if there's a toolbar present.
|
||||
// we really should be calculating our absolute offsets of top by recursing through the DOM
|
||||
toolbar = document.getElementsByClassName("mx_MatrixToolbar")[0];
|
||||
if (toolbar) {
|
||||
top += toolbar.offsetHeight;
|
||||
}
|
||||
|
||||
incomingCallBox.style.top = top + "px";
|
||||
incomingCallBox.style.left = scroll.offsetLeft + scroll.offsetWidth + "px";
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue