bug on agenda, publications and refactore send file on chat

This commit is contained in:
Eudes Inácio
2023-12-27 10:28:48 +01:00
parent 2aef1d6030
commit afa1c41021
8 changed files with 19 additions and 16 deletions
+2 -2
View File
@@ -258,9 +258,9 @@
</div> </div>
<div class="schedule-details"> <div class="schedule-details">
<div class="description"> <div class="description">
<p class="m-0" [innerHTML]="event.event.Subject"></p> <p class="m-0">{{event.event.Subject}}</p>
</div> </div>
<div class="location" [innerHTML]="event.event.Location"></div> <div class="location">{{event.event.Subject}}</div>
<div class="font-13 calendar-owner"*ngIf="eventService.getCalendarOwnNameByCalendarId(event.event.CalendarId) == 'Meu calendario'">{{SessionStore.user.FullName}} </div> <div class="font-13 calendar-owner"*ngIf="eventService.getCalendarOwnNameByCalendarId(event.event.CalendarId) == 'Meu calendario'">{{SessionStore.user.FullName}} </div>
<ng-template #other_content>{{eventService.getCalendarOwnNameByCalendarId(event.event.CalendarId)}}</ng-template> <ng-template #other_content>{{eventService.getCalendarOwnNameByCalendarId(event.event.CalendarId)}}</ng-template>
</div> </div>
@@ -415,9 +415,9 @@ export class NewEventPage implements OnInit {
} }
this.postEvent.Attendees = this.taskParticipants.concat(this.taskParticipantsCc); this.postEvent.Attendees = this.taskParticipants.concat(this.taskParticipantsCc);
this.postEvent.Subject = this.domSanitazerService.sanitizeInput(this.postEvent.Subject); this.postEvent.Subject = /* this.domSanitazerService.sanitizeInput( */this.postEvent.Subject/* ); */
this.postEvent.Location = this.domSanitazerService.sanitizeInput(this.postEvent.Location); this.postEvent.Location = /* this.domSanitazerService.sanitizeInput( */this.postEvent.Location/* ); */
this.postEvent.Body.Text = this.domSanitazerService.sanitizeInput(this.postEvent.Body.Text); this.postEvent.Body.Text = /* this.domSanitazerService.sanitizeInput( */this.postEvent.Body.Text/* ); */
let eventId: any; let eventId: any;
@@ -16,7 +16,7 @@
<div class="main-content"> <div class="main-content">
<div class="ion-item-container" [class.input-error]="Form?.get('Subject')?.invalid && validateFrom "> <div class="ion-item-container" [class.input-error]="Form?.get('Subject')?.invalid && validateFrom ">
<ion-input autocomplete="on" autocorrect="on" spellcheck="true" placeholder="Assunto*" <ion-input autocomplete="on" autocorrect="on" spellcheck="true" placeholder="Assunto*"
[innerHTML]="_postEvent.Subject"></ion-input> [(ngModel)]="_postEvent.Subject"></ion-input>
</div> </div>
<div *ngIf="Form && validateFrom"> <div *ngIf="Form && validateFrom">
<div *ngIf="Form.get('Subject').invalid " class="input-errror-message"> <div *ngIf="Form.get('Subject').invalid " class="input-errror-message">
@@ -515,9 +515,9 @@ export class NewEventPage implements OnInit {
} }
this.postEvent.Attendees = this.taskParticipants.concat(this.taskParticipantsCc); this.postEvent.Attendees = this.taskParticipants.concat(this.taskParticipantsCc);
this.postEvent.Subject = this.domSanitazerService.sanitizeInput(this.postEvent.Subject); this.postEvent.Subject = /* this.domSanitazerService.sanitizeInput( */this.postEvent.Subject/* ); */
this.postEvent.Location = this.domSanitazerService.sanitizeInput(this.postEvent.Location); this.postEvent.Location = /* this.domSanitazerService.sanitizeInput( */this.postEvent.Location/* ); */
this.postEvent.Body.Text = this.domSanitazerService.sanitizeInput(this.postEvent.Body.Text); this.postEvent.Body.Text = /* this.domSanitazerService.sanitizeInput( */this.postEvent.Body.Text/* ); */
@@ -13,7 +13,7 @@
</button> </button>
</div> </div>
<div class="middle" (click)="openOptions()"> <div class="middle" (click)="openOptions()">
<p class="title" [innerHTML]="loadedEvent.Subject"></p> <p class="title">{{loadedEvent.Subject}}</p>
</div> </div>
<div class="div-icon d-flex align-base"> <div class="div-icon d-flex align-base">
@@ -54,7 +54,7 @@
<div class="upper-content"> <div class="upper-content">
<div class="content-location"> <div class="content-location">
<span class="date" [innerHTML]="loadedEvent.Location"></span> <span class="date">{{loadedEvent.Location}}</span>
<div *ngIf="loadedEvent.Organizer"> <div *ngIf="loadedEvent.Organizer">
@@ -699,6 +699,8 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
source: CameraSource.Camera source: CameraSource.Camera
}); });
console.log('FILE CHAT',file)
const imageBase64 = 'data:image/jpeg;base64,' + file.base64String const imageBase64 = 'data:image/jpeg;base64,' + file.base64String
const blob = this.dataURItoBlob(imageBase64) const blob = this.dataURItoBlob(imageBase64)
@@ -867,7 +869,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
console.log('BLOB BLOB', blob) console.log('BLOB BLOB', blob)
formData = new FormData(); formData = new FormData();
formData.append('blobFile', blob); formData.append('blobFile', file);
/* console.log('add file', fileBase64) */ /* console.log('add file', fileBase64) */
} else { } else {
@@ -876,7 +878,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
fileBase64 = await this._getBase64(file) fileBase64 = await this._getBase64(file)
formData = new FormData(); formData = new FormData();
formData.append('blobFile', blob); formData.append('blobFile', file);
} }
@@ -34,11 +34,12 @@
<div class="post-item px-20"> <div class="post-item px-20">
<swiper-container navigation="true" [pagination]="{clickable: true, dynamicBullets: true }"> <swiper-container navigation="true" [pagination]="{clickable: true, dynamicBullets: true }">
<swiper-slide *ngFor="let files of publication.Files let k = index"> <swiper-slide *ngFor="let files of publication.Files let k = index">
<div (click)="openPreview(publication)"> <!-- <div (click)="openPreview(publication)"> -->
<div>
<img *ngIf="checkFileType.checkFileType(files.FileExtension ) == 'image'" alt="image" tappable <img *ngIf="checkFileType.checkFileType(files.FileExtension ) == 'image'" alt="image" tappable
src="{{'data:image/jpg;base64,' + files.FileBase64}}"> src="{{'data:image/jpg;base64,' + files.FileBase64}}">
<video *ngIf="checkFileType.checkFileType(files.FileExtension ) == 'video'" controls="controls" autoplay="autoplay" preload="metadata" <video *ngIf="checkFileType.checkFileType(files.FileExtension ) == 'video'" controls="controls" preload="metadata"
webkit-playsinline="webkit-playsinline"> webkit-playsinline="webkit-playsinline">
<source src="{{'data:video/mp4;base64,' + files.FileBase64}}" type="video/mp4"> <source src="{{'data:video/mp4;base64,' + files.FileBase64}}" type="video/mp4">
</video> </video>
+1 -1
View File
@@ -23,7 +23,7 @@
<add name="X-Content-Type-Options" value="nosniff" /> <add name="X-Content-Type-Options" value="nosniff" />
<!-- <add e="Expect-CT" value="enforce, max-age=86400" /> --> <!-- <add e="Expect-CT" value="enforce, max-age=86400" /> -->
<!-- Permision --> <!-- Permision -->
<add name="Permissions-Policy" value="camera=(), microphone=()" /> <add name="Permissions-Policy" value="camera=(), microphone=*" />
<!-- same origin only --> <!-- same origin only -->
<add name="Cross-Origin-Embedder-Policy" value="require-corp" /> <add name="Cross-Origin-Embedder-Policy" value="require-corp" />
<!-- same origin only --> <!-- same origin only -->