Skip to content

Commit

Permalink
changed: send-email modal UI form mobile platform
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriele Panico committed May 10, 2023
1 parent 9a95b8e commit 39ce309
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/modals/send-email/send-email.page.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</ion-header>

<ion-content>
<div class="content-container">
<div class="content-container" [attr.isMobile]="isMobile">
<form [formGroup]="emailFormGroup" (ngSubmit)="onSubmit()">
<!-- <div class="form-group row">
<ion-item lines="none">
Expand Down
16 changes: 16 additions & 0 deletions src/app/modals/send-email/send-email.page.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,22 @@ ion-content{
padding-top: 40px;
padding-left: 8%;
padding-right: 8%;

}

.content-container[isMobile= true]{
height: 100vh;
form{
height: 100%;
}
.field-wrapper-email{
height: 65%;
ion-textarea{
min-height: calc(100% - 50px);
max-height: calc(100% - 50px);
}
}

}

ion-label + ion-input:focus {
Expand Down
13 changes: 13 additions & 0 deletions src/app/modals/send-email/send-email.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { ModalController, ToastController } from '@ionic/angular';
import { LoggerService } from 'src/chat21-core/providers/abstract/logger.service';
import { LoggerInstance } from 'src/chat21-core/providers/logger/loggerInstance';
import { UserModel } from 'src/chat21-core/models/user';
import { checkPlatformIsMobile } from 'src/chat21-core/utils/utils';

@Component({
selector: 'send-email-modal',
Expand All @@ -26,6 +27,7 @@ export class SendEmailModal implements OnInit {

emailFormGroup: FormGroup;
private logger: LoggerService = LoggerInstance.getInstance()
public isMobile: boolean = false;

constructor(
public viewCtrl: ModalController,
Expand All @@ -36,6 +38,17 @@ export class SendEmailModal implements OnInit {
) { }

ngOnInit() {

if (checkPlatformIsMobile()) {
this.isMobile = true
// this.openInfoConversation = false; // indica se è aperto il box info conversazione
this.logger.log('[CONVS-DETAIL] - initialize -> checkPlatformIsMobile isMobile? ', this.isMobile)
} else {
this.isMobile = false
this.logger.log('[CONVS-DETAIL] - initialize -> checkPlatformIsMobile isMobile? ', this.isMobile)
// this.openInfoConversation = true;
}

this.logger.log('[SEND-EMAIL-MODAL] Hello!')
this.emailFormGroup = this.buildFormGroup();
this.emailFormGroup.valueChanges.subscribe((value)=> {
Expand Down

0 comments on commit 39ce309

Please sign in to comment.