mirror of
				https://github.com/avatao-content/frontend-tutorial-framework
				synced 2025-11-04 12:12:55 +00:00 
			
		
		
		
	Change message button type in send message
This commit is contained in:
		@@ -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
 | 
			
		||||
    });
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user