浏览代码

Don't link own receiver badge

Danilo Bargen 8 年之前
父节点
当前提交
4d863e091f
共有 3 个文件被更改,包括 14 次插入5 次删除
  1. 7 3
      src/partials/messenger.receiver/group.html
  2. 2 0
      src/partials/messenger.ts
  3. 5 2
      src/sass/components/_receiver_badge.scss

+ 7 - 3
src/partials/messenger.receiver/group.html

@@ -15,7 +15,9 @@
 			<md-card-content>
 				<eee-contact-badge
 						eee-identity="ctrl.receiver.administrator"
-						eee-linked="true"></eee-contact-badge>
+						eee-linked="ctrl.receiver.administrator != ctrl.me.id"
+                        ng-class="{'linked': ctrl.receiver.administrator != ctrl.me.id}">
+                </eee-contact-badge>
 			</md-card-content>
 
 			<md-card-title>
@@ -28,7 +30,9 @@
 					<li ng-repeat="memberIdentity in ctrl.receiver.members">
 						<eee-contact-badge
 								eee-identity="memberIdentity"
-								eee-linked="true"></eee-contact-badge>
+								eee-linked="memberIdentity != ctrl.me.id"
+                                ng-class="{'linked': memberIdentity != ctrl.me.id}">
+                        </eee-contact-badge>
 					</li>
 				</ul>
 
@@ -51,4 +55,4 @@
 			</section>
 		</md-card-content>
 	</md-card>
-</div>
+</div>

+ 2 - 0
src/partials/messenger.ts

@@ -886,6 +886,7 @@ class ReceiverDetailController {
     public $mdDialog: any;
     public $state: ng.ui.IStateService;
     public receiver: threema.Receiver;
+    public me: threema.MeReceiver;
     public title: string;
     public fingerPrint?: string;
     private fingerPrintService: FingerPrintService;
@@ -913,6 +914,7 @@ class ReceiverDetailController {
         this.contactService = contactService;
 
         this.receiver = webClientService.receivers.getData($stateParams);
+        this.me = webClientService.me;
 
         // Append members
         if (this.receiver.type === 'contact') {

+ 5 - 2
src/sass/components/_receiver_badge.scss

@@ -11,7 +11,6 @@
   }
 }
 .receiver-badge {
-  @include mouse-hand;
   display: flex;
   flex-direction: row;
   align-items: center !important;
@@ -56,4 +55,8 @@
       color: #757575;
     }
   }
-}
+}
+
+.linked .receiver-badge {
+    @include mouse-hand;
+}