TD-36: Implemented that only showing component and fetching player data if logged in
This commit is contained in:
parent
9f70eb3533
commit
7bbf2db126
5 changed files with 8 additions and 12 deletions
|
@ -1,8 +1,6 @@
|
|||
import { Routes } from '@angular/router';
|
||||
import { DashboardComponent } from '@app/views/dashboard/dashboard.component';
|
||||
|
||||
export const routes: Routes = [
|
||||
{ path: '', component: DashboardComponent, title: 'Player Overview'}
|
||||
];
|
||||
export const routes: Routes = [{ path: '', component: DashboardComponent, title: 'Player Overview'}];
|
||||
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="ban">
|
||||
<th mat-header-cell *matHeaderCellDef class="banColumn"> Ban</th>
|
||||
<th mat-header-cell *matHeaderCellDef class="ban-column"> Ban</th>
|
||||
<td mat-cell *matCellDef="let user">
|
||||
<button mat-mini-fab class="warn shadowless" (click)="banPlayer(user)">
|
||||
<mat-icon>block</mat-icon>
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
.banColumn{
|
||||
.ban-column{
|
||||
padding-right: 0.8rem;
|
||||
}
|
|
@ -1,14 +1,14 @@
|
|||
import {AsyncPipe} from '@angular/common';
|
||||
import {Component, OnInit} from '@angular/core';
|
||||
import {FormsModule} from '@angular/forms';
|
||||
import {MatButtonModule} from '@angular/material/button';
|
||||
import {MatFormField, MatLabel} from '@angular/material/form-field';
|
||||
import {MatIcon} from '@angular/material/icon';
|
||||
import {MatInput} from '@angular/material/input';
|
||||
import {MatTableModule} from '@angular/material/table';
|
||||
import {AuthService} from '@core/auth/auth.service';
|
||||
import UserData from '@core/auth/UserData';
|
||||
import {AdministratablePlayer, AdminService, PlayerFilter} from '@core/server';
|
||||
import {AsyncPipe} from '@angular/common';
|
||||
import {AuthService} from '@core/auth/auth.service';
|
||||
import {MatIcon} from '@angular/material/icon';
|
||||
|
||||
@Component({
|
||||
selector: 'app-admin-overview',
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
import { Component } from '@angular/core';
|
||||
import {AdminOverviewComponent} from "@app/views/admin-overview/admin-overview.component";
|
||||
import {AdminOverviewComponent} from '@app/views/admin-overview/admin-overview.component';
|
||||
|
||||
@Component({
|
||||
selector: 'app-dashboard',
|
||||
imports: [
|
||||
AdminOverviewComponent
|
||||
],
|
||||
imports: [AdminOverviewComponent],
|
||||
templateUrl: './dashboard.component.html',
|
||||
styleUrl: './dashboard.component.scss'
|
||||
})
|
||||
|
|
Loading…
Add table
Reference in a new issue