2014-08-27 15:09:16 +02:00
|
|
|
<div ng-controller="RecentsController" data-ng-init="onInit()">
|
|
|
|
<table class="recentsTable">
|
2014-08-27 17:20:41 +02:00
|
|
|
<tbody ng-repeat="(rm_id, room) in rooms | orderRecents"
|
|
|
|
ng-click="goToPage('room/' + (room.room_alias ? room.room_alias : room.room_id) )"
|
|
|
|
class ="recentsRoom"
|
|
|
|
ng-class="{'recentsRoomSelected': (room.room_id === recentsSelectedRoomID)}">
|
2014-08-27 15:09:16 +02:00
|
|
|
<tr>
|
|
|
|
<td class="recentsRoomName">
|
2014-09-04 11:19:28 +02:00
|
|
|
{{ room.room_id | mRoomName }}
|
2014-08-27 15:09:16 +02:00
|
|
|
</td>
|
|
|
|
<td class="recentsRoomSummaryTS">
|
|
|
|
{{ (room.lastMsg.ts) | date:'MMM d HH:mm' }}
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td colspan="2" class="recentsRoomSummary">
|
|
|
|
|
|
|
|
<div ng-hide="room.membership === 'invite'" ng-switch="room.lastMsg.type" >
|
2014-09-04 09:08:34 +02:00
|
|
|
<div ng-switch-when="m.room.member">
|
|
|
|
<span ng-if="'join' === room.lastMsg.content.membership">
|
|
|
|
{{ room.lastMsg.state_key }} joined
|
|
|
|
</span>
|
|
|
|
<span ng-if="'leave' === room.lastMsg.content.membership">
|
|
|
|
<span ng-if="room.lastMsg.user_id === room.lastMsg.state_key">
|
|
|
|
{{room.lastMsg.state_key }} left
|
|
|
|
</span>
|
|
|
|
<span ng-if="room.lastMsg.user_id !== room.lastMsg.state_key">
|
|
|
|
{{ room.lastMsg.user_id }}
|
|
|
|
{{ {"join": "kicked", "ban": "unbanned"}[room.lastMsg.content.prev] }}
|
|
|
|
{{ room.lastMsg.state_key }}
|
|
|
|
</span>
|
|
|
|
</span>
|
|
|
|
<span ng-if="'invite' === room.lastMsg.content.membership || 'ban' === room.lastMsg.content.membership">
|
|
|
|
{{ room.lastMsg.user_id }}
|
|
|
|
{{ {"invite": "invited", "ban": "banned"}[room.lastMsg.content.membership] }}
|
|
|
|
{{ room.lastMsg.state_key }}
|
|
|
|
</span>
|
2014-08-27 15:09:16 +02:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div ng-switch-when="m.room.message">
|
|
|
|
<div ng-switch="room.lastMsg.content.msgtype">
|
|
|
|
<div ng-switch-when="m.text">
|
|
|
|
{{ room.lastMsg.user_id }} :
|
|
|
|
<span ng-bind-html="(room.lastMsg.content.body) | linky:'_blank'">
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div ng-switch-when="m.image">
|
|
|
|
{{ room.lastMsg.user_id }} sent an image
|
|
|
|
</div>
|
|
|
|
|
2014-08-29 09:49:03 +02:00
|
|
|
<div ng-switch-when="m.emote">
|
|
|
|
<span ng-bind-html="'* ' + (room.lastMsg.user_id) + ' ' + room.lastMsg.content.body | linky:'_blank'">
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
|
2014-08-27 15:09:16 +02:00
|
|
|
<div ng-switch-default>
|
|
|
|
{{ room.lastMsg.content }}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div ng-switch-default>
|
2014-09-01 15:27:03 +02:00
|
|
|
<div ng-if="room.lastMsg.type.indexOf('m.call.') == 0">
|
|
|
|
Call
|
|
|
|
</div>
|
2014-08-27 15:09:16 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|