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 @@
</ion-refresher>
<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({
@@ -30,7 +30,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'];
@@ -100,7 +100,7 @@ export class ContactsPage implements OnInit {
this.room = res['room'];
await this.WsChatMethodsService.getAllRooms();
await this.ChatSystemService.getAllRooms();
this.getDirectMessage(this.room._id);
});
}
+10 -10
View File
@@ -10,12 +10,12 @@
</div>
<div class="middle-container" *ngIf="!showMessageOptions">
<div class="middle">
<ion-label class="title">{{wsChatMethodsService.getDmRoom(roomId).name}}</ion-label>
<ion-label class="title">{{ChatSystemService.getDmRoom(roomId).name}}</ion-label>
<!-- <span><ion-icon class="{{users.status}}" name="ellipse"></ion-icon></span> -->
</div>
</div>
<!-- <div (click)="wsChatMethodsService.getDmRoom(roomId).deleteAll()" >delete all</div> -->
<!-- <div (click)="ChatSystemService.getDmRoom(roomId).deleteAll()" >delete all</div> -->
<div class="middle-container-options" *ngIf="showMessageOptions">
<fa-icon (click)="deleteMessage(selectedMsgId)" icon="trash" class="middle-container-options-icons"></fa-icon>
<!-- <ion-icon name="trash"></ion-icon> -->
@@ -45,7 +45,7 @@
<div (click)="handleClick()" class="message-attachments messages" #scrollMe>
<div class="messages-list-item-wrapper container-width-100 file"
*ngFor="let msg of wsChatMethodsService.getDmRoom(this.roomId).messages; let last = last"
*ngFor="let msg of ChatSystemService.getDmRoom(this.roomId).messages; let last = last"
[class.messages-list-item-wrapper-active]="msg._id == selectedMsgId">
<div (press)="handlePress(msg._id)" class='file message-container incoming-{{msg.u.username!=sessionStore.user.UserName}}'
*ngIf="msg.msg !=''">
@@ -224,8 +224,8 @@
<ion-footer >
<div class="typing" *ngIf="wsChatMethodsService.getDmRoom(roomId).otherUserType == true">
<ngx-letters-avatar [avatarName]="wsChatMethodsService.getGroupRoom(roomId).name" [width]="30" [circular]="true"
<div class="typing" *ngIf="ChatSystemService.getDmRoom(roomId).otherUserType == true">
<ngx-letters-avatar [avatarName]="ChatSystemService.getGroupRoom(roomId).name" [width]="30" [circular]="true"
fontFamily="Roboto"></ngx-letters-avatar>
está a escrever ...
</div>
@@ -251,8 +251,8 @@
<div *ngIf="!recording && !lastAudioRecorded" class="type-message">
<ion-textarea *ngIf="allowTyping" autocomplete="on" autocorrect="on" spellcheck="true" clearOnEdit="true"
placeholder="Escrever uma mensagem" auto-grow class="message-input" rows="1"
[(ngModel)]="wsChatMethodsService.getDmRoom(roomId).message"
(ionChange)="wsChatMethodsService.getDmRoom(roomId).sendTyping()"></ion-textarea>
[(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">
@@ -261,21 +261,21 @@
</div>
</div>
<div>
<button #recordbtn *ngIf="!wsChatMethodsService.getDmRoom(roomId).message && !lastAudioRecorded"
<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>
</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()"
class="btn-no-color">
<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"
<button *ngIf="!ChatSystemService.getDmRoom(roomId).message && lastAudioRecorded"
(click)="sendAudio(lastAudioRecorded)" class="btn-no-color">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="chat-icon-send"
src="assets/icon/theme/gov/icons-chat-send.svg"></ion-icon>
+16 -16
View File
@@ -23,7 +23,7 @@ import { VoiceRecorder, RecordingData, GenericResponse } from 'capacitor-voice-r
import { Haptics, ImpactStyle } from '@capacitor/haptics';
import { SqliteService } from 'src/app/services/sqlite.service';
import { ViewEventPage } from 'src/app/modals/view-event/view-event.page';
import { WsChatMethodsService } from 'src/app/services/chat/ws-chat-methods.service'
import { ChatSystemService } from 'src/app/services/chat/chat-system.service'
import { MessageService } from 'src/app/services/chat/message.service';
import { AttachmentsService } from 'src/app/services/attachments.service';
@@ -124,7 +124,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
private changeDetectorRef: ChangeDetectorRef,
private platform: Platform,
private sqlservice: SqliteService,
public wsChatMethodsService: WsChatMethodsService,
public ChatSystemService: ChatSystemService,
private AttachmentsService: AttachmentsService,
private CameraService: CameraService,
private processesService: ProcessesService,
@@ -149,9 +149,9 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
}
this.wsChatMethodsService.getDmRoom(this.roomId).loadHistory({})
this.wsChatMethodsService.getDmRoom(this.roomId).scrollDown = this.scrollToBottomClicked
this.wsChatMethodsService.openRoom(this.roomId)
this.ChatSystemService.getDmRoom(this.roomId).loadHistory({})
this.ChatSystemService.getDmRoom(this.roomId).scrollDown = this.scrollToBottomClicked
this.ChatSystemService.openRoom(this.roomId)
setTimeout(() => {
this.scrollToBottomClicked()
@@ -162,9 +162,9 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
ngOnInit() {
this.createDirectoryImage()
this.wsChatMethodsService.getAllRooms();
this.ChatSystemService.getAllRooms();
this.chatService.refreshtoken();
this.wsChatMethodsService.getUserOfRoom(this.roomId).then((value) => {
this.ChatSystemService.getUserOfRoom(this.roomId).then((value) => {
})
@@ -301,7 +301,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
}
deleteMessage(msgId: string) {
const room = this.wsChatMethodsService.getDmRoom(this.roomId)
const room = this.ChatSystemService.getDmRoom(this.roomId)
this.alertService.confirmDeleteMessage(msgId, room);
}
@@ -388,7 +388,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
}
sendMessage() {
this.wsChatMethodsService.getDmRoom(this.roomId).send({})
this.ChatSystemService.getDmRoom(this.roomId).send({})
}
base64toBlob(base64Data, contentType) {
@@ -434,7 +434,7 @@ export class MessagesPage implements OnInit, 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,
@@ -526,8 +526,8 @@ export class MessagesPage implements OnInit, 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
}
showDateDuration(start: any) {
@@ -640,7 +640,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
console.log(capturedImage);
this.wsChatMethodsService.getDmRoom(roomId).send({
this.ChatSystemService.getDmRoom(roomId).send({
file: {
"type": "application/img",
"guid": ''
@@ -684,7 +684,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
if (data.selected) {
this.wsChatMethodsService.getDmRoom(roomId).send({
this.ChatSystemService.getDmRoom(roomId).send({
file: {
"name": res.data.selected.Assunto,
"type": "application/webtrix",
@@ -728,7 +728,7 @@ export class MessagesPage implements OnInit, 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": ''
@@ -767,7 +767,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
formData.append('blobFile', blob);
this.wsChatMethodsService.getDmRoom(roomId).send({
this.ChatSystemService.getDmRoom(roomId).send({
file: {
"type": file.type,
"guid": '',