2014-08-26 10:57:29 -04:00
|
|
|
<div ng-controller="HomeController" data-ng-init="onInit()">
|
2014-08-12 10:10:52 -04:00
|
|
|
|
2014-08-15 18:24:42 -04:00
|
|
|
<div id="page">
|
|
|
|
<div id="wrapper">
|
2014-08-22 11:11:39 -04:00
|
|
|
|
2014-08-12 10:10:52 -04:00
|
|
|
<div>
|
|
|
|
<form>
|
2014-08-14 05:39:03 -04:00
|
|
|
<table>
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<div class="profile-avatar">
|
2014-08-22 11:11:39 -04:00
|
|
|
<img ng-src="{{ config.avatarUrl || 'img/default-profile.jpg' }}"/>
|
2014-08-14 05:39:03 -04:00
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
<td>
|
2014-08-22 11:11:39 -04:00
|
|
|
<div id="user-ids">
|
|
|
|
<div id="user-displayname">{{ config.displayName }}</div>
|
|
|
|
<div>{{ config.user_id }}</div>
|
2014-08-14 05:39:03 -04:00
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
2014-08-12 10:10:52 -04:00
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
|
2014-08-27 08:31:20 -04:00
|
|
|
<h3>Recents</h3>
|
|
|
|
|
|
|
|
<div class="recentsTableWrapper">
|
|
|
|
<table class="recentsTable">
|
|
|
|
<tbody ng-repeat="(rm_id, room) in rooms" ng-click="goToPage('room/' + (room.room_alias ? room.room_alias : rm_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>
|
2014-08-12 10:10:52 -04:00
|
|
|
<br/>
|
|
|
|
|
|
|
|
<h3>Public rooms</h3>
|
|
|
|
|
|
|
|
<div class="public_rooms" ng-repeat="room in public_rooms">
|
|
|
|
<div>
|
2014-08-18 11:14:57 -04:00
|
|
|
<a href="#/room/{{ room.room_alias ? room.room_alias : room.room_id }}" >{{ room.room_alias }}</a>
|
2014-08-12 10:10:52 -04:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<br/>
|
|
|
|
|
|
|
|
<div>
|
|
|
|
<form>
|
|
|
|
<input size="40" ng-model="newRoom.room_id" ng-enter="createNewRoom(newRoom.room_id, newRoom.private)" placeholder="(e.g. foo_channel)"/>
|
|
|
|
<input type="checkbox" ng-model="newRoom.private">private
|
|
|
|
<button ng-disabled="!newRoom.room_id" ng-click="createNewRoom(newRoom.room_id, newRoom.private)">Create room</button>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
<form>
|
2014-08-15 12:42:02 -04:00
|
|
|
<input size="40" ng-model="joinAlias.room_alias" ng-enter="joinAlias(joinAlias.room_alias)" placeholder="(e.g. #foo_channel:example.org)"/>
|
2014-08-12 12:17:10 -04:00
|
|
|
<button ng-disabled="!joinAlias.room_alias" ng-click="joinAlias(joinAlias.room_alias)">Join room</button>
|
2014-08-12 10:10:52 -04:00
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
<br/>
|
|
|
|
|
|
|
|
{{ feedback }}
|
|
|
|
|
|
|
|
</div>
|
2014-08-13 21:13:14 -04:00
|
|
|
</div>
|
2014-08-12 10:10:52 -04:00
|
|
|
</div>
|