Show Helpdesk without live streams

This commit is contained in:
Sean 2021-08-09 12:13:12 +02:00
parent 8d90c6821e
commit b2ae972ce0
3 changed files with 24 additions and 17 deletions

View File

@ -33,6 +33,7 @@
>
<mat-icon color="primary"> phone </mat-icon>
</button>
</ng-container>
<!-- Call support button -->
<button
@ -40,12 +41,11 @@
class="action-bar-shadow background-default"
(click)="enterSupportRoom()"
matTooltip="{{ 'Help desk' | translate }}"
*ngIf="isSupportEnabled | async"
*ngIf="showHelpDesk | async"
@fade
>
<mat-icon color="primary">help_outline</mat-icon>
</button>
</ng-container>
<!-- applause button -->
<button

View File

@ -5,7 +5,8 @@ import { Router } from '@angular/router';
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
import { TranslateService } from '@ngx-translate/core';
import { Observable } from 'rxjs';
import { combineLatest, Observable } from 'rxjs';
import { map } from 'rxjs/operators';
import { fadeAnimation, fadeInOut } from 'app/shared/animations';
import { BaseViewComponentDirective } from 'app/site/base/base-view';
@ -34,8 +35,6 @@ export class ActionBarComponent extends BaseViewComponentDirective {
public showCallDialog: Observable<boolean> = this.rtcService.showCallDialogObservable;
public showLiveConf: Observable<boolean> = this.interactionService.showLiveConfObservable;
public isSupportEnabled: Observable<boolean> = this.rtcService.isSupportEnabled;
private canEnterCallObservable: Observable<boolean> = this.callRestrictionService.canEnterCallObservable;
public canEnterCall = false;
@ -65,6 +64,14 @@ export class ActionBarComponent extends BaseViewComponentDirective {
}
}
public get showHelpDesk(): Observable<boolean> {
return combineLatest([this.rtcService.isSupportEnabled, this.isJoined]).pipe(
map(([isSupportEnabled, isJoined]) => {
return isSupportEnabled && !isJoined;
})
);
}
public constructor(
titleService: Title,
translate: TranslateService,

View File

@ -3,8 +3,8 @@ import { MatSnackBar } from '@angular/material/snack-bar';
import { Title } from '@angular/platform-browser';
import { TranslateService } from '@ngx-translate/core';
import { combineLatest, forkJoin, merge, Observable } from 'rxjs';
import { distinctUntilChanged, filter, mergeAll, mergeMap, withLatestFrom } from 'rxjs/operators';
import { Observable } from 'rxjs';
import { distinctUntilChanged } from 'rxjs/operators';
import { BaseViewComponentDirective } from 'app/site/base/base-view';
import { ApplauseService } from '../../services/applause.service';