-style approve entents for desktop finished

-style expedient  for desktop ongoing
This commit is contained in:
tiago.kayaya
2021-03-18 16:30:03 +01:00
parent c16fc7197a
commit 2c766015e7
31 changed files with 685 additions and 94 deletions
@@ -187,8 +187,19 @@ export class GroupMessagesPage implements OnInit, OnChanges {
return await modal.present();
}
openSendGroupMessageOptions(ev: any){
if(window.innerWidth <= 1024){
console.log('mobile');
this.openChatOptions(ev);
}
else{
console.log('desktop');
this._openChatOptions();
}
}
/* async openOptions(ev: any) {
async openOptions(ev: any) {
const popover = await this.popoverController.create({
component: ChatPopoverPage,
cssClass: 'chat-popover',
@@ -202,10 +213,7 @@ export class GroupMessagesPage implements OnInit, OnChanges {
popover.onDidDismiss().then(res=>{
console.log(res);
if(res.data){
this.roomName = res.data.name.split('-').join(' ');
console.log(this.roomName);
this.load();
this.getRoomInfo();
//this.modalController.dismiss();
};
@@ -241,10 +249,10 @@ export class GroupMessagesPage implements OnInit, OnChanges {
await modal.present();
modal.onDidDismiss().then(()=>{
this.load();
this.getRoomInfo();
});
}
*/
/* async actionSheet() {
const actionSheet = await this.actionSheetController.create({
cssClass: 'my-custom-class',
@@ -271,5 +279,42 @@ export class GroupMessagesPage implements OnInit, OnChanges {
}
*/
async _openChatOptions() {
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: ChatOptionsPopoverPage,
cssClass: 'model profile-modal search-submodal',
componentProps: {
roomId: this.roomId,
}
});
return await modal.present();
}
}