Add event power levels to room settings
parent
813cf0481e
commit
af190f286c
|
@ -14,32 +14,16 @@ See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
.mx_RoomSettings_power_levels {
|
.mx_RoomSettings_settings {
|
||||||
display: table;
|
display: table;
|
||||||
margin: 5px 0;
|
margin: 5px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mx_RoomSettings_power_levels > div {
|
.mx_RoomSettings_settings > div {
|
||||||
display: table-row;
|
display: table-row;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mx_RoomSettings_power_levels > div > * {
|
.mx_RoomSettings_settings > div > * {
|
||||||
display: table-cell;
|
|
||||||
|
|
||||||
margin: 0 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.mx_RoomSettings_user_levels {
|
|
||||||
display: table;
|
|
||||||
margin: 5px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mx_RoomSettings_user_levels > div {
|
|
||||||
display: table-row;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mx_RoomSettings_user_levels > div > * {
|
|
||||||
display: table-cell;
|
display: table-cell;
|
||||||
|
|
||||||
margin: 0 10px;
|
margin: 0 10px;
|
||||||
|
|
|
@ -86,6 +86,7 @@ module.exports = React.createClass({
|
||||||
var default_user_level = parseInt(power_levels.users_default);
|
var default_user_level = parseInt(power_levels.users_default);
|
||||||
|
|
||||||
var user_levels = power_levels.users;
|
var user_levels = power_levels.users;
|
||||||
|
var events_levels = power_levels.events;
|
||||||
|
|
||||||
var user_id = MatrixClientPeg.get().credentials.userId;
|
var user_id = MatrixClientPeg.get().credentials.userId;
|
||||||
|
|
||||||
|
@ -107,7 +108,7 @@ module.exports = React.createClass({
|
||||||
<label><input type="checkbox" /> Encrypt room</label> <br/>
|
<label><input type="checkbox" /> Encrypt room</label> <br/>
|
||||||
|
|
||||||
Power levels:
|
Power levels:
|
||||||
<div className="mx_RoomSettings_power_levels">
|
<div className="mx_RoomSettings_power_levels mx_RoomSettings_settings">
|
||||||
<div>
|
<div>
|
||||||
<label htmlFor="mx_RoomSettings_ban_level">Ban level</label>
|
<label htmlFor="mx_RoomSettings_ban_level">Ban level</label>
|
||||||
<input type="text" defaultValue={ban_level} size="3" ref="ban" id="mx_RoomSettings_ban_level"
|
<input type="text" defaultValue={ban_level} size="3" ref="ban" id="mx_RoomSettings_ban_level"
|
||||||
|
@ -147,7 +148,7 @@ module.exports = React.createClass({
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
User levels:
|
User levels:
|
||||||
<div className="mx_RoomSettings_user_levels">
|
<div className="mx_RoomSettings_user_levels mx_RoomSettings_settings">
|
||||||
{Object.keys(user_levels).map(function(user, i) {
|
{Object.keys(user_levels).map(function(user, i) {
|
||||||
return (
|
return (
|
||||||
<div key={user}>
|
<div key={user}>
|
||||||
|
@ -157,6 +158,18 @@ module.exports = React.createClass({
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
Event levels:
|
||||||
|
<div className="mx_RoomSettings_event_lvels mx_RoomSettings_settings">
|
||||||
|
{Object.keys(events_levels).map(function(event_type, i) {
|
||||||
|
return (
|
||||||
|
<div key={event_type}>
|
||||||
|
<label htmlFor={"mx_RoomSettings_event_"+i}>{event_type}</label>
|
||||||
|
<input type="text" defaultValue={events_levels[event_type]} size="3" id={"mx_RoomSettings_event_"+i} disabled/>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
})}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue