mirror of
https://github.com/avatao-content/frontend-tutorial-framework
synced 2024-12-04 19:11:33 +00:00
Change message button type in send message
This commit is contained in:
parent
d92f3da04d
commit
2f9aa9c298
@ -12,10 +12,10 @@
|
||||
|
||||
<div class="tfw-message-btn-divider"></div>
|
||||
<div class="tfw-message-btn">
|
||||
<button *ngFor="let button of message.buttons"
|
||||
class="{{button}}"
|
||||
(click)="sendButtonCommand(button)">
|
||||
{{buttonMap[button].caption}}
|
||||
<button *ngFor="let messageButton of message.buttons"
|
||||
class="{{messageButton}}"
|
||||
(click)="sendButtonCommand(messageButton)">
|
||||
{{buttonMap[messageButton].caption}}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -79,10 +79,10 @@ export class MessagesComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
sendButtonCommand(button: string) {
|
||||
sendButtonCommand(messageButton: MessageButton) {
|
||||
this.websocketService.send({
|
||||
'key': 'button.click',
|
||||
'value': button
|
||||
'key': 'message.button.click',
|
||||
'value': messageButton
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user