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

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';