rename files

This commit is contained in:
Peter Maquiran
2022-09-30 15:13:36 +01:00
parent 64ad7bbc7f
commit 12cf5831a8
36 changed files with 256 additions and 315 deletions
@@ -29,7 +29,7 @@
<div class="main-content">
<ion-virtual-scroll [items]="WsChatMethodsService.users | filter:textSearch: 'name'" approxItemHeight="70px" [headerFn]="separateLetter">
<ion-virtual-scroll [items]="ChatSystemService.users | filter:textSearch: 'name'" approxItemHeight="70px" [headerFn]="separateLetter">
<div class="item-divider" *virtualHeader="let header">
<ion-label>{{header}}</ion-label>
@@ -5,7 +5,7 @@ import { AuthService } from 'src/app/services/auth.service';
import { ChatService } from 'src/app/services/chat.service';
import { MessagesPage } from '../messages.page';
import { ThemeService } from 'src/app/services/theme.service'
import { WsChatMethodsService} from 'src/app/services/chat/ws-chat-methods.service'
import { ChatSystemService } from 'src/app/services/chat/chat-system.service'
import { SessionStore } from 'src/app/store/session.service';
@Component({
@@ -34,7 +34,7 @@ export class ContactsPage implements OnInit {
private chatService: ChatService,
private authService: AuthService,
public ThemeService: ThemeService,
public WsChatMethodsService: WsChatMethodsService
public ChatSystemService: ChatSystemService
) {
this.loggedUser = authService.ValidatedUserChat['data'];
this.textSearch="";
@@ -124,7 +124,7 @@ export class ContactsPage implements OnInit {
this.room = res['room'];
this.openMessagesModal(this.room._id);
this.WsChatMethodsService.getAllRooms()
this.ChatSystemService.getAllRooms()
});
}
@@ -3,7 +3,7 @@
<div class="main-header">
<div class="header-top">
<div class="middle">
<ion-label class="title">{{ this.wsChatMethodsService.getDmRoom(this.roomId).name }}</ion-label>
<ion-label class="title">{{ this.ChatSystemService.getDmRoom(this.roomId).name }}</ion-label>
<button (click)="ChatMessageDebuggingPage()">Dev</button>
<!-- <span><ion-icon class="{{users.status}}" name="ellipse"></ion-icon></span> -->
</div>
@@ -38,7 +38,7 @@
<ion-list>
<div class="messages-list-item-wrapper container-width-100"
*ngFor="let msg of wsChatMethodsService.getDmRoom(roomId).messages; index as i; let last = last">
*ngFor="let msg of ChatSystemService.getDmRoom(roomId).messages; index as i; let last = last">
<div class='message-item incoming-{{msg.u.username!=sessionStore.user.UserName}} max-width-45' *ngIf="msg.msg !=''">
<div class="message-item-options d-flex justify-content-end">
@@ -218,11 +218,11 @@
</ion-content>
<ion-footer (click)="wsChatMethodsService.getDmRoom(roomId).sendReadMessage()">
<ion-footer (click)="ChatSystemService.getDmRoom(roomId).sendReadMessage()">
<div class="typing" *ngIf="wsChatMethodsService.getDmRoom(roomId).otherUserType == true" >
<div class="typing" *ngIf="ChatSystemService.getDmRoom(roomId).otherUserType == true" >
<ngx-letters-avatar *ngIf="showAvatar"
[avatarName]= "wsChatMethodsService.getDmRoom(roomId).name"
[avatarName]= "ChatSystemService.getDmRoom(roomId).name"
[width]="30"
[circular]="true"
fontFamily="Roboto"></ngx-letters-avatar>
@@ -268,7 +268,7 @@
<div class="width-100">
<div *ngIf="!recording && !lastAudioRecorded" class="type-message">
<ion-textarea *ngIf="allowTyping" (keyup.enter)="sendMessage()" clearOnEdit="true" placeholder="Escrever uma mensagem" class="message-input" rows="1" [(ngModel)]="wsChatMethodsService.getDmRoom(roomId).message" (ionChange)="wsChatMethodsService.getDmRoom(roomId).sendTyping()"></ion-textarea>
<ion-textarea *ngIf="allowTyping" (keyup.enter)="sendMessage()" clearOnEdit="true" placeholder="Escrever uma mensagem" class="message-input" rows="1" [(ngModel)]="ChatSystemService.getDmRoom(roomId).message" (ionChange)="ChatSystemService.getDmRoom(roomId).sendTyping()"></ion-textarea>
</div>
<div *ngIf="recording" class="d-flex align-items-center justify-content-center">
<button (click)="stopRecording()" class="btn-no-color d-flex align-items-center justify-content-center">
@@ -278,16 +278,16 @@
</div>
<div>
<button #recordbtn *ngIf="!wsChatMethodsService.getDmRoom(roomId).message && !lastAudioRecorded" (click)="startRecording()" class="btn-no-color">
<button #recordbtn *ngIf="!ChatSystemService.getDmRoom(roomId).message && !lastAudioRecorded" (click)="startRecording()" class="btn-no-color">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="chat-icon-send" src="assets/icon/theme/default/icons-chat-record-audio.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="chat-icon-send" src="assets/icon/theme/gov/icons-chat-record-audio.svg"></ion-icon>
<!-- <ion-icon *ngIf="audioPermissionStatus != 'granted' " class="chat-icon-send" src="assets/icon/theme/gov/icons-chat-record-audio-disable.svg"></ion-icon> -->
</button>
<button *ngIf="wsChatMethodsService.getDmRoom(roomId).message" class="btn-no-color" (click)="sendMessage()">
<button *ngIf="ChatSystemService.getDmRoom(roomId).message" class="btn-no-color" (click)="sendMessage()">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="chat-icon-send" src="assets/icon/theme/gov/icons-chat-send.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="chat-icon-send" src="assets/icon/theme/gov/icons-chat-send.svg"></ion-icon>
</button>
<button *ngIf="!wsChatMethodsService.getDmRoom(roomId).message && lastAudioRecorded" class="btn-no-color" (click)="sendAudio(lastAudioRecorded)">
<button *ngIf="!ChatSystemService.getDmRoom(roomId).message && lastAudioRecorded" class="btn-no-color" (click)="sendAudio(lastAudioRecorded)">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="chat-icon-send" src="assets/icon/theme/gov/icons-chat-send.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="chat-icon-send" src="assets/icon/theme/gov/icons-chat-send.svg"></ion-icon>
</button>
+20 -20
View File
@@ -15,8 +15,8 @@ import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.pag
import { ThemeService } from 'src/app/services/theme.service'
import { ViewEventPage } from 'src/app/modals/view-event/view-event.page';
import { Storage } from '@ionic/storage';
import { WsChatMethodsService } from 'src/app/services/chat/ws-chat-methods.service'
import { WsChatService } from 'src/app/services/chat/ws-chat.service'
import { ChatSystemService } from 'src/app/services/chat/chat-system.service'
import { RochetChatConnectorService } from 'src/app/services/chat/rochet-chat-connector.service'
import { MessageService } from 'src/app/services/chat/message.service';
import { AttachmentsService } from 'src/app/services/attachments.service';
import { CameraService } from 'src/app/services/camera.service';
@@ -116,8 +116,8 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
private gestureController: GestureController,
public ThemeService: ThemeService,
private storage: Storage,
public wsChatMethodsService: WsChatMethodsService,
public WsChatService: WsChatService,
public ChatSystemService: ChatSystemService,
public RochetChatConnectorService: RochetChatConnectorService,
private AttachmentsService: AttachmentsService,
private CameraService: CameraService,
private sanitiser: DomSanitizer,
@@ -131,12 +131,12 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
ngOnChanges(changes: SimpleChanges): void {
this.wsChatMethodsService.getAllRooms();
this.wsChatMethodsService.getDmRoom(this.roomId).loadHistory({})
this.ChatSystemService.getAllRooms();
this.ChatSystemService.getDmRoom(this.roomId).loadHistory({})
this.wsChatMethodsService.getDmRoom(this.roomId).scrollDown = this.scrollToBottomClicked
this.ChatSystemService.getDmRoom(this.roomId).scrollDown = this.scrollToBottomClicked
this.wsChatMethodsService.openRoom(this.roomId)
this.ChatSystemService.openRoom(this.roomId)
this.showAvatar = false
@@ -176,7 +176,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
}
ngOnInit() {
this.wsChatMethodsService.getAllRooms();
this.ChatSystemService.getAllRooms();
this.chatService.refreshtoken();
this.scrollToBottom();
this.getChatMembers();
@@ -406,7 +406,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
}
sendMessage() {
this.wsChatMethodsService.getDmRoom(this.roomId).send({})
this.ChatSystemService.getDmRoom(this.roomId).send({})
}
@@ -430,7 +430,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
const formData = new FormData();
formData.append("blobFile", blob);
this.wsChatMethodsService.getDmRoom(roomId).send({
this.ChatSystemService.getDmRoom(roomId).send({
file: {
"type": "application/audio",
"msDuration": audioFile.value.msDuration,
@@ -450,7 +450,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
deleteMessage(msgId: string, msg: MessageService) {
this.wsChatMethodsService.getDmRoom(this.roomId).sendDeleteRequest(msgId)
this.ChatSystemService.getDmRoom(this.roomId).sendDeleteRequest(msgId)
}
base64toBlob(base64Data, contentType) {
@@ -534,8 +534,8 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
// this.showLoader = false;
// });
this.members = this.wsChatMethodsService.getDmRoom(this.roomId).members
this.dmUsers = this.wsChatMethodsService.getDmRoom(this.roomId).membersExcludeMe
this.members = this.ChatSystemService.getDmRoom(this.roomId).members
this.dmUsers = this.ChatSystemService.getDmRoom(this.roomId).membersExcludeMe
}
async openMessagesOptions(ev: any) {
@@ -669,7 +669,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
const formData = new FormData();
formData.append("blobFile", blob);
this.wsChatMethodsService.getDmRoom(roomId).send({
this.ChatSystemService.getDmRoom(roomId).send({
file: {
"type": "application/img",
"guid": '',
@@ -702,7 +702,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
this.wsChatMethodsService.getDmRoom(roomId).send({
this.ChatSystemService.getDmRoom(roomId).send({
file: {
"type": "application/img",
"guid": ''
@@ -744,7 +744,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
if (data.selected) {
this.wsChatMethodsService.getDmRoom(roomId).send({
this.ChatSystemService.getDmRoom(roomId).send({
file: {
"name": res.data.selected.Assunto,
"type": "application/webtrix",
@@ -787,7 +787,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
const formData = new FormData();
formData.append("blobFile", blob);
this.wsChatMethodsService.getDmRoom(roomId).send({
this.ChatSystemService.getDmRoom(roomId).send({
file: {
"type": "application/img",
"guid": ''
@@ -821,7 +821,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
const formData = new FormData();
formData.append("blobFile", blob);
this.wsChatMethodsService.getDmRoom(roomId).send({
this.ChatSystemService.getDmRoom(roomId).send({
file: {
"type": file.type,
"guid": '',
@@ -1134,7 +1134,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
}
async getRoomInfo() {
// this.wsChatMethodsService.getGroupRoom(this.roomId).loadHistory({});
// this.ChatSystemService.getGroupRoom(this.roomId).loadHistory({});
let room = await this.chatService.getRoomInfo(this.roomId).toPromise();
// console.log('ROOM',room)
this.room = room['room'];