This commit is contained in:
Eudes Inácio
2022-02-02 10:19:09 +01:00
13 changed files with 26 additions and 31 deletions
+1 -1
View File
@@ -228,7 +228,7 @@
<div class="calendar-title-container px-20 d-none d-md-flex" *ngIf="loggeduser.Profile == 'MDGPR'">
<div class="calendar-title-description flex-grow-1 text-grey d-flex justify-center align-center">
<div>Meu Calendário</div>
<div>Calendário do MDGPR</div>
</div>
<div class="calendar-title-description text-black align-center">
<div class="flex-grow-1 text-grey d-flex justify-center align-center">
@@ -32,7 +32,7 @@
Calendário do Presidente da República
</mat-option>
<mat-option value="MDGPR">
Meu calendário
Calendário do MDGPR
</mat-option>
</mat-select>
@@ -16,7 +16,7 @@
<ion-toolbar>
<ion-segment [(ngModel)]="segment" (ionChange)="segmentChanged($event)">
<ion-segment-button value="MDGPR">
Meu calendário
Calendário do MDGPR
</ion-segment-button>
<ion-segment-button value="PR">
Presidente da República
@@ -1,5 +1,4 @@
<ion-header class="ion-no-border">
<app-header></app-header>
</ion-header>
<ion-content>
@@ -1,9 +1,8 @@
:host{
}
ion-content{
--background: transparent;
transform: translate3d(0, 5px, 0);
--border-radius: 30px;
}
ion-footer{
@@ -89,4 +88,4 @@
.post-description{
margin: 0 auto;
margin-bottom: 35px;
}
}
+10 -9
View File
@@ -84,20 +84,21 @@ export class RoomService {
ChatMessage = this.fix_updatedAt(ChatMessage)
console.log('recivemessage', ChatMessage)
const message = this.prepareMessage(ChatMessage)
if(message._updatedAt == undefined){
message._updatedAt = new Date().getTime();
}
this.lastMessage = message
if (message.t == 'r') { this.name = message.msg }
this.calDateDuration(ChatMessage._updatedAt)
this.calDateDuration(message._updatedAt)
this.messages.push(message)
setTimeout(() => {
this.scrollDown()
}, 100)
//this.sortService.sortDate(this.messages, '')
if(SessionStore.user.RochetChatUser != ChatMessage.u.username) {
this.NativeNotificationService.sendNotificationChat({
message: message.msg,
@@ -182,7 +183,7 @@ export class RoomService {
if(message._id == id) {
messages.splice(index, 1)
}
})
this.storage.set('chatmsg' + this.id, messages).then((value) => {
@@ -250,12 +251,12 @@ export class RoomService {
open() {
// this.typing(this.message)
}
leave(rid?) {
this.WsChatService.leaveRoom(this.id)
}
isJson(str) {
try {
JSON.parse(str);
@@ -341,10 +342,10 @@ export class RoomService {
private fix_updatedAt(message) {
if (message.result) {
console.log('FIX UPDATE ', message.result)
//console.log('FIX UPDATE ', message.result)
message.result._updatedAt = message.result._updatedAt['$date']
} else {
// console.log('FIX UPDATE 11', message)
//console.log('FIX UPDATE 11', message)
message._updatedAt = message._updatedAt['$date']
}
return message
+2 -8
View File
@@ -299,10 +299,10 @@ export class FileService {
loader.remove();
this.toastService.badRequest("Não foi possível adicionar a fotografia!");
});
});
}
});
}
@@ -386,12 +386,6 @@ export class FileService {
accept: ['image/apng', 'image/jpeg', 'image/png']
})
setInterval(() => {
console.log(input.value)
}, 550)
input.onchange = async () => {
//alert('Onchange AQUI')
@@ -11,7 +11,7 @@
<ion-toolbar>
<ion-segment [(ngModel)]="segment" (ionChange)="segmentChanged($event)">
<ion-segment-button value="MDGPR">
Meu calendário
Calendário do MDGPR
</ion-segment-button>
<ion-segment-button value="PR">
Presidente da República
@@ -43,7 +43,7 @@
Calendário do Presidente da República
</mat-option>
<mat-option value="MDGPR">
Meu calendário
Calendário do MDGPR
</mat-option>
</mat-select>
@@ -68,7 +68,7 @@
</div>
<div class="title">
<ion-label>{{msg.u.name}}</ion-label>
<span class="time">{{showDateDuration(msg._updatedAt)}}</span>
<span class="time">{{showDateDuration(msg.duration)}}</span>
</div>
<div>
<div *ngIf="msg.attachments" class="message-attachments">
@@ -10,7 +10,7 @@
<ion-toolbar>
<ion-segment [(ngModel)]="segment" (ionChange)="segmentChanged($event)">
<ion-segment-button value="MDGPR">
Meu calendário
Calendário do MDGPR
</ion-segment-button>
<ion-segment-button value="PR">
Presidente da República
@@ -66,7 +66,9 @@ export class ChatPopoverPage implements OnInit {
});
await modal.present();
modal.onDidDismiss().then((res)=>{
this.leaveGroup();
if(res.data == 'success'){
this.leaveGroup();
}
});
}