mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
improve
This commit is contained in:
@@ -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.openMessage.emit(this.room._id);
|
||||
|
||||
this.ChatSystemService.getAllRooms(() => {
|
||||
this.openMessage.emit(this.room._id);
|
||||
|
||||
this.loading = false
|
||||
}, this.room._id);
|
||||
|
||||
}, ()=> {
|
||||
this.loading = false
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,39 +29,47 @@
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Captured -->
|
||||
<!-- Captured -->
|
||||
<div class="ion-item-container-no-border" *ngIf="capturedImage">
|
||||
<ion-label class="attached-title">Fotografia Anexada</ion-label>
|
||||
<ion-item lines="none" >
|
||||
<ion-thumbnail slot="start">
|
||||
<ion-img [(ngModel)]="capturedImage" name="image" ngDefaultControl [src]="capturedImage"></ion-img>
|
||||
</ion-thumbnail>
|
||||
|
||||
<ion-label>
|
||||
<p>{{capturedImageTitle}}</p>
|
||||
<p hidden>size</p>
|
||||
</ion-label>
|
||||
<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 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>
|
||||
</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>
|
||||
|
||||
<!-- 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>
|
||||
|
||||
|
||||
|
||||
<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';
|
||||
}
|
||||
|
||||
|
||||
@@ -272,10 +272,15 @@ export class NewPublicationPage implements OnInit {
|
||||
this.goBack();
|
||||
}
|
||||
|
||||
clear(){
|
||||
clear() {
|
||||
this.capturedImageTitle = '';
|
||||
this.capturedImage = '';
|
||||
}
|
||||
|
||||
deletePublicationImage() {
|
||||
this.publication.FileBase64 = ""
|
||||
}
|
||||
|
||||
setTitle(){
|
||||
if(this.publicationType == '1') {
|
||||
this.publicationTitle = 'Nova Publicação Rápida';
|
||||
|
||||
Reference in New Issue
Block a user