mirror of
https://github.com/SchildiChat/element-web.git
synced 2024-10-01 01:26:12 -04:00
Enable guest access. Show r/w icons on room directory.
This commit is contained in:
parent
d2635373f0
commit
1a8a4728cd
@ -87,13 +87,30 @@ module.exports = React.createClass({
|
|||||||
});
|
});
|
||||||
var rows = [];
|
var rows = [];
|
||||||
var self = this;
|
var self = this;
|
||||||
|
var guestRead, guestJoin;
|
||||||
for (var i = 0; i < rooms.length; i++) {
|
for (var i = 0; i < rooms.length; i++) {
|
||||||
var name = rooms[i].name || rooms[i].aliases[0];
|
var name = rooms[i].name || rooms[i].aliases[0];
|
||||||
|
guestRead = null;
|
||||||
|
guestJoin = null;
|
||||||
|
|
||||||
|
if (rooms[i].world_readable) {
|
||||||
|
guestRead = (
|
||||||
|
<img src="img/members.svg"
|
||||||
|
alt="World Readable" title="World Readable" width="12" height="12" />
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if (rooms[i].guest_can_join) {
|
||||||
|
guestJoin = (
|
||||||
|
<img src="img/leave.svg"
|
||||||
|
alt="Guests can join" title="Guests can join" width="12" height="12" />
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
// <img src={ MatrixClientPeg.get().getAvatarUrlForRoom(rooms[i].room_id, 40, 40, "crop") } width="40" height="40" alt=""/>
|
// <img src={ MatrixClientPeg.get().getAvatarUrlForRoom(rooms[i].room_id, 40, 40, "crop") } width="40" height="40" alt=""/>
|
||||||
rows.unshift(
|
rows.unshift(
|
||||||
<tbody key={ rooms[i].room_id }>
|
<tbody key={ rooms[i].room_id }>
|
||||||
<tr onClick={self.joinRoom.bind(null, rooms[i].room_id)}>
|
<tr onClick={self.joinRoom.bind(null, rooms[i].room_id)}>
|
||||||
<td className="mx_RoomDirectory_name">{ name }</td>
|
<td className="mx_RoomDirectory_name">{ name } {guestRead} {guestJoin}</td>
|
||||||
<td>{ rooms[i].aliases[0] }</td>
|
<td>{ rooms[i].aliases[0] }</td>
|
||||||
<td>{ rooms[i].num_joined_members }</td>
|
<td>{ rooms[i].num_joined_members }</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -154,7 +154,8 @@ function loadApp() {
|
|||||||
registrationUrl={makeRegistrationUrl()}
|
registrationUrl={makeRegistrationUrl()}
|
||||||
ConferenceHandler={VectorConferenceHandler}
|
ConferenceHandler={VectorConferenceHandler}
|
||||||
config={configJson}
|
config={configJson}
|
||||||
startingQueryParams={parseQsFromFragment(window.location)} />,
|
startingQueryParams={parseQsFromFragment(window.location)}
|
||||||
|
enableGuest={true} />,
|
||||||
document.getElementById('matrixchat')
|
document.getElementById('matrixchat')
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user