chat retry

This commit is contained in:
Peter Maquiran
2022-12-26 15:41:11 +01:00
parent b83fff6fbd
commit 0a3fd0ec8b
79 changed files with 223 additions and 1025 deletions
@@ -63,10 +63,11 @@
<ion-label class="float-status-all float-status" *ngIf="msg.u.username==sessionStore.user.UserName">
<ion-icon *ngIf="msg.messageSend == false" src="assets/images/clock-regular.svg"></ion-icon>
<ion-icon *ngIf="msg.messageSend == false && !msg.manualRetry" src="assets/images/clock-regular.svg"></ion-icon>
<ion-icon *ngIf="msg.messageSend == true && msg.received.length == 0" src="assets/images/check-solid.svg"></ion-icon>
<ion-icon *ngIf="msg.messageSend && msg.received.length >= 1 && msg.viewed.length == 0" src="assets/images/check-double-solid.svg"></ion-icon>
<ion-icon *ngIf="msg.viewed.length >= 1" src="assets/images/check-double-solid -viewed.svg"></ion-icon>
<div *ngIf="msg.manualRetry" class="try">Tentar</div>
</ion-label>
{{last ? scrollToBottom() : ''}}
</div>
@@ -101,10 +102,11 @@
<img *ngIf="msg.attachments[0].image_url" src="{{msg.attachments[0].image_url}}" alt="image" >
<ion-icon *ngIf="msg.attachments[0].image_url == null" name="download-outline"></ion-icon>
<ion-label class="float-status-all float-status" *ngIf="msg.u.username==sessionStore.user.UserName">
<ion-icon *ngIf="msg.messageSend == false" src="assets/images/clock-regular.svg"></ion-icon>
<ion-icon *ngIf="msg.messageSend == false && !msg.manualRetry" src="assets/images/clock-regular.svg"></ion-icon>
<ion-icon *ngIf="msg.messageSend == true && msg.received.length == 0" src="assets/images/check-solid.svg"></ion-icon>
<ion-icon *ngIf="msg.messageSend && msg.received.length >= 1 && msg.viewed.length == 0" src="assets/images/check-double-solid.svg"></ion-icon>
<ion-icon *ngIf="msg.viewed.length >= 1" src="assets/images/check-double-solid -viewed.svg"></ion-icon>
<div *ngIf="msg.manualRetry" class="try">Tentar</div>
</ion-label>
</div>
<div *ngIf="msg.file.type != 'application/img'">
@@ -158,6 +160,7 @@
<ion-icon *ngIf="msg.messageSend == true && msg.received.length == 0" src="assets/images/check-solid.svg"></ion-icon>
<ion-icon *ngIf="msg.messageSend && msg.received.length >= 1 && msg.viewed.length == 0" src="assets/images/check-double-solid.svg"></ion-icon>
<ion-icon *ngIf="msg.viewed.length >= 1" src="assets/images/check-double-solid -viewed.svg"></ion-icon>
<div *ngIf="msg.manualRetry" class="try">Tentar</div>
</ion-label>
</div>
</div>
@@ -387,3 +387,11 @@
.float-status-all {
font-size: 10pt !important;
}
.try {
color: red;
background: #f3414159;
padding: 6px;
border-radius: 10px;
cursor: pointer;
}
@@ -60,10 +60,11 @@
<ion-label class="float-status-all float-status" *ngIf="msg.u.username==sessionStore.user.UserName">
<ion-icon *ngIf="msg.messageSend == false" src="assets/images/clock-regular.svg"></ion-icon>
<ion-icon *ngIf="msg.messageSend == false && !msg.manualRetry" src="assets/images/clock-regular.svg"></ion-icon>
<ion-icon *ngIf="msg.messageSend == true && msg.received.length == 0" src="assets/images/check-solid.svg"></ion-icon>
<ion-icon *ngIf="msg.messageSend && msg.received.length >= 1 && msg.viewed.length == 0" src="assets/images/check-double-solid.svg"></ion-icon>
<ion-icon *ngIf="msg.viewed.length >= 1" src="assets/images/check-double-solid -viewed.svg"></ion-icon>
<div *ngIf="msg.manualRetry" class="try">Tentar</div>
</ion-label>
</div>
{{last ? scrollToBottom() : ''}}
@@ -96,10 +97,11 @@
<img *ngIf="msg.attachments[0].image_url" src="{{msg.attachments[0].image_url}}" alt="image">
<ion-label class="float-status-all float-status" *ngIf="msg.u.username==sessionStore.user.UserName">
<ion-icon *ngIf="msg.messageSend == false" src="assets/images/clock-regular.svg"></ion-icon>
<ion-icon *ngIf="msg.messageSend == false && !msg.manualRetry" src="assets/images/clock-regular.svg"></ion-icon>
<ion-icon *ngIf="msg.messageSend == true && msg.received.length == 0" src="assets/images/check-solid.svg"></ion-icon>
<ion-icon *ngIf="msg.messageSend && msg.received.length >= 1 && msg.viewed.length == 0" src="assets/images/check-double-solid.svg"></ion-icon>
<ion-icon *ngIf="msg.viewed.length >= 1" src="assets/images/check-double-solid -viewed.svg"></ion-icon>
<div *ngIf="msg.manualRetry" class="try">Tentar</div>
</ion-label>
</div>
@@ -161,10 +163,11 @@
<ion-icon *ngIf="msg.messageSend == false" src="assets/images/clock-regular.svg"></ion-icon>
<!-- <span *ngIf="msg.messageSend == false" >{{ msg.sendAttempt }}</span> -->
<ion-icon *ngIf="msg.messageSend == false && !msg.manualRetry" src="assets/images/clock-regular.svg"></ion-icon>
<ion-icon *ngIf="msg.messageSend == true && msg.received.length == 0" src="assets/images/check-solid.svg"></ion-icon>
<ion-icon *ngIf="msg.messageSend && msg.received.length >= 1 && msg.viewed.length == 0" src="assets/images/check-double-solid.svg"></ion-icon>
<ion-icon *ngIf="msg.viewed.length >= 1" src="assets/images/check-double-solid -viewed.svg"></ion-icon>
<div *ngIf="msg.manualRetry" class="try">Tentar</div>
</ion-label>
</div>
@@ -356,3 +356,11 @@ button::-moz-focus-inner {
.float-status-all {
font-size: 10pt !important;
}
.try {
color: red;
background: #f3414159;
padding: 6px;
border-radius: 10px;
cursor: pointer;
}
+5 -3
View File
@@ -280,9 +280,11 @@ export class EventsPage implements OnInit {
}
})
this.listToPresent = todayEvents
this.totalEvent = this.listToPresent.length
this.currentEvent = this.listToPresent[0].Subject
this.currentHoursMinutes = this.listToPresent[0].StartDate
if(this.listToPresent?.length) {
this.totalEvent = this.listToPresent.length
this.currentEvent = this.listToPresent[0].Subject
this.currentHoursMinutes = this.listToPresent[0].StartDate
}
//
})
+9 -22
View File
@@ -16,7 +16,7 @@ import { RochetChatConnectorService } from 'src/app/services/chat/rochet-chat-co
import { ChatSystemService } from 'src/app/services/chat/chat-system.service';
import { ChatService } from 'src/app/services/chat.service';
import { Platform } from '@ionic/angular';
import { FirstEnterService } from '../../services/first-enter.service';
@Component({
selector: 'app-login',
@@ -52,10 +52,13 @@ export class LoginPage implements OnInit {
public ChatSystemService: ChatSystemService,
private ChatService: ChatService,
private platform: Platform,
) {}
private FirstEnterService: FirstEnterService
) {
console.log('constructor')
}
ngOnInit() {
console.log('ngOngInit')
}
togglePassword() {
@@ -68,7 +71,6 @@ export class LoginPage implements OnInit {
}
}
//
//Function to validade the login inputs
validateUsername() {
@@ -134,7 +136,7 @@ export class LoginPage implements OnInit {
}
this.changeProfileService.runLogin();
this.getToken();
// this.getToken();
SessionStore.setInativity(true);
this.goback();
@@ -160,7 +162,7 @@ export class LoginPage implements OnInit {
this.ChatSystemService.loadChat();
}
this.getToken();
// this.getToken();
if(!this.platform.is('desktop') && !this.platform.is('mobileweb')) {
if(this.sessionStore.hasPin) {
@@ -196,22 +198,7 @@ export class LoginPage implements OnInit {
if(pathName) {
this.router.navigate([pathName]);
} else {
if(this.p.userPermission(this.p.permissionList.Agenda.access) || this.p.userPermission(this.p.permissionList.Gabinete.access)){
//When user has got access to Agenda but does not have their own calendar, goes to Agenda
if(this.p.userPermission(this.p.permissionList.Agenda.access) && SessionStore.user.OwnerCalendars.length == 0){
this.router.navigate(['/home/agenda']);
}
else{
this.router.navigate(['/home/events']);
}
}
//If user has access permission to both Chat and Action, goes to Chat by default.
else if((this.p.userPermission(this.p.permissionList.Chat.access) && this.p.userPermission(this.p.permissionList.Actions.access)) || this.p.userPermission(this.p.permissionList.Chat.access)){
this.router.navigate(['/home/chat']);
}
else if(this.p.userPermission(this.p.permissionList.Actions.access)){
this.router.navigate(['/home/publications']);
}
this.FirstEnterService.enter()
}
}