mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 12:37:53 +00:00
save
This commit is contained in:
+3
-2
@@ -84,7 +84,8 @@
|
||||
"serve": {
|
||||
"builder": "@angular-devkit/build-angular:dev-server",
|
||||
"options": {
|
||||
"browserTarget": "app:build"
|
||||
"browserTarget": "app:build",
|
||||
"proxyConfig": "proxy.config.json"
|
||||
},
|
||||
"configurations": {
|
||||
"production": {
|
||||
@@ -197,4 +198,4 @@
|
||||
"styleext": "scss"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -118,29 +118,6 @@
|
||||
</ion-fab>
|
||||
|
||||
</ion-content>
|
||||
<!--
|
||||
<ion-footer>
|
||||
<ion-toolbar>
|
||||
<ion-row align-items-center class="row">
|
||||
<ion-col size="1">
|
||||
<ion-label class="ion-no-padding" lines="none">
|
||||
<ion-icon (click)="openChatOptions()" class="chat-icon-options" src="assets/icon/icons-chat-options.svg"></ion-icon>
|
||||
</ion-label>
|
||||
</ion-col>
|
||||
<ion-col size="9">
|
||||
<ion-item class="ion-no-padding type-message" lines="none">
|
||||
<ion-textarea placeholder="Escrever uma mensagem" auto-grow class="message-input" rows="1" [(ngModel)]="message"></ion-textarea>
|
||||
<ion-icon slot="end" src="assets/icon/icons-chat-mic.svg"></ion-icon>
|
||||
</ion-item>
|
||||
</ion-col>
|
||||
<ion-col size="2">
|
||||
<ion-label>
|
||||
<ion-icon (click)="sendMessage()" class="chat-icon-send" src="assets/icon/icons-chat-send.svg"></ion-icon>
|
||||
</ion-label>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
</ion-toolbar>
|
||||
</ion-footer> -->
|
||||
|
||||
<ion-footer>
|
||||
<div class="container width-100 d-flex">
|
||||
|
||||
@@ -9,6 +9,7 @@ import { Storage } from '@ionic/storage';
|
||||
import { Message } from 'src/app/models/message.model';
|
||||
import { Observable, Subject } from "rxjs/Rx";
|
||||
import { WebsocketService } from './websocket.service';
|
||||
import { FileService } from './functions/file.service';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
@@ -31,6 +32,7 @@ export class ChatService {
|
||||
private authService: AuthService,
|
||||
private storage: Storage,
|
||||
private storageService:StorageService,
|
||||
private fileService: FileService,
|
||||
//private wsService: WebsocketService,
|
||||
)
|
||||
{
|
||||
@@ -49,6 +51,22 @@ export class ChatService {
|
||||
}); */
|
||||
}
|
||||
|
||||
getDocumentDetails(url:string){
|
||||
let headersc = new HttpHeaders();
|
||||
headersc = headersc.set('X-User-Id', this.loggedUserChat['data'].userId);
|
||||
headersc = headersc.set('X-Auth-Token', this.loggedUserChat['data'].authToken);
|
||||
// headersc = headersc.set("Host", "www.tabularium.pt");
|
||||
// headersc = headersc.set("Origin", "http://localhost:8100");
|
||||
// headersc = headersc.set("Referer", "http://localhost:8100/");
|
||||
let optionsc = {
|
||||
headers: headersc,
|
||||
};
|
||||
let fullUrl = "https://www.tabularium.pt/" + url;
|
||||
return this.http.get(fullUrl, optionsc).subscribe(()=>{
|
||||
this.fileService.viewDocumentByUrl(url)
|
||||
});
|
||||
}
|
||||
|
||||
getAllChannels(){
|
||||
return this.http.get(environment.apiChatUrl+'channels.list', this.options);
|
||||
}
|
||||
|
||||
@@ -51,14 +51,16 @@
|
||||
<div>
|
||||
<div class="file">
|
||||
<!-- <canvas id="pdf_canvas"></canvas> -->
|
||||
<div class="file-details add-ellipsis" *ngIf="msg.file">
|
||||
<span *ngIf="msg.file.type" (click)="viewDocument(file.title_link)" class="cursor-pointer">
|
||||
<div (click)="viewDocument(file.title_link)" class="file-details add-ellipsis" *ngIf="msg.file">
|
||||
<span *ngIf="msg.file.type" class="cursor-pointer">
|
||||
<fa-icon *ngIf="msg.file.type == 'application/pdf'" icon="file-pdf" class="pdf-icon"></fa-icon>
|
||||
<fa-icon *ngIf="msg.file.type == 'application/word'" icon="file-word" class="word-icon"></fa-icon>
|
||||
<fa-icon *ngIf="msg.file.type == 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'" icon="file-word" class="excel-icon"></fa-icon>
|
||||
<ion-icon *ngIf="msg.file.type == 'application/webtrix'" src="assets/icon/webtrix.svg"></ion-icon>
|
||||
</span>
|
||||
<ion-label class="file-title">{{file.title}}</ion-label>
|
||||
<br />
|
||||
<ion-label>{{file.title_link}}</ion-label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="file-details-optional">
|
||||
|
||||
@@ -241,6 +241,9 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
||||
|
||||
viewDocument(url:string){
|
||||
this.fileService.viewDocumentByUrl(url);
|
||||
/* this.chatService.getDocumentDetails(url).subscribe(res => {
|
||||
console.log(res);
|
||||
}) */
|
||||
}
|
||||
|
||||
getChatMembers() {
|
||||
|
||||
Reference in New Issue
Block a user