From 21c9bd0ae23636eb7955f76629b24ae0ed89ea6e Mon Sep 17 00:00:00 2001 From: leejh Date: Tue, 15 Oct 2019 16:59:05 +0900 Subject: [PATCH] =?UTF-8?q?=EC=88=98=EC=A0=95=20::=20KEY=5FVER=5FINFO=20?= =?UTF-8?q?=EC=97=90=20=EB=8C=80=ED=95=9C=20=EB=AF=B8=EC=A7=84=ED=95=9C=20?= =?UTF-8?q?=EB=B6=80=EB=B6=84=20=EC=B2=98=EB=A6=AC.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/left-sidenav/chat.component.html | 8 ++------ .../components/left-sidenav/chat.component.ts | 14 +++++++++++++- .../components/template.page.component.html | 10 ++++++---- .../template/components/template.page.component.ts | 14 ++++++++++++-- .../src/lib/components/list-item.component.ts | 4 +++- 5 files changed, 36 insertions(+), 14 deletions(-) diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/chat.component.html b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/chat.component.html index 187f8359..69385770 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/chat.component.html +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/chat.component.html @@ -1,7 +1,3 @@ - + diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/chat.component.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/chat.component.ts index 1b1ce638..15b0020d 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/chat.component.ts +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/chat.component.ts @@ -15,6 +15,9 @@ import { RoomUserDetailData, RoomUserData } from '@ucap-webmessenger/protocol-sync'; +import { VersionInfo2Response } from '@ucap-webmessenger/api-public'; +import { SessionStorageService } from '@ucap-webmessenger/web-storage'; +import { KEY_VER_INFO } from '@app/types/ver-info.type'; @Component({ selector: 'app-layout-chat-left-sidenav-chat', @@ -26,10 +29,15 @@ export class ChatComponent implements OnInit, OnDestroy { roomList: RoomInfo[]; roomUserList: RoomUserDetailData[]; roomUserShortList: RoomUserData[]; + sessionVerinfo: VersionInfo2Response; roomSubscription: Subscription; - constructor(private store: Store, private logger: NGXLogger) {} + constructor( + private store: Store, + private logger: NGXLogger, + private sessionStorageService: SessionStorageService + ) {} ngOnInit() { this.roomSubscription = combineLatest([ @@ -51,6 +59,10 @@ export class ChatComponent implements OnInit, OnDestroy { }) ) .subscribe(); + + this.sessionVerinfo = this.sessionStorageService.get( + KEY_VER_INFO + ); } ngOnDestroy(): void { diff --git a/projects/ucap-webmessenger-app/src/app/pages/template/components/template.page.component.html b/projects/ucap-webmessenger-app/src/app/pages/template/components/template.page.component.html index 7dbe8b02..e745d33e 100644 --- a/projects/ucap-webmessenger-app/src/app/pages/template/components/template.page.component.html +++ b/projects/ucap-webmessenger-app/src/app/pages/template/components/template.page.component.html @@ -5,11 +5,13 @@

User-list-item

- + - + - +

Organization

@@ -26,7 +28,7 @@

Chat

- +

Chat::MessageBox

diff --git a/projects/ucap-webmessenger-app/src/app/pages/template/components/template.page.component.ts b/projects/ucap-webmessenger-app/src/app/pages/template/components/template.page.component.ts index 241765e5..6c6c93bf 100644 --- a/projects/ucap-webmessenger-app/src/app/pages/template/components/template.page.component.ts +++ b/projects/ucap-webmessenger-app/src/app/pages/template/components/template.page.component.ts @@ -11,10 +11,12 @@ import { TerminalStatusInfo, TerminalStatusNumber } from '@ucap-webmessenger/protocol-status'; -import { StatusCode } from '@ucap-webmessenger/core'; import { Router } from '@angular/router'; import { Company } from '@ucap-webmessenger/api-external'; import { EventType } from '@ucap-webmessenger/protocol-event'; +import { VersionInfo2Response } from '@ucap-webmessenger/api-public'; +import { StatusCode as ApiStatusCode } from '@ucap-webmessenger/api'; +import { StatusCode } from '@ucap-webmessenger/core'; @Component({ selector: 'app-template.page', @@ -34,9 +36,17 @@ export class TemplatePageComponent implements OnInit { roomInfo: RoomInfo = roomInfo; + sessionVerinfo: VersionInfo2Response; + constructor(private router: Router) {} - ngOnInit() {} + ngOnInit() { + this.sessionVerinfo = { + statusCode: ApiStatusCode.Success, + errorMessage: '', + profileRoot: this.profileImageRoot + }; + } onClickLogin() { this.router.navigate(['/account/login']); diff --git a/projects/ucap-webmessenger-ui-room/src/lib/components/list-item.component.ts b/projects/ucap-webmessenger-ui-room/src/lib/components/list-item.component.ts index 19e94f31..c351e8f3 100644 --- a/projects/ucap-webmessenger-ui-room/src/lib/components/list-item.component.ts +++ b/projects/ucap-webmessenger-ui-room/src/lib/components/list-item.component.ts @@ -5,6 +5,7 @@ import { UserInfo as RoomUserInfo } from '@ucap-webmessenger/protocol-room'; import { NGXLogger } from 'ngx-logger'; +import { VersionInfo2Response } from '@ucap-webmessenger/api-public'; @Component({ selector: 'ucap-room-list-item', @@ -14,9 +15,10 @@ import { NGXLogger } from 'ngx-logger'; export class ListItemComponent implements OnInit { @Input() roomInfo: RoomInfo; - @Input() roomUserInfo: RoomUserInfo[] | UserInfoShort[]; + @Input() + sessionVerinfo: VersionInfo2Response; constructor(private logger: NGXLogger) {}