mirror of
https://github.com/avatao-content/frontend-tutorial-framework
synced 2024-12-05 02:11:32 +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-divider"></div>
|
||||||
<div class="tfw-message-btn">
|
<div class="tfw-message-btn">
|
||||||
<button *ngFor="let button of message.buttons"
|
<button *ngFor="let messageButton of message.buttons"
|
||||||
class="{{button}}"
|
class="{{messageButton}}"
|
||||||
(click)="sendButtonCommand(button)">
|
(click)="sendButtonCommand(messageButton)">
|
||||||
{{buttonMap[button].caption}}
|
{{buttonMap[messageButton].caption}}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -79,10 +79,10 @@ export class MessagesComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sendButtonCommand(button: string) {
|
sendButtonCommand(messageButton: MessageButton) {
|
||||||
this.websocketService.send({
|
this.websocketService.send({
|
||||||
'key': 'button.click',
|
'key': 'message.button.click',
|
||||||
'value': button
|
'value': messageButton
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user