mirror of
https://github.com/element-hq/element-web
synced 2024-11-21 16:55:34 +03:00
Merge branch 'develop' into rav/karma
This commit is contained in:
commit
438453e61a
9 changed files with 91 additions and 6 deletions
|
@ -89,7 +89,7 @@ var LeftPanel = React.createClass({
|
|||
var BottomLeftMenu = sdk.getComponent('structures.BottomLeftMenu');
|
||||
|
||||
var collapseButton;
|
||||
var classes = "mx_LeftPanel";
|
||||
var classes = "mx_LeftPanel mx_fadable";
|
||||
if (this.props.collapsed) {
|
||||
classes += " collapsed";
|
||||
}
|
||||
|
@ -109,7 +109,7 @@ var LeftPanel = React.createClass({
|
|||
}
|
||||
|
||||
return (
|
||||
<aside className={classes}>
|
||||
<aside className={classes} style={{ opacity: this.props.opacity }}>
|
||||
{ collapseButton }
|
||||
{ callPreview }
|
||||
<RoomList
|
||||
|
|
|
@ -158,13 +158,13 @@ module.exports = React.createClass({
|
|||
|
||||
}
|
||||
|
||||
var classes = "mx_RightPanel";
|
||||
var classes = "mx_RightPanel mx_fadable";
|
||||
if (this.props.collapsed) {
|
||||
classes += " collapsed";
|
||||
}
|
||||
|
||||
return (
|
||||
<aside className={classes}>
|
||||
<aside className={classes} style={{ opacity: this.props.opacity }}>
|
||||
<div className="mx_RightPanel_header">
|
||||
{ buttonGroup }
|
||||
</div>
|
||||
|
|
|
@ -79,6 +79,17 @@ module.exports = React.createClass({
|
|||
}
|
||||
var oob_data = {};
|
||||
if (room) {
|
||||
if (MatrixClientPeg.get().isGuest()) {
|
||||
if (!room.world_readable && !room.guest_can_join) {
|
||||
var NeedToRegisterDialog = sdk.getComponent("dialogs.NeedToRegisterDialog");
|
||||
Modal.createDialog(NeedToRegisterDialog, {
|
||||
title: "Failed to join the room",
|
||||
description: "This room is inaccessible to guests. You may be able to join if you register."
|
||||
});
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
oob_data = {
|
||||
avatarUrl: room.avatar_url,
|
||||
// XXX: This logic is duplicated from the JS SDK which
|
||||
|
|
|
@ -601,7 +601,7 @@ module.exports = React.createClass({
|
|||
|
||||
_refreshFromServer: function() {
|
||||
var self = this;
|
||||
MatrixClientPeg.get().getPushRules().then(self._portRulesToNewAPI).done(function(rulesets) {
|
||||
var pushRulesPromise = MatrixClientPeg.get().getPushRules().then(self._portRulesToNewAPI).done(function(rulesets) {
|
||||
MatrixClientPeg.get().pushRules = rulesets;
|
||||
|
||||
// Get homeserver default rules and triage them by categories
|
||||
|
@ -811,10 +811,20 @@ module.exports = React.createClass({
|
|||
self.state.externalPushRules.push(rule);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var pushersPromise = MatrixClientPeg.get().getPushers().then(function(resp) {
|
||||
self.setState({pushers: resp.pushers});
|
||||
});
|
||||
|
||||
q.all([pushRulesPromise, pushersPromise]).done(function() {
|
||||
self.setState({
|
||||
phase: self.phases.DISPLAY
|
||||
});
|
||||
}, function(error) {
|
||||
self.setState({
|
||||
phase: self.phases.ERROR
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
|
@ -936,6 +946,32 @@ module.exports = React.createClass({
|
|||
externalRules.push(<li>Notifications on the following keywords follow rules which can’t be displayed here: { externalKeyWords }</li>);
|
||||
}
|
||||
|
||||
var devicesSection;
|
||||
if (this.state.pushers === undefined) {
|
||||
devicesSection = <div className="error">Unable to fetch device list</div>
|
||||
} else if (this.state.pushers.length == 0) {
|
||||
devicesSection = <div className="mx_UserSettings_devicesTable_nodevices">
|
||||
No devices are receiving push notifications
|
||||
</div>
|
||||
} else {
|
||||
// It would be great to be able to delete pushers from here too,
|
||||
// and this wouldn't be hard to add.
|
||||
var rows = [];
|
||||
for (var i = 0; i < this.state.pushers.length; ++i) {
|
||||
rows.push(<tr>
|
||||
<td>{this.state.pushers[i].app_display_name}</td>
|
||||
<td>{this.state.pushers[i].device_display_name}</td>
|
||||
</tr>);
|
||||
}
|
||||
devicesSection = (<table className="mx_UserSettings_devicesTable">
|
||||
<tr>
|
||||
<th>Application</th>
|
||||
<th>Device</th>
|
||||
</tr>
|
||||
{rows}
|
||||
</table>);
|
||||
}
|
||||
|
||||
var advancedSettings;
|
||||
if (externalRules.length) {
|
||||
advancedSettings = (
|
||||
|
@ -1012,6 +1048,9 @@ module.exports = React.createClass({
|
|||
|
||||
{ advancedSettings }
|
||||
|
||||
<h3>Devices</h3>
|
||||
{ devicesSection }
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -58,6 +58,15 @@ input[type=text]:focus, textarea:focus {
|
|||
box-shadow: none;
|
||||
}
|
||||
|
||||
/* applied to side-panels and messagepanel when in RoomSettings */
|
||||
.mx_fadable {
|
||||
opacity: 1;
|
||||
-webkit-transition: opacity 0.2s ease-in-out;
|
||||
-moz-transition: opacity 0.2s ease-in-out;
|
||||
-ms-transition: opacity 0.2s ease-in-out;
|
||||
-o-transition: opacity 0.2s ease-in-out;
|
||||
}
|
||||
|
||||
/* XXX: critical hack to GeminiScrollbar to allow them to work in FF 42 and Chrome 48.
|
||||
Stop the scrollbar view from pushing out the container's overall sizing, which causes
|
||||
flexbox to adapt to the new size and cause the view to keep growing.
|
||||
|
|
|
@ -89,7 +89,7 @@ limitations under the License.
|
|||
margin: auto;
|
||||
|
||||
overflow: auto;
|
||||
border-bottom: 1px solid #eee;
|
||||
border-bottom: 1px solid #ccc;
|
||||
|
||||
-webkit-flex: 0 0 auto;
|
||||
flex: 0 0 auto;
|
||||
|
|
|
@ -158,10 +158,15 @@ limitations under the License.
|
|||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.mx_EventTile_msgOption a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.mx_EventTile .mx_MessageTimestamp {
|
||||
display: block;
|
||||
visibility: hidden;
|
||||
text-align: right;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.mx_EventTile_last .mx_MessageTimestamp {
|
||||
|
|
|
@ -53,6 +53,19 @@ limitations under the License.
|
|||
flex: 1;
|
||||
}
|
||||
|
||||
.mx_RoomHeader_spinner {
|
||||
height: 36px;
|
||||
|
||||
-webkit-box-ordinal-group: 2;
|
||||
-moz-box-ordinal-group: 2;
|
||||
-ms-flex-order: 2;
|
||||
-webkit-order: 2;
|
||||
order: 2;
|
||||
|
||||
padding-left: 12px;
|
||||
padding-right: 12px;
|
||||
}
|
||||
|
||||
.mx_RoomHeader_textButton {
|
||||
height: 36px;
|
||||
background-color: #76cfa6;
|
||||
|
|
|
@ -60,3 +60,11 @@ limitations under the License.
|
|||
cursor: pointer;
|
||||
color: #76cfa6;
|
||||
}
|
||||
|
||||
.mx_UserSettings_devicesTable td {
|
||||
padding-left: 20px;
|
||||
padding-right: 20px;
|
||||
}
|
||||
.mx_UserSettings_devicesTable_nodevices {
|
||||
font-style: italic;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue