Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: adiciona notificacao mobile #312

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions src/app/modules/components/header/header.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@
<header fxLayout="row">
<div class="container">
<a routerLink="/"><mat-icon svgIcon="logo" class="logo"></mat-icon></a>
<div *ngIf="!hideMenu" fxLayout="row" fxLayoutGap="8px">
<a (click)="openMobileNotifications()" fxHide fxHide.xs="false">
<app-icon [icon]="notificationIcon"></app-icon>
</a>
<a (click)="openDialog()" id="support" fxHide fxHide.xs="false">
<mat-icon svgIcon="bars" class="bars"></mat-icon>
</a>
</div>
<nav fxHide.xs fxLayoutGap="32px" *ngIf="!hideMenu">
<a routerLink="/" #explore>Explore</a>
<a routerLink="/dados">Dados</a>
Expand All @@ -14,15 +22,15 @@
<button routerLink="/apoie" class="btn">Apoie</button>
<button routerLink="/educacao" class="btn-purple">Educação</button>
</nav>
<a *ngIf="!hideMenu" (click)="openDialog()" id="support" fxHide fxHide.xs="false">
<mat-icon svgIcon="bars" class="bars"></mat-icon>
</a>
</div>
<app-modal fxHide> </app-modal>
<app-notifications fxHide></app-notifications>
</header>
</app-row>

<div class="mobile-notifications" *ngIf="mobileNotificationsOpen" fxHide fxHide.xs="false">
<app-notifications></app-notifications>
</div>

<div class="suspended-menu" *ngIf="mobileMenuOpen" (click)="onClickLink()">
<a routerLink="/" #explore><div class="link bg-white">
Expand Down
6 changes: 6 additions & 0 deletions src/app/modules/components/header/header.component.sass
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@ header
.suspended-menu
display: none

.mobile-notifications
position: fixed
width: 100vw
height: 100%
overflow-y: auto

@media only screen and (max-width: 960px)
:host
position: sticky
Expand Down
5 changes: 5 additions & 0 deletions src/app/modules/components/header/header.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import { tokenKeys } from '../../pages/area-education/utils';
export class HeaderComponent implements OnInit {
@ViewChild('explore') explore!: ElementRef;
mobileMenuOpen = false;
mobileNotificationsOpen = false;
userData: UserModel = {};
urlsHide = ['/educacao/cadastrar'];
hideMenu = false;
Expand Down Expand Up @@ -93,4 +94,8 @@ export class HeaderComponent implements OnInit {
},
});
}

openMobileNotifications() {
this.mobileNotificationsOpen = !this.mobileNotificationsOpen;
}
}