5 ng-style="{'background-color': '{{settings.backgroundColor}}'}"
10 ng-repeat="(key, message) in messages track by $index"
11 class="md-padding message-row"
12 ng-style="{'font-size': '{{settings.messageFontSize}}px'}"
13 ng-class="{'in':( message.direction === 'in' && settings.messagesAlignment === 'alternate'), 'in2': ( message.direction === 'in' && settings.messagesAlignment === 'centered'), 'out': message.direction === 'out' && message.UserId, 'auto': message.direction === 'out' && !message.UserId}"
16 ng-if="message.direction ==='out' && !message.UserId"
17 ng-src="{{settings.remote}}/api/chat/websites/{{settings.id}}/system_avatar?token={{settings.token}}"
22 ng-if="message.direction ==='out' && message.UserId"
23 ng-src="{{settings.remote}}/api/{{settings.showAgentAvatar ? 'users/' + message.UserId + '/avatar' : 'chat/websites/' + settings.id + '/avatar'}}?token={{settings.token}}"
28 ng-if="message.direction ==='in'"
29 ng-src="{{settings.remote}}/api/chat/websites/{{settings.id}}/customer_avatar?token={{settings.token}}"
35 <div layout="row" layout-align="end center">
36 <div class="time secondary-text" ng-switch="settings.agentIdentifier">
37 <span ng-switch-when="website_alias">
38 {{message.direction === 'out' ? (message.UserId ?
39 (settings.agentAlias + message.UserId) : settings.systemAlias) :
40 (settings.customerAlias || visitor.from || 'Visitor' +
41 message.ContactId)}} - {{message.createdAt | date : 'h:mm'}}
43 <span ng-switch-when="agent_alias">
44 {{message.direction === 'out' ? (message.UserId ?
45 (message.User.alias || message.User.fullname) :
46 settings.systemAlias) : (settings.customerAlias || visitor.from ||
47 'Visitor' + message.ContactId)}} - {{message.createdAt | date :
50 <span ng-switch-when="agent_fullname">
51 {{message.direction === 'out' ? (message.UserId ?
52 message.User.fullname : settings.systemAlias) :
53 (settings.customerAlias || visitor.from || 'Visitor' +
54 message.ContactId)}} - {{message.createdAt | date : 'h:mm'}}
56 <span ng-switch-default>
57 {{message.direction === 'out' ? (message.UserId ?
58 ((settings.agentAlias || 'Agent') + message.UserId) :
59 settings.systemAlias) : (settings.customerAlias || visitor.from ||
60 'Visitor' + message.ContactId)}} - {{message.createdAt | date :
65 style="padding-left: 5px"
66 ng-if="message.direction === 'in' && settings.enableCustomerCheckmarks"
70 class="mdi mdi-18px mdi-check"
75 class="mdi mdi-18px mdi-check-all"
76 style="color: #34b7f1"
81 ng-class="{'in': message.direction === 'in', 'out': message.direction ==='out' && message.UserId, 'auto': message.direction ==='out' && !message.UserId}"
83 <div ng-if="message.AttachmentId">
84 <div ng-switch="message.Attachment.type | typeFromMimeType">
86 ng-switch-when="audio"
87 source="message.urlFromBody"
88 type="message.Attachment.type"
92 ng-switch-when="image|video"
93 ng-switch-when-separator="|"
94 source="message.urlFromBody"
95 type="message.Attachment.type"
100 source="message.urlFromBody"
101 document-name="message.Attachment.name"
106 ng-if="!message.AttachmentId"
107 ng-bind-html="message.body | embed:vm.emojiOptions"
117 ng-repeat="error in vm.errors"
119 layout-align="center end"
122 <i class="mdi mdi-alert mdi-24px mdi-light"></i>
123 <span class="chat-error-message"
124 >{{error.message || 'Service temporarily unavailable.'}}</span
129 <!-- / CHAT CONTENT -->
133 ng-show="!vm.recording"
134 ng-hide="vm.recording"
136 layout-align="center center"
137 class="chat-footer md-padding"
139 <div id="input_text" layout="row" layout-align="end center">
140 <input id="emojionearea" />
142 id="attachmentButton"
143 ng-if="settings.enableCustomerAttachment"
144 class="md-fab md-mini md-warn"
146 flow-init="vm.ngFlowOptions"
148 flow-name="vm.ngFlow.flow"
149 flow-file-added="vm.fileAdded($file, $event, $flow)"
151 <i class="mdi mdi-attachment mdi-24px mdi-light"></i>
157 ng-if="settings.enableCustomerAudioRecording"
158 class="md-fab md-mini md-warn rec-button-group"
160 ng-click="vm.onRecordingStart($event)"
164 class="mdi mdi-microphone mdi-24px mdi-light icon_color"
171 ng-if="settings.enableSendButton"
172 class="md-fab md-mini md-warn"
174 ng-click="vm.reply_button($event)"
178 class="mdi mdi-send mdi-24px mdi-light icon_color"
183 <!-- Rec controls -->
185 ng-if="settings.enableCustomerAudioRecording"
186 ng-show="vm.recording"
187 ng-hide="!vm.recording"
189 layout-align="end end"
190 class="chat-footer md-padding"
193 <div class="record-time" ng-if="!vm.recordingStopped"></div>
195 <!-- audio player -->
196 <div ng-if="vm.recordingStopped" style="margin: 1px">
197 <audio-player source="vm.recordedAudioUrl" dispose-source="true" />
200 <!-- stop recording button -->
202 ng-if="!vm.recordingStopped"
204 class="md-icon-button"
206 ng-click="vm.onRecordingStop()"
208 <i class="mdi mdi-stop mdi-24px icon_color"></i>
211 <!-- delete recording button -->
213 id="delete_rec_button"
214 class="md-icon-button md-warn md-mini"
216 ng-click="vm.onRecordingDelete()"
218 <i class="mdi mdi-delete mdi-24px mdi-warn"></i>
221 <!-- send recording button -->
222 <div class="btn-send-container" style="margin: 1px">
223 <div class="record-ripple"></div>
226 class="md-icon-button md-mini"
227 ng-click="vm.onRecordingSend()"
229 flow-name="vm.ngFlow.flow"
230 flow-file-added="vm.fileAdded($file, $event, $flow)"
232 <i class="mdi mdi-send mdi-24px mdi-success"></i>
236 <!-- / CHAT FOOTER -->