mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-12-25 21:09:25 -05:00
Make messages list and room users list scroll-overflow
This commit is contained in:
parent
31ac288eb7
commit
f99168de06
@ -52,11 +52,16 @@ h1 {
|
|||||||
|
|
||||||
/*** Participant list ***/
|
/*** Participant list ***/
|
||||||
|
|
||||||
.usersTable {
|
.usersTableWrapper {
|
||||||
float: right;
|
float: right;
|
||||||
width: 120px;
|
width: 120px;
|
||||||
|
height: 100%;
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.usersTable {
|
||||||
|
width: 100%;
|
||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
margin-bottom: 150px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.usersTable td {
|
.usersTable td {
|
||||||
@ -105,18 +110,29 @@ h1 {
|
|||||||
background-color: #FFCC00;
|
background-color: #FFCC00;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*** Room page ***/
|
||||||
|
|
||||||
|
/* Limit the height of the page content to 100% of the viewport height minus the
|
||||||
|
height of the header and the footer.
|
||||||
|
The two divs containing the messages list and the users list will then scroll-
|
||||||
|
overflow separetely.
|
||||||
|
*/
|
||||||
|
.room .page {
|
||||||
|
height: calc(100vh - 198px);
|
||||||
|
}
|
||||||
|
|
||||||
/*** Message table ***/
|
/*** Message table ***/
|
||||||
|
|
||||||
.messageTableWrapper {
|
.messageTableWrapper {
|
||||||
width: auto;
|
width: auto;
|
||||||
|
height: 100%;
|
||||||
margin-right: 140px;
|
margin-right: 140px;
|
||||||
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.messageTable {
|
.messageTable {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
margin-bottom: 100px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.messageTable td {
|
.messageTable td {
|
||||||
|
@ -33,7 +33,8 @@ angular.module('RoomController', [])
|
|||||||
}
|
}
|
||||||
$scope.messages.push(chunk);
|
$scope.messages.push(chunk);
|
||||||
$timeout(function() {
|
$timeout(function() {
|
||||||
window.scrollTo(0, document.body.scrollHeight);
|
var objDiv = document.getElementsByClassName("messageTableWrapper")[0];
|
||||||
|
objDiv.scrollTop = objDiv.scrollHeight;
|
||||||
},0);
|
},0);
|
||||||
}
|
}
|
||||||
else if (chunk.room_id == $scope.room_id && chunk.type == "m.room.member") {
|
else if (chunk.room_id == $scope.room_id && chunk.type == "m.room.member") {
|
||||||
|
@ -6,15 +6,17 @@
|
|||||||
{{ room_alias || room_id }}
|
{{ room_alias || room_id }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<table class="usersTable">
|
<div class="usersTableWrapper">
|
||||||
<tr ng-repeat="(name, info) in members">
|
<table class="usersTable">
|
||||||
<td class="userAvatar">
|
<tr ng-repeat="(name, info) in members">
|
||||||
<img class="userAvatarImage" ng-src="{{info.avatar_url || 'img/default-profile.jpg'}}" width="80" height="80"/>
|
<td class="userAvatar">
|
||||||
<img class="userAvatarGradient" src="img/gradient.png" width="80" height="24"/>
|
<img class="userAvatarImage" ng-src="{{info.avatar_url || 'img/default-profile.jpg'}}" width="80" height="80"/>
|
||||||
<div class="userName">{{ info.displayname || name }}</div>
|
<img class="userAvatarGradient" src="img/gradient.png" width="80" height="24"/>
|
||||||
</td>
|
<div class="userName">{{ info.displayname || name }}</div>
|
||||||
<td class="userPresence" ng-class="info.presenceState === 'online' ? 'online' : (info.presenceState === 'away' ? 'away' : '')" />
|
</td>
|
||||||
</table>
|
<td class="userPresence" ng-class="info.presenceState === 'online' ? 'online' : (info.presenceState === 'away' ? 'away' : '')" />
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="messageTableWrapper">
|
<div class="messageTableWrapper">
|
||||||
<table class="messageTable">
|
<table class="messageTable">
|
||||||
|
Loading…
Reference in New Issue
Block a user