Display image messages from the stream

This commit is contained in:
Emmanuel ROHEE 2014-08-13 11:09:30 +02:00
parent 3e35a9f96e
commit 30efb04060
2 changed files with 10 additions and 1 deletions

View File

@ -187,6 +187,14 @@ h1 {
border: 0px ! important; border: 0px ! important;
} }
.image {
display: block;
max-width:320px;
max-height:320px;
width: auto;
height: auto;
}
.bubble { .bubble {
padding: 6px; padding: 6px;
padding-left: 1em; padding-left: 1em;

View File

@ -32,7 +32,8 @@
<td ng-class="!msg.content.membership_target ? (msg.content.msgtype === 'm.emote' ? 'emote text' : 'text') : ''"> <td ng-class="!msg.content.membership_target ? (msg.content.msgtype === 'm.emote' ? 'emote text' : 'text') : ''">
<div class="bubble"> <div class="bubble">
{{ msg.content.msgtype === "m.emote" ? ("* " + (members[msg.user_id].displayname || msg.user_id) + " ") : "" }} {{ msg.content.msgtype === "m.emote" ? ("* " + (members[msg.user_id].displayname || msg.user_id) + " ") : "" }}
{{ msg.content.body }} {{ msg.content.msgtype === "m.text" ? msg.content.body : "" }}
<img class="image" ng-hide='msg.content.msgtype !== "m.image"' src="{{ msg.content.url }}" alt="{{ msg.content.body }}"/>
</div> </div>
</td> </td>
<td class="rightBlock"> <td class="rightBlock">