Reorganize HTML

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
Šimon Brandner 2021-06-01 07:55:55 +02:00
parent d05b1798b8
commit 5e4a10ab84
No known key found for this signature in database
GPG key ID: 9760693FDD98A790
2 changed files with 28 additions and 18 deletions

View file

@ -26,15 +26,20 @@ limitations under the License.
max-width: 75%;
box-sizing: border-box;
.mx_CallEvent_content {
.mx_CallEvent_info {
display: flex;
flex-direction: column;
margin-left: 10px; // To match mx_CallEvent
flex-direction: row;
.mx_CallEvent_type {
font-weight: 400;
color: gray;
line-height: $font-14px;
.mx_CallEvent_info_basic {
display: flex;
flex-direction: column;
margin-left: 10px; // To match mx_CallEvent
.mx_CallEvent_type {
font-weight: 400;
color: gray;
line-height: $font-14px;
}
}
}
}

View file

@ -31,21 +31,26 @@ export default class CallEvent extends React.Component<IProps> {
const event = this.props.mxEvent;
const sender = event.sender ? event.sender.name : event.getSender();
let content;
return (
<div className="mx_CallEvent">
<MemberAvatar
member={event.sender}
width={32}
height={32}
/>
<div className="mx_CallEvent_content">
<div>
{sender}
</div>
<div className="mx_CallEvent_type">
{ this.props.callState.isVoice ? _t("Voice call") : _t("Video call") }
<div className="mx_CallEvent_info">
<MemberAvatar
member={event.sender}
width={32}
height={32}
/>
<div className="mx_CallEvent_info_basic">
<div>
{ sender }
</div>
<div className="mx_CallEvent_type">
{ this.props.callState.isVoice ? _t("Voice call") : _t("Video call") }
</div>
</div>
</div>
{ content }
</div>
);
}