switch of message type is applied

This commit is contained in:
병준 박 2019-10-08 16:41:23 +09:00
parent f72100c4f5
commit d7a1a398d3
2 changed files with 8 additions and 1 deletions

View File

@ -8,6 +8,11 @@
contact: message.senderSeq !== loginRes.userSeq
}"
>
<ng-container [ngSwitch]="message.type">
<div *ngSwitchCase="EventType.Character">Character</div>
<div *ngSwitchCase="EventType.Join">Join</div>
</ng-container>
<img *ngIf="" src="" class="avatar" />
<div class="bubble">

View File

@ -1,6 +1,6 @@
import { Component, OnInit, Input } from '@angular/core';
import { Info } from '@ucap-webmessenger/protocol-event';
import { Info, EventType } from '@ucap-webmessenger/protocol-event';
import { LoginResponse } from '@ucap-webmessenger/protocol-authentication';
import { NGXLogger } from 'ngx-logger';
@ -15,6 +15,8 @@ export class MessagesComponent implements OnInit {
@Input()
messages: Info[];
EventType = EventType;
constructor(private logger: NGXLogger) {}
ngOnInit() {