add SVG Images to HeaderBar

This commit is contained in:
Felix
2021-01-06 19:12:19 +01:00
committed by Mondei1
parent 8cc0d96abf
commit a3e3eb983b
5 changed files with 19 additions and 1 deletions

View File

@@ -8,3 +8,9 @@
z-index: 999; z-index: 999;
border-radius: 8px; border-radius: 8px;
} }
.history-svg {}
.admin-svg {
fill: white;
}

View File

@@ -1,3 +1,5 @@
<div class="header" *ngIf="this.dashboard.user != undefined"> <div class="header" *ngIf="this.dashboard.user != undefined">
<p>HEADER</p> <img src="assets/history.svg" class="history-svg">
<img src="assets/dash.svg" class="dash-svg">
<img src="assets/admin.svg" class="admin-svg">
</div> </div>

View File

@@ -18,7 +18,15 @@ export class LoginComponent implements OnInit {
) { } ) { }
ngOnInit(): void { ngOnInit(): void {
const loginStatus = this.dashboard.login("admin", "password");
if (loginStatus) {
this.router.navigate(['dashboard', 'overview']);
} else {
// TODO: Meldung anzeigen
} }
}
login() { login() {
const loginStatus = this.dashboard.login(this.username, this.password); const loginStatus = this.dashboard.login(this.username, this.password);

1
src/assets/admin.svg Normal file
View File

@@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path d="M12,19.2C9.5,19.2 7.29,17.92 6,16C6.03,14 10,12.9 12,12.9C14,12.9 17.97,14 18,16C16.71,17.92 14.5,19.2 12,19.2M12,5A3,3 0 0,1 15,8A3,3 0 0,1 12,11A3,3 0 0,1 9,8A3,3 0 0,1 12,5M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12C22,6.47 17.5,2 12,2Z" /></svg>

After

Width:  |  Height:  |  Size: 549 B

1
src/assets/dash.svg Normal file
View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24" height="24" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24" style="-ms-transform: rotate(360deg); -webkit-transform: rotate(360deg); transform: rotate(360deg);"><path d="M21 16V4H3v12h18m0-14a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2h-7v2h2v2H8v-2h2v-2H3a2 2 0 0 1-2-2V4c0-1.11.89-2 2-2h18M5 6h9v5H5V6m10 0h4v2h-4V6m4 3v5h-4V9h4M5 12h4v2H5v-2m5 0h4v2h-4v-2z" fill="white"/><rect x="0" y="0" width="24" height="24" fill="rgba(0, 0, 0, 0)" /></svg>

After

Width:  |  Height:  |  Size: 537 B