From 9f5be78d711cceec3216ab34ef6fb8d993bbe7f1 Mon Sep 17 00:00:00 2001 From: Lukas Haase <lukas.haase@mni.thm.de> Date: Tue, 17 Aug 2021 17:46:43 +0200 Subject: [PATCH] always show topiccloud usercounter in header --- .../shared/overlay/active-user/active-user.component.ts | 3 ++- src/app/components/shared/tag-cloud/tag-cloud.component.html | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/app/components/shared/overlay/active-user/active-user.component.ts b/src/app/components/shared/overlay/active-user/active-user.component.ts index cf06c3a17..b11e6ba9d 100644 --- a/src/app/components/shared/overlay/active-user/active-user.component.ts +++ b/src/app/components/shared/overlay/active-user/active-user.component.ts @@ -16,6 +16,7 @@ export class ActiveUserComponent implements OnInit,OnDestroy{ @Input() backgroundColor: string; @Input() left: number; @Input() top: number; + @Input() alwaysShowInHeader: boolean; @ViewChild('divElement') elem: HTMLElement; activeUser=0; onDestroyListener: (() => void)[]=[]; @@ -30,7 +31,7 @@ export class ActiveUserComponent implements OnInit,OnDestroy{ } ngOnInit(): void{ - if(this.deviceType&&this.deviceType==='mobile'){ + if(this.deviceType&&(this.deviceType==='mobile'||this.alwaysShowInHeader)){ this.headerService.toggleCurrentUserActivity(true); this.onDestroyListener.push(()=>this.headerService.toggleCurrentUserActivity(false)); this.onValueChangeListener.push(num=>this.headerService.setCurrentUserActivity(num)); diff --git a/src/app/components/shared/tag-cloud/tag-cloud.component.html b/src/app/components/shared/tag-cloud/tag-cloud.component.html index be4636bee..e8e27e6d8 100644 --- a/src/app/components/shared/tag-cloud/tag-cloud.component.html +++ b/src/app/components/shared/tag-cloud/tag-cloud.component.html @@ -28,7 +28,7 @@ [zoomOnHover]="zoomOnHoverOptions" [realignOnResize]="false"> </angular-tag-cloud> - <app-active-user *ngIf="room" [room]="this.room" [top]="120"></app-active-user> + <app-active-user *ngIf="room" [alwaysShowInHeader]="true" [room]="this.room" [top]="120"></app-active-user> </ars-fill> <button *ngIf="((user && user.role > 0) || (room && !room.questionsBlocked)) && drawer && !drawer.opened" mat-fab -- GitLab