0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-12-14 13:33:50 +01:00

Merge branch 'release-v0.1.0' into develop

This commit is contained in:
David Baker 2014-08-29 14:01:30 +01:00
commit e76cd252fe
2 changed files with 7 additions and 3 deletions

View file

@ -51,7 +51,7 @@ angular.module('RoomController', ['ngSanitize', 'mFileInput'])
objDiv.scrollTop = objDiv.scrollHeight; objDiv.scrollTop = objDiv.scrollHeight;
}, 0); }, 0);
}; };
$scope.$on(eventHandlerService.MSG_EVENT, function(ngEvent, event, isLive) { $scope.$on(eventHandlerService.MSG_EVENT, function(ngEvent, event, isLive) {
if (isLive && event.room_id === $scope.room_id) { if (isLive && event.room_id === $scope.room_id) {
scrollToBottom(); scrollToBottom();
@ -88,6 +88,10 @@ angular.module('RoomController', ['ngSanitize', 'mFileInput'])
call.onHangup = $scope.onCallHangup; call.onHangup = $scope.onCallHangup;
$scope.currentCall = call; $scope.currentCall = call;
}); });
$scope.memberCount = function() {
return Object.keys($scope.members).length;
};
$scope.paginateMore = function() { $scope.paginateMore = function() {
if ($scope.state.can_paginate) { if ($scope.state.can_paginate) {

View file

@ -98,14 +98,14 @@
<button ng-click="inviteUser(userIDToInvite)">Invite</button> <button ng-click="inviteUser(userIDToInvite)">Invite</button>
</span> </span>
<button ng-click="leaveRoom()">Leave</button> <button ng-click="leaveRoom()">Leave</button>
<button ng-click="startVoiceCall()" ng-show="currentCall == undefined">Voice Call</button> <button ng-click="startVoiceCall()" ng-show="currentCall == undefined && memberCount() == 2">Voice Call</button>
<div ng-show="currentCall.state == 'ringing'"> <div ng-show="currentCall.state == 'ringing'">
Incoming call from {{ currentCall.user_id }} Incoming call from {{ currentCall.user_id }}
<button ng-click="answerCall()">Answer</button> <button ng-click="answerCall()">Answer</button>
<button ng-click="hangupCall()">Reject</button> <button ng-click="hangupCall()">Reject</button>
</div> </div>
<button ng-click="hangupCall()" ng-show="currentCall && currentCall.state != 'ringing'">Hang up</button> <button ng-click="hangupCall()" ng-show="currentCall && currentCall.state != 'ringing'">Hang up</button>
{{ currentCall.state }} <span style="display: none; ">{{ currentCall.state }}</span>
</div> </div>
{{ feedback }} {{ feedback }}