Browse Source

Show buddy list and chat even when in no room.

pull/48/head
Simon Eisenmann 11 years ago committed by Simon Eisenmann
parent
commit
d8996870a2
  1. 4
      html/main.html
  2. 1
      src/styles/global/_base.scss
  3. 15
      static/js/controllers/mediastreamcontroller.js
  4. 8
      static/js/directives/buddylist.js
  5. 2
      static/partials/buddylist.html
  6. 2
      static/partials/page/welcome.html

4
html/main.html

@ -15,7 +15,7 @@
<status-message></status-message> <status-message></status-message>
<div class="ng-cloak right"> <div class="ng-cloak right">
<button title="{{_('Share your screen')}}" class="btn aenablebtn" ng-show="isChrome && webrtcDetectedVersion >= 32 && (status=='connected' || status=='conference' || layout.screenshare)" ng-model="layout.screenshare" btn-checkbox><i class="fa fa-desktop"></i></button> <button title="{{_('Share your screen')}}" class="btn aenablebtn" ng-show="isChrome && webrtcDetectedVersion >= 32 && (status=='connected' || status=='conference' || layout.screenshare)" ng-model="layout.screenshare" btn-checkbox><i class="fa fa-desktop"></i></button>
<button title="{{_('Chat')}}" ng-show="roomstatus" class="btn" ng-class="{messagesunseen: chatMessagesUnseen>0}" ng-model="layout.chat" btn-checkbox btn-checkbox-true="true" btn-checkbox-false="false"><i class="fa fa-comments-o"></i><span class="badge" ng-show="chatMessagesUnseen">{{chatMessagesUnseen}}</span></button> <button title="{{_('Chat')}}" class="btn" ng-class="{messagesunseen: chatMessagesUnseen>0}" ng-model="layout.chat" btn-checkbox btn-checkbox-true="true" btn-checkbox-false="false"><i class="fa fa-comments-o"></i><span class="badge" ng-show="chatMessagesUnseen">{{chatMessagesUnseen}}</span></button>
<button title="{{_('Mute microphone')}}" class="btn amutebtn" ng-model="microphoneMute" btn-checkbox btn-checkbox-true="true" btn-checkbox-false="false"><i class="fa fa-microphone-slash"></i></button> <button title="{{_('Mute microphone')}}" class="btn amutebtn" ng-model="microphoneMute" btn-checkbox btn-checkbox-true="true" btn-checkbox-false="false"><i class="fa fa-microphone-slash"></i></button>
<button title="{{_('Turn camera off')}}" class="btn amutebtn" ng-model="cameraMute" btn-checkbox btn-checkbox-true="true" btn-checkbox-false="false"><i class="fa fa-eye-slash"></i></button> <button title="{{_('Turn camera off')}}" class="btn amutebtn" ng-model="cameraMute" btn-checkbox btn-checkbox-true="true" btn-checkbox-false="false"><i class="fa fa-eye-slash"></i></button>
<button title="{{_('Settings')}}" class="btn" ng-model="layout.settings" btn-checkbox btn-checkbox-true="true" btn-checkbox-false="false"><i class="fa fa-cog"></i></button> <button title="{{_('Settings')}}" class="btn" ng-model="layout.settings" btn-checkbox btn-checkbox-true="true" btn-checkbox-false="false"><i class="fa fa-cog"></i></button>
@ -35,7 +35,7 @@
<screenshare/> <screenshare/>
</div> </div>
<div class="ng-cloak nicescroll" id="rightslide"> <div class="ng-cloak nicescroll" id="rightslide">
<div class="rightslidepane" ng-show="roomstatus"> <div class="rightslidepane">
<div id="buddylist"><buddy-list/></div> <div id="buddylist"><buddy-list/></div>
<div id="chat"><chat/></div> <div id="chat"><chat/></div>
</div> </div>

1
src/styles/global/_base.scss

@ -131,4 +131,5 @@ a {
font-size: 1.1em; font-size: 1.1em;
margin-top: 80px; margin-top: 80px;
text-shadow: 0 0 5px black; text-shadow: 0 0 5px black;
max-width:500px;
} }

15
static/js/controllers/mediastreamcontroller.js

@ -668,8 +668,23 @@ define(['underscore', 'bigscreen', 'moment', 'sjcl', 'webrtc.adapter'], function
if (mediaStream.connector.connected) { if (mediaStream.connector.connected) {
$scope.setStatus("waiting"); $scope.setStatus("waiting");
} }
if ($scope.roomstatus) {
$scope.layout.buddylist = true; $scope.layout.buddylist = true;
$scope.layout.buddylistAutoHide = false; $scope.layout.buddylistAutoHide = false;
} else {
$scope.layout.buddylist = false;
$scope.layout.buddylistAutoHide = true;
}
});
$scope.$watch("roomstatus", function(roomstatus) {
if (roomstatus && !$scope.peer) {
$scope.layout.buddylist = true;
$scope.layout.buddylistAutoHide = false;
} else if (!$scope.layout.buddylistAutoHide) {
$scope.layout.buddylist = false;
$scope.layout.buddylistAutoHide = true;
}
}); });
mediaStream.webrtc.e.on("busy", function(event, from) { mediaStream.webrtc.e.on("busy", function(event, from) {

8
static/js/directives/buddylist.js

@ -28,7 +28,7 @@ define(['underscore', 'text!partials/buddylist.html'], function(_, template) {
var controller = ['$scope', '$element', '$attrs', function($scope, $element, $attrs) { var controller = ['$scope', '$element', '$attrs', function($scope, $element, $attrs) {
$scope.layout.buddylist = false; $scope.layout.buddylist = false;
$scope.enabled = false; $scope.layout.buddylistAutoHide = true;
$scope.doCall = function(id) { $scope.doCall = function(id) {
@ -75,13 +75,7 @@ define(['underscore', 'text!partials/buddylist.html'], function(_, template) {
};*/ };*/
$scope.setRoomStatus = function(status) { $scope.setRoomStatus = function(status) {
if (status !== $scope.enabled) {
$scope.enabled = status;
$scope.$emit("roomStatus", status); $scope.$emit("roomStatus", status);
}
if (status && !$scope.layout.buddylistAutoHide) {
$scope.layout.buddylist = true
}
}; };
var buddylist = $scope.buddylist = buddyList.buddylist($element, $scope, {}); var buddylist = $scope.buddylist = buddyList.buddylist($element, $scope, {});

2
static/partials/buddylist.html

@ -1,4 +1,4 @@
<div class="buddylist nicescroll" ng-show="enabled" ng-class="{loading: loading, empty: empty}"> <div class="buddylist nicescroll" ng-class="{loading: loading, empty: empty}">
<div class="buddycontainer"> <div class="buddycontainer">
<div> <div>
</div> </div>

2
static/partials/page/welcome.html

@ -1,4 +1,4 @@
<div class="welcome container" ng-controller="RoomchangeController"> <div class="welcome container-fluid" ng-controller="RoomchangeController">
<h3 style="margin-top:0px">{{_("Create your room")}}</h3> <h3 style="margin-top:0px">{{_("Create your room")}}</h3>
<p><i>{{_("This is your room link:")}}</i></p> <p><i>{{_("This is your room link:")}}</i></p>
<p> <p>

Loading…
Cancel
Save