Blacked and isorted the python files
Prettied and eslinted the typescript/html files
This commit is contained in:
@ -5,11 +5,15 @@
|
||||
</a>
|
||||
<span class="fill-remaining-space"></span>
|
||||
<button mat-button [routerLink]="['/', 'login']" *ngIf="!(auth.currentUser | async)">
|
||||
<mat-icon>account_box</mat-icon>
|
||||
Login
|
||||
<mat-icon>account_box</mat-icon>
|
||||
Login
|
||||
</button>
|
||||
<button mat-button [routerLink]="['/', 'logout']" *ngIf="(auth.currentUser | async)?.name as name">
|
||||
<mat-icon>account_box</mat-icon>
|
||||
Logout {{name}}
|
||||
<button
|
||||
mat-button
|
||||
[routerLink]="['/', 'logout']"
|
||||
*ngIf="(auth.currentUser | async)?.name as name"
|
||||
>
|
||||
<mat-icon>account_box</mat-icon>
|
||||
Logout {{ name }}
|
||||
</button>
|
||||
</mat-toolbar>
|
||||
|
||||
@ -8,9 +8,8 @@ describe('NavBarComponent', () => {
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ NavBarComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
declarations: [NavBarComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
|
||||
@ -1,20 +1,18 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
|
||||
import { AuthService } from '../auth/auth.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-nav-bar',
|
||||
templateUrl: './nav-bar.component.html',
|
||||
styleUrls: ['./nav-bar.component.css']
|
||||
styleUrls: ['./nav-bar.component.css'],
|
||||
})
|
||||
export class NavBarComponent {
|
||||
constructor(private router: Router, public auth: AuthService) {}
|
||||
|
||||
constructor(private router: Router, public auth: AuthService) {
|
||||
logout() {
|
||||
this.auth.logout();
|
||||
this.router.navigate(['/']);
|
||||
}
|
||||
|
||||
logout() {
|
||||
this.auth.logout();
|
||||
this.router.navigate(['/']);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user