mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 21:35:50 +00:00
Merge branch 'feature/calendar' of bitbucket.org:equilibriumito/gabinete-digital into feature/calendar
This commit is contained in:
@@ -8,9 +8,10 @@
|
|||||||
<div class="div-logo height-fit-content">
|
<div class="div-logo height-fit-content">
|
||||||
<img src='assets/images/logo-no-bg.png' alt='logo'>
|
<img src='assets/images/logo-no-bg.png' alt='logo'>
|
||||||
</div>
|
</div>
|
||||||
<div class="div-profile">
|
<div class="div-profile" (click)="openProfile()">
|
||||||
<ion-icon class="font-45" *ngIf="profile == 'mdgpr' " src='assets/images/icons-profile.svg'></ion-icon>
|
<ion-icon class="font-45" *ngIf="profile == 'mdgpr' " src='assets/images/icons-profile.svg'></ion-icon>
|
||||||
<ion-icon class="font-45" *ngIf="profile == 'pr' " src='assets/images/icons-profile-pr-header.svg'></ion-icon>
|
<ion-icon class="font-45" *ngIf="profile == 'pr' " src='assets/images/icons-profile-pr-header.svg'></ion-icon>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -55,7 +56,7 @@
|
|||||||
<ion-icon class="font-45" src='assets/images/icons-search.svg'></ion-icon>
|
<ion-icon class="font-45" src='assets/images/icons-search.svg'></ion-icon>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="div-profile justify-end d-flex">
|
<div class="div-profile justify-end d-flex" (click)="openProfile()">
|
||||||
<ion-icon class="font-45" *ngIf="profile == 'mdgpr' " src='assets/images/icons-profile.svg'></ion-icon>
|
<ion-icon class="font-45" *ngIf="profile == 'mdgpr' " src='assets/images/icons-profile.svg'></ion-icon>
|
||||||
<ion-icon class="font-45" *ngIf="profile == 'pr' " src='assets/images/icons-profile-pr-header.svg'></ion-icon>
|
<ion-icon class="font-45" *ngIf="profile == 'pr' " src='assets/images/icons-profile-pr-header.svg'></ion-icon>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
import { ModalController } from '@ionic/angular';
|
import { AnimationController, ModalController } from '@ionic/angular';
|
||||||
import { SearchPage } from 'src/app/pages/search/search.page';
|
import { SearchPage } from 'src/app/pages/search/search.page';
|
||||||
import { Router } from '@angular/router';
|
import { Router } from '@angular/router';
|
||||||
|
import { ProfileComponent } from '../headers/header-no-search/profile/profile.component';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-header',
|
selector: 'app-header',
|
||||||
@@ -12,8 +13,9 @@ export class HeaderPage implements OnInit {
|
|||||||
|
|
||||||
profile: string = 'mdgpr';
|
profile: string = 'mdgpr';
|
||||||
|
|
||||||
constructor(private modalController: ModalController,
|
constructor(
|
||||||
private router: Router) {
|
private router: Router,private modalController: ModalController,
|
||||||
|
private animationController: AnimationController,) {
|
||||||
|
|
||||||
window['header'] = (profile:string) => {
|
window['header'] = (profile:string) => {
|
||||||
this.profile = profile;
|
this.profile = profile;
|
||||||
@@ -41,4 +43,45 @@ export class HeaderPage implements OnInit {
|
|||||||
changeRoute(path){
|
changeRoute(path){
|
||||||
this.router.navigateByUrl(path)
|
this.router.navigateByUrl(path)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
async openProfile() {
|
||||||
|
|
||||||
|
const enterAnimation = (baseEl: any) => {
|
||||||
|
const backdropAnimation = this.animationController.create()
|
||||||
|
.addElement(baseEl.querySelector('ion-backdrop')!)
|
||||||
|
.fromTo('opacity', '0.01', 'var(--backdrop-opacity)');
|
||||||
|
|
||||||
|
const wrapperAnimation = this.animationController.create()
|
||||||
|
.addElement(baseEl.querySelector('.modal-wrapper')!)
|
||||||
|
.keyframes([
|
||||||
|
{ offset: 0, opacity: '1', right: '-100%' },
|
||||||
|
{ offset: 1, opacity: '1', right: '0px' }
|
||||||
|
]);
|
||||||
|
|
||||||
|
return this.animationController.create()
|
||||||
|
.addElement(baseEl)
|
||||||
|
.easing('ease-out')
|
||||||
|
.duration(500)
|
||||||
|
.addAnimation([backdropAnimation, wrapperAnimation]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const leaveAnimation = (baseEl: any) => {
|
||||||
|
return enterAnimation(baseEl).direction('reverse');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const modal = await this.modalController.create({
|
||||||
|
enterAnimation,
|
||||||
|
leaveAnimation,
|
||||||
|
component: ProfileComponent,
|
||||||
|
cssClass: 'model profile-modal',
|
||||||
|
componentProps: {
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return await modal.present();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,8 @@
|
|||||||
<div class="div-logo height-fit-content">
|
<div class="div-logo height-fit-content">
|
||||||
<img src='assets/images/logo-no-bg.png' alt='logo'>
|
<img src='assets/images/logo-no-bg.png' alt='logo'>
|
||||||
</div>
|
</div>
|
||||||
<div class="div-profile">
|
|
||||||
|
<div class="div-profile" (click)="openProfile()">
|
||||||
<ion-icon class="font-45" src='assets/images/icons-profile.svg'></ion-icon>
|
<ion-icon class="font-45" src='assets/images/icons-profile.svg'></ion-icon>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -54,7 +55,7 @@
|
|||||||
<ion-icon src='assets/images/icons-search.svg'></ion-icon>
|
<ion-icon src='assets/images/icons-search.svg'></ion-icon>
|
||||||
</div> -->
|
</div> -->
|
||||||
|
|
||||||
<div class="div-profile">
|
<div class="div-profile" (click)="openProfile()">
|
||||||
<ion-icon src='assets/images/icons-profile.svg'></ion-icon>
|
<ion-icon src='assets/images/icons-profile.svg'></ion-icon>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ export class HeaderNoSearchPage implements OnInit {
|
|||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
}
|
}
|
||||||
|
|
||||||
async openSearch() {
|
async openProfile() {
|
||||||
|
|
||||||
const enterAnimation = (baseEl: any) => {
|
const enterAnimation = (baseEl: any) => {
|
||||||
const backdropAnimation = this.animationController.create()
|
const backdropAnimation = this.animationController.create()
|
||||||
|
|||||||
Reference in New Issue
Block a user