summary refs log tree commit diff
path: root/webclient/recents/recents.html
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-08-27 15:34:01 +0100
committerErik Johnston <erik@matrix.org>2014-08-27 15:34:01 +0100
commit08881d808d7cfd600d130eb7a960c6c51c797a09 (patch)
tree1a8c8833a981b9a01e5f8c68c555203f2bc59455 /webclient/recents/recents.html
parentIndex sources in a nicer fashion. (diff)
parentBF: use room_id if there is no alias (diff)
downloadsynapse-08881d808d7cfd600d130eb7a960c6c51c797a09.tar.xz
Merge branch 'develop' of github.com:matrix-org/synapse into stream_refactor
Diffstat (limited to 'webclient/recents/recents.html')
-rw-r--r--webclient/recents/recents.html53
1 files changed, 53 insertions, 0 deletions
diff --git a/webclient/recents/recents.html b/webclient/recents/recents.html
new file mode 100644
index 0000000000..6d2864ac97
--- /dev/null
+++ b/webclient/recents/recents.html
@@ -0,0 +1,53 @@
+<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" >
+            <tr>
+                <td class="recentsRoomName">
+                    {{ room.room_display_name }}
+                </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"}[room.lastMsg.content.membership] }}
+                            {{ room.lastMsg.content.membership === "invite" ? (room.lastMsg.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-default>
+                                    {{ room.lastMsg.content }}
+                                </div>
+                            </div>
+                        </div>
+
+                        <div ng-switch-default>
+                            {{ room.lastMsg }}
+                        </div>
+                    </div>
+                </td>
+            </tr>
+        </tbody>
+    </table>
+</div>