기능추가 :: 프로필 > 즐겨찾기 등록/해제, 동료추가 / 삭제
This commit is contained in:
parent
2f72ee7ae6
commit
47ff1d3e4a
@ -5,5 +5,7 @@
|
|||||||
[isBuddy]="isBuddy"
|
[isBuddy]="isBuddy"
|
||||||
[isFavorit]="isFavorit"
|
[isFavorit]="isFavorit"
|
||||||
(openChat)="onClickChat($event)"
|
(openChat)="onClickChat($event)"
|
||||||
|
(toggleFavorit)="onClickToggleFavorit($event)"
|
||||||
|
(toggleBuddy)="onClickToggleBuddy($event)"
|
||||||
>
|
>
|
||||||
</ucap-profile-profile>
|
</ucap-profile-profile>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { Component, OnInit, Inject, ViewChild } from '@angular/core';
|
import { Component, OnInit, Inject, ViewChild, OnDestroy } from '@angular/core';
|
||||||
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';
|
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';
|
||||||
import { KEY_LOGIN_RES_INFO } from '@app/types/login-res-info.type';
|
import { KEY_LOGIN_RES_INFO } from '@app/types/login-res-info.type';
|
||||||
import { KEY_VER_INFO } from '@app/types/ver-info.type';
|
import { KEY_VER_INFO } from '@app/types/ver-info.type';
|
||||||
@ -7,17 +7,20 @@ import { SessionStorageService } from '@ucap-webmessenger/web-storage';
|
|||||||
import { Store, select } from '@ngrx/store';
|
import { Store, select } from '@ngrx/store';
|
||||||
import * as AppStore from '@app/store';
|
import * as AppStore from '@app/store';
|
||||||
import * as ChatStore from '@app/store/messenger/chat';
|
import * as ChatStore from '@app/store/messenger/chat';
|
||||||
|
import * as SyncStore from '@app/store/messenger/sync';
|
||||||
|
|
||||||
import { UserInfo } from '@ucap-webmessenger/protocol-sync';
|
import { UserInfo, GroupDetailData } from '@ucap-webmessenger/protocol-sync';
|
||||||
import {
|
import {
|
||||||
UserInfoSS,
|
UserInfoSS,
|
||||||
UserInfoF,
|
UserInfoF,
|
||||||
UserInfoDN
|
UserInfoDN
|
||||||
} from '@ucap-webmessenger/protocol-query';
|
} from '@ucap-webmessenger/protocol-query';
|
||||||
import { DialogService } from '@ucap-webmessenger/ui';
|
import { DialogService, ConfirmDialogComponent, ConfirmDialogData, ConfirmDialogResult } from '@ucap-webmessenger/ui';
|
||||||
import { VersionInfo2Response } from '@ucap-webmessenger/api-public';
|
import { VersionInfo2Response } from '@ucap-webmessenger/api-public';
|
||||||
import { LoginResponse } from '@ucap-webmessenger/protocol-authentication';
|
import { LoginResponse } from '@ucap-webmessenger/protocol-authentication';
|
||||||
import { map } from 'rxjs/operators';
|
import { map } from 'rxjs/operators';
|
||||||
|
import { Subscription } from 'rxjs';
|
||||||
|
import { SelectGroupDialogComponent, SelectGroupDialogData, SelectGroupDialogResult } from '../group/select-group.dialog.component';
|
||||||
|
|
||||||
export interface ProfileDialogData {
|
export interface ProfileDialogData {
|
||||||
userInfo: UserInfo | UserInfoSS | UserInfoF | UserInfoDN;
|
userInfo: UserInfo | UserInfoSS | UserInfoF | UserInfoDN;
|
||||||
@ -30,13 +33,15 @@ export interface ProfileDialogResult {}
|
|||||||
templateUrl: './profile.dialog.component.html',
|
templateUrl: './profile.dialog.component.html',
|
||||||
styleUrls: ['./profile.dialog.component.scss']
|
styleUrls: ['./profile.dialog.component.scss']
|
||||||
})
|
})
|
||||||
export class ProfileDialogComponent implements OnInit {
|
export class ProfileDialogComponent implements OnInit, OnDestroy {
|
||||||
loginRes: LoginResponse;
|
loginRes: LoginResponse;
|
||||||
sessionVerinfo: VersionInfo2Response;
|
sessionVerinfo: VersionInfo2Response;
|
||||||
isMe: boolean;
|
isMe: boolean;
|
||||||
isBuddy: boolean;
|
isBuddy: boolean;
|
||||||
isFavorit: boolean;
|
isFavorit: boolean;
|
||||||
|
|
||||||
|
selectAllBuddy2Subscription: Subscription;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
public dialogRef: MatDialogRef<ProfileDialogData, ProfileDialogResult>,
|
public dialogRef: MatDialogRef<ProfileDialogData, ProfileDialogResult>,
|
||||||
@Inject(MAT_DIALOG_DATA) public data: ProfileDialogData,
|
@Inject(MAT_DIALOG_DATA) public data: ProfileDialogData,
|
||||||
@ -55,18 +60,26 @@ export class ProfileDialogComponent implements OnInit {
|
|||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.isMe = this.loginRes.userSeq === this.data.userInfo.seq;
|
this.isMe = this.loginRes.userSeq === this.data.userInfo.seq;
|
||||||
|
|
||||||
this.store.pipe(
|
this.selectAllBuddy2Subscription = this.store
|
||||||
select(AppStore.MessengerSelector.SyncSelector.selectAllBuddy2),
|
.pipe(
|
||||||
map(buddyList => {
|
select(AppStore.MessengerSelector.SyncSelector.selectAllBuddy2),
|
||||||
const users = buddyList.filter(
|
map(buddyList => {
|
||||||
buddy => buddy.seq === this.data.userInfo.seq
|
const users = buddyList.filter(
|
||||||
);
|
buddy => buddy.seq === this.data.userInfo.seq
|
||||||
this.isBuddy = users.length > 0;
|
);
|
||||||
if (this.isBuddy) {
|
this.isBuddy = users.length > 0;
|
||||||
this.isFavorit = users[0].isFavorit;
|
if (this.isBuddy) {
|
||||||
}
|
this.isFavorit = users[0].isFavorit;
|
||||||
})
|
}
|
||||||
);
|
})
|
||||||
|
)
|
||||||
|
.subscribe();
|
||||||
|
}
|
||||||
|
|
||||||
|
ngOnDestroy(): void {
|
||||||
|
if (!!this.selectAllBuddy2Subscription) {
|
||||||
|
this.selectAllBuddy2Subscription.unsubscribe();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onClickChat(userInfo: UserInfo | UserInfoSS | UserInfoF | UserInfoDN) {
|
onClickChat(userInfo: UserInfo | UserInfoSS | UserInfoF | UserInfoDN) {
|
||||||
@ -80,4 +93,71 @@ export class ProfileDialogComponent implements OnInit {
|
|||||||
|
|
||||||
this.dialogRef.close();
|
this.dialogRef.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onClickToggleFavorit(param: {
|
||||||
|
userInfo: UserInfo | UserInfoF;
|
||||||
|
isFavorit: boolean;
|
||||||
|
}) {
|
||||||
|
this.store.dispatch(
|
||||||
|
SyncStore.updateBuddy({
|
||||||
|
seq: param.userInfo.seq,
|
||||||
|
isFavorit: param.isFavorit
|
||||||
|
})
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
async onClickToggleBuddy(param: {
|
||||||
|
userInfo: UserInfo | UserInfoF;
|
||||||
|
isBuddy: boolean;
|
||||||
|
}) {
|
||||||
|
if (param.isBuddy) {
|
||||||
|
// 동료추가.
|
||||||
|
const result = await this.dialogService.open<
|
||||||
|
SelectGroupDialogComponent,
|
||||||
|
SelectGroupDialogData,
|
||||||
|
SelectGroupDialogResult
|
||||||
|
>(SelectGroupDialogComponent, {
|
||||||
|
width: '600px',
|
||||||
|
data: {
|
||||||
|
title: 'Group Select'
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if (!!result && !!result.choice && result.choice) {
|
||||||
|
if (!!result.group) {
|
||||||
|
const oldGroup: GroupDetailData = result.group;
|
||||||
|
const trgtUserSeq: number[] = [];
|
||||||
|
result.group.userSeqs.map(seq => trgtUserSeq.push(seq));
|
||||||
|
trgtUserSeq.push(param.userInfo.seq);
|
||||||
|
|
||||||
|
this.store.dispatch(
|
||||||
|
SyncStore.updateGroupMember({
|
||||||
|
oldGroup,
|
||||||
|
trgtUserSeq
|
||||||
|
})
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// 동료삭제.
|
||||||
|
const result = await this.dialogService.open<
|
||||||
|
ConfirmDialogComponent,
|
||||||
|
ConfirmDialogData,
|
||||||
|
ConfirmDialogResult
|
||||||
|
>(ConfirmDialogComponent, {
|
||||||
|
width: '360px',
|
||||||
|
data: {
|
||||||
|
title: 'Delete Buddy',
|
||||||
|
html: `[${param.userInfo.name} ${param.userInfo.grade}]를 그룹에서 삭제하시겠습니까?<br/>프로필에서 삭제하면 모든 그룹에서 삭제됩니다.`
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if (!!result && !!result.choice && result.choice) {
|
||||||
|
this.store.dispatch(
|
||||||
|
SyncStore.delBuddyAndClear({ seq: param.userInfo.seq })
|
||||||
|
);
|
||||||
|
this.isBuddy = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -176,6 +176,19 @@ export const delBuddyFailure = createAction(
|
|||||||
'[Messenger::Sync] Buddy Del Failure',
|
'[Messenger::Sync] Buddy Del Failure',
|
||||||
props<{ error: any }>()
|
props<{ error: any }>()
|
||||||
);
|
);
|
||||||
|
/** 동료 삭제 및 그룹 클리어.(in profile) */
|
||||||
|
export const delBuddyAndClear = createAction(
|
||||||
|
'[Messenger::Sync] Buddy Del and Group Clear',
|
||||||
|
props<{ seq: number }>()
|
||||||
|
);
|
||||||
|
export const delBuddyAndClearSuccess = createAction(
|
||||||
|
'[Messenger::Sync] Buddy Del and Group Clear Success',
|
||||||
|
props<BuddyDelResponse>()
|
||||||
|
);
|
||||||
|
export const delBuddyAndClearFailure = createAction(
|
||||||
|
'[Messenger::Sync] Buddy Del and Group Clear Failure',
|
||||||
|
props<{ error: any }>()
|
||||||
|
);
|
||||||
/** 동료 변경(즐겨찾기) */
|
/** 동료 변경(즐겨찾기) */
|
||||||
export const updateBuddy = createAction(
|
export const updateBuddy = createAction(
|
||||||
'[Messenger::Sync] Buddy Update',
|
'[Messenger::Sync] Buddy Update',
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
import { openTimer } from './../room/actions';
|
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
|
|
||||||
import { Actions, ofType, createEffect } from '@ngrx/effects';
|
import { Actions, ofType, createEffect } from '@ngrx/effects';
|
||||||
@ -48,7 +47,8 @@ import {
|
|||||||
updateGroupMember,
|
updateGroupMember,
|
||||||
delGroup,
|
delGroup,
|
||||||
delGroupFailure,
|
delGroupFailure,
|
||||||
delGroupSuccess
|
delGroupSuccess,
|
||||||
|
delBuddyAndClear
|
||||||
} from './actions';
|
} from './actions';
|
||||||
import { SessionStorageService } from '@ucap-webmessenger/web-storage';
|
import { SessionStorageService } from '@ucap-webmessenger/web-storage';
|
||||||
import { LoginInfo, KEY_LOGIN_INFO } from '@app/types';
|
import { LoginInfo, KEY_LOGIN_INFO } from '@app/types';
|
||||||
@ -727,6 +727,54 @@ export class Effects {
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
delBuddyAndClear$ = createEffect(
|
||||||
|
() => {
|
||||||
|
return this.actions$.pipe(
|
||||||
|
ofType(delBuddyAndClear),
|
||||||
|
withLatestFrom(
|
||||||
|
this.store.pipe(
|
||||||
|
select(
|
||||||
|
(state: any) =>
|
||||||
|
state.messenger.sync.group2.entities as Dictionary<
|
||||||
|
GroupDetailData
|
||||||
|
>
|
||||||
|
)
|
||||||
|
)
|
||||||
|
),
|
||||||
|
tap(([req, groupList]) => {
|
||||||
|
// tslint:disable-next-line: forin
|
||||||
|
for (const key in groupList) {
|
||||||
|
const group: GroupDetailData = groupList[key];
|
||||||
|
if (group.userSeqs.indexOf(req.seq) > -1) {
|
||||||
|
// Group Clear..
|
||||||
|
this.store.dispatch(
|
||||||
|
updateGroup({
|
||||||
|
groupSeq: group.seq,
|
||||||
|
groupName: group.name,
|
||||||
|
userSeqs: group.userSeqs.filter(
|
||||||
|
userSeq => userSeq !== req.seq
|
||||||
|
)
|
||||||
|
})
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Favorit Clear..
|
||||||
|
this.store.dispatch(
|
||||||
|
updateBuddy({
|
||||||
|
seq: req.seq,
|
||||||
|
isFavorit: false
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
|
// Buddy Clear..
|
||||||
|
this.store.dispatch(delBuddy({ userSeqs: [req.seq] }));
|
||||||
|
})
|
||||||
|
);
|
||||||
|
},
|
||||||
|
{ dispatch: false }
|
||||||
|
);
|
||||||
|
|
||||||
updateBuddy$ = createEffect(() =>
|
updateBuddy$ = createEffect(() =>
|
||||||
this.actions$.pipe(
|
this.actions$.pipe(
|
||||||
ofType(updateBuddy),
|
ofType(updateBuddy),
|
||||||
|
@ -9,71 +9,147 @@
|
|||||||
|
|
||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<div class="profile-img">
|
<div class="profile-img">
|
||||||
<img ucapImage [base]="profileImageRoot" [path]="userInfo.profileImageFile"
|
<img
|
||||||
[default]="'assets/images/img_nophoto_50.png'" />
|
ucapImage
|
||||||
|
[base]="profileImageRoot"
|
||||||
|
[path]="userInfo.profileImageFile"
|
||||||
|
[default]="'assets/images/img_nophoto_50.png'"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<!-- 내프로필의 경우<div class="profile-option">이 없음 -->
|
|
||||||
<div class="profile-option">
|
<div *ngIf="!isMe" class="profile-option">
|
||||||
<span class="btn-favorite">
|
<span *ngIf="isBuddy" class="btn-favorite" (click)="onToggleFavorit()">
|
||||||
<!--즐겨찾기 추가버튼 추가된 상태: svg에 class="on"-->
|
<svg
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
stroke="currentColor" stroke-width="1.5" stroke-linecap="butt" stroke-linejoin="round">
|
width="20"
|
||||||
|
height="20"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
fill="none"
|
||||||
|
stroke="currentColor"
|
||||||
|
stroke-width="1.5"
|
||||||
|
stroke-linecap="butt"
|
||||||
|
stroke-linejoin="round"
|
||||||
|
[ngClass]="[isFavorit ? 'on' : '']"
|
||||||
|
>
|
||||||
<polygon
|
<polygon
|
||||||
points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2">
|
points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"
|
||||||
</polygon>
|
></polygon>
|
||||||
</svg>
|
</svg>
|
||||||
</span>
|
</span>
|
||||||
<span class="btn-groupadd">
|
<span class="btn-groupadd">
|
||||||
<!--친구 추가 버튼-->
|
<ng-container [ngSwitch]="isBuddy">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none"
|
<svg
|
||||||
stroke="currentColor" stroke-width="1.5" stroke-linecap="butt" stroke-linejoin="round" class="on">
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
<path d="M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path>
|
width="20"
|
||||||
<circle cx="8.5" cy="7" r="4"></circle>
|
height="20"
|
||||||
<line x1="20" y1="8" x2="20" y2="14"></line>
|
viewBox="0 0 24 24"
|
||||||
<line x1="23" y1="11" x2="17" y2="11"></line>
|
fill="none"
|
||||||
</svg>
|
stroke="currentColor"
|
||||||
<!--친구 삭제 버튼-->
|
stroke-width="1.5"
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none"
|
stroke-linecap="butt"
|
||||||
stroke="currentColor" stroke-width="1.5" stroke-linecap="butt" stroke-linejoin="round">
|
stroke-linejoin="round"
|
||||||
<path d="M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path>
|
class="on"
|
||||||
<circle cx="8.5" cy="7" r="4"></circle>
|
*ngSwitchCase="false"
|
||||||
<line x1="23" y1="11" x2="17" y2="11"></line>
|
(click)="onClickAddBuddy()"
|
||||||
</svg>
|
>
|
||||||
|
<!-- not buddy -->
|
||||||
|
<path d="M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path>
|
||||||
|
<circle cx="8.5" cy="7" r="4"></circle>
|
||||||
|
<line x1="20" y1="8" x2="20" y2="14"></line>
|
||||||
|
<line x1="23" y1="11" x2="17" y2="11"></line>
|
||||||
|
</svg>
|
||||||
|
|
||||||
|
<svg
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
width="20"
|
||||||
|
height="20"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
fill="none"
|
||||||
|
stroke="currentColor"
|
||||||
|
stroke-width="1.5"
|
||||||
|
stroke-linecap="butt"
|
||||||
|
stroke-linejoin="round"
|
||||||
|
class="on"
|
||||||
|
*ngSwitchCase="true"
|
||||||
|
(click)="onClickDelBuddy()"
|
||||||
|
>
|
||||||
|
<!-- is buddy -->
|
||||||
|
<path d="M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path>
|
||||||
|
<circle cx="8.5" cy="7" r="4"></circle>
|
||||||
|
<line x1="23" y1="11" x2="17" y2="11"></line>
|
||||||
|
</svg>
|
||||||
|
</ng-container>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<!--<mat-icon>chat</mat-icon>-->
|
<svg
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
stroke="currentColor" stroke-width="1.5" stroke-linecap="butt" stroke-linejoin="round">
|
width="20"
|
||||||
<path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"></path>
|
height="20"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
fill="none"
|
||||||
|
stroke="currentColor"
|
||||||
|
stroke-width="1.5"
|
||||||
|
stroke-linecap="butt"
|
||||||
|
stroke-linejoin="round"
|
||||||
|
>
|
||||||
|
<path
|
||||||
|
d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"
|
||||||
|
></path>
|
||||||
</svg>
|
</svg>
|
||||||
{{ userInfo.intro }}
|
{{ userInfo.intro }}
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<!--<mat-icon>email</mat-icon>-->
|
<svg
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
stroke="currentColor" stroke-width="1.5" stroke-linecap="butt" stroke-linejoin="round">
|
width="20"
|
||||||
<path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"></path>
|
height="20"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
fill="none"
|
||||||
|
stroke="currentColor"
|
||||||
|
stroke-width="1.5"
|
||||||
|
stroke-linecap="butt"
|
||||||
|
stroke-linejoin="round"
|
||||||
|
>
|
||||||
|
<path
|
||||||
|
d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"
|
||||||
|
></path>
|
||||||
<polyline points="22,6 12,13 2,6"></polyline>
|
<polyline points="22,6 12,13 2,6"></polyline>
|
||||||
</svg>
|
</svg>
|
||||||
{{ userInfo.email }}
|
{{ userInfo.email }}
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<!--<mat-icon>local_phone</mat-icon>-->
|
<svg
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
stroke="currentColor" stroke-width="1.5" stroke-linecap="butt" stroke-linejoin="round">
|
width="20"
|
||||||
|
height="20"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
fill="none"
|
||||||
|
stroke="currentColor"
|
||||||
|
stroke-width="1.5"
|
||||||
|
stroke-linecap="butt"
|
||||||
|
stroke-linejoin="round"
|
||||||
|
>
|
||||||
<path
|
<path
|
||||||
d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z">
|
d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"
|
||||||
</path>
|
></path>
|
||||||
</svg>
|
</svg>
|
||||||
{{ userInfo.lineNumber }}
|
{{ userInfo.lineNumber }}
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<!--<mat-icon>phone_android</mat-icon>-->
|
<svg
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
stroke="currentColor" stroke-width="1.5" stroke-linecap="butt" stroke-linejoin="round">
|
width="20"
|
||||||
|
height="20"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
fill="none"
|
||||||
|
stroke="currentColor"
|
||||||
|
stroke-width="1.5"
|
||||||
|
stroke-linecap="butt"
|
||||||
|
stroke-linejoin="round"
|
||||||
|
>
|
||||||
<rect x="5" y="2" width="14" height="20" rx="2" ry="2"></rect>
|
<rect x="5" y="2" width="14" height="20" rx="2" ry="2"></rect>
|
||||||
<line x1="12" y1="18" x2="12" y2="18"></line>
|
<line x1="12" y1="18" x2="12" y2="18"></line>
|
||||||
</svg>
|
</svg>
|
||||||
@ -84,47 +160,103 @@
|
|||||||
|
|
||||||
<mat-card-actions>
|
<mat-card-actions>
|
||||||
<div fxFlex fxLayout="row" fxLayoutAlign="space-around center">
|
<div fxFlex fxLayout="row" fxLayoutAlign="space-around center">
|
||||||
<button mat-mini-fab class="mat-elevation-z" [matTooltip]="isMe ? 'MyTalk' : '1:1 대화'" matTooltipPosition="above"
|
<button
|
||||||
(click)="onClickOpenChat()">
|
mat-mini-fab
|
||||||
<!--<mat-icon>chat</mat-icon>-->
|
class="mat-elevation-z"
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
|
[matTooltip]="isMe ? 'MyTalk' : '1:1 대화'"
|
||||||
stroke="currentColor" stroke-width="2" stroke-linecap="butt" stroke-linejoin="round">
|
matTooltipPosition="above"
|
||||||
|
(click)="onClickOpenChat()"
|
||||||
|
>
|
||||||
|
<svg
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
width="24"
|
||||||
|
height="24"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
fill="none"
|
||||||
|
stroke="currentColor"
|
||||||
|
stroke-width="2"
|
||||||
|
stroke-linecap="butt"
|
||||||
|
stroke-linejoin="round"
|
||||||
|
>
|
||||||
<path
|
<path
|
||||||
d="M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z">
|
d="M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z"
|
||||||
</path>
|
></path>
|
||||||
</svg>
|
</svg>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<button mat-mini-fab class="mat-elevation-z" *ngIf="!isMe" matTooltip="전화" matTooltipPosition="above"
|
<button
|
||||||
(click)="onClickCall()">
|
mat-mini-fab
|
||||||
<!--<mat-icon>call</mat-icon>-->
|
class="mat-elevation-z"
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
|
*ngIf="!isMe"
|
||||||
stroke="currentColor" stroke-width="2" stroke-linecap="butt" stroke-linejoin="round">
|
matTooltip="전화"
|
||||||
|
matTooltipPosition="above"
|
||||||
|
(click)="onClickCall()"
|
||||||
|
>
|
||||||
|
<svg
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
width="24"
|
||||||
|
height="24"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
fill="none"
|
||||||
|
stroke="currentColor"
|
||||||
|
stroke-width="2"
|
||||||
|
stroke-linecap="butt"
|
||||||
|
stroke-linejoin="round"
|
||||||
|
>
|
||||||
<path
|
<path
|
||||||
d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z">
|
d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"
|
||||||
</path>
|
></path>
|
||||||
</svg>
|
</svg>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<button mat-mini-fab class="mat-elevation-z" *ngIf="!isMe" matTooltip="화상회의" matTooltipPosition="above"
|
<button
|
||||||
(click)="onClickVideoConference()">
|
mat-mini-fab
|
||||||
<!--<mat-icon>videocam</mat-icon>-->
|
class="mat-elevation-z"
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
|
*ngIf="!isMe"
|
||||||
stroke="currentColor" stroke-width="2" stroke-linecap="butt" stroke-linejoin="round">
|
matTooltip="화상회의"
|
||||||
|
matTooltipPosition="above"
|
||||||
|
(click)="onClickVideoConference()"
|
||||||
|
>
|
||||||
|
<svg
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
width="24"
|
||||||
|
height="24"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
fill="none"
|
||||||
|
stroke="currentColor"
|
||||||
|
stroke-width="2"
|
||||||
|
stroke-linecap="butt"
|
||||||
|
stroke-linejoin="round"
|
||||||
|
>
|
||||||
<path
|
<path
|
||||||
d="M15.6 11.6L22 7v10l-6.4-4.5v-1zM4 5h9a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V7c0-1.1.9-2 2-2z" />
|
d="M15.6 11.6L22 7v10l-6.4-4.5v-1zM4 5h9a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V7c0-1.1.9-2 2-2z"
|
||||||
|
/>
|
||||||
</svg>
|
</svg>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<button mat-mini-fab class="mat-elevation-z" *ngIf="!isMe" matTooltip="쪽지" matTooltipPosition="above"
|
<button
|
||||||
(click)="onClickMessage()">
|
mat-mini-fab
|
||||||
<!--<mat-icon>sms</mat-icon>-->
|
class="mat-elevation-z"
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
|
*ngIf="!isMe"
|
||||||
stroke="currentColor" stroke-width="2" stroke-linecap="butt" stroke-linejoin="round">
|
matTooltip="쪽지"
|
||||||
|
matTooltipPosition="above"
|
||||||
|
(click)="onClickMessage()"
|
||||||
|
>
|
||||||
|
<svg
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
width="24"
|
||||||
|
height="24"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
fill="none"
|
||||||
|
stroke="currentColor"
|
||||||
|
stroke-width="2"
|
||||||
|
stroke-linecap="butt"
|
||||||
|
stroke-linejoin="round"
|
||||||
|
>
|
||||||
<line class="st0" x1="18" y1="2" x2="9.2" y2="10.8" />
|
<line class="st0" x1="18" y1="2" x2="9.2" y2="10.8" />
|
||||||
<polygon class="st0" points="18,2 12.4,18 9.2,10.8 2,7.6 " />
|
<polygon class="st0" points="18,2 12.4,18 9.2,10.8 2,7.6 " />
|
||||||
</svg>
|
</svg>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</mat-card-actions>
|
</mat-card-actions>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
|
@ -22,10 +22,20 @@ export class ProfileComponent implements OnInit {
|
|||||||
@Input()
|
@Input()
|
||||||
isFavorit: boolean;
|
isFavorit: boolean;
|
||||||
@Input()
|
@Input()
|
||||||
userInfo: UserInfo | UserInfoSS | UserInfoF | UserInfoDN;
|
userInfo: UserInfo | UserInfoF;
|
||||||
|
|
||||||
@Output()
|
@Output()
|
||||||
openChat = new EventEmitter<UserInfo | UserInfoSS | UserInfoF | UserInfoDN>();
|
openChat = new EventEmitter<UserInfo | UserInfoF>();
|
||||||
|
@Output()
|
||||||
|
toggleFavorit = new EventEmitter<{
|
||||||
|
userInfo: UserInfo | UserInfoF;
|
||||||
|
isFavorit: boolean;
|
||||||
|
}>();
|
||||||
|
@Output()
|
||||||
|
toggleBuddy = new EventEmitter<{
|
||||||
|
userInfo: UserInfo | UserInfoF;
|
||||||
|
isBuddy: boolean;
|
||||||
|
}>();
|
||||||
|
|
||||||
constructor() {}
|
constructor() {}
|
||||||
|
|
||||||
@ -40,4 +50,27 @@ export class ProfileComponent implements OnInit {
|
|||||||
onClickVideoConference() {}
|
onClickVideoConference() {}
|
||||||
|
|
||||||
onClickMessage() {}
|
onClickMessage() {}
|
||||||
|
|
||||||
|
onToggleFavorit() {
|
||||||
|
this.isFavorit = !this.isFavorit;
|
||||||
|
|
||||||
|
this.toggleFavorit.emit({
|
||||||
|
userInfo: this.userInfo,
|
||||||
|
isFavorit: this.isFavorit
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
onClickAddBuddy() {
|
||||||
|
this.toggleBuddy.emit({
|
||||||
|
userInfo: this.userInfo,
|
||||||
|
isBuddy: true
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
onClickDelBuddy() {
|
||||||
|
this.toggleBuddy.emit({
|
||||||
|
userInfo: this.userInfo,
|
||||||
|
isBuddy: false
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user