general avatar polishing

This commit is contained in:
Manuel Araoz 2014-05-08 15:48:00 -03:00
parent ffdaa86c21
commit 032ae804b1
2 changed files with 14 additions and 14 deletions

View File

@ -123,19 +123,15 @@
<div class="large-9 medium-9 small-9 columns">
<div class="bottom-copay"
ng-repeat="c in $root.wallet.getRegisteredPeerIds()">
<video
ng-if="$root.videoInfo[c.peerId]"
class="video-small"
<video ng-if="$root.videoInfo[c.peerId]"
avatar peer="{{c}}"
autoplay
confvideo
peer="{{c.peerId}}"
ng-src="{{$root.getVideoURL(c.peerId)}}"
title="{{c.peerId + (c.peerId == $root.wallet.network.peerId?' (You)':'')}}" ></video>
></video>
<img ng-if="!$root.videoInfo[c.peerId]"
ng-class="($root.wallet.getOnlinePeerIDs().indexOf(c.peerId) != -1) ? 'online' : 'offline'"
class="video-small"
avatar peer="{{c}}"
src="./img/satoshi.gif"
title="{{c.peerId + (c.peerId == $root.wallet.network.peerId?' (You)':'')}}" />
/>
<span ng-if="c.nick" style="position:absolute; bottom:-10px; width: 80px; overflow: hidden;">{{c.nick}}</span>
</div>
</div>
@ -240,7 +236,7 @@
</select>
</div>
<div class="large-6 columns">
<h6>Select required number of signatures</h6>
<h6>Select required signatures</h6>
<select ng-model="requiredCopayers" ng-options="requiredCopayers as requiredCopayers for requiredCopayers in RCValues">
</select>
</div>

View File

@ -89,12 +89,16 @@ angular.module('copay.directives')
});
}
}
}).directive('confvideo', function($rootScope) {
}).directive('avatar', function($rootScope) {
return {
link: function(scope, element, attrs) {
var peer = attrs.peer;
element.addClass(($rootScope.wallet.getOnlinePeerIDs().indexOf(peer) != -1) ? 'online' : 'offline');
var muted = $rootScope.getVideoMutedStatus(peer);
var peer = JSON.parse(attrs.peer)
var peerId = peer.peerId;
var nick = peer.nick;
element.addClass(($rootScope.wallet.getOnlinePeerIDs().indexOf(peerId) != -1) ? 'online' : 'offline');
element.addClass('video-small');
element.attr('title', peerId + (peerId == $rootScope.wallet.network.peerId?' (You)':''));
var muted = $rootScope.getVideoMutedStatus(peerId);
if (muted) {
element.attr("muted", true);
}