모바일 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)"
/>
</div>
<span
*ngIf="getPresence(PresenceType.MOBILE) === 'mobileOn'"
class="text-accent-color badge-mobile-state"
>
<mat-icon>phone_android</mat-icon>
</span>
</dt>
<dd class="info">
<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 {
position: relative;
display: flex;

View File

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