mirror of
https://mau.dev/maunium/synapse.git
synced 2024-12-20 23:43:51 +01:00
Display the room topic in the room, underneath the name of the room.
This commit is contained in:
parent
544691ab05
commit
324020d5fe
3 changed files with 33 additions and 8 deletions
|
@ -220,12 +220,6 @@ a:active { color: #000; }
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
#roomName {
|
|
||||||
float: right;
|
|
||||||
font-size: 16px;
|
|
||||||
margin-top: 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#roomHeader {
|
#roomHeader {
|
||||||
margin: auto;
|
margin: auto;
|
||||||
padding-left: 20px;
|
padding-left: 20px;
|
||||||
|
@ -282,6 +276,21 @@ a:active { color: #000; }
|
||||||
float: right;
|
float: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#roomName {
|
||||||
|
font-size: 16px;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
#roomTopic {
|
||||||
|
text-align: right;
|
||||||
|
font-size: 13px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.roomHeaderInfo {
|
||||||
|
float: right;
|
||||||
|
margin-top: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
/*** Participant list ***/
|
/*** Participant list ***/
|
||||||
|
|
||||||
#usersTableWrapper {
|
#usersTableWrapper {
|
||||||
|
|
|
@ -149,6 +149,14 @@ angular.module('eventHandlerService', [])
|
||||||
$rootScope.$broadcast(NAME_EVENT, event, isLiveEvent);
|
$rootScope.$broadcast(NAME_EVENT, event, isLiveEvent);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var handleRoomTopic = function(event, isLiveEvent) {
|
||||||
|
console.log("handleRoomTopic " + isLiveEvent);
|
||||||
|
|
||||||
|
initRoom(event.room_id);
|
||||||
|
|
||||||
|
$rootScope.events.rooms[event.room_id][event.type] = event;
|
||||||
|
};
|
||||||
|
|
||||||
var handleCallEvent = function(event, isLiveEvent) {
|
var handleCallEvent = function(event, isLiveEvent) {
|
||||||
$rootScope.$broadcast(CALL_EVENT, event, isLiveEvent);
|
$rootScope.$broadcast(CALL_EVENT, event, isLiveEvent);
|
||||||
};
|
};
|
||||||
|
@ -204,6 +212,9 @@ angular.module('eventHandlerService', [])
|
||||||
case 'm.room.name':
|
case 'm.room.name':
|
||||||
handleRoomName(event, isLiveEvent);
|
handleRoomName(event, isLiveEvent);
|
||||||
break;
|
break;
|
||||||
|
case 'm.room.topic':
|
||||||
|
handleRoomTopic(event, isLiveEvent);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
console.log("Unable to handle event type " + event.type);
|
console.log("Unable to handle event type " + event.type);
|
||||||
console.log(JSON.stringify(event, undefined, 4));
|
console.log(JSON.stringify(event, undefined, 4));
|
||||||
|
|
|
@ -2,9 +2,14 @@
|
||||||
|
|
||||||
<div id="roomHeader">
|
<div id="roomHeader">
|
||||||
<a href ng-click="goToPage('/')"><img src="img/logo-small.png" width="100" height="43" alt="[matrix]"/></a>
|
<a href ng-click="goToPage('/')"><img src="img/logo-small.png" width="100" height="43" alt="[matrix]"/></a>
|
||||||
|
<div class="roomHeaderInfo">
|
||||||
<div id="roomName">
|
<div id="roomName">
|
||||||
{{ room_id | mRoomName }}
|
{{ room_id | mRoomName }}
|
||||||
</div>
|
</div>
|
||||||
|
<div id="roomTopic" ng-show="events.rooms[room_id]['m.room.topic'].content.topic">
|
||||||
|
{{ events.rooms[room_id]['m.room.topic'].content.topic }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="roomPage">
|
<div id="roomPage">
|
||||||
|
|
Loading…
Reference in a new issue