summary refs log tree commit diff
path: root/webclient
diff options
context:
space:
mode:
authorKegan Dougal <kegan@matrix.org>2014-09-17 16:29:21 +0100
committerKegan Dougal <kegan@matrix.org>2014-09-17 16:38:40 +0100
commit16f55d42752ad8feb473963457834c4fa752245a (patch)
tree204de3d69cc1682331e3316d5f2fdd129fcea8f4 /webclient
parentSYWEB-30: BF: When switching between rooms, pagination flickered between the ... (diff)
downloadsynapse-16f55d42752ad8feb473963457834c4fa752245a.tar.xz
webclient SYWEB-3 : Public rooms are bold. Can't think of a nicer way which doesn't clutter the recents list.
Diffstat (limited to 'webclient')
-rwxr-xr-xwebclient/app.css4
-rw-r--r--webclient/components/matrix/event-handler-service.js11
-rw-r--r--webclient/components/matrix/event-stream-service.js2
-rw-r--r--webclient/recents/recents.html2
4 files changed, 18 insertions, 1 deletions
diff --git a/webclient/app.css b/webclient/app.css
index 704cd83947..736aea660c 100755
--- a/webclient/app.css
+++ b/webclient/app.css
@@ -603,6 +603,10 @@ a:active  { color: #000; }
     width: auto;
 }
 
+.recentsPublicRoom {
+    font-weight: bold;
+}
+
 .recentsRoomSummaryUsersCount, .recentsRoomSummaryTS {
     color: #888;
     font-size: 12px;
diff --git a/webclient/components/matrix/event-handler-service.js b/webclient/components/matrix/event-handler-service.js
index 8eb8a6b180..0be294d745 100644
--- a/webclient/components/matrix/event-handler-service.js
+++ b/webclient/components/matrix/event-handler-service.js
@@ -511,6 +511,17 @@ function(matrixService, $rootScope, $q, $timeout, mPresence) {
                 member = room.members[user_id];
             }
             return member;
+        },
+        
+        setRoomVisibility: function(room_id, visible) {
+            if (!visible) {
+                return;
+            }
+            
+            var room = $rootScope.events.rooms[room_id];
+            if (room) {
+                room.visibility = visible;
+            }
         }
     };
 }]);
diff --git a/webclient/components/matrix/event-stream-service.js b/webclient/components/matrix/event-stream-service.js
index 6f92332246..5af1ab2911 100644
--- a/webclient/components/matrix/event-stream-service.js
+++ b/webclient/components/matrix/event-stream-service.js
@@ -120,6 +120,8 @@ angular.module('eventStreamService', [])
                     if ("state" in room) {
                         eventHandlerService.handleEvents(room.state, false, true);
                     }
+                    
+                    eventHandlerService.setRoomVisibility(room.room_id, room.visibility);
                 }
 
                 var presence = response.data.presence;
diff --git a/webclient/recents/recents.html b/webclient/recents/recents.html
index e783d3a6b4..7fec8f03e5 100644
--- a/webclient/recents/recents.html
+++ b/webclient/recents/recents.html
@@ -5,7 +5,7 @@
                class ="recentsRoom" 
                ng-class="{'recentsRoomSelected': (room.room_id === recentsSelectedRoomID)}">                                           
             <tr>
-                <td class="recentsRoomName">
+                <td ng-class="room.visibility == 'public' ? 'recentsRoomName recentsPublicRoom' : 'recentsRoomName'">
                     {{ room.room_id | mRoomName }}
                 </td>
                 <td class="recentsRoomSummaryUsersCount">