mirror of https://github.com/OpenVidu/openvidu.git
openvidu-components: Added participant input in participant item
parent
602ae5b66b
commit
c24a6d4cd0
|
@ -1,8 +1,8 @@
|
|||
<mat-list>
|
||||
<mat-list-item>
|
||||
<mat-icon matListAvatar class="participant-avatar">person</mat-icon>
|
||||
<h3 matLine class="participant-nickname">{{ name }}</h3>
|
||||
<p matLine class="participant-subtitle">{{ connections }}</p>
|
||||
<h3 matLine class="participant-nickname">{{ participant | nickname }}</h3>
|
||||
<p matLine class="participant-subtitle">{{ participant | streamsEnabled }}</p>
|
||||
<!-- <p matLine>
|
||||
<span class="participant-subtitle"></span>
|
||||
</p> -->
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { ParticipantAbstractModel } from '../../../../models/participant.model';
|
||||
|
||||
@Component({
|
||||
selector: 'ov-participant-panel-item',
|
||||
|
@ -6,8 +7,7 @@ import { Component, Input, OnInit } from '@angular/core';
|
|||
styleUrls: ['./participant-panel-item.component.css']
|
||||
})
|
||||
export class ParticipantPanelItemComponent implements OnInit {
|
||||
@Input() name: string;
|
||||
@Input() connections: string;
|
||||
@Input() participant: ParticipantAbstractModel;
|
||||
@Input() showDividerLine: boolean;
|
||||
|
||||
constructor() {}
|
||||
|
|
|
@ -10,19 +10,17 @@
|
|||
|
||||
<div class="local-participant-container">
|
||||
<ov-participant-panel-item
|
||||
[name]="localParticipant | nickname"
|
||||
[connections]="localParticipant | streamsEnabled"
|
||||
[participant]="localParticipant"
|
||||
[showDividerLine]="true"
|
||||
></ov-participant-panel-item>
|
||||
</div>
|
||||
|
||||
<div class="remote-participants-container" *ngIf="remoteParticipants.length > 0">
|
||||
<ov-participant-item
|
||||
*ngFor="let p of remoteParticipants; let lastItem = last"
|
||||
[name]="p | nickname"
|
||||
[connections]="p | streamsEnabled"
|
||||
<ov-participant-panel-item
|
||||
*ngFor="let participant of remoteParticipants; let lastItem = last"
|
||||
[participant]="participant"
|
||||
[showDividerLine]="!lastItem"
|
||||
></ov-participant-item>
|
||||
></ov-participant-panel-item>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue