mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-10-01 08:25:44 -04:00
Only show voice call button if there are exactly 2 members in the room. Also hide the somewhat user unfriendly call state.
This commit is contained in:
parent
073bec4830
commit
4b7f6dd7fc
@ -89,6 +89,10 @@ angular.module('RoomController', ['ngSanitize', 'mFileInput'])
|
|||||||
$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) {
|
||||||
// console.log("Paginating more.");
|
// console.log("Paginating more.");
|
||||||
|
@ -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 }}
|
||||||
|
Loading…
Reference in New Issue
Block a user