improve banned users layout

This commit is contained in:
Matthew Hodgson 2016-01-20 22:47:42 +00:00
parent 41da05f36a
commit 6f6db75ea1

View file

@ -599,7 +599,9 @@ module.exports = React.createClass({
var user_levels_section;
if (Object.keys(user_levels).length) {
user_levels_section =
<ul>
<div>
<h3>Privileged Users</h3>
<ul className="mx_RoomSettings_userLevels">
{Object.keys(user_levels).map(function(user, i) {
return (
<li className="mx_RoomSettings_userLevel" key={user}>
@ -607,7 +609,8 @@ module.exports = React.createClass({
</li>
);
})}
</ul>;
</ul>
</div>;
}
else {
user_levels_section = <div>No users have specific privileges in this room.</div>
@ -619,15 +622,15 @@ module.exports = React.createClass({
banned_users_section =
<div>
<h3>Banned users</h3>
<div className="mx_RoomSettings_banned">
<ul className="mx_RoomSettings_banned">
{banned.map(function(member, i) {
return (
<div key={i}>
<li key={i}>
{member.userId}
</div>
</li>
);
})}
</div>
</ul>
</div>;
}
@ -730,10 +733,7 @@ module.exports = React.createClass({
{ unfederatable_section }
</div>
<h3>Privileged Users</h3>
<div className="mx_RoomSettings_userLevels mx_RoomSettings_settings">
{ user_levels_section }
</div>
{ banned_users_section }