瀏覽代碼

Support emoji in conversation and contact names (#234)

Fixes #44.
Danilo Bargen 8 年之前
父節點
當前提交
b740ef6f02

+ 1 - 3
src/partials/messenger.conversation.html

@@ -11,9 +11,7 @@
                         eee-resolution="'low'"></eee-avatar>
         </div>
         <div class="header-details" ng-click="ctrl.showReceiver()">
-            <div class="conversation-header-details-name">
-                {{ ctrl.receiver.displayName }}
-            </div>
+            <div class="conversation-header-details-name" ng-bind-html="ctrl.receiver.displayName | escapeHtml | emojify"></div>
             <div class="conversation-header-details-detail" ng-if="ctrl.type == 'contact'">
             <eee-verification-level ng-if="ctrl.type == 'contact'"
                                     contact="ctrl.receiver"></eee-verification-level>

+ 2 - 3
src/partials/messenger.navigation.html

@@ -75,8 +75,7 @@
 
             <section class="conversation-box">
                 <section class="receiver-box">
-                    <span ng-class="{'disabled': conversation.receiver.disabled === true}">
-                        {{ conversation.receiver.displayName }}
+                    <span ng-class="{'disabled': conversation.receiver.disabled === true}" ng-bind-html="conversation.receiver.displayName | escapeHtml | emojify">
                     </span>
                     <span class="badge unread-count" ng-show="conversation.unreadCount > 0">
                         {{ conversation.unreadCount }}
@@ -113,7 +112,7 @@
             </section>
 
             <section class="left">
-                <div class="name">{{ contact.displayName }}</div>
+                <div class="name" ng-bind-html="contact.displayName | escapeHtml | emojify"></div>
                 <div class="identity">{{ contact.id }}</div>
             </section>
 

+ 1 - 1
src/partials/messenger.receiver.edit.html

@@ -2,7 +2,7 @@
     <div id="receiver-detail-header" class="detail-header">
         <ng-include src="'partials/messenger.backbutton.html'"></ng-include>
         <div class="header-details">
-            <h2>{{ctrl.controllerModel.subject}}</h2>
+            <h2 ng-bind-html="ctrl.controllerModel.subject | escapeHtml | emojify"></h2>
         </div>
 
         <div class="header-buttons">

+ 1 - 1
src/partials/messenger.receiver.html

@@ -2,7 +2,7 @@
     <div id="receiver-detail-header" class="detail-header">
         <ng-include src="'partials/messenger.backbutton.html'"></ng-include>
         <div class="header-details">
-            <h2>{{ ctrl.receiver.displayName }}</h2>
+            <h2 ng-bind-html="ctrl.receiver.displayName | escapeHtml | emojify"></h2>
         </div>
 
         <div class="header-buttons">