Merge pull request #6202 from tsiegleauq/unhide-help-desk

Show Helpdesk without live streams
This commit is contained in:
Sean 2021-08-09 14:16:18 +02:00 committed by GitHub
commit 8c7a770f9b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 24 additions and 17 deletions

View File

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

View File

@ -5,7 +5,8 @@ import { Router } from '@angular/router';
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
import { TranslateService } from '@ngx-translate/core'; 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 { fadeAnimation, fadeInOut } from 'app/shared/animations';
import { BaseViewComponentDirective } from 'app/site/base/base-view'; 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 showCallDialog: Observable<boolean> = this.rtcService.showCallDialogObservable;
public showLiveConf: Observable<boolean> = this.interactionService.showLiveConfObservable; public showLiveConf: Observable<boolean> = this.interactionService.showLiveConfObservable;
public isSupportEnabled: Observable<boolean> = this.rtcService.isSupportEnabled;
private canEnterCallObservable: Observable<boolean> = this.callRestrictionService.canEnterCallObservable; private canEnterCallObservable: Observable<boolean> = this.callRestrictionService.canEnterCallObservable;
public canEnterCall = false; 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( public constructor(
titleService: Title, titleService: Title,
translate: TranslateService, translate: TranslateService,

View File

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