-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
działa już lepiej, cssy nawet ładne też wyszły
- Loading branch information
Showing
6 changed files
with
140 additions
and
6 deletions.
There are no files selected for viewing
1 change: 0 additions & 1 deletion
1
src/main/frontend/src/app/component/common/header-menu/header-menu.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
src/main/frontend/src/app/component/dashboard/my-groups/my-groups.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<div class="flex"> | ||
<div class="your-groups">Twoje grupy to:</div> | ||
<div class="add-group" routerLink="/group/add">Dodaj | ||
<mat-icon class="add-group-icon">group_add</mat-icon> | ||
</div> | ||
</div> | ||
<div class="sidenav"> | ||
<ul class="sidenav-nav"> | ||
<li *ngFor="let group of allGroups" class="sidenav-nav-item"> | ||
<a (click)="navigate(group.id!)" class="sidenav-nav-link"> | ||
<mat-icon class="icon">groups</mat-icon> | ||
<span class="sidenav-link-text pointer">{{group.name}}</span> | ||
</a> | ||
</li> | ||
</ul> | ||
</div> |
90 changes: 90 additions & 0 deletions
90
src/main/frontend/src/app/component/dashboard/my-groups/my-groups.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
@import "../../app.component"; | ||
|
||
.sidenav { | ||
list-style-type: none; | ||
font-size: 14px; | ||
background: #263238; | ||
//transition: all .5s ease; | ||
position: fixed; | ||
|
||
} | ||
|
||
.sidenav-nav { | ||
list-style: none; | ||
padding: 0.938rem; | ||
margin: 0; | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
cursor: pointer; | ||
|
||
.sidenav-nav-item { | ||
width: 100%; | ||
margin-bottom: 0.625rem; | ||
|
||
.sidenav-nav-link { | ||
display: flex; | ||
align-items: center; | ||
height: 3rem; | ||
color: #f3f3f3; | ||
text-decoration: none; | ||
border-radius: 0.625rem; | ||
transition: all .3s ease; | ||
padding: 10px; | ||
|
||
.sidenav-link-icon { | ||
font-size: 22px; | ||
width: 2rem; | ||
min-width: 2rem; | ||
margin: 0 0.5rem; | ||
text-align: center; | ||
} | ||
|
||
.sidenav-link-text { | ||
margin-left: 1.5rem; | ||
} | ||
} | ||
|
||
.sidenav-nav-link:hover { | ||
background-color: #fff; | ||
color: #000; | ||
|
||
.menu-collapse-icon { | ||
color: #000; | ||
} | ||
} | ||
} | ||
} | ||
|
||
.active { | ||
background-color: #fff; | ||
|
||
.menu-collapse-icon, | ||
.sidenav-link-icon, | ||
.sidenav-link-text { | ||
color: #000; | ||
} | ||
} | ||
|
||
.flex { | ||
display: flex; | ||
justify-content: space-between; | ||
} | ||
|
||
.your-groups { | ||
font-size: 26px; | ||
color: white; | ||
padding: 10px; | ||
} | ||
|
||
.add-group { | ||
display: flex; | ||
align-items: center; | ||
font-size: 16px; | ||
color: white; | ||
padding-right: 10px; | ||
} | ||
|
||
.add-group-icon { | ||
margin-left: 1rem; | ||
} |
30 changes: 30 additions & 0 deletions
30
src/main/frontend/src/app/component/dashboard/my-groups/my-groups.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import {Component} from '@angular/core'; | ||
import {Group} from "../../../model/group"; | ||
import {GroupService} from "../../../service/group.service"; | ||
import {Router} from "@angular/router"; | ||
|
||
@Component({ | ||
selector: 'my-groups', | ||
templateUrl: './my-groups.component.html', | ||
styleUrl: './my-groups.component.scss' | ||
}) | ||
export class MyGroupsComponent { | ||
allGroups: Group[]; | ||
|
||
constructor(private groupService: GroupService, | ||
private router: Router) { | ||
} | ||
|
||
ngOnInit(): void { | ||
this.findAllGroupsForUser(); | ||
} | ||
|
||
findAllGroupsForUser() { | ||
this.groupService.findAllGroupsForUser().subscribe(groups => this.allGroups = groups.body!); | ||
|
||
} | ||
|
||
navigate(groupId: number) { | ||
this.router.navigate(['group/details', groupId]); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters