From dba4cbb6dd18414f639860b4fc58741e958a8eb8 Mon Sep 17 00:00:00 2001 From: Ruben Bimberg <ruben.bimberg@mni.thm.de> Date: Fri, 22 Oct 2021 13:22:53 +0200 Subject: [PATCH] Enable buttons only on desktop --- .../shared/header/header.component.html | 37 +++++++++++++++++-- 1 file changed, 33 insertions(+), 4 deletions(-) diff --git a/src/app/components/shared/header/header.component.html b/src/app/components/shared/header/header.component.html index cc5b95bab..d21862632 100644 --- a/src/app/components/shared/header/header.component.html +++ b/src/app/components/shared/header/header.component.html @@ -36,7 +36,8 @@ <button mat-flat-button tabindex="0" - *ngIf="deviceType !== 'mobile' && !router.url.endsWith('moderator/comments') && isSafari === 'false' && router.url.endsWith('/comments')" + *ngIf="deviceType === 'desktop' && !router.url.endsWith('moderator/comments') && + isSafari === 'false' && router.url.endsWith('/comments')" routerLink="participant/room/{{shortId}}/comments/questionwall"> <mat-icon class="beamer-icon" svgIcon="beamer"></mat-icon> <span>{{'header.questionwall' | translate}}</span> @@ -44,7 +45,8 @@ <button mat-flat-button tabindex="0" - *ngIf="!router.url.endsWith('moderator/comments') && router.url.endsWith('/comments')" + *ngIf="!router.url.endsWith('moderator/comments') && router.url.endsWith('/comments') && + deviceType === 'desktop'" (click)="navigateTopicCloud()"> <mat-icon>cloud</mat-icon> <span>{{'header.tag-cloud' | translate}}</span> @@ -57,7 +59,8 @@ <button mat-flat-button tabindex="0" - *ngIf="!router.url.endsWith('moderator/comments') && router.url.endsWith('/comments')" + *ngIf="!router.url.endsWith('moderator/comments') && router.url.endsWith('/comments') && + deviceType === 'desktop'" routerLink="quiz"> <mat-icon>timer</mat-icon> <span>{{'header.quiz-now' | translate}}</span> @@ -66,7 +69,8 @@ <button mat-flat-button tabindex="0" *ngIf="user && user.role > 0 && !router.url.includes('/participant/') && - !router.url.endsWith('moderator/comments') && router.url.endsWith('/comments')" + !router.url.endsWith('moderator/comments') && router.url.endsWith('/comments') && + deviceType === 'desktop'" routerLink="moderator/room/{{shortId}}/moderator/comments"> <mat-icon>visibility_off</mat-icon> <span>{{'header.moderationboard' | translate}}</span> @@ -205,6 +209,31 @@ <span>{{'header.room-qr' | translate}}</span> </button> + <button mat-menu-item + tabindex="0" + *ngIf="user && user.role > 0 && !router.url.includes('/participant/') && + !router.url.endsWith('moderator/comments') && deviceType === 'mobile'" + routerLink="moderator/room/{{shortId}}/moderator/comments"> + <mat-icon>visibility_off</mat-icon> + <span>{{'header.moderationboard' | translate}}</span> + </button> + + <button mat-menu-item + tabindex="0" + *ngIf="!router.url.endsWith('moderator/comments') && deviceType === 'mobile'" + (click)="navigateTopicCloud()"> + <mat-icon>cloud</mat-icon> + <span>{{'header.tag-cloud' | translate}}</span> + </button> + + <button mat-menu-item + tabindex="0" + *ngIf="!router.url.endsWith('moderator/comments') && deviceType === 'mobile'" + routerLink="quiz"> + <mat-icon>timer</mat-icon> + <span>{{'header.quiz-now' | translate}}</span> + </button> + </ng-container> <!-- Session --> -- GitLab