This commit is contained in:
tiago.kayaya
2021-06-30 15:48:37 +01:00
parent 7fe0308b27
commit 28c483ff0b
5 changed files with 54 additions and 20 deletions
@@ -277,20 +277,41 @@ export class PublicationsPage implements OnInit {
}
}
async openOptions(taskAction?: any) {
const popover = await this.modalController.create({
async openOptions(id?: string) {
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: ActionsOptionsPage,
cssClass: 'model aside-modal',
cssClass: 'model profile-modal search-submodal',
componentProps: {
/* task: this.task,
fulltask: this.fulltask, */
taskAction: taskAction,
showEnviarPendentes: false
id: id,
},
//translucent: true
});
return await popover.present();
return await modal.present();
}
}