-
Notifications
You must be signed in to change notification settings - Fork 667
Expand file tree
/
Copy pathapp.component.html
More file actions
41 lines (40 loc) · 1.37 KB
/
app.component.html
File metadata and controls
41 lines (40 loc) · 1.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<div class="demo-container">
<dx-chat
[dataSource]="dataSource"
[reloadOnChange]="false"
[showAvatar]="false"
[showDayHeaders]="false"
[user]="user"
height="710"
[typingUsers]="typingUsers$ | async"
[alerts]="alerts$ | async"
[sendButtonOptions]="sendButtonOptions$ | async"
[speechToTextEnabled]="true"
(onMessageEntered)="onMessageEntered($event)"
messageTemplate="messageTemplate"
emptyViewTemplate="emptyViewTemplate"
>
<div *dxTemplate="let data of 'messageTemplate'">
<div
class="chat-messagebubble-text"
[innerHTML]="convertToHtml(data.message)"
></div>
</div>
<div *dxTemplate="let data of 'emptyViewTemplate'">
<div class="dx-chat-messagelist-empty-message">{{ data.texts.message }}</div>
<div class="dx-chat-messagelist-empty-prompt">{{ data.texts.prompt }}</div>
<div class="dx-chat-suggestion-cards">
@for (card of suggestionCards; track card.title) {
<button
type="button"
class="dx-chat-suggestion-card"
(click)="onSuggestionClick(card.prompt)"
>
<div class="dx-chat-suggestion-card-title">{{ card.title }}</div>
<div class="dx-chat-suggestion-card-prompt">{{ card.description }}</div>
</button>
}
</div>
</div>
</dx-chat>
</div>