Add unified material return navigation button

pull/43/head
HardiReady 2018-07-24 21:43:09 +02:00
parent 8dd1abff55
commit 51b11cb2a1
8 changed files with 60 additions and 33 deletions

View File

@ -12,6 +12,7 @@
}
.return-button {
position: absolute;
display: block;
width: auto;
}

View File

@ -1,12 +1,16 @@
<div class="army-member-view">
<div class="army-member-view-container">
<div class="return-button">
<span class="btn btn-default" style="position:absolute;" (click)="backToOverview()">< zurück zur Übersicht</span>
<button mat-raised-button (click)="backToOverview()">
<mat-icon svgIcon="chevron-left"></mat-icon>
Zurück
</button>
</div>
<h3 class="text-center" style="font-weight: 600"
[style.color]="user.squadId?.fraction === 'BLUFOR' ? fraction.COLOR_BLUFOR : fraction.COLOR_OPFOR">
Auszeichnungen von {{user.username}}
</h3>
</div>
<div class="text-center">
<img src="{{signatureUrl}}">

View File

@ -7,6 +7,12 @@
min-height: calc(100vh - 95px);
}
.return-button {
display: block;
width: auto;
float: left;
}
.show-panel {
display: inline-block;
margin: inherit;

View File

@ -1,6 +1,12 @@
<div class="tracer-container">
<h1>Alle aktiven Teilnehmer mit {{isRank ? 'Rang' : 'Auszeichnung'}}</h1>
<div class="return-button" style="position:absolute;">
<button mat-raised-button (click)="navigateBack()">
<mat-icon svgIcon="chevron-left"></mat-icon>Zurück
</button>
</div>
<div class="show-panel"
*ngIf="isRank">
<cc-rank-panel [rank]="traceItem">

View File

@ -1,6 +1,6 @@
import {Component, Inject, OnDestroy, OnInit} from '@angular/core';
import {ActivatedRoute, Router} from '@angular/router';
import {DOCUMENT} from '@angular/common';
import {DOCUMENT, Location} from '@angular/common';
import {Fraction} from '../../utils/fraction.enum';
import {CSSHelpers} from '../../utils/global.helpers';
import {RouteConfig} from '../../app.config';
@ -29,6 +29,7 @@ export class TraceOverviewComponent implements OnInit, OnDestroy {
constructor(private router: Router,
private route: ActivatedRoute,
private location: Location,
private userService: UserService,
private rankService: RankService,
private decorationService: DecorationService,
@ -67,6 +68,10 @@ export class TraceOverviewComponent implements OnInit, OnDestroy {
this.router.navigate(['overview', {outlets: {'right': ['member', user._id]}}]);
}
navigateBack() {
this.location.back();
}
ngOnDestroy() {
if (!this.router.url.includes(RouteConfig.overviewPath)) {
this.document.getElementById('right').setAttribute('style', '');

View File

@ -2,7 +2,9 @@
<h2 class="pull-left">Kampagnendetails - {{campaignPlayer.name}}</h2>
<h2 class="pull-right">{{campaignPlayer.campaign.title}} Kampagne</h2>
<span class="btn btn-default btn-back" (click)="navigateBack()">< Zurück</span>
<button class="btn-back" mat-raised-button (click)="navigateBack()">
<mat-icon svgIcon="chevron-left"></mat-icon>Zurück
</button>
<div class="sum-container">
<div class="gauge-container pull-left">

View File

@ -1,10 +1,9 @@
.scoreboard-table {
height: 68vh;
height: 60vh;
width:fit-content;
border: 1px solid #dadada;
overflow-x: auto;
margin: auto;
margin-top: 56px;
margin: 56px auto auto;
}
:host /deep/ table.mat-table > thead {

View File

@ -1,3 +1,7 @@
.select-list {
min-height: calc(100vh - 50px);
}
.war-list-header {
margin: auto;
}