0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-12-24 23:44:21 +01:00
synapse/webclient/recents/recents.html

63 lines
2.8 KiB
HTML

<div ng-controller="RecentsController" data-ng-init="onInit()">
<table class="recentsTable">
<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)}">
<tr>
<td class="recentsRoomName">
{{ room.room_id | roomName }}
</td>
<td class="recentsRoomSummaryTS">
{{ (room.lastMsg.ts) | date:'MMM d HH:mm' }}
</td>
</tr>
<tr>
<td colspan="2" class="recentsRoomSummary">
<div ng-show="room.membership === 'invite'" >
{{ room.inviter }} invited you
</div>
<div ng-hide="room.membership === 'invite'" ng-switch="room.lastMsg.type" >
<div ng-switch-when="m.room.member">
{{ room.lastMsg.user_id }}
{{ {"join": "joined", "leave": "left", "invite": "invited", "ban": "banned"}[msg.content.membership] }}
{{ (msg.content.membership === "invite" || msg.content.membership === "ban") ? (msg.state_key || '') : '' }}
</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>
<div ng-switch-when="m.emote">
<span ng-bind-html="'* ' + (room.lastMsg.user_id) + ' ' + room.lastMsg.content.body | linky:'_blank'">
</span>
</div>
<div ng-switch-default>
{{ room.lastMsg.content }}
</div>
</div>
</div>
<div ng-switch-default>
<div ng-if="room.lastMsg.type.indexOf('m.call.') == 0">
Call
</div>
</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>