mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
improve
This commit is contained in:
@@ -45,11 +45,6 @@
|
||||
|
||||
|
||||
<ion-content>
|
||||
<!-- <ion-refresher name="refresher" slot="fixed" (ionRefresh)="doRefresh($event)">
|
||||
<ion-progress-bar type="indeterminate" *ngIf="showLoader"></ion-progress-bar>
|
||||
<ion-refresher-content>
|
||||
</ion-refresher-content>
|
||||
</ion-refresher> -->
|
||||
|
||||
<div (click)="handleClick()" class="messages overflow-y-auto" #scrollMe>
|
||||
<div class="welcome-text">
|
||||
@@ -78,29 +73,6 @@
|
||||
</div>
|
||||
|
||||
|
||||
<!-- <div class='message-item incoming-{{msg.u.username!=sessionStore.user.UserName}} max-width-45' *ngIf="msg.msg ==''">
|
||||
<div *ngIf="msg.file.type == 'application/img'">
|
||||
<div class="message-item-options d-flex justify-content-end">
|
||||
</div>
|
||||
<div class="title">
|
||||
<ion-label>{{msg.u.name ?? ""}}</ion-label>
|
||||
<span class="time">{{msg.duration}}</span>
|
||||
</div>
|
||||
<div>
|
||||
<ion-label>{{msg.msg}}</ion-label>
|
||||
<div *ngIf="msg.file" class="message-attachments">
|
||||
<div>
|
||||
<div (click)="openPreview(msg)">
|
||||
File
|
||||
<img *ngIf="msg.attachments[0].image_url" src="{{msg.attachments[0].image_url}}" alt="image">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{last ? scrollToBottom() : ''}}
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div *ngIf="msg.file && msg.delate == false">
|
||||
<div class='message-container incoming-{{msg.u.username!=sessionStore.user.UserName}}' class='message-container incoming-{{msg.u.username!=sessionStore.user.UserName}}' *ngIf="msg.t != 'r' && msg.t != 'ul' && msg.t != 'ru' && msg.file.type != 'application/meeting'" (press)="handlePress(msg._id)">
|
||||
<div class="title">
|
||||
|
||||
@@ -159,14 +159,8 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
this.wsChatMethodsService.getUserOfRoom(this.roomId).then((value) => {
|
||||
|
||||
})
|
||||
//this.loadFiles();
|
||||
VoiceRecorder.requestAudioRecordingPermission();
|
||||
this.getChatMembers();
|
||||
/* Filesystem.mkdir({
|
||||
path: IMAGE_DIR,
|
||||
directory: Directory.Data,
|
||||
recursive: true
|
||||
}); */
|
||||
}
|
||||
|
||||
ngAfterViewInit() {
|
||||
@@ -185,9 +179,6 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
onEnd: ev => {
|
||||
Haptics.impact({ style: ImpactStyle.Light })
|
||||
this.stopRecording();
|
||||
/* setTimeout(() => {
|
||||
this.loadFiles();
|
||||
}, 500); */
|
||||
}
|
||||
}, true);
|
||||
longpress.enable();
|
||||
|
||||
@@ -2,7 +2,7 @@ import { Component, OnInit } from '@angular/core';
|
||||
import { ModalController, NavParams, PickerController, PopoverController } from '@ionic/angular';
|
||||
import { GroupDurationPage } from 'src/app/shared/popover/group-duration/group-duration.page';
|
||||
import { GroupContactsPage } from '../group-messages/group-contacts/group-contacts.page';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { ThemeService } from 'src/app/services/theme.service';
|
||||
import { ChatService } from 'src/app/services/chat.service';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { WsChatMethodsService } from 'src/app/services/chat/ws-chat-methods.service';
|
||||
@@ -35,8 +35,7 @@ export class NewGroupPage implements OnInit {
|
||||
private processesService: ProcessesService,
|
||||
public wsChatMethodsService: WsChatMethodsService,
|
||||
private authService: AuthService,
|
||||
)
|
||||
{
|
||||
) {
|
||||
this.loggedUserChat = authService.ValidatedUserChat['data'];
|
||||
this.isGroupCreated = false;
|
||||
this.groupName = this.navParams.get('name');
|
||||
@@ -71,9 +70,9 @@ export class NewGroupPage implements OnInit {
|
||||
let customFields = {}
|
||||
let res:any;
|
||||
|
||||
if(this.thedate){
|
||||
if(this.thedate) {
|
||||
let customFields = {
|
||||
"countDownDate":this.thedate
|
||||
"countDownDate": this.thedate
|
||||
}
|
||||
res = await this.wsChatMethodsService.createPrivateRoom(name, SessionStore.user.UserName, customFields);
|
||||
|
||||
@@ -85,13 +84,14 @@ export class NewGroupPage implements OnInit {
|
||||
|
||||
this.isGroupCreated = true;
|
||||
this.addContacts(res.result);
|
||||
|
||||
this.wsChatMethodsService.subscribeToRoomUpdate(res.result.rid, res.result);
|
||||
console.log(res.result.rid)
|
||||
|
||||
setTimeout(() => {
|
||||
this.wsChatMethodsService.subscribeToRoomUpdate(res.result.rid, res.result);
|
||||
}, 10)
|
||||
|
||||
}
|
||||
|
||||
async addContacts(room){
|
||||
async addContacts(room) {
|
||||
this.close();
|
||||
|
||||
let name = this.groupName.split(' ').join('-');
|
||||
@@ -130,7 +130,7 @@ export class NewGroupPage implements OnInit {
|
||||
{
|
||||
text: 'Ok',
|
||||
cssClass: 'btn-cancel',
|
||||
handler:(value:any)=>{
|
||||
handler:(value:any) => {
|
||||
|
||||
let now = new Date();
|
||||
this.thedate = new Date(now.getFullYear(), now.getMonth(), now.getDate() + value.days.value, now.getHours() + value.hours.value, now.getMinutes() + value.minutes.value, now.getSeconds(), now.getMilliseconds());
|
||||
@@ -142,9 +142,9 @@ export class NewGroupPage implements OnInit {
|
||||
]
|
||||
|
||||
if(value.days.value != null && value.hours.value != null && value.minutes.value != null){
|
||||
if(value.days.value > 0){
|
||||
if(value.days.value == 1){
|
||||
if(value.hours.value == 1){
|
||||
if(value.days.value > 0) {
|
||||
if(value.days.value == 1) {
|
||||
if(value.hours.value == 1) {
|
||||
this.displayDuration = value.days.value + " day " +
|
||||
value.hours.value + " hora " +
|
||||
value.minutes.value + " minutos";
|
||||
|
||||
Reference in New Issue
Block a user