messenger.navigation.html 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  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="$mdMenu.open($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-hidden="true" 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-hidden="true" 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-hidden="true" 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-hidden="true" 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="1" name="conversations" aria-label="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="1" name="contacts" aria-label="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. ng-init="dndModeSimplified = ctrl.dndModeSimplified(conversation)"
  67. ui-sref="messenger.home.conversation({ type: conversation.type, id: conversation.id, initParams: null })"
  68. aria-label="conversation with {{ conversation.receiver.displayName }}"
  69. class="conversation-wrapper"
  70. ng-if="ctrl.isVisible(conversation)">
  71. <div class="conversation"
  72. ng-class="{'unread': conversation.unreadCount > 0,
  73. 'starred': conversation.isStarred,
  74. 'active': ctrl.isActive(conversation)}">
  75. <section class="avatar-box" role="button">
  76. <eee-avatar eee-receiver="conversation.receiver"
  77. eee-resolution="'low'"></eee-avatar>
  78. </section>
  79. <section class="conversation-box">
  80. <section class="receiver-box">
  81. <span class="title" ng-class="{'disabled': conversation.receiver.disabled === true}" ng-bind-html="conversation.receiver.displayName | escapeHtml | emojify" role="button">
  82. </span>
  83. <span class="notification-settings" ng-if="dndModeSimplified === 'on'">
  84. <img height="16" width="16" src="img/ic_dnd_total_silence.svg" translate translate-attr-title="messenger.MUTED_NONE">
  85. </span>
  86. <span class="notification-settings" ng-if="dndModeSimplified === 'mention'">
  87. <img height="16" width="16" src="img/ic_dnd_mention.svg" translate translate-attr-title="messenger.MUTED_MENTION_ONLY">
  88. </span>
  89. <span class="notification-settings" ng-if="dndModeSimplified === 'off' && conversation.notifications && conversation.notifications.sound.mode === 'muted'">
  90. <img height="16" width="16" src="img/ic_notifications_off.svg" translate translate-attr-title="messenger.MUTED_SILENT">
  91. </span>
  92. <span class="badge unread-count" ng-show="conversation.unreadCount > 0">
  93. {{ conversation.unreadCount }}
  94. </span>
  95. </section>
  96. <section class="message-box">
  97. <eee-latest-message
  98. ng-if="!conversation.receiver.isTyping() && conversation.latestMessage"
  99. ng-class="latest-message-text"
  100. eee-type="conversation.type"
  101. eee-receiver="conversation.receiver"
  102. eee-message="conversation.latestMessage"></eee-latest-message>
  103. </section>
  104. </section>
  105. </div>
  106. </li>
  107. </ul>
  108. </div>
  109. <!-- Contacts -->
  110. <div id="navigation-contacts" class="tab-content" ng-if="ctrl.activeTab == 'contacts'" in-view-container>
  111. <p class="empty" ng-if="ctrl.contacts().length === 0" translate>messenger.NO_CONTACTS_FOUND</p>
  112. <ul ng-class="{'hide-inactive': ctrl.hideInactiveContacts()}">
  113. <li ng-repeat="contact in ctrl.contacts() | isNotMe | filter:ctrl.searchContact"
  114. ui-sref="messenger.home.conversation({ type: 'contact', id: contact.id, initParams: null })"
  115. class="contact"
  116. ng-class="{'inactive': contact.state == 'INACTIVE'}">
  117. <section class="avatar-box">
  118. <eee-avatar eee-receiver="contact"
  119. eee-resolution="'low'"></eee-avatar>
  120. </section>
  121. <section class="left">
  122. <div class="name" ng-bind-html="contact.displayName | escapeHtml | emojify"></div>
  123. <div class="identity">{{ contact.id }}</div>
  124. </section>
  125. <section class="right">
  126. <div class="nickname">
  127. <span ng-show="contact.publicNickname && contact.publicNickname != contact.identity">
  128. ~{{ contact.publicNickname }}
  129. </span>
  130. </div>
  131. <div class="verification-level">
  132. <eee-verification-level
  133. contact="contact"
  134. ng-if="contact.verificationLevel">
  135. </eee-verification-level>
  136. </div>
  137. </section>
  138. </li>
  139. </ul>
  140. </div>
  141. <!-- FAB -->
  142. <div id="navigation-fab">
  143. <md-fab-speed-dial md-direction="up" class="md-scale md-fab-bottom-right md-hover-full" ng-cloak>
  144. <md-fab-trigger>
  145. <md-button aria-label="menu" class="md-fab">
  146. <md-icon aria-label="Add" class="material-icons md-24">add</md-icon>
  147. </md-button>
  148. </md-fab-trigger>
  149. <md-fab-actions>
  150. <md-button
  151. ng-click="ctrl.addContact()"
  152. translate-attr="{'aria-label': 'messenger.ADD_CONTACT'}"
  153. aria-label="Add Contact"
  154. class="md-fab md-raised md-mini fab-button-add-contact">
  155. <md-tooltip md-direction="left" md-visible="tooltipVisible">
  156. <label translate>messenger.ADD_CONTACT</label>
  157. </md-tooltip>
  158. <md-icon class="material-icons md-24">person_add</md-icon>
  159. </md-button>
  160. <md-button
  161. ng-click="ctrl.createGroup()"
  162. translate-attr="{'aria-label': 'messenger.CREATE_GROUP'}"
  163. aria-label="Create Group"
  164. class="md-fab md-mini fab-button-add-group">
  165. <md-tooltip md-direction="left" md-visible="tooltipVisible">
  166. <label translate>messenger.CREATE_GROUP</label>
  167. </md-tooltip>
  168. <md-icon class="material-icons md-24">group_add</md-icon>
  169. </md-button>
  170. <md-button
  171. ng-if="ctrl.showCreateDistributionListButton()"
  172. ng-click="ctrl.createDistributionList()"
  173. translate-attr="{'aria-label': 'messenger.CREATE_DISTRIBUTION_LIST'}"
  174. aria-label="Create Distribution list"
  175. class="md-fab md-mini fab-button-add-distribution-list">
  176. <md-tooltip md-direction="left" md-visible="tooltipVisible">
  177. <label translate>messenger.CREATE_DISTRIBUTION_LIST</label>
  178. </md-tooltip>
  179. <md-icon class="material-icons md-24">question_answer</md-icon>
  180. </md-button>
  181. </md-fab-actions>
  182. </md-fab-speed-dial>
  183. </div>