@chat21/chat21-ionic 3.0.58 → 3.0.59-rc4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/README.md +4 -0
  3. package/package.json +1 -1
  4. package/resources/Android/splash/drawable-land-hdpi-screen.png +0 -0
  5. package/resources/Android/splash/drawable-land-ldpi-screen.png +0 -0
  6. package/resources/Android/splash/drawable-land-mdpi-screen.png +0 -0
  7. package/resources/Android/splash/drawable-land-xhdpi-screen.png +0 -0
  8. package/resources/Android/splash/drawable-land-xxhdpi-screen.png +0 -0
  9. package/resources/Android/splash/drawable-land-xxxhdpi-screen.png +0 -0
  10. package/resources/Android/splash/drawable-port-hdpi-screen.png +0 -0
  11. package/resources/Android/splash/drawable-port-ldpi-screen.png +0 -0
  12. package/resources/Android/splash/drawable-port-mdpi-screen.png +0 -0
  13. package/resources/Android/splash/drawable-port-xhdpi-screen.png +0 -0
  14. package/resources/Android/splash/drawable-port-xxhdpi-screen.png +0 -0
  15. package/resources/Android/splash/drawable-port-xxxhdpi-screen.png +0 -0
  16. package/resources/Android/splash.png +0 -0
  17. package/src/app/app-routing.module.ts +21 -17
  18. package/src/app/app.component.html +6 -3
  19. package/src/app/app.component.ts +195 -41
  20. package/src/app/app.module.ts +4 -1
  21. package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.html +4 -4
  22. package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.scss +8 -2
  23. package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.ts +6 -1
  24. package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.html +7 -2
  25. package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.ts +47 -2
  26. package/src/app/chatlib/conversation-detail/message/image/image.component.html +7 -6
  27. package/src/app/chatlib/conversation-detail/message/image/image.component.ts +20 -1
  28. package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.html +34 -5
  29. package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.scss +8 -144
  30. package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.ts +14 -18
  31. package/src/app/components/authentication/login/login.component.html +2 -2
  32. package/src/app/components/authentication/login/login.component.ts +2 -1
  33. package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.ts +1 -1
  34. package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.ts +1 -1
  35. package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.html +17 -12
  36. package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.scss +12 -0
  37. package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.ts +21 -5
  38. package/src/app/components/conversation-detail/message-text-area/message-text-area.component.html +3 -2
  39. package/src/app/components/conversation-detail/message-text-area/message-text-area.component.scss +22 -17
  40. package/src/app/components/conversation-detail/message-text-area/message-text-area.component.ts +46 -5
  41. package/src/app/components/image-viewer/image-viewer.component.html +23 -0
  42. package/src/app/components/image-viewer/image-viewer.component.scss +107 -0
  43. package/src/app/components/image-viewer/image-viewer.component.spec.ts +24 -0
  44. package/src/app/components/image-viewer/image-viewer.component.ts +38 -0
  45. package/src/app/components/project-item/project-item.component.html +102 -0
  46. package/src/app/components/project-item/project-item.component.scss +542 -0
  47. package/src/app/components/project-item/project-item.component.spec.ts +24 -0
  48. package/src/app/components/project-item/project-item.component.ts +308 -0
  49. package/src/app/components/utils/avatar-profile/avatar-profile.component.html +7 -0
  50. package/src/app/components/utils/avatar-profile/avatar-profile.component.ts +22 -5
  51. package/src/app/pages/authentication/login/login.page.ts +1 -1
  52. package/src/app/pages/conversation-detail/conversation-detail.page.html +5 -3
  53. package/src/app/pages/conversation-detail/conversation-detail.page.ts +122 -30
  54. package/src/app/pages/conversations-list/conversations-list.page.html +40 -24
  55. package/src/app/pages/conversations-list/conversations-list.page.scss +146 -1
  56. package/src/app/pages/conversations-list/conversations-list.page.ts +80 -6
  57. package/src/app/pages/unassigned-conversations/unassigned-conversations-routing.module.ts +17 -0
  58. package/src/app/pages/unassigned-conversations/unassigned-conversations.module.ts +22 -0
  59. package/src/app/pages/unassigned-conversations/unassigned-conversations.page.html +14 -0
  60. package/src/app/pages/unassigned-conversations/unassigned-conversations.page.scss +0 -0
  61. package/src/app/pages/unassigned-conversations/unassigned-conversations.page.spec.ts +24 -0
  62. package/src/app/pages/unassigned-conversations/unassigned-conversations.page.ts +105 -0
  63. package/src/app/services/nav-proxy.service.ts +1 -1
  64. package/src/app/services/tiledesk/tiledesk.service.ts +22 -1
  65. package/src/app/services/websocket/websocket-js.ts +559 -0
  66. package/src/app/services/websocket/websocket.service.spec.ts +12 -0
  67. package/src/app/services/websocket/websocket.service.ts +274 -0
  68. package/src/app/shared/shared.module.ts +7 -1
  69. package/src/assets/i18n/en.json +8 -1
  70. package/src/assets/i18n/it.json +8 -1
  71. package/src/chat21-core/providers/chat-manager.ts +3 -3
  72. package/src/chat21-core/providers/firebase/firebase-archivedconversations-handler.ts +1 -1
  73. package/src/chat21-core/providers/firebase/firebase-auth-service.ts +6 -6
  74. package/src/chat21-core/providers/firebase/firebase-conversation-handler.ts +1 -1
  75. package/src/chat21-core/providers/firebase/firebase-notifications.ts +1 -1
  76. package/src/chat21-core/providers/firebase/firebase-presence.service.ts +2 -2
  77. package/src/chat21-core/providers/firebase/firebase-typing.service.ts +1 -1
  78. package/src/chat21-core/providers/firebase/firebase-upload.service.ts +1 -1
  79. package/src/chat21-core/providers/tiledesk/tiledesk-auth.service.ts +1 -1
  80. package/src/chat21-core/utils/utils.ts +1 -1
@@ -5,6 +5,8 @@ import { MAX_WIDTH_IMAGES } from 'src/chat21-core/utils/constants';
5
5
  import { LoggerService } from 'src/chat21-core/providers/abstract/logger.service';
6
6
  import { isFile, isFrame, isImage } from 'src/chat21-core/utils/utils-message';
7
7
  import { LoggerInstance } from 'src/chat21-core/providers/logger/loggerInstance';
8
+ import { TranslateService } from '@ngx-translate/core';
9
+ import * as moment from 'moment';
8
10
  @Component({
9
11
  selector: 'chat-bubble-message',
10
12
  templateUrl: './bubble-message.component.html',
@@ -21,6 +23,8 @@ export class BubbleMessageComponent implements OnInit, OnChanges {
21
23
  isFile = isFile;
22
24
  isFrame = isFrame;
23
25
 
26
+ public browserLang: string;
27
+
24
28
  tooltipOptions = {
25
29
  'show-delay': 500,
26
30
  'tooltip-class': 'chat-tooltip',
@@ -32,17 +36,58 @@ export class BubbleMessageComponent implements OnInit, OnChanges {
32
36
  };
33
37
 
34
38
  private logger: LoggerService = LoggerInstance.getInstance()
35
- constructor(public sanitizer: DomSanitizer) {
39
+ constructor(
40
+ public sanitizer: DomSanitizer,
41
+ private translate: TranslateService) {
36
42
  // console.log('BUBBLE-MSG Hello !!!!')
37
43
  }
38
44
 
39
45
  ngOnInit() {
46
+ this.browserLang = this.translate.getBrowserLang();
47
+ // console.log('BUBBLE-MSG ngOnInit browserLang ', this.browserLang)
48
+ if (this.browserLang) {
49
+ if (this.browserLang === 'it') {
50
+ // console.log('BUBBLE-MSG browserLang ', this.browserLang)
51
+ // moment.locale('it')
52
+
53
+ moment.locale('it', {
54
+ calendar: {
55
+ lastDay: '[Ieri alle] LT',
56
+ sameDay: '[Oggi alle] LT',
57
+ nextDay: '[Domani alle] LT',
58
+ lastWeek: '[Ultimo] dddd [alle] LT',
59
+ nextWeek: 'dddd [alle] LT',
60
+ sameElse: 'lll'
61
+ }
62
+ });
63
+
64
+ } else {
65
+ // console.log('BUBBLE-MSG browserLang ', this.browserLang)
66
+ // moment.locale('en')
67
+
68
+ moment.locale('en', {
69
+ calendar: {
70
+ lastDay: '[Yesterday at] LT',
71
+ sameDay: '[Today at] LT',
72
+ nextDay: '[Tomorrow at] LT',
73
+ lastWeek: '[last] dddd [at] LT',
74
+ nextWeek: 'dddd [at] LT',
75
+ sameElse: 'lll'
76
+ }
77
+ });
78
+ }
79
+ }
80
+
81
+
82
+
83
+ // const yesterday = moment().subtract(1, 'day')
84
+ // console.log('BUBBLE-MSG yesterday ', yesterday)
40
85
 
41
86
  }
42
87
 
43
88
  ngOnChanges() {
44
89
  // console.log('BUBBLE-MSG Hello !!!! this.message ', this.message)
45
- if (this.message && this.message.metadata) {
90
+ if (this.message && this.message.metadata && typeof this.message.metadata === 'object') {
46
91
  this.getMetadataSize(this.message.metadata)
47
92
  // console.log('BUBBLE-MSG ngOnChanges message > metadata', this.message.metadata)
48
93
  }
@@ -1,9 +1,10 @@
1
1
  <div [ngStyle]="{ 'max-width': width +'px', 'max-height': height +'px' }" style="position: relative; ">
2
2
  <div *ngIf="loading" class="loader" [ngStyle]="{ 'width': width +'px', 'height': height +'px' }"></div>
3
- <img [ngStyle]="{ 'width': width +'px', 'height': height +'px' }" style="cursor:pointer" [tooltip]="timeTooltipRight" [options]="tooltipOptions" placement="bottom"
4
- content-type="template" class="message-contentX message-content-imageX" [ngClass]="{'isLoadingImage': loading}"
5
- [src]="metadata.src" (load)="onLoaded($event)" (click)="downloadImage(metadata.src, metadata.name)" />
6
- <ng-template #timeTooltipRight>
3
+ <!-- [tooltip]="timeTooltipRight" [options]="tooltipOptions" placement="bottom" content-type="template" -->
4
+ <img id="myImg" [ngStyle]="{ 'width': width +'px', 'height': height +'px' }" style="cursor:pointer"
5
+ class="message-contentX message-content-imageX" [ngClass]="{'isLoadingImage': loading}"
6
+ [src]="metadata.src" (load)="onLoaded($event)" (click)="openImageViewerModal(metadata.src, metadata.name)" />
7
+ <!-- <ng-template #timeTooltipRight>
7
8
  <span>{{ tooltipMessage }}</span>
8
- </ng-template>
9
- </div>
9
+ </ng-template> -->
10
+ </div>
@@ -14,6 +14,8 @@ export class ImageComponent implements OnInit {
14
14
 
15
15
  loading: boolean = true
16
16
  tooltipMessage: string;
17
+ modal: any
18
+ span: any
17
19
 
18
20
  tooltipOptions = {
19
21
  'show-delay': 0,
@@ -45,7 +47,7 @@ export class ImageComponent implements OnInit {
45
47
  this.onImageRendered.emit(true)
46
48
  }
47
49
 
48
- downloadImage(url: string, fileName: string) {
50
+ _downloadImage(url: string, fileName: string) {
49
51
  // console.log('Image COMP - IMAGE URL ', url)
50
52
  // console.log('Image COMP - IMAGE FILENAME ', fileName)
51
53
  const a: any = document.createElement('a');
@@ -56,4 +58,21 @@ export class ImageComponent implements OnInit {
56
58
  a.click();
57
59
  a.remove();
58
60
  }
61
+
62
+ openImageViewerModal(url: string, fileName: string) {
63
+ this.modal = document.getElementById("image-viewer-modal");
64
+ // console.log('has clicked open image-viewer modal ', this.modal)
65
+ this.modal.style.display = "block";
66
+ var modalImg = <HTMLImageElement>document.getElementById("image-viewer-img");
67
+ var captionText = document.getElementById("caption");
68
+ modalImg.src = url
69
+ captionText.innerHTML = fileName;
70
+
71
+ }
72
+
73
+
74
+
75
+
59
76
  }
77
+
78
+
@@ -25,7 +25,8 @@
25
25
  <!-- -------------------------------------------------------------------------- -->
26
26
  <!-- New <ion-spinner class="spinner-middle" style="margin-left: 19px;"></ion-spinner> -->
27
27
  <!-- -------------------------------------------------------------------------- -->
28
- <ion-item *ngIf="isOnline === false" button="true" lines="none" class="ion-no-padding waiting-for-connection">
28
+ <!-- <ion-item *ngIf="isOnline === false" button="true" lines="none" class="ion-no-padding waiting-for-connection">
29
+ <div tabindex="0"></div>
29
30
  <ion-avatar item-start>
30
31
  <div class="sk-fading-circle">
31
32
  <div class="sk-circle1 sk-circle"></div>
@@ -43,10 +44,38 @@
43
44
  </div>
44
45
  </ion-avatar>
45
46
  <ion-label part="message-text" class="waiting-for-network-msg"> Waiting for network</ion-label>
46
- </ion-item>
47
+ </ion-item> -->
48
+
49
+ <!-- <ion-item>
50
+ <div tabindex="0"></div>
51
+ <iframe loading="lazy" width="100%" height="70px" style="border: unset;" [src]="PROJECT_FOR_PANEL"></iframe>
52
+ </ion-item> -->
53
+ <!-- <ion-item button="true" (click)="openUnsevedConversationIframe()">
54
+ <app-project-item
55
+ (projectIdEvent)="getLastProjectId($event)"></app-project-item>
56
+ </ion-item> -->
57
+
58
+
59
+ <!-- <ion-item-sliding disabled>
60
+ <ion-item>
61
+ <ion-label>
62
+ Sliding Item, Icons Start
63
+ </ion-label>
64
+ </ion-item>
65
+ <ion-item-options>
66
+ <ion-item-option color="primary">
67
+ <ion-icon slot="start" ios="ellipsis-horizontal" md="ellipsis-vertical"></ion-icon>
68
+ More
69
+ </ion-item-option>
70
+ <ion-item-option color="secondary">
71
+ <ion-icon slot="start" name="archive"></ion-icon>
72
+ Archive
73
+ </ion-item-option>
74
+ </ion-item-options>
75
+ </ion-item-sliding> -->
47
76
 
48
77
  <ion-item button="true" lines="none" class="ion-no-padding" [class.ion-selected]="conversation.uid === uidConvSelected"
49
- *ngFor="let conversation of listConversations" (click)="openConversationByID(conversation)">
78
+ *ngFor="let conversation of listConversations" (click)="openConversationByID(conversation)" detail=false>
50
79
  <div tabindex="0"></div>
51
80
 
52
81
  <!-- <div [class.selected]="conversation.uid === uidConvSelected"></div> -->
@@ -88,7 +117,7 @@
88
117
  <ion-note *ngIf="!conversation.archived" class="conversation_time">{{conversation.timestamp | amTimeAgo}}</ion-note>
89
118
 
90
119
  <ion-buttons slot="end">
91
- <ion-button *ngIf="!conversation.archived" [ngClass]="{'hide': !isApp, 'button-on-desktop': !isApp }"
120
+ <ion-button *ngIf="!conversation.archived" [ngClass]="{'hide': !isApp, 'button-on-desktop': !isApp, 'button-on-mobile': isApp }"
92
121
  id="{{ 'close_conversation_button' + conversation.uid }}" class="close-conversation-button" ion-button clear
93
122
  item-end (click)="closeConversation(conversation);$event.stopPropagation();" padding>
94
123
  <ion-icon slot="icon-only" style="display:block;" id="{{ 'close_button_icon' + conversation.uid }}"
@@ -117,7 +146,7 @@
117
146
  </div>
118
147
 
119
148
  <!-- && !conversation?.archived -->
120
- <div item-end class="notification_point" [ngClass]="{'notification_point-on-desktop': !isApp }"
149
+ <div item-end class="notification_point" [ngClass]="{'notification_point-on-desktop': !isApp, 'notification_point-on-mobile': isApp }"
121
150
  *ngIf="conversation.is_new">
122
151
  </div>
123
152
 
@@ -142,6 +142,10 @@ ion-item {
142
142
  .notification_point-on-desktop {
143
143
  bottom: 29px !important;
144
144
  }
145
+ .notification_point-on-mobile {
146
+ bottom: 29px !important;
147
+ right: 8px;
148
+ }
145
149
  }
146
150
 
147
151
  // ion-item {
@@ -171,6 +175,10 @@ ion-item:hover {
171
175
  }
172
176
  }
173
177
 
178
+ .button-on-mobile {
179
+ margin-right: 31px !important;
180
+ }
181
+
174
182
  .truncate-on-desktop {
175
183
  width: 88% !important
176
184
  }
@@ -212,147 +220,3 @@ ion-item:hover {
212
220
  }
213
221
 
214
222
 
215
- .waiting-for-connection {
216
- --background: #fdd764;
217
- }
218
-
219
- // -------------------------------
220
- // Spinner
221
- // -------------------------------
222
- .sk-fading-circle {
223
- // margin: 100px auto;
224
- width: 40px;
225
- height: 40px;
226
- position: relative;
227
- margin-left: 5px;
228
- margin-top: 5px;
229
- }
230
-
231
- .sk-fading-circle .sk-circle {
232
- width: 100%;
233
- height: 100%;
234
- position: absolute;
235
- left: 0;
236
- top: 0;
237
- }
238
-
239
- .sk-fading-circle .sk-circle:before {
240
- content: '';
241
- display: block;
242
- margin: 0 auto;
243
- width: 15%;
244
- height: 15%;
245
- background-color: #333;
246
- border-radius: 100%;
247
- -webkit-animation: sk-circleFadeDelay 1.2s infinite ease-in-out both;
248
- animation: sk-circleFadeDelay 1.2s infinite ease-in-out both;
249
- }
250
- .sk-fading-circle .sk-circle2 {
251
- -webkit-transform: rotate(30deg);
252
- -ms-transform: rotate(30deg);
253
- transform: rotate(30deg);
254
- }
255
- .sk-fading-circle .sk-circle3 {
256
- -webkit-transform: rotate(60deg);
257
- -ms-transform: rotate(60deg);
258
- transform: rotate(60deg);
259
- }
260
- .sk-fading-circle .sk-circle4 {
261
- -webkit-transform: rotate(90deg);
262
- -ms-transform: rotate(90deg);
263
- transform: rotate(90deg);
264
- }
265
- .sk-fading-circle .sk-circle5 {
266
- -webkit-transform: rotate(120deg);
267
- -ms-transform: rotate(120deg);
268
- transform: rotate(120deg);
269
- }
270
- .sk-fading-circle .sk-circle6 {
271
- -webkit-transform: rotate(150deg);
272
- -ms-transform: rotate(150deg);
273
- transform: rotate(150deg);
274
- }
275
- .sk-fading-circle .sk-circle7 {
276
- -webkit-transform: rotate(180deg);
277
- -ms-transform: rotate(180deg);
278
- transform: rotate(180deg);
279
- }
280
- .sk-fading-circle .sk-circle8 {
281
- -webkit-transform: rotate(210deg);
282
- -ms-transform: rotate(210deg);
283
- transform: rotate(210deg);
284
- }
285
- .sk-fading-circle .sk-circle9 {
286
- -webkit-transform: rotate(240deg);
287
- -ms-transform: rotate(240deg);
288
- transform: rotate(240deg);
289
- }
290
- .sk-fading-circle .sk-circle10 {
291
- -webkit-transform: rotate(270deg);
292
- -ms-transform: rotate(270deg);
293
- transform: rotate(270deg);
294
- }
295
- .sk-fading-circle .sk-circle11 {
296
- -webkit-transform: rotate(300deg);
297
- -ms-transform: rotate(300deg);
298
- transform: rotate(300deg);
299
- }
300
- .sk-fading-circle .sk-circle12 {
301
- -webkit-transform: rotate(330deg);
302
- -ms-transform: rotate(330deg);
303
- transform: rotate(330deg);
304
- }
305
- .sk-fading-circle .sk-circle2:before {
306
- -webkit-animation-delay: -1.1s;
307
- animation-delay: -1.1s;
308
- }
309
- .sk-fading-circle .sk-circle3:before {
310
- -webkit-animation-delay: -1s;
311
- animation-delay: -1s;
312
- }
313
- .sk-fading-circle .sk-circle4:before {
314
- -webkit-animation-delay: -0.9s;
315
- animation-delay: -0.9s;
316
- }
317
- .sk-fading-circle .sk-circle5:before {
318
- -webkit-animation-delay: -0.8s;
319
- animation-delay: -0.8s;
320
- }
321
- .sk-fading-circle .sk-circle6:before {
322
- -webkit-animation-delay: -0.7s;
323
- animation-delay: -0.7s;
324
- }
325
- .sk-fading-circle .sk-circle7:before {
326
- -webkit-animation-delay: -0.6s;
327
- animation-delay: -0.6s;
328
- }
329
- .sk-fading-circle .sk-circle8:before {
330
- -webkit-animation-delay: -0.5s;
331
- animation-delay: -0.5s;
332
- }
333
- .sk-fading-circle .sk-circle9:before {
334
- -webkit-animation-delay: -0.4s;
335
- animation-delay: -0.4s;
336
- }
337
- .sk-fading-circle .sk-circle10:before {
338
- -webkit-animation-delay: -0.3s;
339
- animation-delay: -0.3s;
340
- }
341
- .sk-fading-circle .sk-circle11:before {
342
- -webkit-animation-delay: -0.2s;
343
- animation-delay: -0.2s;
344
- }
345
- .sk-fading-circle .sk-circle12:before {
346
- -webkit-animation-delay: -0.1s;
347
- animation-delay: -0.1s;
348
- }
349
-
350
- @-webkit-keyframes sk-circleFadeDelay {
351
- 0%, 39%, 100% { opacity: 0; }
352
- 40% { opacity: 1; }
353
- }
354
-
355
- @keyframes sk-circleFadeDelay {
356
- 0%, 39%, 100% { opacity: 0; }
357
- 40% { opacity: 1; }
358
- }
@@ -7,10 +7,13 @@ import { Platform } from '@ionic/angular';
7
7
  import { LoggerService } from 'src/chat21-core/providers/abstract/logger.service';
8
8
  import { LoggerInstance } from 'src/chat21-core/providers/logger/loggerInstance';
9
9
  import { TranslateService } from '@ngx-translate/core';
10
+
10
11
  import * as moment from 'moment';
11
12
  // import { EventsService } from 'src/app/services/events-service';
12
13
  // import { TiledeskService } from '../../../services/tiledesk/tiledesk.service';
13
14
  import { NetworkService } from '../../../services/network-service/network.service';
15
+ import { AppConfigProvider } from 'src/app/services/app-config';
16
+ import { DomSanitizer } from '@angular/platform-browser'
14
17
  // import { LoggerService } from 'src/chat21-core/providers/abstract/logger.service';
15
18
  // import { LoggerInstance } from 'src/chat21-core/providers/logger/loggerInstance';
16
19
 
@@ -29,8 +32,8 @@ export class IonListConversationsComponent extends ListConversationsComponent im
29
32
  public logger: LoggerService = LoggerInstance.getInstance();
30
33
  public currentYear: any;
31
34
  public browserLang: string;
32
- public isOnline: boolean = true;
33
- public checkInternet: boolean;
35
+
36
+ public PROJECT_FOR_PANEL: any;
34
37
 
35
38
  /**
36
39
  *
@@ -45,7 +48,9 @@ export class IonListConversationsComponent extends ListConversationsComponent im
45
48
  private translate: TranslateService,
46
49
  // private events: EventsService,
47
50
  // private tiledeskService: TiledeskService,
48
- private networkService: NetworkService
51
+ private networkService: NetworkService,
52
+ private appConfigProvider: AppConfigProvider,
53
+ private sanitizer: DomSanitizer,
49
54
  ) {
50
55
  super(iterableDiffers, kvDiffers)
51
56
  this.browserLang = this.translate.getBrowserLang();
@@ -62,31 +67,22 @@ export class IonListConversationsComponent extends ListConversationsComponent im
62
67
 
63
68
  this.currentYear = moment().format('YYYY');
64
69
  this.logger.log('[ION-LIST-CONVS-COMP] - currentYear ', this.currentYear)
70
+
71
+ const DASHBOARD_BASE_URL = this.appConfigProvider.getConfig().dashboardUrl;
72
+
73
+ // console.log('[ION-LIST-CONVS-COMP] - DASHBOARD_BASE_URL ', DASHBOARD_BASE_URL)
74
+ this.PROJECT_FOR_PANEL = this.sanitizer.bypassSecurityTrustResourceUrl(DASHBOARD_BASE_URL + '#/project-for-panel');
65
75
  }
66
76
 
67
77
  ngOnInit() {
68
78
  this.isApp = this.platform.is('ios') || this.platform.is('android')
69
79
  this.logger.log('[ION-LIST-CONVS-COMP] - ngOnInit - IS-APP ', this.isApp)
70
80
  this.logger.log('[ION-LIST-CONVS-COMP] - ngOnInit - Platform', this.platform.platforms());
71
- this.watchToConnectionStatus();
81
+
72
82
  }
73
83
 
74
84
 
75
- watchToConnectionStatus() {
76
-
77
- this.networkService.checkInternetFunc().subscribe(isOnline => {
78
- this.checkInternet = isOnline
79
- this.logger.log('[ION-LIST-CONVS-COMP] - watchToConnectionStatus - isOnline', this.checkInternet)
80
85
 
81
- // checking internet connection
82
- if (this.checkInternet == true) {
83
-
84
- this.isOnline = true;
85
- } else {
86
- this.isOnline = false;
87
- }
88
- });
89
- }
90
86
  // --------------------------------------------------
91
87
  // subdsribe to event
92
88
  // --------------------------------------------------
@@ -42,12 +42,12 @@
42
42
  <ion-spinner *ngIf="showSpinnerInLoginBtn === true" name="bubbles" color="white" duration="2" ></ion-spinner>
43
43
  </button>
44
44
 
45
- <p style="color: #666666; font-size: 1.1em; text-align: center; margin-top: 16px;">
45
+ <!-- <p style="color: #666666; font-size: 1.1em; text-align: center; margin-top: 16px;">
46
46
  {{ translationMap.get('LABEL_DONT_HAVE_AN_ACCOUNT_YET') }}
47
47
  <span style="color: #03a5e8; cursor:pointer" (click)="goToSignupPage()">
48
48
  {{ translationMap.get('LABEL_SIGNUP') }}
49
49
  </span>
50
- </p>
50
+ </p> -->
51
51
 
52
52
  <p style="color: #666666; font-size: 1.1em; text-align: center; margin-top: 16px;">
53
53
  {{ translationMap.get('LABEL_FORGOT_YOUR_PASSWORD') }}
@@ -3,6 +3,7 @@ import { FormBuilder, FormGroup, Validators } from '@angular/forms';
3
3
  import { ToastController, IonInput } from '@ionic/angular';
4
4
  import { AppConfigProvider } from '../../../services/app-config';
5
5
 
6
+
6
7
  // Logger
7
8
  import { LoggerService } from 'src/chat21-core/providers/abstract/logger.service';
8
9
  import { LoggerInstance } from 'src/chat21-core/providers/logger/loggerInstance';
@@ -59,7 +60,7 @@ export class LoginComponent implements OnInit {
59
60
  this.buildForm();
60
61
  this.DASHBOARD_URL = this.appConfig.getConfig().dashboardUrl;
61
62
  this.logger.log('LOGIN-COMP OnInit DASHBOARD_URL', this.DASHBOARD_URL)
62
- this.showSpinnerInLoginBtn = false;
63
+ // this.showSpinnerInLoginBtn = false;
63
64
  }
64
65
  // ngAfterViewChecked() {
65
66
  // this.emailInputEl.setFocus()
@@ -61,7 +61,7 @@ export class BubbleMyMessageComponent implements OnInit {
61
61
  * alla chiusura controllo su quale opzione ho premuto e attivo l'azione corrispondete
62
62
  */
63
63
  presentPopover(event, msg) {
64
- console.log('presentPopover');
64
+ // console.log('presentPopover');
65
65
  // let popover = this.popoverCtrl.create(PopoverPage, { typePopup: TYPE_POPUP_DETAIL_MESSAGE, message: msg });
66
66
  // popover.present({
67
67
  // ev: event
@@ -62,7 +62,7 @@ export class BubbleOthersMessageComponent implements OnInit {
62
62
  }
63
63
 
64
64
  presentPopover(event, msg) {
65
- console.log('presentPopover');
65
+ // console.log('presentPopover');
66
66
  }
67
67
 
68
68
  }
@@ -1,25 +1,27 @@
1
+
1
2
  <ion-header no-border class="ion-no-border">
2
3
  <ion-toolbar>
3
4
 
4
5
  <ion-buttons slot="start">
5
- <ion-back-button *ngIf="isMobile"
6
- defaultHref="conversations-list"
7
- (click)="pushPage('conversations-list')">
6
+ <!-- (click)="pushPage('conversations-list')" -->
7
+ <ion-back-button text="" *ngIf="isMobile"
8
+ defaultHref="/conversations-list"
9
+ >
8
10
  </ion-back-button>
9
11
  </ion-buttons>
10
12
 
11
13
  <ion-title [class.info-open]="openInfoConversation || openInfoMessage">
12
14
 
13
- <div *ngIf="conversationAvatar" class="">
14
-
15
- <div *ngIf="conversationAvatar" class="avatar-container">
15
+ <div *ngIf="conversationAvatar" class="avatar-and-typing-wpr">
16
+ <!-- [ngStyle] = "{ 'left': platformName === 'ios' ? '55px' : '' }" -->
17
+ <div *ngIf="conversationAvatar" class="avatar-container" [ngClass] = "{ 'avatar-container-ios': platformName === 'ios' }">
16
18
  <app-avatar-profile
17
19
  [itemAvatar] = conversationAvatar
18
20
  ></app-avatar-profile>
19
21
  </div>
20
-
21
- <div *ngIf="isDirect" class="user-presence">
22
- <app-user-presence
22
+ <!-- [ngStyle] = "{ 'left': platformName === 'ios' ? '63px' : '' }" -->
23
+ <div *ngIf="isDirect" class="user-presence" [ngClass] = "{ 'user-presence-ios': platformName === 'ios' }">
24
+ <app-user-presence
23
25
  [idUser] = conversationAvatar.conversation_with
24
26
  [translationMap] = translationMap
25
27
  [borderColor] = borderColor
@@ -39,9 +41,12 @@
39
41
  </div>
40
42
 
41
43
  </div>
42
-
43
- <div *ngIf="conversationAvatar" class="tile-info-with" (click)="onOpenCloseInfoConversation()">
44
- <span class="tile-username">{{ conversationAvatar.conversation_with_fullname }} </span>
44
+ <!-- [ngClass] = "{ 'tile-info-with-ios': platformName === 'ios' ? '82px' : ''82px'' }" -->
45
+ <div *ngIf="conversationAvatar" class="tile-info-with" (click)="onOpenCloseInfoConversation()"
46
+ [ngClass] = "{ 'tile-info-with-ios': platformName === 'ios' }">
47
+ <!-- <span class="tile-username">{{ conversationAvatar.conversation_with_fullname }} </span> -->
48
+ <span class="tile-username">{{ conversation_with_fullname }} </span>
49
+
45
50
  </div>
46
51
 
47
52
  <!-- <div *ngIf="conversationWithFullname" class="tile-info-with" (click)="onOpenCloseInfoConversation()">
@@ -146,4 +146,16 @@ ion-header {
146
146
  margin: 0;
147
147
  height: 16px;
148
148
  width: 140px;
149
+ }
150
+
151
+ .tile-info-with-ios {
152
+ left: 82px !important;
153
+ }
154
+
155
+ .user-presence-ios {
156
+ left: 63px;
157
+ }
158
+
159
+ .avatar-container-ios {
160
+ left: 55px;
149
161
  }
@@ -6,7 +6,7 @@ import { ImageRepoService } from 'src/chat21-core/providers/abstract/image-repo.
6
6
  import { LoggerService } from 'src/chat21-core/providers/abstract/logger.service';
7
7
  import { LoggerInstance } from 'src/chat21-core/providers/logger/loggerInstance';
8
8
  import { setConversationAvatar, setChannelType } from 'src/chat21-core/utils/utils';
9
-
9
+ import { Platform } from '@ionic/angular';
10
10
  @Component({
11
11
  selector: 'app-header-conversation-detail',
12
12
  templateUrl: './header-conversation-detail.component.html',
@@ -31,7 +31,9 @@ export class HeaderConversationDetailComponent implements OnInit, OnChanges {
31
31
  membersConversation = ['SYSTEM'];
32
32
  fullNameConv: string;
33
33
  idConv: string;
34
-
34
+ conversation_with_fullname: string;
35
+ platformName: string;
36
+
35
37
  private logger: LoggerService = LoggerInstance.getInstance();
36
38
 
37
39
  /**
@@ -41,6 +43,7 @@ export class HeaderConversationDetailComponent implements OnInit, OnChanges {
41
43
  constructor(
42
44
  public imageRepoService: ImageRepoService,
43
45
  private route: ActivatedRoute,
46
+ public platform: Platform
44
47
  ) {
45
48
  this.route.paramMap.subscribe(params => {
46
49
 
@@ -59,7 +62,8 @@ export class HeaderConversationDetailComponent implements OnInit, OnChanges {
59
62
  // ----------------------------------------------------
60
63
  ngOnInit() {
61
64
  this.logger.log('[CONVS-DETAIL][HEADER] - (ngOnInit) - idLoggedUser', this.idLoggedUser);
62
- // this.logger.log('[CONVS-DETAIL][HEADER] - (ngOnInit) - conversationAvatar', this.conversationAvatar);
65
+ this.logger.log('[CONVS-DETAIL][HEADER] - (ngOnInit) - conversationAvatar', this.conversationAvatar);
66
+ this.conversation_with_fullname = this.conversationAvatar.conversation_with_fullname
63
67
 
64
68
  this.initialize();
65
69
  }
@@ -79,7 +83,7 @@ export class HeaderConversationDetailComponent implements OnInit, OnChanges {
79
83
  if (this.conversationAvatar) {
80
84
  this.conversationAvatar.imageurl = this.imageRepoService.getImagePhotoUrl(this.conversationAvatar.uid)
81
85
  }
82
- this.logger.log('[CONVS-DETAIL][HEADER] - (ngOnChanges) - conversationAvatar usecase UNDEFINED conversationAvatar', this.conversationAvatar);
86
+ this.logger.log('[CONVS-DETAIL][HEADER] - (ngOnChanges) - conversationAvatar usecase UNDEFINED conversationAvatar', this.conversationAvatar);
83
87
  }
84
88
 
85
89
  this.logger.log('[CONVS-DETAIL][HEADER] - (ngOnChanges) - isOpenInfoConversation', this.isOpenInfoConversation);
@@ -91,7 +95,7 @@ export class HeaderConversationDetailComponent implements OnInit, OnChanges {
91
95
  // @ Initialize (called in ngOnInit)
92
96
  // ----------------------------------------------------
93
97
  initialize() {
94
-
98
+ this.getPlatformName()
95
99
  if (this.conversationAvatar && this.conversationAvatar.channelType === this.DIRECT) {
96
100
  this.isDirect = true;
97
101
  } else if (this.idLoggedUser) {
@@ -99,6 +103,18 @@ export class HeaderConversationDetailComponent implements OnInit, OnChanges {
99
103
  }
100
104
  }
101
105
 
106
+ getPlatformName() {
107
+ this.logger.log('getPlatformName this.platform', this.platform)
108
+ if (this.platform.is('ios')) {
109
+ this.platformName = 'ios'
110
+ this.logger.log('getPlatformName platformName', this.platformName)
111
+ } else if (this.platform.is('android')){
112
+ this.platformName = 'android'
113
+ this.logger.log('getPlatformName platformName', this.platformName)
114
+ }
115
+
116
+ }
117
+
102
118
  onOpenCloseInfoConversation() {
103
119
  this.openInfoMessage = false;
104
120
  this.openInfoConversation = !this.openInfoConversation;
@@ -48,9 +48,10 @@
48
48
  </div>
49
49
 
50
50
  <div class="buttons-right">
51
- <ion-button [disabled]="!conversationEnabled" class="send-button right active" ion-button fill="clear"
51
+ <!-- [disabled]="conversationEnabled === false" -->
52
+ <ion-button [disabled]="conversationEnabled === false" class="send-button right active" ion-button fill="clear"
52
53
  (click)="sendMessage(messageString)">
53
- <ion-icon slot="icon-only" name="send"></ion-icon>
54
+ <ion-icon [ngClass]="{'send-msg-disabled': conversationEnabled === false,'send-msg-activated': conversationEnabled === true }" slot="icon-only" name="send"></ion-icon>
54
55
  </ion-button>
55
56
  </div>
56
57
  </ion-col>