Minor styling and avatar bug fixing

pull/21833/head
Travis Ralston 2019-01-28 11:34:21 -07:00
parent 9a524c49b1
commit ea1d6a0146
3 changed files with 7 additions and 2 deletions

View File

@ -17,3 +17,7 @@ limitations under the License.
.mx_GeneralRoomSettingsTab_profileSection { .mx_GeneralRoomSettingsTab_profileSection {
margin-top: 10px; margin-top: 10px;
} }
.mx_GeneralRoomSettingsTab .mx_AliasSettings .mx_Field select {
width: 100%;
}

View File

@ -279,7 +279,7 @@ module.exports = React.createClass({
} }
return ( return (
<div> <div className='mx_AliasSettings'>
{canonical_alias_section} {canonical_alias_section}
<EditableItemList <EditableItemList
className={"mx_RoomSettings_localAliases"} className={"mx_RoomSettings_localAliases"}

View File

@ -34,7 +34,8 @@ export default class RoomProfileSettings extends React.Component {
const client = MatrixClientPeg.get(); const client = MatrixClientPeg.get();
const room = client.getRoom(props.roomId); const room = client.getRoom(props.roomId);
if (!room) throw new Error("Expected a room for ID: ", props.roomId); if (!room) throw new Error("Expected a room for ID: ", props.roomId);
let avatarUrl = room.avatarUrl; const avatarEvent = room.currentState.getStateEvents("m.room.avatar", "");
let avatarUrl = avatarEvent && avatarEvent.getContent() ? avatarEvent.getContent()["url"] : null;
if (avatarUrl) avatarUrl = client.mxcUrlToHttp(avatarUrl, 96, 96, 'crop', false); if (avatarUrl) avatarUrl = client.mxcUrlToHttp(avatarUrl, 96, 96, 'crop', false);
const topicEvent = room.currentState.getStateEvents("m.room.topic", ""); const topicEvent = room.currentState.getStateEvents("m.room.topic", "");
const topic = topicEvent && topicEvent.getContent() ? topicEvent.getContent()['topic'] : null; const topic = topicEvent && topicEvent.getContent() ? topicEvent.getContent()['topic'] : null;