mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
save
This commit is contained in:
+2
-1
@@ -84,7 +84,8 @@
|
|||||||
"serve": {
|
"serve": {
|
||||||
"builder": "@angular-devkit/build-angular:dev-server",
|
"builder": "@angular-devkit/build-angular:dev-server",
|
||||||
"options": {
|
"options": {
|
||||||
"browserTarget": "app:build"
|
"browserTarget": "app:build",
|
||||||
|
"proxyConfig": "proxy.config.json"
|
||||||
},
|
},
|
||||||
"configurations": {
|
"configurations": {
|
||||||
"production": {
|
"production": {
|
||||||
|
|||||||
@@ -118,29 +118,6 @@
|
|||||||
</ion-fab>
|
</ion-fab>
|
||||||
|
|
||||||
</ion-content>
|
</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>
|
<ion-footer>
|
||||||
<div class="container width-100 d-flex">
|
<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 { Message } from 'src/app/models/message.model';
|
||||||
import { Observable, Subject } from "rxjs/Rx";
|
import { Observable, Subject } from "rxjs/Rx";
|
||||||
import { WebsocketService } from './websocket.service';
|
import { WebsocketService } from './websocket.service';
|
||||||
|
import { FileService } from './functions/file.service';
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root'
|
providedIn: 'root'
|
||||||
@@ -31,6 +32,7 @@ export class ChatService {
|
|||||||
private authService: AuthService,
|
private authService: AuthService,
|
||||||
private storage: Storage,
|
private storage: Storage,
|
||||||
private storageService:StorageService,
|
private storageService:StorageService,
|
||||||
|
private fileService: FileService,
|
||||||
//private wsService: WebsocketService,
|
//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(){
|
getAllChannels(){
|
||||||
return this.http.get(environment.apiChatUrl+'channels.list', this.options);
|
return this.http.get(environment.apiChatUrl+'channels.list', this.options);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -51,14 +51,16 @@
|
|||||||
<div>
|
<div>
|
||||||
<div class="file">
|
<div class="file">
|
||||||
<!-- <canvas id="pdf_canvas"></canvas> -->
|
<!-- <canvas id="pdf_canvas"></canvas> -->
|
||||||
<div class="file-details add-ellipsis" *ngIf="msg.file">
|
<div (click)="viewDocument(file.title_link)" class="file-details add-ellipsis" *ngIf="msg.file">
|
||||||
<span *ngIf="msg.file.type" (click)="viewDocument(file.title_link)" class="cursor-pointer">
|
<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/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/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>
|
<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>
|
<ion-icon *ngIf="msg.file.type == 'application/webtrix'" src="assets/icon/webtrix.svg"></ion-icon>
|
||||||
</span>
|
</span>
|
||||||
<ion-label class="file-title">{{file.title}}</ion-label>
|
<ion-label class="file-title">{{file.title}}</ion-label>
|
||||||
|
<br />
|
||||||
|
<ion-label>{{file.title_link}}</ion-label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="file-details-optional">
|
<div class="file-details-optional">
|
||||||
|
|||||||
@@ -241,6 +241,9 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
|||||||
|
|
||||||
viewDocument(url:string){
|
viewDocument(url:string){
|
||||||
this.fileService.viewDocumentByUrl(url);
|
this.fileService.viewDocumentByUrl(url);
|
||||||
|
/* this.chatService.getDocumentDetails(url).subscribe(res => {
|
||||||
|
console.log(res);
|
||||||
|
}) */
|
||||||
}
|
}
|
||||||
|
|
||||||
getChatMembers() {
|
getChatMembers() {
|
||||||
|
|||||||
Reference in New Issue
Block a user