From 06a34a8f0313887440b675dbe26c27b079ffe5bc Mon Sep 17 00:00:00 2001 From: Sean Date: Tue, 20 Jul 2021 13:11:56 +0200 Subject: [PATCH] Scrollable sorted jitsi user list Sorts and scrolls through the jitsi users --- .../components/call/call.component.html | 21 ++++-------- .../components/call/call.component.scss | 4 ++- .../components/call/call.component.ts | 33 ++++++++++--------- .../site/interaction/services/rtc.service.ts | 10 ++++-- 4 files changed, 34 insertions(+), 34 deletions(-) diff --git a/client/src/app/site/interaction/components/call/call.component.html b/client/src/app/site/interaction/components/call/call.component.html index ee87ed83f..dd2ffe722 100644 --- a/client/src/app/site/interaction/components/call/call.component.html +++ b/client/src/app/site/interaction/components/call/call.component.html @@ -25,20 +25,13 @@ *ngIf="showParticles | async" class="room-list-applause-particles" > -
-
    -
  1. -
    - {{ members[memberId].name }} -
    -
  2. -
-
+
    +
  1. +
    + {{ member.value.name }} +
    +
  2. +
diff --git a/client/src/app/site/interaction/components/call/call.component.scss b/client/src/app/site/interaction/components/call/call.component.scss index 222d3c955..e9e56a333 100644 --- a/client/src/app/site/interaction/components/call/call.component.scss +++ b/client/src/app/site/interaction/components/call/call.component.scss @@ -26,10 +26,12 @@ $wrapper-padding: 5px; height: 100%; width: 70px; right: 0; + pointer-events: none; } .member-list { - max-height: 100%; + max-height: 230px; + margin: 0; overflow-y: auto; .member-list-entry { diff --git a/client/src/app/site/interaction/components/call/call.component.ts b/client/src/app/site/interaction/components/call/call.component.ts index 4b44badbe..391160958 100644 --- a/client/src/app/site/interaction/components/call/call.component.ts +++ b/client/src/app/site/interaction/components/call/call.component.ts @@ -1,3 +1,4 @@ +import { KeyValue } from '@angular/common'; import { AfterViewInit, ChangeDetectionStrategy, @@ -20,7 +21,7 @@ import { BaseViewComponentDirective } from 'app/site/base/base-view'; import { ApplauseService } from '../../services/applause.service'; import { CallRestrictionService } from '../../services/call-restriction.service'; import { InteractionService } from '../../services/interaction.service'; -import { RtcService } from '../../services/rtc.service'; +import { ConferenceMember, ConferenceMemberCollection, RtcService } from '../../services/rtc.service'; import { StreamService } from '../../services/stream.service'; const helpDeskTitle = _('Help desk'); @@ -35,25 +36,10 @@ const connectingTitle = _('connecting ...'); changeDetection: ChangeDetectionStrategy.OnPush }) export class CallComponent extends BaseViewComponentDirective implements OnInit, AfterViewInit, OnDestroy { - public isJitsiActiveInAnotherTab: Observable = this.rtcService.inOtherTab; - public canEnterCall: Observable = this.callRestrictionService.canEnterCallObservable; - public isJitsiDialogOpen: Observable = this.rtcService.showCallDialogObservable; - public showParticles: Observable = this.applauseService.showParticles; - public hasLiveStreamUrl: Observable = this.streamService.hasLiveStreamUrlObvervable; - - public isJitsiActive: boolean; - public isJoined: boolean; - public get showHangUp(): boolean { return this.isJitsiActive && this.isJoined; } - private dominantSpeaker: string; - private members = {}; - public get memberList(): string[] { - return Object.keys(this.members); - } - public get isDisconnected(): boolean { return !this.isJitsiActive && !this.isJoined; } @@ -65,6 +51,17 @@ export class CallComponent extends BaseViewComponentDirective implements OnInit, public get isConnected(): boolean { return this.isJitsiActive && this.isJoined; } + public isJitsiActiveInAnotherTab: Observable = this.rtcService.inOtherTab; + public canEnterCall: Observable = this.callRestrictionService.canEnterCallObservable; + public isJitsiDialogOpen: Observable = this.rtcService.showCallDialogObservable; + public showParticles: Observable = this.applauseService.showParticles; + public hasLiveStreamUrl: Observable = this.streamService.hasLiveStreamUrlObvervable; + + public isJitsiActive: boolean; + public isJoined: boolean; + + private dominantSpeaker: string; + public members: ConferenceMemberCollection = {}; private autoConnect: boolean; @@ -126,6 +123,10 @@ export class CallComponent extends BaseViewComponentDirective implements OnInit, ); } + public valueNameOrder = (a: KeyValue, b: KeyValue): number => { + return a.value.name.localeCompare(b.value.name); + }; + public ngOnInit(): void { this.updateSubtitle(); } diff --git a/client/src/app/site/interaction/services/rtc.service.ts b/client/src/app/site/interaction/services/rtc.service.ts index ffa9d6eb9..e21ac2557 100644 --- a/client/src/app/site/interaction/services/rtc.service.ts +++ b/client/src/app/site/interaction/services/rtc.service.ts @@ -24,9 +24,13 @@ interface ConferenceJoinedResult { formattedDisplayName: string; } -interface ConferenceMember { +export interface ConferenceMemberCollection { + [key: number]: ConferenceMember; +} + +export interface ConferenceMember { name: string; - focus: boolean; + focus?: boolean; } interface DisplayNameChangeResult { @@ -150,7 +154,7 @@ export class RtcService { public jitsiMeetUrl = this.jitsiMeetUrlSubject.asObservable(); private members = {}; - private memberSubject = new BehaviorSubject(this.members); + private memberSubject = new BehaviorSubject(this.members); public memberObservableObservable = this.memberSubject.asObservable(); private dominantSpeaker: JitsiMember;