Commit a968f272 authored by Dennis Willers's avatar Dennis Willers 🏀

Fix Layout für mobile overview Ansicht

parent 68f49472
Pipeline #397 passed with stages
in 5 minutes and 58 seconds
This diff is collapsed.
This diff is collapsed.
{ {
"name": "tabooh", "name": "tabooh",
"version": "2.2.1", "version": "2.2.2",
"scripts": { "scripts": {
"ng": "ng", "ng": "ng",
"start": "ng serve", "start": "ng serve",
......
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
<br> <br>
<div data-aos="zoom-out-right" data-aos-duration="250"> <div data-aos="zoom-out-right" data-aos-duration="250">
<mat-card class="transparent"> <mat-card class="transparent">
<mat-card-subtitle>Tabooh-Version: 2.2.1</mat-card-subtitle> <mat-card-subtitle>Tabooh-Version: 2.2.2</mat-card-subtitle>
<mat-card-subtitle>Zuletzt geändert am: 11.04.2021</mat-card-subtitle> <mat-card-subtitle>Zuletzt geändert am: 11.04.2021</mat-card-subtitle>
<mat-card-content> <mat-card-content>
<button mat-raised-button color="primary" (click)="goToStartpage()">Zur Startseite</button> <button mat-raised-button color="primary" (click)="goToStartpage()">Zur Startseite</button>
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<button matTooltip="Neues Spiel starten" [disabled]="buttonNewGameDisabled || gameStatus.activeExplainer == 1" mat-raised-button color="primary" (click)="startGame()"> <button matTooltip="Neues Spiel starten" [disabled]="buttonNewGameDisabled || gameStatus.activeExplainer == 1" mat-raised-button color="primary" (click)="startGame()">
<mat-icon color = "white" aria-hidden="false">autorenew</mat-icon> <mat-icon color = "white" aria-hidden="false">autorenew</mat-icon>
</button> </button>
<mat-icon *ngIf="view === 'mobileView'" class="peopleInSessionRight" matBadge="{{totalPlayers}}" matBadgeSize="small" matBadgeColor="primary" aria-hidden="false" aria-label="home icon blue">people</mat-icon> <mat-icon *ngIf="view === 'mobileView'" class="peopleInSessionRight" matBadgeHidden="{{disablePlayersOnlineBadges}}" matBadge="{{totalPlayers}}" matBadgeSize="small" matBadgeColor="primary" aria-hidden="false" aria-label="home icon blue">people</mat-icon>
</div> </div>
<br *ngIf="view === 'mobileView'"> <br *ngIf="view === 'mobileView'">
<br *ngIf="view === 'mobileView'"> <br *ngIf="view === 'mobileView'">
...@@ -30,17 +30,17 @@ ...@@ -30,17 +30,17 @@
<mat-icon color = "white" aria-hidden="false">autorenew</mat-icon> <mat-icon color = "white" aria-hidden="false">autorenew</mat-icon>
</button> </button>
</div> </div>
<mat-icon *ngIf="view !== 'mobileView'" class="peopleInSessionRight" matBadge="{{totalPlayers}}" matBadgeSize="small" matBadgeColor="primary" aria-hidden="false" aria-label="home icon blue">people</mat-icon> <mat-icon *ngIf="view !== 'mobileView'" class="peopleInSessionRight" matBadgeHidden="{{disablePlayersOnlineBadges}}" matBadge="{{totalPlayers}}" matBadgeSize="small" matBadgeColor="primary" aria-hidden="false" aria-label="home icon blue">people</mat-icon>
<div class="CenterText"> <div class="CenterText">
<h2 *ngIf="view === 'mobileView'" class="textMobileView">{{membership}}</h2> <h2 *ngIf="view === 'mobileView'" class="textMobileView">{{membership}}</h2>
<h2 *ngIf="view !== 'mobileView'">{{membership}}</h2> <h2 *ngIf="view !== 'mobileView'">{{membership}}</h2>
</div> </div>
</div> </div>
<button mat-raised-button class = "{{red}}" (click)="joinTeam('red')"> <button mat-raised-button class = "{{red}}" (click)="joinTeam('red')">
<mat-icon matBadge="{{redPlayers}}" matBadgeSize="small" matBadgeColor="primary" color = "warn" aria-hidden="false" aria-label="home icon red" >home</mat-icon> <mat-icon matBadge="{{redPlayers}}" matBadgeHidden="{{disablePlayersOnlineBadges}}" matBadgeSize="small" matBadgeColor="primary" color = "warn" aria-hidden="false" aria-label="home icon red" >home</mat-icon>
</button> </button>
<button mat-raised-button class = "{{blue}}" (click)="joinTeam('blue')"> <button mat-raised-button class = "{{blue}}" (click)="joinTeam('blue')">
<mat-icon style="color: darkblue" matBadge="{{bluePlayers}}" matBadgeSize="small" aria-hidden="false" aria-label="home icon blue">home</mat-icon> <mat-icon style="color: darkblue" matBadgeHidden="{{disablePlayersOnlineBadges}}" matBadge="{{bluePlayers}}" matBadgeSize="small" aria-hidden="false" aria-label="home icon blue">home</mat-icon>
</button> </button>
</mat-card> </mat-card>
<br> <br>
......
...@@ -24,6 +24,10 @@ th{ ...@@ -24,6 +24,10 @@ th{
background-color: rgba(200, 0, 0, 0.3); background-color: rgba(200, 0, 0, 0.3);
} }
.floatLeft {
float: left;
}
.bluefont{ .bluefont{
margin: 5px; margin: 5px;
color: rgba(0,0,139); color: rgba(0,0,139);
...@@ -50,7 +54,11 @@ th{ ...@@ -50,7 +54,11 @@ th{
align-items: center; align-items: center;
} }
.newStartButtonLeft{float:left;width:100px;} .newStartButtonLeft{float:left;width:100px;}
.peopleInSessionRight{float:right; margin-top: 4px} .peopleInSessionRight{
position: absolute;
right: 10px;
margin-top: 4px;
}
.CenterText{margin:0 auto;width:250px;} .CenterText{margin:0 auto;width:250px;}
.spinner-wrapper { .spinner-wrapper {
...@@ -74,7 +82,3 @@ th{ ...@@ -74,7 +82,3 @@ th{
.textMobileView { .textMobileView {
display: inline; display: inline;
} }
.peopleRight {
float: right;
}
...@@ -27,6 +27,7 @@ export class OverviewComponent implements OnInit, OnDestroy { ...@@ -27,6 +27,7 @@ export class OverviewComponent implements OnInit, OnDestroy {
isActiveRound = false; isActiveRound = false;
red = 'choose'; red = 'choose';
blue = 'choose'; blue = 'choose';
disablePlayersOnlineBadges = true;
totalPlayers = 1; totalPlayers = 1;
redPlayers = 0; redPlayers = 0;
bluePlayers = 0; bluePlayers = 0;
...@@ -133,6 +134,7 @@ export class OverviewComponent implements OnInit, OnDestroy { ...@@ -133,6 +134,7 @@ export class OverviewComponent implements OnInit, OnDestroy {
this.subSessionPlayers = this.socketDataService.getSessionPlayers(this.sessionName) this.subSessionPlayers = this.socketDataService.getSessionPlayers(this.sessionName)
.pipe(takeUntil(this.ngUnsubscribe)).subscribe(data => { .pipe(takeUntil(this.ngUnsubscribe)).subscribe(data => {
if (data.hasOwnProperty('total')) { if (data.hasOwnProperty('total')) {
this.disablePlayersOnlineBadges = false;
this.totalPlayers = data.total; this.totalPlayers = data.total;
this.redPlayers = data.red; this.redPlayers = data.red;
this.bluePlayers = data.blue; this.bluePlayers = data.blue;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment