mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
improve
This commit is contained in:
@@ -95,9 +95,13 @@ export class ContactsPage implements OnInit {
|
||||
}
|
||||
this.chatService.createRoom(body).subscribe(async(res) => {
|
||||
this.room = res['room'];
|
||||
await this.ChatSystemService.getAllRooms();
|
||||
|
||||
this.ChatSystemService.getAllRooms(() => {
|
||||
this.getDirectMessage(this.room._id);
|
||||
this.loading = false
|
||||
}, this.room._id);
|
||||
|
||||
|
||||
}, ()=> {
|
||||
this.loading = false
|
||||
});
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
<ion-content>
|
||||
<div class="content-container d-flex flex-column">
|
||||
<div class="title-content width-100 ">
|
||||
<div class="div-title">
|
||||
<div class="div-title padding">
|
||||
<ion-label class="title">{{publicationTitle}}</ion-label> <br>
|
||||
<i style="margin-top: -3px; font-size: 15px;" > Campos marcados com * são obrigatórios</i>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="overflow-y-auto">
|
||||
<div class="overflow-y-auto padding">
|
||||
<div *ngIf="publicationType!='1'" class="ion-item-container" [class.input-error]="Form?.get('Subject')?.invalid && validateFrom ">
|
||||
<ion-input autocomplete="on" autocorrect="on" spellcheck="true" [(ngModel)]="pub.Title" name="title" ngDefaultControl placeholder="Título*" ></ion-input>
|
||||
</div>
|
||||
@@ -25,41 +25,39 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div *ngIf="capturedImage != '' " class="ion-item-container-no-border">
|
||||
<ion-label class="attached-title">Fotografia Anexada </ion-label>
|
||||
<div *ngIf="capturedImage != '' " class="ion-item-container-no-border mb-20">
|
||||
<ion-label class="attached-title pb-10">Fotografia Anexada</ion-label>
|
||||
|
||||
<ion-item lines="none">
|
||||
<div class="d-flex justify-content-between">
|
||||
<div class="d-flex">
|
||||
<ion-thumbnail slot="start">
|
||||
|
||||
<ion-img [(ngModel)]="capturedImage" name="image" ngDefaultControl [src]="capturedImage" (click)="imageSize(capturedImage)" ></ion-img>
|
||||
<ion-row>
|
||||
<ion-col>
|
||||
<img src="" #imageElement/>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
|
||||
</ion-thumbnail>
|
||||
<ion-label>
|
||||
<ion-label class="pl-10">
|
||||
<p>{{capturedImageTitle}}</p>
|
||||
<p hidden>size</p>
|
||||
</ion-label>
|
||||
<div (click)="clear()">
|
||||
</div>
|
||||
|
||||
<div class="font-25" (click)="clear()">
|
||||
<ion-icon name="close"></ion-icon>
|
||||
</div>
|
||||
</ion-item>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="picture d-flex pb-5 hide-desktop" *ngIf="!( publication.FileBase64 == 'data:image/jpg;base64,null' || publication.FileBase64 == '' )">
|
||||
|
||||
<div class="picture d-flex pb-5 hide-desktop" *ngIf="!( publication.FileBase64 == 'data:image/jpg;base64,null' || publication.FileBase64 == '' ) && !capturedImage">
|
||||
<div class="post-img" *ngIf="publication.FileBase64">
|
||||
<img src="{{publication.FileBase64}}" alt="image" >
|
||||
</div>
|
||||
<div class="d-flex flex-column pl-10" *ngIf="publication.FileBase64">
|
||||
<div class="picture-file-name">{{publication.OriginalFileName}}.{{publication.FileExtension}}</div>
|
||||
<div class="size">75 Kb</div>
|
||||
<!-- <div class="size">75 Kb</div> -->
|
||||
</div>
|
||||
<div class="flex-grow-1 d-flex align-center justify-end" *ngIf="publication.FileBase64">
|
||||
<div style="color: red;">X</div>
|
||||
<div class="flex-grow-1 d-flex align-center justify-end font-25" *ngIf="publication.FileBase64" (click)="deletePublicationImage()">
|
||||
<ion-icon name="close"></ion-icon>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -55,9 +55,11 @@ ion-toolbar{
|
||||
background: #ffffff;
|
||||
height: 100%;
|
||||
box-shadow: 0px 0px 18px rgba(0, 0, 0, 0.6);
|
||||
padding: 25px 20px 0 20px;
|
||||
overflow: auto;
|
||||
}
|
||||
.padding{
|
||||
padding: 25px 20px 0 20px;
|
||||
}
|
||||
.title-content{
|
||||
margin: 0px auto;
|
||||
padding: 0 !important;
|
||||
|
||||
@@ -125,6 +125,7 @@ export class NewPublicationPage implements OnInit {
|
||||
this.convertBlobToBase64Worker.postMessage(blob);
|
||||
this.convertBlobToBase64Worker.onmessage = async (oEvent)=> {
|
||||
this.capturedImage = oEvent.data
|
||||
this.capturedImageTitle = 'foto'
|
||||
|
||||
}
|
||||
}
|
||||
@@ -186,6 +187,7 @@ export class NewPublicationPage implements OnInit {
|
||||
this.convertBlobToBase64Worker.postMessage(blob);
|
||||
this.convertBlobToBase64Worker.onmessage = async (oEvent)=> {
|
||||
this.capturedImage = oEvent.data
|
||||
this.capturedImageTitle = 'foto'
|
||||
|
||||
}
|
||||
|
||||
@@ -357,6 +359,7 @@ export class NewPublicationPage implements OnInit {
|
||||
}
|
||||
|
||||
clear() {
|
||||
this.capturedImageTitle = '';
|
||||
this.capturedImage = '';
|
||||
}
|
||||
|
||||
@@ -375,30 +378,6 @@ export class NewPublicationPage implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
/* async openGallery() {
|
||||
const modal = await this.modalController.create({
|
||||
component: GalleryPage,
|
||||
componentProps:{
|
||||
},
|
||||
cssClass: 'new-publication',
|
||||
backdropDismiss: false
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss();
|
||||
} */
|
||||
|
||||
/* async takePicture(){
|
||||
const image = await Plugins.Camera.getPhoto({
|
||||
quality: 100,
|
||||
allowEditing: false,
|
||||
resultType: CameraResultType.DataUrl,
|
||||
source: CameraSource.Camera
|
||||
});
|
||||
|
||||
|
||||
this.photo = this.sanitizer.bypassSecurityTrustResourceUrl(image && (image.dataUrl));
|
||||
} */
|
||||
|
||||
async selectImage() {
|
||||
const image = await Camera.getPhoto({
|
||||
quality: 90,
|
||||
@@ -453,26 +432,6 @@ export class NewPublicationPage implements OnInit {
|
||||
});
|
||||
await loading.present();
|
||||
|
||||
/* Filesystem.readdir({
|
||||
path: `${IMAGE_DIR}/${fileName}`,
|
||||
directory: Directory.Data,
|
||||
}).then(result => {
|
||||
|
||||
let lastphoto = result.files[result.files.length - 1]
|
||||
this.loadFileData(lastphoto);
|
||||
},
|
||||
async (err) => {
|
||||
|
||||
// Folder does not yet exists!
|
||||
await Filesystem.mkdir({
|
||||
path: IMAGE_DIR,
|
||||
directory: Directory.Data,
|
||||
recursive: true
|
||||
});
|
||||
}
|
||||
).then(_ => {
|
||||
loading.dismiss();
|
||||
}); */
|
||||
}
|
||||
|
||||
async loadFileData(fileName: string) {
|
||||
@@ -506,22 +465,6 @@ export class NewPublicationPage implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
/* compressImage() {
|
||||
let image = this.capturedImage;
|
||||
this.imageCompress.compressFile(image, orientation, 50, 50,).then(() => {
|
||||
|
||||
this.imgResultBeforeCompress = image;
|
||||
|
||||
|
||||
this.imageCompress.compressFile(image, orientation, 50, 50).then(
|
||||
result => {
|
||||
this.imgResultAfterCompress = result;
|
||||
|
||||
}
|
||||
);
|
||||
})
|
||||
} */
|
||||
|
||||
compressFile() {
|
||||
|
||||
//this.imgResultBeforeCompress = image;s
|
||||
@@ -538,5 +481,7 @@ export class NewPublicationPage implements OnInit {
|
||||
}
|
||||
|
||||
|
||||
|
||||
deletePublicationImage() {
|
||||
this.publication.FileBase64 = ""
|
||||
}
|
||||
}
|
||||
|
||||
@@ -199,7 +199,7 @@ export class ChatSystemService {
|
||||
}
|
||||
}
|
||||
|
||||
async getAllRooms () {
|
||||
async getAllRooms (callback:Function = () =>{} , roomIdCallback = "") {
|
||||
this.loadingWholeList = true
|
||||
var rooms;
|
||||
|
||||
@@ -295,8 +295,14 @@ export class ChatSystemService {
|
||||
rooms.result.update[index]['membersExcludeMe'] = users
|
||||
await this.prepareRoom(roomData);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(roomId == roomIdCallback) {
|
||||
callback()
|
||||
}
|
||||
|
||||
|
||||
index++;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
</ion-header>
|
||||
|
||||
<ion-content>
|
||||
|
||||
<ion-progress-bar class="position-absolute" type="indeterminate" *ngIf="loading"></ion-progress-bar>
|
||||
<ion-refresher name="refresher" slot="fixed" (ionRefresh)="doRefresh($event)">
|
||||
<!-- <ion-progress-bar type="indeterminate" *ngIf="showLoader"></ion-progress-bar> -->
|
||||
<ion-refresher-content>
|
||||
|
||||
@@ -21,6 +21,7 @@ export class ContactsPage implements OnInit {
|
||||
room:any;
|
||||
dm:any;
|
||||
sessionStore = SessionStore
|
||||
loading = false
|
||||
@Input() roomId: string;
|
||||
|
||||
@Output() openMessage:EventEmitter<any> = new EventEmitter<any>();
|
||||
@@ -67,10 +68,19 @@ export class ContactsPage implements OnInit {
|
||||
let body = {
|
||||
username: username,
|
||||
}
|
||||
|
||||
this.loading = true
|
||||
this.chatService.createRoom(body).subscribe(res => {
|
||||
this.ChatSystemService.getAllRooms();
|
||||
this.room = res['room'];
|
||||
|
||||
this.ChatSystemService.getAllRooms(() => {
|
||||
this.openMessage.emit(this.room._id);
|
||||
|
||||
this.loading = false
|
||||
}, this.room._id);
|
||||
|
||||
}, ()=> {
|
||||
this.loading = false
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,37 +31,45 @@
|
||||
|
||||
<!-- Captured -->
|
||||
<div class="ion-item-container-no-border" *ngIf="capturedImage">
|
||||
<ion-label class="attached-title">Fotografia Anexada</ion-label>
|
||||
<ion-item lines="none" >
|
||||
<ion-label class="attached-title pb-10">Fotografia Anexada</ion-label>
|
||||
<div class="d-flex justify-content-between">
|
||||
<div class="d-flex">
|
||||
<ion-thumbnail slot="start">
|
||||
<ion-img [(ngModel)]="capturedImage" name="image" ngDefaultControl [src]="capturedImage"></ion-img>
|
||||
</ion-thumbnail>
|
||||
|
||||
<ion-label>
|
||||
<ion-label class="pl-10">
|
||||
<p>{{capturedImageTitle}}</p>
|
||||
<p hidden>size</p>
|
||||
</ion-label>
|
||||
</div>
|
||||
<button class="btn-no-color" (click)="clear()">
|
||||
<ion-icon name="close"></ion-icon>
|
||||
</button>
|
||||
</ion-item>
|
||||
</div>
|
||||
|
||||
<!-- current image -->
|
||||
<div class="picture d-flex pb-5 hide-desktop" *ngIf="!( publication.FileBase64 == 'data:image/jpg;base64,null' || publication.FileBase64 == '' )" >
|
||||
<div class="post-img">
|
||||
<img src="{{publication.FileBase64}}" alt="image" >
|
||||
</div>
|
||||
<div class="d-flex flex-column pl-10">
|
||||
<div class="picture-file-name">{{publication.OriginalFileName}}.{{publication.FileExtension}}</div>
|
||||
<div class="size">75 Kb</div>
|
||||
</div>
|
||||
<div class="flex-grow-1 d-flex align-center justify-end">
|
||||
<div style="color: red;">X</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Current -->
|
||||
<div class="ion-item-container-no-border mb-20" *ngIf="!( publication.FileBase64 == 'data:image/jpg;base64,null' || publication.FileBase64 == '' ) && !capturedImage">
|
||||
<!-- <ion-label class="attached-title pb-10">Fotografia Anexada</ion-label> -->
|
||||
<div class="d-flex justify-content-between">
|
||||
<div class="d-flex">
|
||||
<ion-thumbnail slot="start">
|
||||
<ion-img [(ngModel)]="publication.FileBase64" name="image" ngDefaultControl [src]="publication.FileBase64"></ion-img>
|
||||
</ion-thumbnail>
|
||||
|
||||
<ion-label class="pl-10">
|
||||
<p>{{publication.OriginalFileName}}.{{publication.FileExtension}}</p>
|
||||
<p hidden>size</p>
|
||||
</ion-label>
|
||||
</div>
|
||||
<button class="btn-no-color" (click)="deletePublicationImage()" >
|
||||
<ion-icon name="close"></ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="ion-item-container-no-border hide-desktop">
|
||||
<ion-label (click)="takePicture()">
|
||||
|
||||
@@ -93,7 +93,7 @@ export class NewPublicationPage implements OnInit {
|
||||
});
|
||||
|
||||
this.capturedImage = 'data:image/jpeg;base64,' +capturedImage.base64String;
|
||||
this.capturedImageTitle = capturedImage.path;
|
||||
this.capturedImageTitle = 'foto';
|
||||
//
|
||||
}
|
||||
|
||||
@@ -105,7 +105,7 @@ export class NewPublicationPage implements OnInit {
|
||||
});
|
||||
|
||||
this.capturedImage = 'data:image/jpeg;base64,' +capturedImage.base64String;
|
||||
this.capturedImageTitle = capturedImage.path;
|
||||
this.capturedImageTitle = 'foto';
|
||||
}
|
||||
|
||||
|
||||
@@ -273,9 +273,14 @@ export class NewPublicationPage implements OnInit {
|
||||
}
|
||||
|
||||
clear() {
|
||||
this.capturedImageTitle = '';
|
||||
this.capturedImage = '';
|
||||
}
|
||||
|
||||
deletePublicationImage() {
|
||||
this.publication.FileBase64 = ""
|
||||
}
|
||||
|
||||
setTitle(){
|
||||
if(this.publicationType == '1') {
|
||||
this.publicationTitle = 'Nova Publicação Rápida';
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
export let versionData = {
|
||||
"shortSHA": "3dae0db03",
|
||||
"SHA": "3dae0db03e713f2a8fa728ca8f12cb59195075ef",
|
||||
"shortSHA": "4f4381a6d",
|
||||
"SHA": "4f4381a6d7f9fb23cc31a0a57d4d1bcce86bb204",
|
||||
"branch": "developer",
|
||||
"lastCommitAuthor": "'Peter Maquiran'",
|
||||
"lastCommitTime": "'Mon Aug 14 21:26:23 2023 +0100'",
|
||||
"lastCommitTime": "'Mon Aug 14 21:43:52 2023 +0100'",
|
||||
"lastCommitMessage": "fix errors",
|
||||
"lastCommitNumber": "5156",
|
||||
"lastCommitNumber": "5157",
|
||||
"change": "",
|
||||
"changeStatus": "On branch developer\nChanges to be committed:\n (use \"git restore --staged <file>...\" to unstage)\n\tmodified: src/app/shared/popover/event-details-documents-options/event-details-documents-options.page.html",
|
||||
"changeStatus": "On branch developer\nChanges to be committed:\n (use \"git restore --staged <file>...\" to unstage)\n\tmodified: src/app/pages/chat/messages/contacts/contacts.page.ts\n\tmodified: src/app/pages/publications/new-publication/new-publication.page.html\n\tmodified: src/app/pages/publications/new-publication/new-publication.page.scss\n\tmodified: src/app/pages/publications/new-publication/new-publication.page.ts\n\tmodified: src/app/services/chat/chat-system.service.ts\n\tmodified: src/app/shared/chat/messages/contacts/contacts.page.html\n\tmodified: src/app/shared/chat/messages/contacts/contacts.page.ts\n\tmodified: src/app/shared/publication/new-publication/new-publication.page.html\n\tmodified: src/app/shared/publication/new-publication/new-publication.page.ts\n\tmodified: version/git-version.ts",
|
||||
"changeAuthor": "peter.maquiran"
|
||||
}
|
||||
Reference in New Issue
Block a user