From e916203994506ac67145a8746ae5bfe42ec9982e Mon Sep 17 00:00:00 2001 From: leejinho Date: Mon, 25 Nov 2019 09:56:59 +0900 Subject: [PATCH] =?UTF-8?q?left-side=20navi=20=EC=97=90=20=EB=82=B4?= =?UTF-8?q?=ED=94=84=EB=A1=9C=ED=95=84=20=EC=BB=B4=ED=8F=AC=EB=84=8C?= =?UTF-8?q?=ED=8A=B8=ED=99=94.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/left-side.component.html | 10 +++-- .../components/left-side.component.scss | 12 +----- .../components/left-side.component.ts | 18 ++++++++- .../my-profile-widget.component.html | 12 ++++++ .../my-profile-widget.component.scss | 26 +++++++++++++ .../my-profile-widget.component.spec.ts | 25 ++++++++++++ .../components/my-profile-widget.component.ts | 38 +++++++++++++++++++ .../src/lib/ucap-ui-profile.module.ts | 8 +++- 8 files changed, 133 insertions(+), 16 deletions(-) create mode 100644 projects/ucap-webmessenger-ui-profile/src/lib/components/my-profile-widget.component.html create mode 100644 projects/ucap-webmessenger-ui-profile/src/lib/components/my-profile-widget.component.scss create mode 100644 projects/ucap-webmessenger-ui-profile/src/lib/components/my-profile-widget.component.spec.ts create mode 100644 projects/ucap-webmessenger-ui-profile/src/lib/components/my-profile-widget.component.ts diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-side.component.html b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-side.component.html index a3600d85..b91ef75e 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-side.component.html +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-side.component.html @@ -140,10 +140,12 @@ -
- - 내프로필 -
+
, private dialogService: DialogService, + private sessionStorageService: SessionStorageService, private logger: NGXLogger - ) {} + ) { + this.loginRes = this.sessionStorageService.get( + KEY_LOGIN_RES_INFO + ); + this.sessionVerinfo = this.sessionStorageService.get( + KEY_VER_INFO + ); + } ngOnInit() { this.badgeChatUnReadCountSubscription = this.store diff --git a/projects/ucap-webmessenger-ui-profile/src/lib/components/my-profile-widget.component.html b/projects/ucap-webmessenger-ui-profile/src/lib/components/my-profile-widget.component.html new file mode 100644 index 00000000..4c4bd682 --- /dev/null +++ b/projects/ucap-webmessenger-ui-profile/src/lib/components/my-profile-widget.component.html @@ -0,0 +1,12 @@ +
+ + + + 내프로필 +
diff --git a/projects/ucap-webmessenger-ui-profile/src/lib/components/my-profile-widget.component.scss b/projects/ucap-webmessenger-ui-profile/src/lib/components/my-profile-widget.component.scss new file mode 100644 index 00000000..209015a3 --- /dev/null +++ b/projects/ucap-webmessenger-ui-profile/src/lib/components/my-profile-widget.component.scss @@ -0,0 +1,26 @@ +.myprofile { + position: absolute; + display: flex; + flex-flow: column; + justify-content: center; + height: 80px; + width: 68px; + bottom: 10px; + color: #ffffff; + font-size: 11px; + text-align: center; + + .myprofile-img { + display: block; + border-radius: 10px; + height: 42px; + width: 42px; + background-color: #efefef; + align-self: center; + margin-bottom: 6px; + + .thumbnail { + border-radius: 10px; + } + } +} diff --git a/projects/ucap-webmessenger-ui-profile/src/lib/components/my-profile-widget.component.spec.ts b/projects/ucap-webmessenger-ui-profile/src/lib/components/my-profile-widget.component.spec.ts new file mode 100644 index 00000000..677f6f55 --- /dev/null +++ b/projects/ucap-webmessenger-ui-profile/src/lib/components/my-profile-widget.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { MyProfileWidgetComponent } from './my-profile-widget.component'; + +describe('MyProfileWidgetComponent', () => { + let component: MyProfileWidgetComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ MyProfileWidgetComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(MyProfileWidgetComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/projects/ucap-webmessenger-ui-profile/src/lib/components/my-profile-widget.component.ts b/projects/ucap-webmessenger-ui-profile/src/lib/components/my-profile-widget.component.ts new file mode 100644 index 00000000..af11f3de --- /dev/null +++ b/projects/ucap-webmessenger-ui-profile/src/lib/components/my-profile-widget.component.ts @@ -0,0 +1,38 @@ +import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core'; +import { UserInfo } from '@ucap-webmessenger/protocol-room'; +import { + UserInfoSS, + UserInfoF, + UserInfoDN +} from '@ucap-webmessenger/protocol-query'; + +@Component({ + selector: 'ucap-profile-my-profile-widget', + templateUrl: './my-profile-widget.component.html', + styleUrls: ['./my-profile-widget.component.scss'] +}) +export class MyProfileWidgetComponent implements OnInit { + @Input() + profileImageRoot: string; + @Input() + profileImageFile: string; + + @Output() + openProfile = new EventEmitter< + UserInfo | UserInfoSS | UserInfoF | UserInfoDN + >(); + + constructor() {} + + ngOnInit() {} + + onClickOpenProfile( + event: MouseEvent, + userInfo: UserInfo | UserInfoSS | UserInfoF | UserInfoDN + ) { + event.preventDefault(); + event.stopPropagation(); + + this.openProfile.emit(userInfo); + } +} diff --git a/projects/ucap-webmessenger-ui-profile/src/lib/ucap-ui-profile.module.ts b/projects/ucap-webmessenger-ui-profile/src/lib/ucap-ui-profile.module.ts index be843bfb..1849a2ad 100644 --- a/projects/ucap-webmessenger-ui-profile/src/lib/ucap-ui-profile.module.ts +++ b/projects/ucap-webmessenger-ui-profile/src/lib/ucap-ui-profile.module.ts @@ -14,8 +14,14 @@ import { UCapUiModule } from '@ucap-webmessenger/ui'; import { ListItemComponent } from './components/list-item.component'; import { UserListItemComponent } from './components/user-list-item.component'; import { ProfileComponent } from './components/profile.component'; +import { MyProfileWidgetComponent } from './components/my-profile-widget.component'; -const COMPONENTS = [ListItemComponent, UserListItemComponent, ProfileComponent]; +const COMPONENTS = [ + ListItemComponent, + UserListItemComponent, + ProfileComponent, + MyProfileWidgetComponent +]; const SERVICES = [];