summary refs log tree commit diff
path: root/webclient/home/home.html
blob: 5a1e18e1dee7f6f47ac7ceb03b4963ee948becf6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<div ng-controller="HomeController" data-ng-init="onInit()">

    <div id="wrapper">
    
    <div id="genericHeading">
        <a href ng-click="goToPage('/')"><img src="img/logo-small.png" width="100" height="43" alt="[matrix]"/></a>
    </div>
    
    <h1>Welcome to homeserver {{ config.homeserver }}</h1>
    
    <div>
        <div class="profile-avatar">
            <img ng-src="{{ (null !== profile.avatarUrl) ? profile.avatarUrl : 'img/default-profile.png' }}"/>
        </div>
        <div id="user-ids">
            <div id="user-displayname">{{ profile.displayName }}</div>
            <div>{{ config.user_id }}</div>
        </div>
    </div>
    
    <h3>Recent conversations</h3>
        <div ng-include="'recents/recents.html'"></div>
    <br/>

    <h3>Public rooms</h3>
    
    <table class="publicTable">
        <tbody ng-repeat="room in public_rooms | orderBy:'room_display_name'"
               class="publicRoomEntry"
               ng-class="room.room_display_name.toLowerCase().indexOf('#matrix:') === 0 ? 'roomHighlight' : ''">
            <tr>
                <td class="publicRoomEntry">
                    <a href="#/room/{{ room.room_alias ? room.room_alias : room.room_id }}"  >
                        {{ room.room_display_name }}
                    </a>
                </td>
                <td>
                    <div class="publicRoomJoinedUsers"
                         ng-show="room.num_joined_members">
                        {{ room.num_joined_members }} {{ room.num_joined_members == 1 ? 'user' : 'users' }}
                    </div>
                </td>
            </tr>
            <tr>
                <td colspan="2" class="publicRoomTopic">
                    {{ room.topic }}
                </td>
            </tr>
        </tbody>
    </table>
    <br/>
    
    <div>
        <form>
            <input size="40" ng-model="newRoom.room_alias" ng-enter="createNewRoom(newRoom.room_alias, newRoom.private)" placeholder="(e.g. foo_channel)"/>
            <input type="checkbox" ng-model="newRoom.private">private
            <button ng-disabled="!newRoom.room_alias" ng-click="createNewRoom(newRoom.room_alias, newRoom.private)">Create room</button>    
        </form>
    </div>
    <div>
        <form>
            <input size="40" ng-model="joinAlias.room_alias" ng-enter="joinAlias(joinAlias.room_alias)" placeholder="(e.g. #foo_channel:example.org)"/>
            <button ng-disabled="!joinAlias.room_alias" ng-click="joinAlias(joinAlias.room_alias)">Join room</button>    
        </form>
    </div>
    <br/>
    
    {{ feedback }}

    </div>    
</div>