messenger.navigation.html 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. <!-- Top header (nickname + menu) -->
  2. <div id="navigation-topheader">
  3. <div class="my-identity">
  4. <span ng-click="ctrl.showProfile()" ng-cloak translate-attr="{'title': 'messenger.MY_PUBLIC_NICKNAME'}">
  5. {{ ctrl.getMe().publicNickname || ctrl.getMe().id }}
  6. </span>
  7. </div>
  8. <battery-status></battery-status>
  9. <md-menu md-position-mode="target-right target" md-offset="0 45">
  10. <md-button aria-label="Open menu" class="md-icon-button" ng-click="$mdOpenMenu($event)">
  11. <i class="material-icons md-light md-24">more_vert</i>
  12. </md-button>
  13. <md-menu-content width="4">
  14. <md-menu-item>
  15. <md-button ng-click="ctrl.closeSession()">
  16. <md-icon aria-label="Close session" class="material-icons md-24">exit_to_app</md-icon>
  17. <span translate>common.SESSION_CLOSE</span>
  18. </md-button>
  19. </md-menu-item>
  20. <md-menu-item ng-if="ctrl.isPersistent()">
  21. <md-button ng-click="ctrl.deleteSession()">
  22. <md-icon aria-label="Delete session" class="material-icons md-24">delete</md-icon>
  23. <span translate>common.SESSION_DELETE</span>
  24. </md-button>
  25. </md-menu-item>
  26. <md-menu-item>
  27. <md-button ng-click="ctrl.settings()">
  28. <md-icon aria-label="Settings" class="material-icons md-24">settings</md-icon>
  29. <span translate>messenger.SETTINGS</span>
  30. </md-button>
  31. </md-menu-item>
  32. <md-menu-item>
  33. <md-button ng-click="ctrl.about()">
  34. <md-icon aria-label="About" class="material-icons md-24">info</md-icon>
  35. <span translate>messenger.ABOUT</span>
  36. </md-button>
  37. </md-menu-item>
  38. </md-menu-content>
  39. </md-menu>
  40. </div>
  41. <!-- Header -->
  42. <div id="navigation-header">
  43. <div class="main">
  44. <md-nav-bar md-no-ink md-selected-nav-item="ctrl.activeTab" nav-bar-aria-label="navigation links">
  45. <md-nav-item md-nav-click="" name="conversations">
  46. <i class="material-icons md-dark md-24" translate translate-attr-title="messenger.CONVERSATIONS">speaker_notes</i>
  47. </md-nav-item>
  48. <md-nav-item md-nav-click="" name="contacts">
  49. <i class="material-icons md-dark md-24" translate translate-attr-title="messenger.CONTACTS">person</i>
  50. </md-nav-item>
  51. </md-nav-bar>
  52. <span flex></span>
  53. <md-button aria-label="Search" class="md-icon-button" ng-click="ctrl.toggleSearch()">
  54. <i class="material-icons md-dark md-24" translate translate-attr-title="messenger.SEARCH">search</i>
  55. </md-button>
  56. </div>
  57. <div class="search" searchbox searchbox-focus="ctrl.searchVisible">
  58. <input type="text" ng-model="ctrl.searchText" translate translate-attr-placeholder="messenger.SEARCH" aria-label="Search" translate-attr-aria-label="messenger.SEARCH">
  59. </div>
  60. </div>
  61. <!-- Conversations -->
  62. <div id="navigation-conversations" class="tab-content" ng-if="ctrl.activeTab == 'conversations'" in-view-container>
  63. <p class="empty" ng-if="ctrl.conversations().length === 0" translate>messenger.NO_CONVERSATIONS_FOUND</p>
  64. <ul>
  65. <li ng-repeat="conversation in ctrl.conversations() | filter:ctrl.searchConversation"
  66. ui-sref="messenger.home.conversation({ type: conversation.type, id: conversation.id, initParams: null })"
  67. class="conversation-wrapper" ng-if="ctrl.isVisible(conversation)">
  68. <div class="conversation"
  69. ng-class="{'unread': conversation.unreadCount > 0,
  70. 'starred': conversation.isStarred,
  71. 'active': ctrl.isActive(conversation)}">
  72. <section class="avatar-box">
  73. <eee-avatar eee-receiver="conversation.receiver"
  74. eee-resolution="'low'"></eee-avatar>
  75. </section>
  76. <section class="conversation-box">
  77. <section class="receiver-box">
  78. <span class="title" ng-class="{'disabled': conversation.receiver.disabled === true}" ng-bind-html="conversation.receiver.displayName | escapeHtml | emojify">
  79. </span>
  80. <span class="notification-settings" ng-show="(conversation | dndModeSimplified) === 'on'">
  81. <img height="16" width="16" src="img/ic_dnd_total_silence.svg" translate translate-attr-title="messenger.MUTED_NONE">
  82. </span>
  83. <span class="notification-settings" ng-show="(conversation | dndModeSimplified) === 'mention'">
  84. <img height="16" width="16" src="img/ic_dnd_mention.svg" translate translate-attr-title="messenger.MUTED_MENTION_ONLY">
  85. </span>
  86. <span class="notification-settings" ng-show="(conversation | dndModeSimplified) === 'off' && conversation.notifications && conversation.notifications.sound.mode === 'muted'">
  87. <img height="16" width="16" src="img/ic_notifications_off.svg" translate translate-attr-title="messenger.MUTED_SILENT">
  88. </span>
  89. <span class="badge unread-count" ng-show="conversation.unreadCount > 0">
  90. {{ conversation.unreadCount }}
  91. </span>
  92. </section>
  93. <section class="message-box">
  94. <eee-latest-message
  95. ng-if="!conversation.receiver.isTyping() && conversation.latestMessage"
  96. ng-class="latest-message-text"
  97. eee-type="conversation.type"
  98. eee-receiver="conversation.receiver"
  99. eee-message="conversation.latestMessage"></eee-latest-message>
  100. </section>
  101. </section>
  102. </div>
  103. </li>
  104. </ul>
  105. </div>
  106. <!-- Contacts -->
  107. <div id="navigation-contacts" class="tab-content" ng-if="ctrl.activeTab == 'contacts'" in-view-container>
  108. <p class="empty" ng-if="ctrl.contacts().length === 0" translate>messenger.NO_CONTACTS_FOUND</p>
  109. <ul ng-class="{'hide-inactive': ctrl.hideInactiveContacts()}">
  110. <li ng-repeat="contact in ctrl.contacts() | isNotMe | filter:ctrl.searchContact"
  111. ui-sref="messenger.home.conversation({ type: 'contact', id: contact.id, initParams: null })"
  112. class="contact"
  113. ng-class="{'inactive': contact.state == 'INACTIVE'}">
  114. <section class="avatar-box">
  115. <eee-avatar eee-receiver="contact"
  116. eee-resolution="'low'"></eee-avatar>
  117. </section>
  118. <section class="left">
  119. <div class="name" ng-bind-html="contact.displayName | escapeHtml | emojify"></div>
  120. <div class="identity">{{ contact.id }}</div>
  121. </section>
  122. <section class="right">
  123. <div class="nickname">
  124. <span ng-show="contact.publicNickname && contact.publicNickname != contact.identity">
  125. ~{{ contact.publicNickname }}
  126. </span>
  127. </div>
  128. <div class="verification-level">
  129. <eee-verification-level
  130. contact="contact"
  131. ng-if="contact.verificationLevel">
  132. </eee-verification-level>
  133. </div>
  134. </section>
  135. </li>
  136. </ul>
  137. </div>
  138. <!-- FAB -->
  139. <div id="navigation-fab">
  140. <md-fab-speed-dial md-direction="up" class="md-scale md-fab-bottom-right md-hover-full" ng-cloak>
  141. <md-fab-trigger>
  142. <md-button aria-label="menu" class="md-fab">
  143. <md-icon aria-label="Add" class="material-icons md-24">add</md-icon>
  144. </md-button>
  145. </md-fab-trigger>
  146. <md-fab-actions>
  147. <md-button
  148. ng-click="ctrl.addContact()"
  149. translate-attr="{'aria-label': 'messenger.ADD_CONTACT'}"
  150. aria-label="Add Contact"
  151. class="md-fab md-raised md-mini fab-button-add-contact">
  152. <md-tooltip md-direction="left" md-visible="tooltipVisible">
  153. <label translate>messenger.ADD_CONTACT</label>
  154. </md-tooltip>
  155. <md-icon class="material-icons md-24">person_add</md-icon>
  156. </md-button>
  157. <md-button
  158. ng-click="ctrl.createGroup()"
  159. translate-attr="{'aria-label': 'messenger.CREATE_GROUP'}"
  160. aria-label="Create Group"
  161. class="md-fab md-mini fab-button-add-group">
  162. <md-tooltip md-direction="left" md-visible="tooltipVisible">
  163. <label translate>messenger.CREATE_GROUP</label>
  164. </md-tooltip>
  165. <md-icon class="material-icons md-24">group_add</md-icon>
  166. </md-button>
  167. <md-button
  168. ng-if="ctrl.showCreateDistributionListButton()"
  169. ng-click="ctrl.createDistributionList()"
  170. translate-attr="{'aria-label': 'messenger.CREATE_DISTRIBUTION_LIST'}"
  171. aria-label="Create Distribution list"
  172. class="md-fab md-mini fab-button-add-distribution-list">
  173. <md-tooltip md-direction="left" md-visible="tooltipVisible">
  174. <label translate>messenger.CREATE_DISTRIBUTION_LIST</label>
  175. </md-tooltip>
  176. <md-icon class="material-icons md-24">question_answer</md-icon>
  177. </md-button>
  178. </md-fab-actions>
  179. </md-fab-speed-dial>
  180. </div>