diff --git a/android/app/src/main/assets/capacitor.config.json b/android/app/src/main/assets/capacitor.config.json index 2399c4927..3a22a4571 100644 --- a/android/app/src/main/assets/capacitor.config.json +++ b/android/app/src/main/assets/capacitor.config.json @@ -16,5 +16,8 @@ "sound" ] } + }, + "server": { + "url": "http://192.168.1.6:8101" } } diff --git a/src/app/modals/profile/edit-profile/edit-profile.page.html b/src/app/modals/profile/edit-profile/edit-profile.page.html index 7d5da7de3..160bfd828 100644 --- a/src/app/modals/profile/edit-profile/edit-profile.page.html +++ b/src/app/modals/profile/edit-profile/edit-profile.page.html @@ -9,16 +9,16 @@
-

Presidente da República

-
+

GABINETE DIGITAL

+
-

Presidente da República

-
+

GABINETE DIGITAL

+
diff --git a/src/app/modals/profile/profile.page.html b/src/app/modals/profile/profile.page.html index 0b4d029e5..f4f95f128 100644 --- a/src/app/modals/profile/profile.page.html +++ b/src/app/modals/profile/profile.page.html @@ -8,16 +8,16 @@
-

Presidente da República

-
+

GABINETE DIGITAL

+
-

Presidente da República

-
+

GABINETE DIGITAL

+
diff --git a/src/app/modals/view-media/view-media.page.ts b/src/app/modals/view-media/view-media.page.ts index 66e49deca..d69533c2f 100644 --- a/src/app/modals/view-media/view-media.page.ts +++ b/src/app/modals/view-media/view-media.page.ts @@ -36,7 +36,7 @@ export class ViewMediaPage implements OnInit { } ngOnInit() { - + console.log(this.image) this.base64Sanitize = this.sanitizer.bypassSecurityTrustResourceUrl(this.image); } diff --git a/src/app/pages/chat/group-messages/group-messages.page.ts b/src/app/pages/chat/group-messages/group-messages.page.ts index fd96b8a75..49ac7d5eb 100644 --- a/src/app/pages/chat/group-messages/group-messages.page.ts +++ b/src/app/pages/chat/group-messages/group-messages.page.ts @@ -31,6 +31,7 @@ import { MessageService } from 'src/app/services/chat/message.service'; import { File } from '@awesome-cordova-plugins/file/ngx'; import { FileOpener } from '@awesome-cordova-plugins/file-opener/ngx'; import { SessionStore } from 'src/app/store/session.service'; +import { ViewMediaPage } from 'src/app/modals/view-media/view-media.page'; @Component({ selector: 'app-group-messages', @@ -1105,18 +1106,22 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy { if (this.platform.is('desktop') || this.platform.is('mobileweb')) { - this.downloadFileFromBrowser(msg.attachments[0].name, str) - /* const modal = await this.modalController.create({ - component: ViewMediaPage, - cssClass: 'modal modal-desktop', - componentProps: { - image: str, - type: msg.file.type, - username: msg.u.name, - _updatedAt: msg._updatedAt - } - }); - modal.present(); */ + console.log(msg) + if (msg.file.type == "application/img") { + const modal = await this.modalController.create({ + component: ViewMediaPage, + cssClass: 'modal modal-desktop', + componentProps: { + image: msg.attachments[0].image_url, + type: msg.file.type, + username: msg.u.name, + _updatedAt: msg._updatedAt + } + }); + modal.present(); + } else { + this.downloadFileFromBrowser("file", str) + } } else { this.openFile(str, msg.attachments[0].name); diff --git a/src/app/pages/chat/messages/messages.page.ts b/src/app/pages/chat/messages/messages.page.ts index cc8657f78..1de812766 100644 --- a/src/app/pages/chat/messages/messages.page.ts +++ b/src/app/pages/chat/messages/messages.page.ts @@ -37,6 +37,7 @@ import { Camera, CameraResultType, CameraSource } from '@capacitor/camera'; import { DomSanitizer } from '@angular/platform-browser'; import { SessionStore } from 'src/app/store/session.service'; import { HttpErrorResponse } from '@angular/common/http'; +import { ViewMediaPage } from 'src/app/modals/view-media/view-media.page'; const IMAGE_DIR = 'stored-images'; @@ -992,18 +993,22 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy { if (this.platform.is('desktop') || this.platform.is('mobileweb')) { - this.downloadFileFromBrowser(msg.attachments[0].name, str) - /* const modal = await this.modalController.create({ - component: ViewMediaPage, - cssClass: 'modal modal-desktop', - componentProps: { - image: str, - type: msg.file.type, - username: msg.u.name, - _updatedAt: msg._updatedAt - } - }); - modal.present(); */ + console.log(msg) + if (msg.file.type == "application/img") { + const modal = await this.modalController.create({ + component: ViewMediaPage, + cssClass: 'modal modal-desktop', + componentProps: { + image: msg.attachments[0].image_url, + type: msg.file.type, + username: msg.u.name, + _updatedAt: msg._updatedAt + } + }); + modal.present(); + } else { + this.downloadFileFromBrowser("file", str) + } } else { this.openFile(str, msg.attachments[0].name, msg.file.type); diff --git a/src/app/pages/login/login.page.html b/src/app/pages/login/login.page.html index 3c9ae6af4..f6bc36e69 100644 --- a/src/app/pages/login/login.page.html +++ b/src/app/pages/login/login.page.html @@ -37,7 +37,7 @@
-

Uma iniciativa do Gabinete do Presidente da República

+
diff --git a/src/app/shared/chat/group-messages/group-messages.page.ts b/src/app/shared/chat/group-messages/group-messages.page.ts index b1cf161c8..8b80e04eb 100644 --- a/src/app/shared/chat/group-messages/group-messages.page.ts +++ b/src/app/shared/chat/group-messages/group-messages.page.ts @@ -35,6 +35,7 @@ import { File } from '@awesome-cordova-plugins/file/ngx'; import { FileOpener } from '@awesome-cordova-plugins/file-opener/ngx'; import { SessionStore } from 'src/app/store/session.service'; import { HttpErrorResponse } from '@angular/common/http'; +import { ViewMediaPage } from 'src/app/modals/view-media/view-media.page'; /* @@ -1115,8 +1116,23 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe str = str.substring(1, ((str.length) - 1)); if (this.platform.is('desktop') || this.platform.is('mobileweb')) { - this.downloadFileFromBrowser(msg.attachments[0].name, str) - } else if (this.platform.is('tablet')) { + console.log(msg) + if (msg.file.type == "application/img") { + const modal = await this.modalController.create({ + component: ViewMediaPage, + cssClass: 'modal modal-desktop', + componentProps: { + image: msg.attachments[0].image_url, + type: msg.file.type, + username: msg.u.name, + _updatedAt: msg._updatedAt + } + }); + modal.present(); + } else { + this.downloadFileFromBrowser("file", str) + } + } else { this.openFile(str, msg.attachments[0].name, msg.file.type); } diff --git a/src/app/shared/chat/messages/messages.page.html b/src/app/shared/chat/messages/messages.page.html index 66482dde6..254add615 100644 --- a/src/app/shared/chat/messages/messages.page.html +++ b/src/app/shared/chat/messages/messages.page.html @@ -3,7 +3,7 @@
- {{ wsChatMethodsService.getDmRoom(roomId).name }} + {{ this.wsChatMethodsService.getDmRoom(this.roomId).name }}
-

Presidente da República

-
+

GABINETE DIGITAL

+
-

Presidente da República

-
+

GABINETE DIGITAL

+
@@ -57,9 +57,9 @@
-

Presidente da República

-
+

GABINETE DIGITAL

+