mirror of https://github.com/vector-im/riot-web
Merge pull request #1583 from matrix-org/luke/groups-disable-rooms-whilst-editing
Disable RoomDetailList in GroupView when editingpull/21833/head
commit
d777e370f2
|
@ -681,6 +681,10 @@ export default React.createClass({
|
||||||
{ _t('Add rooms to this community') }
|
{ _t('Add rooms to this community') }
|
||||||
</div>
|
</div>
|
||||||
</AccessibleButton>) : <div />;
|
</AccessibleButton>) : <div />;
|
||||||
|
const roomDetailListClassName = classnames({
|
||||||
|
"mx_fadable": true,
|
||||||
|
"mx_fadable_faded": this.state.editing,
|
||||||
|
});
|
||||||
return <div className="mx_GroupView_rooms">
|
return <div className="mx_GroupView_rooms">
|
||||||
<div className="mx_GroupView_rooms_header">
|
<div className="mx_GroupView_rooms_header">
|
||||||
<h3>
|
<h3>
|
||||||
|
@ -691,7 +695,9 @@ export default React.createClass({
|
||||||
</div>
|
</div>
|
||||||
{ this.state.groupRoomsLoading ?
|
{ this.state.groupRoomsLoading ?
|
||||||
<Spinner /> :
|
<Spinner /> :
|
||||||
<RoomDetailList rooms={this.state.groupRooms} />
|
<RoomDetailList
|
||||||
|
rooms={this.state.groupRooms}
|
||||||
|
className={roomDetailListClassName} />
|
||||||
}
|
}
|
||||||
</div>;
|
</div>;
|
||||||
},
|
},
|
||||||
|
|
|
@ -23,6 +23,7 @@ import sanitizeHtml from 'sanitize-html';
|
||||||
import { ContentRepo } from 'matrix-js-sdk';
|
import { ContentRepo } from 'matrix-js-sdk';
|
||||||
import MatrixClientPeg from '../../../MatrixClientPeg';
|
import MatrixClientPeg from '../../../MatrixClientPeg';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
|
import classNames from 'classnames';
|
||||||
|
|
||||||
function getDisplayAliasForRoom(room) {
|
function getDisplayAliasForRoom(room) {
|
||||||
return room.canonicalAlias || (room.aliases ? room.aliases[0] : "");
|
return room.canonicalAlias || (room.aliases ? room.aliases[0] : "");
|
||||||
|
@ -117,6 +118,8 @@ export default React.createClass({
|
||||||
worldReadable: PropTypes.bool,
|
worldReadable: PropTypes.bool,
|
||||||
guestCanJoin: PropTypes.bool,
|
guestCanJoin: PropTypes.bool,
|
||||||
})),
|
})),
|
||||||
|
|
||||||
|
className: PropTypes.string,
|
||||||
},
|
},
|
||||||
|
|
||||||
getRows: function() {
|
getRows: function() {
|
||||||
|
@ -138,7 +141,7 @@ export default React.createClass({
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>;
|
</table>;
|
||||||
}
|
}
|
||||||
return <div className="mx_RoomDetailList">
|
return <div className={classNames("mx_RoomDetailList", this.props.className)}>
|
||||||
{ rooms }
|
{ rooms }
|
||||||
</div>;
|
</div>;
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue