모바일 status 표시 처리

This commit is contained in:
leejinho 2019-12-30 15:55:48 +09:00
parent d06426c88e
commit 84a30fc416
3 changed files with 28 additions and 2 deletions

View File

@ -14,6 +14,12 @@
(click)="onClickOpenProfile($event, userInfo)" (click)="onClickOpenProfile($event, userInfo)"
/> />
</div> </div>
<span
*ngIf="getPresence(PresenceType.MOBILE) === 'mobileOn'"
class="text-accent-color badge-mobile-state"
>
<mat-icon>phone_android</mat-icon>
</span>
</dt> </dt>
<dd class="info"> <dd class="info">
<div class="detail"> <div class="detail">

View File

@ -26,6 +26,23 @@ $thumbnail-msize: 40px;
} }
} }
.badge-mobile-state {
position: absolute;
background-color: #ffffff;
width: 18px;
height: 18px;
border-radius: 50%;
bottom: 14px;
left: 60px;
text-align: center;
.mat-icon {
font-size: 14px;
width: 18px;
height: 18px;
line-height: 18px;
}
}
%list-item { %list-item {
position: relative; position: relative;
display: flex; display: flex;

View File

@ -65,13 +65,16 @@ export class UserListItemComponent implements OnInit {
this.profileImageRoot || this.sessionVerinfo.profileRoot; this.profileImageRoot || this.sessionVerinfo.profileRoot;
} }
getPresence(type: string): string { getPresence(type: PresenceType): string {
let status: string; let status: string;
let rtnClass = ''; let rtnClass = '';
switch (type) { switch (type) {
case 'pc': case PresenceType.PC:
status = !!this.presence ? this.presence.pcStatus : undefined; status = !!this.presence ? this.presence.pcStatus : undefined;
break; break;
case PresenceType.MOBILE:
status = !!this.presence ? this.presence.mobileStatus : undefined;
break;
} }
if (!!status) { if (!!status) {