mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-16 21:24:59 +08:00
Add event power levels to room settings
This commit is contained in:
parent
813cf0481e
commit
af190f286c
@ -14,32 +14,16 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
.mx_RoomSettings_power_levels {
|
||||
.mx_RoomSettings_settings {
|
||||
display: table;
|
||||
margin: 5px 0;
|
||||
}
|
||||
|
||||
.mx_RoomSettings_power_levels > div {
|
||||
.mx_RoomSettings_settings > div {
|
||||
display: table-row;
|
||||
}
|
||||
|
||||
.mx_RoomSettings_power_levels > 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 > * {
|
||||
.mx_RoomSettings_settings > div > * {
|
||||
display: table-cell;
|
||||
|
||||
margin: 0 10px;
|
||||
|
@ -86,6 +86,7 @@ module.exports = React.createClass({
|
||||
var default_user_level = parseInt(power_levels.users_default);
|
||||
|
||||
var user_levels = power_levels.users;
|
||||
var events_levels = power_levels.events;
|
||||
|
||||
var user_id = MatrixClientPeg.get().credentials.userId;
|
||||
|
||||
@ -107,7 +108,7 @@ module.exports = React.createClass({
|
||||
<label><input type="checkbox" /> Encrypt room</label> <br/>
|
||||
|
||||
Power levels:
|
||||
<div className="mx_RoomSettings_power_levels">
|
||||
<div className="mx_RoomSettings_power_levels mx_RoomSettings_settings">
|
||||
<div>
|
||||
<label htmlFor="mx_RoomSettings_ban_level">Ban level</label>
|
||||
<input type="text" defaultValue={ban_level} size="3" ref="ban" id="mx_RoomSettings_ban_level"
|
||||
@ -147,7 +148,7 @@ module.exports = React.createClass({
|
||||
</div>
|
||||
|
||||
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) {
|
||||
return (
|
||||
<div key={user}>
|
||||
@ -157,6 +158,18 @@ module.exports = React.createClass({
|
||||
);
|
||||
})}
|
||||
</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>
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user