Added grey muted badges
This commit is contained in:
parent
5b98c89d08
commit
faaffc9b6e
@ -2666,6 +2666,33 @@ angular.module('myApp.directives', ['myApp.filters'])
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
.directive('myPeerMuted', function ($rootScope, NotificationsManager) {
|
||||||
|
|
||||||
|
return {
|
||||||
|
link: link
|
||||||
|
};
|
||||||
|
|
||||||
|
function link ($scope, element, attrs) {
|
||||||
|
var peerID = $scope.$eval(attrs.myPeerMuted);
|
||||||
|
var className = attrs.mutedClass || 'muted';
|
||||||
|
var unsubscribe = $rootScope.$on('notify_settings', function (e, data) {
|
||||||
|
if (data.peerID == peerID) {
|
||||||
|
updateClass(peerID, element, className);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
updateClass(peerID, element, className);
|
||||||
|
|
||||||
|
$scope.$on('$destroy', unsubscribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
function updateClass (peerID, element, className) {
|
||||||
|
NotificationsManager.getPeerMuted(peerID).then(function (muted) {
|
||||||
|
element.toggleClass(className, muted);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
.directive('myPeerLink', function (AppChatsManager, AppUsersManager) {
|
.directive('myPeerLink', function (AppChatsManager, AppUsersManager) {
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
@ -1243,6 +1243,9 @@ a.im_dialog_selected {
|
|||||||
.im_dialogs_modal_col & {
|
.im_dialogs_modal_col & {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
&_muted {
|
||||||
|
background: #ccc;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.im_dialog_unread {
|
.im_dialog_unread {
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
class="im_dialog_badge badge"
|
class="im_dialog_badge badge"
|
||||||
ng-show="dialogMessage.unreadCount > 0 && !dialogMessage.pFlags.out"
|
ng-show="dialogMessage.unreadCount > 0 && !dialogMessage.pFlags.out"
|
||||||
ng-bind="dialogMessage.unreadCount"
|
ng-bind="dialogMessage.unreadCount"
|
||||||
|
my-peer-muted="dialogMessage.peerID" muted-class="im_dialog_badge_muted"
|
||||||
></span>
|
></span>
|
||||||
<i
|
<i
|
||||||
class="im_dialog_unread"
|
class="im_dialog_unread"
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
class="im_dialog_badge badge"
|
class="im_dialog_badge badge"
|
||||||
ng-show="dialogMessage.unreadCount > 0 && !dialogMessage.pFlags.out"
|
ng-show="dialogMessage.unreadCount > 0 && !dialogMessage.pFlags.out"
|
||||||
ng-bind="dialogMessage.unreadCount"
|
ng-bind="dialogMessage.unreadCount"
|
||||||
|
my-peer-muted="dialogMessage.peerID" muted-class="im_dialog_badge_muted"
|
||||||
></span>
|
></span>
|
||||||
<i
|
<i
|
||||||
class="im_dialog_unread"
|
class="im_dialog_unread"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user