@chat21/chat21-ionic 3.0.55-RC6 → 3.0.57

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 (73) hide show
  1. package/CHANGELOG.md +95 -1
  2. package/package.json +1 -1
  3. package/src/app/app.component.scss +1 -0
  4. package/src/app/app.component.ts +615 -515
  5. package/src/app/app.module.ts +1 -1
  6. package/src/app/chatlib/conversation-detail/conversation-content/conversation-content.component.ts +2 -1
  7. package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.html +44 -24
  8. package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.scss +7 -8
  9. package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.ts +9 -7
  10. package/src/app/chatlib/conversation-detail/message/avatar/avatar.component.ts +1 -1
  11. package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.html +22 -14
  12. package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.ts +85 -45
  13. package/src/app/chatlib/conversation-detail/message/buttons/action-button/action-button.component.scss +1 -1
  14. package/src/app/chatlib/conversation-detail/message/buttons/action-button/action-button.component.ts +1 -1
  15. package/src/app/chatlib/conversation-detail/message/buttons/link-button/link-button.component.scss +4 -4
  16. package/src/app/chatlib/conversation-detail/message/buttons/link-button/link-button.component.ts +1 -1
  17. package/src/app/chatlib/conversation-detail/message/buttons/text-button/text-button.component.scss +1 -1
  18. package/src/app/chatlib/conversation-detail/message/buttons/text-button/text-button.component.ts +1 -1
  19. package/src/app/chatlib/conversation-detail/message/frame/frame.component.ts +4 -2
  20. package/src/app/chatlib/conversation-detail/message/image/image.component.html +9 -8
  21. package/src/app/chatlib/conversation-detail/message/image/image.component.scss +3 -2
  22. package/src/app/chatlib/conversation-detail/message/image/image.component.ts +35 -3
  23. package/src/app/chatlib/conversation-detail/message/info-message/info-message.component.ts +1 -1
  24. package/src/app/chatlib/conversation-detail/message/message-attachment/message-attachment.component.html +56 -0
  25. package/src/app/chatlib/conversation-detail/message/message-attachment/message-attachment.component.scss +169 -0
  26. package/src/app/chatlib/conversation-detail/message/message-attachment/message-attachment.component.spec.ts +33 -0
  27. package/src/app/chatlib/conversation-detail/message/message-attachment/message-attachment.component.ts +80 -0
  28. package/src/app/chatlib/conversation-detail/message/return-receipt/return-receipt.component.ts +1 -1
  29. package/src/app/chatlib/conversation-detail/message/text/text.component.html +2 -1
  30. package/src/app/chatlib/conversation-detail/message/text/text.component.ts +4 -4
  31. package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.html +40 -13
  32. package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.scss +147 -1
  33. package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.ts +47 -2
  34. package/src/app/components/authentication/login/login.component.scss +1 -1
  35. package/src/app/components/contacts-directory/contacts-directory.component.html +3 -2
  36. package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.html +2 -2
  37. package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.ts +28 -13
  38. package/src/app/components/conversation-detail/message-text-area/message-text-area.component.html +1 -2
  39. package/src/app/components/conversation-detail/message-text-area/message-text-area.component.scss +10 -6
  40. package/src/app/components/conversation-detail/message-text-area/message-text-area.component.ts +46 -43
  41. package/src/app/components/conversation-info/advanced-info-accordion/advanced-info-accordion.component.html +2 -2
  42. package/src/app/components/conversation-info/info-content/info-content.component.ts +15 -5
  43. package/src/app/components/conversation-info/info-group/info-group.component.ts +4 -4
  44. package/src/app/components/utils/avatar-profile/avatar-profile.component.html +2 -1
  45. package/src/app/components/utils/user-presence/user-presence.component.ts +8 -6
  46. package/src/app/pages/contacts-directory/contacts-directory.page.ts +1 -1
  47. package/src/app/pages/conversation-detail/conversation-detail.page.html +4 -1
  48. package/src/app/pages/conversation-detail/conversation-detail.page.ts +218 -42
  49. package/src/app/pages/conversations-list/conversations-list.page.html +1 -1
  50. package/src/app/pages/conversations-list/conversations-list.page.ts +135 -45
  51. package/src/app/pages/loader-preview/loader-preview.page.html +1 -1
  52. package/src/app/pages/loader-preview/loader-preview.page.ts +18 -5
  53. package/src/app/pages/profile-info/profile-info.page.html +2 -0
  54. package/src/app/services/nav-proxy.service.ts +2 -2
  55. package/src/app/services/network-service/network.service.spec.ts +12 -0
  56. package/src/app/services/network-service/network.service.ts +46 -0
  57. package/src/app/shared/shared.module.ts +2 -0
  58. package/src/assets/i18n/en.json +4 -2
  59. package/src/assets/i18n/it.json +5 -3
  60. package/src/chat21-core/providers/abstract/app-storage.service.ts +2 -2
  61. package/src/chat21-core/providers/chat-manager.ts +2 -1
  62. package/src/chat21-core/providers/firebase/firebase-archivedconversations-handler.ts +3 -2
  63. package/src/chat21-core/providers/firebase/firebase-auth-service.ts +112 -69
  64. package/src/chat21-core/providers/firebase/firebase-conversations-handler.ts +4 -4
  65. package/src/chat21-core/providers/firebase/firebase-image-repo.ts +1 -1
  66. package/src/chat21-core/providers/firebase/firebase-notifications.ts +29 -29
  67. package/src/chat21-core/providers/firebase/firebase-presence.service.ts +1 -0
  68. package/src/chat21-core/providers/localSessionStorage.ts +155 -154
  69. package/src/chat21-core/providers/tiledesk/tiledesk-auth.service.ts +42 -12
  70. package/src/chat21-core/utils/user-typing/user-typing.component.html +6 -11
  71. package/src/chat21-core/utils/utils.ts +3 -3
  72. package/src/global.scss +17 -0
  73. package/src/index.html +27 -59
@@ -1,7 +1,7 @@
1
1
  import { Component, EventEmitter, Input, OnInit, Output, SimpleChanges } from '@angular/core';
2
2
 
3
3
  @Component({
4
- selector: 'tiledeskwidget-image',
4
+ selector: 'chat-image',
5
5
  templateUrl: './image.component.html',
6
6
  styleUrls: ['./image.component.scss']
7
7
  })
@@ -11,17 +11,49 @@ export class ImageComponent implements OnInit {
11
11
  @Input() width: string;
12
12
  @Input() height: number;
13
13
  @Output() onImageRendered = new EventEmitter<boolean>();
14
+
14
15
  loading: boolean = true
16
+ tooltipMessage: string;
17
+
18
+ tooltipOptions = {
19
+ 'show-delay': 0,
20
+ 'tooltip-class': 'chat-tooltip',
21
+ 'theme': 'light',
22
+ 'shadow': false,
23
+ 'hide-delay-mobile': 0,
24
+ 'hideDelayAfterClick': 3000,
25
+ 'hide-delay': 200
26
+ };
15
27
 
16
28
  constructor() { }
17
29
 
18
30
  ngOnInit() {
31
+ this.getBrowserLanguageAndTranslateTooltipMsg()
32
+ }
33
+ getBrowserLanguageAndTranslateTooltipMsg() {
34
+ var userLang = navigator.language;
35
+ // console.log('Image COMP - userLang ', userLang)
36
+ if (userLang === 'en') {
37
+ this.tooltipMessage = "Click to download"
38
+ } else {
39
+ this.tooltipMessage = "Clicca per scaricare"
40
+ }
19
41
  }
20
42
 
21
- onLoaded(event){
43
+ onLoaded(event) {
22
44
  this.loading = false
23
45
  this.onImageRendered.emit(true)
24
46
  }
25
47
 
26
-
48
+ downloadImage(url: string, fileName: string) {
49
+ // console.log('Image COMP - IMAGE URL ', url)
50
+ // console.log('Image COMP - IMAGE FILENAME ', fileName)
51
+ const a: any = document.createElement('a');
52
+ a.href = url;
53
+ a.download = fileName;
54
+ document.body.appendChild(a);
55
+ a.style = 'display: none';
56
+ a.click();
57
+ a.remove();
58
+ }
27
59
  }
@@ -6,7 +6,7 @@ import { replaceEndOfLine } from 'src/chat21-core/utils/utils';
6
6
  import { LoggerInstance } from 'src/chat21-core/providers/logger/loggerInstance';
7
7
 
8
8
  @Component({
9
- selector: 'tiledeskwidget-info-message',
9
+ selector: 'chat-info-message',
10
10
  templateUrl: './info-message.component.html',
11
11
  styleUrls: ['./info-message.component.scss']
12
12
  })
@@ -0,0 +1,56 @@
1
+ <div id="buttons-in-message">
2
+
3
+ <span *ngFor="let button of buttons" class="div-button">
4
+
5
+ <chat-text-button-attachment *ngIf="button.type === 'text' && isLastMessage === true" class="div-button"
6
+ [button]="button"
7
+ [themeColor]="stylesMap.get('themeColor')"
8
+ [foregroundColor]="stylesMap.get('foregroundColor')"
9
+ (onButtonClicked)="returnOnAttachmentButtonClicked($event)">
10
+ </chat-text-button-attachment>
11
+
12
+ <chat-link-button-attachment *ngIf="button.type === 'url'" class="div-button"
13
+ [button]="button"
14
+ [themeColor]="stylesMap.get('themeColor')"
15
+ [foregroundColor]="stylesMap.get('foregroundColor')"
16
+ (onButtonClicked)="returnOnAttachmentButtonClicked($event)">
17
+ </chat-link-button-attachment>
18
+
19
+ <chat-action-button-attachment *ngIf="button.type === 'action' && isLastMessage === true" class="div-button"
20
+ [button]="button"
21
+ [themeColor]="stylesMap.get('themeColor')"
22
+ [foregroundColor]="stylesMap.get('foregroundColor')"
23
+ (onButtonClicked)="returnOnAttachmentButtonClicked($event)">
24
+ </chat-action-button-attachment>
25
+
26
+ <!-- <div class="alt">{{button.value}}</div> -->
27
+ <!-- <div *ngIf="button.type === 'text' && isLastMessage === true" class="button-in-msg {{button.type}}" (click)="actionButtonText(button)" title="{{button.value}}">
28
+ {{button.value}}
29
+ </div> -->
30
+
31
+ <!-- <div *ngIf="button.type === 'url'" class="button-in-msg {{button.type}}" (click)="actionButtonUrl(button)" title="{{button.value}}">
32
+ <span *ngIf="button.target !== 'self'" class="icon-button-action">
33
+ <!- - <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="black" width="12px" height="12px">
34
+ <path d="M0 0h24v24H0z" fill="none"/>
35
+ <path d="M9 5v2h6.59L4 18.59 5.41 20 17 8.41V15h2V5z"/>
36
+ </svg> - ->
37
+ <svg style="transform: rotateZ(45deg);" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="black" width="18px" height="18px">
38
+ <path d="M0 0h24v24H0z" fill="none"/>
39
+ <path d="M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z"/>
40
+ </svg>
41
+ </span>
42
+
43
+ {{button.value}}
44
+ <div class="clear"></div>
45
+ </div> -->
46
+
47
+ <!-- <div *ngIf="button.type === 'action' && isLastMessage === true" #actionButton id="actionButton" class="button-in-msg {{button.type}}" (click)="actionButtonAction(button)" title="{{button.value}}">
48
+ {{button.value}}
49
+ </div> -->
50
+
51
+ <!-- <button tabindex="1413" [disabled]="!preChatFormGroup.controls.name.valid || !preChatFormGroup.controls.email.valid" class="c21-button-primary" (click)="openNewConversation()" [ngStyle]="{'background-color': g.themeColor, 'border-color': g.themeColor, 'color': g.themeForegroundColor }">
52
+
53
+ </button> -->
54
+
55
+ </span>
56
+ </div>
@@ -0,0 +1,169 @@
1
+ #buttons-in-message {
2
+ text-align: left;
3
+ display: block;
4
+ margin-top: -6px;
5
+ margin-bottom: 5px;
6
+ height: auto;
7
+
8
+
9
+ .div-button {
10
+ display: inline-block;
11
+ .button-in-msg {
12
+ padding: 8px 16px!important;
13
+ }
14
+ }
15
+
16
+
17
+
18
+
19
+ // .button-success {
20
+ // background-color: white;
21
+ // color: #333333;
22
+ // border: 1px solid rgb(28, 184, 65);
23
+ // }
24
+ // .button-error {
25
+ // background-color: white;
26
+ // color: #333333;
27
+ // border: 1px solid rgb(202, 60, 60);
28
+ // }
29
+ // .button-warning {
30
+ // background-color: white;
31
+ // color: #333333;
32
+ // border: 1px solid rgb(223, 117, 20);
33
+ // }
34
+ // .button-secondary {
35
+ // background-color: white;
36
+ // color: #333333;
37
+ // border: 1px solid rgb(66, 184, 221);
38
+ // }
39
+ // .button-success:hover {
40
+ // color: white;
41
+ // background: rgb(28, 184, 65);
42
+ // }
43
+ // .button-error:hover {
44
+ // color: white;
45
+ // background: rgb(202, 60, 60);
46
+ // }
47
+ // .button-warning:hover {
48
+ // color: white;
49
+ // background: rgb(223, 117, 20);
50
+ // }
51
+ // .button-secondary:hover {
52
+ // color: white;
53
+ // background: rgb(66, 184, 221);
54
+ // }
55
+ }
56
+
57
+
58
+ .button-in-msg {
59
+ position: relative;
60
+ max-width: 300px;
61
+ min-width: inherit;
62
+ cursor: pointer;
63
+ border: 1px solid rgb(42, 106, 193);
64
+ border-radius: 20px;
65
+ margin: 3px;
66
+ background: transparent;
67
+ overflow: hidden;
68
+ font-family: 'Muli', sans-serif;
69
+ font-size: 15px;
70
+ -o-text-overflow: ellipsis;
71
+ text-overflow: ellipsis;
72
+ white-space: nowrap;
73
+ letter-spacing: -0.24px;
74
+ -webkit-font-smoothing: antialiased;
75
+ color: rgb(42, 106, 193);
76
+ line-height: 16px;
77
+ // &:focus,
78
+ // &:hover {
79
+ // color: white;
80
+ // background: rgb(42, 106, 193);
81
+ // }
82
+
83
+
84
+ &.text {
85
+ // color: rgb(42, 106, 193);
86
+ transition: background-color .6s ease;
87
+ &:focus,
88
+ &:hover {
89
+ color: white;
90
+ background: rgb(42, 106, 193);
91
+ .icon-button-action {
92
+ svg {
93
+ fill: rgb(255,255,255);
94
+ }
95
+ }
96
+ }
97
+ }
98
+ &.url {
99
+ transition: background-color .6s ease;
100
+ .icon-button-action {
101
+ position: absolute;
102
+ top: -1;
103
+ right: 1;
104
+ svg {
105
+ fill: rgb(42, 106, 193);
106
+ }
107
+ }
108
+ &:focus,
109
+ &:hover {
110
+ color: white;
111
+ background: rgb(42, 106, 193);
112
+ .icon-button-action {
113
+ svg {
114
+ fill: rgb(255,255,255);
115
+ }
116
+ }
117
+ }
118
+ }
119
+ &.action {
120
+ background: rgb(255,255,255);
121
+ transition: background-color .6s ease;
122
+ &:focus,
123
+ &:hover {
124
+ color: white;
125
+ background: rgb(42, 106, 193);
126
+ .icon-button-action {
127
+ svg {
128
+ fill: rgb(255,255,255);
129
+ }
130
+ }
131
+ }
132
+ &:after {
133
+ content: "";
134
+ position: absolute;
135
+ width: 0;
136
+ height: 0;
137
+ top: 50%;
138
+ left: 50%;
139
+ transform-style: flat;
140
+ transform: translate3d(-50%,-50%,0);
141
+ background: rgba(white,.2);
142
+ border-radius: 100%;
143
+ transition: width .5s ease, height .5s ease;
144
+ }
145
+ &.active {
146
+ &:after {
147
+ width: 200px;
148
+ height: 200px;
149
+ }
150
+
151
+ }
152
+
153
+ // &:focus{
154
+ // color: white;
155
+ // background: rgb(42, 106, 193);
156
+ // }
157
+ // &:hover {
158
+ // transition: background-color .6s ease;
159
+ // // color: white;
160
+ // // background: rgb(42, 106, 193);
161
+ // }
162
+ // &:active {
163
+ // &:after {
164
+ // width: 200px;
165
+ // height: 200px;
166
+ // }
167
+ // }
168
+ }
169
+ }
@@ -0,0 +1,33 @@
1
+ import { ActionButtonComponent } from './../message/buttons/action-button/action-button.component';
2
+ import { TextButtonComponent } from './../message/buttons/text-button/text-button.component';
3
+ import { LinkButtonComponent } from './../message/buttons/link-button/link-button.component';
4
+ import { async, ComponentFixture, TestBed } from '@angular/core/testing';
5
+
6
+ import { MessageAttachmentComponent } from './message-attachment.component';
7
+
8
+ describe('MessageAttachmentComponent', () => {
9
+ let component: MessageAttachmentComponent;
10
+ let fixture: ComponentFixture<MessageAttachmentComponent>;
11
+
12
+ beforeEach(async(() => {
13
+ TestBed.configureTestingModule({
14
+ declarations: [
15
+ MessageAttachmentComponent,
16
+ LinkButtonComponent,
17
+ TextButtonComponent,
18
+ ActionButtonComponent
19
+ ]
20
+ })
21
+ .compileComponents();
22
+ }));
23
+
24
+ beforeEach(() => {
25
+ fixture = TestBed.createComponent(MessageAttachmentComponent);
26
+ component = fixture.componentInstance;
27
+ fixture.detectChanges();
28
+ });
29
+
30
+ it('should create', () => {
31
+ expect(component).toBeTruthy();
32
+ });
33
+ });
@@ -0,0 +1,80 @@
1
+ import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
2
+
3
+ // models
4
+ import { MessageModel } from 'src/chat21-core/models/message';
5
+
6
+ @Component({
7
+ selector: 'chat-message-attachment',
8
+ templateUrl: './message-attachment.component.html',
9
+ styleUrls: ['./message-attachment.component.scss']
10
+ })
11
+ export class MessageAttachmentComponent implements OnInit {
12
+
13
+ // ========= begin:: Input/Output values ============//
14
+ @Output() onAttachmentButtonClicked = new EventEmitter<any>();
15
+ @Input() message: MessageModel;
16
+ @Input() isLastMessage: boolean;
17
+ @Input() stylesMap: Map<string, string>;
18
+ // ========= end:: Input/Output values ============//
19
+
20
+ public type: string;
21
+ public buttons: [any];
22
+
23
+ constructor() { }
24
+
25
+ ngOnInit() {
26
+ this.getAttachmentButton();
27
+ }
28
+
29
+ /** */
30
+ getAttachmentButton() {
31
+ if (this.message && this.message.attributes && this.message.attributes.attachment) {
32
+ try {
33
+ this.type = this.message.attributes.attachment.type;
34
+ // console.log(this.type);
35
+ } catch (error) {
36
+ // this.g.wdLog(['> Error :' + error]);
37
+ return;
38
+ }
39
+ try {
40
+ this.buttons = this.message.attributes.attachment.buttons;
41
+ } catch (error) {
42
+ // this.g.wdLog(['> Error :' + error]);
43
+ return;
44
+ }
45
+ }
46
+ }
47
+
48
+ returnOnAttachmentButtonClicked(event: any){
49
+ if ( event && event.target ) {
50
+ const ev = {target: event.target, message: this.message, currentTarget: this }
51
+ this.onAttachmentButtonClicked.emit(ev);
52
+ }
53
+ }
54
+
55
+ // actionButtonText(event: any) {
56
+ // if ( event ) {
57
+ // this.eventOpenAttachment.emit(event.value);
58
+ // }
59
+ // }
60
+
61
+ /** */
62
+ // actionButtonUrl(event: any) {
63
+ // if ( event && event.link && event.link !== '') {
64
+ // this.eventClickOnAttachmentButton.emit(event);
65
+ // }
66
+ // }
67
+
68
+ // actionButtonAction(event: any) {
69
+ // if ( event && event.action && event.action !== '') {
70
+ // const spanCheck = window.document.getElementById('actionButton');
71
+ // if (spanCheck) {
72
+ // spanCheck.classList.add('active');
73
+ // setTimeout(function() {
74
+ // spanCheck.classList.remove('active');
75
+ // }, 400);
76
+ // }
77
+ // this.eventClickOnAttachmentButton.emit(event);
78
+ // }
79
+ // }
80
+ }
@@ -2,7 +2,7 @@ import { Component, Input, OnInit } from '@angular/core';
2
2
  import { MSG_STATUS_RETURN_RECEIPT, MSG_STATUS_SENT, MSG_STATUS_SENT_SERVER } from 'src/chat21-core/utils/constants';
3
3
 
4
4
  @Component({
5
- selector: 'tiledeskwidget-return-receipt',
5
+ selector: 'chat-return-receipt',
6
6
  templateUrl: './return-receipt.component.html',
7
7
  styleUrls: ['./return-receipt.component.scss']
8
8
  })
@@ -1,4 +1,5 @@
1
- <p [ngStyle] = "{ 'width': media_width +'px' }" #messageEl class="message_innerhtml marked"
1
+ <!-- [ngStyle] = "{ 'width': message.type === 'image' ? media_width +'px' : '' }" -->
2
+ <p #messageEl class="message_innerhtml marked"
2
3
  [innerHTML]="printMessage(text, messageEl, this) | htmlEntiesEncode | marked"
3
4
  [ngStyle]="{'color': '$'+ color }">
4
5
  </p>
@@ -1,7 +1,7 @@
1
1
  import { Component, EventEmitter, Input, OnChanges, OnInit, Output, Sanitizer } from '@angular/core';
2
2
  import { MAX_WIDTH_IMAGES } from 'src/chat21-core/utils/constants';
3
3
  @Component({
4
- selector: 'tiledeskwidget-text',
4
+ selector: 'chat-text',
5
5
  templateUrl: './text.component.html',
6
6
  styleUrls: ['./text.component.scss']
7
7
  })
@@ -36,7 +36,7 @@ export class TextComponent implements OnInit {
36
36
 
37
37
  ngOnChanges() {
38
38
  if (this.message.type === 'image') {
39
- console.log('TextComponent message ', this.message)
39
+ // console.log('TextComponent message ', this.message)
40
40
  if (this.message.metadata.width && this.message.metadata.width > MAX_WIDTH_IMAGES) {
41
41
 
42
42
  const ratio = (this.message.metadata['width'] / this.message.metadata['height']);
@@ -44,11 +44,11 @@ export class TextComponent implements OnInit {
44
44
  this.media_width = MAX_WIDTH_IMAGES;
45
45
  this.media_height = MAX_WIDTH_IMAGES / ratio;
46
46
 
47
- console.log('TextComponent media_width ', this.media_width, ' media_height' , this.media_height)
47
+ // console.log('TextComponent media_width ', this.media_width, ' media_height' , this.media_height)
48
48
  } else {
49
49
  this.media_width = this.message.metadata.width;
50
50
  this.media_height = this.message.metadata.height;
51
- console.log('TextComponent media_width ', this.media_width, ' media_height' , this.media_height)
51
+ // console.log('TextComponent media_width ', this.media_width, ' media_height' , this.media_height)
52
52
  }
53
53
  }
54
54
  }
@@ -22,15 +22,38 @@
22
22
  </div>
23
23
  </div> -->
24
24
 
25
+ <!-- -------------------------------------------------------------------------- -->
26
+ <!-- New <ion-spinner class="spinner-middle" style="margin-left: 19px;"></ion-spinner> -->
27
+ <!-- -------------------------------------------------------------------------- -->
28
+ <ion-item *ngIf="isOnline === false" button="true" lines="none" class="ion-no-padding waiting-for-connection">
29
+ <ion-avatar item-start>
30
+ <div class="sk-fading-circle">
31
+ <div class="sk-circle1 sk-circle"></div>
32
+ <div class="sk-circle2 sk-circle"></div>
33
+ <div class="sk-circle3 sk-circle"></div>
34
+ <div class="sk-circle4 sk-circle"></div>
35
+ <div class="sk-circle5 sk-circle"></div>
36
+ <div class="sk-circle6 sk-circle"></div>
37
+ <div class="sk-circle7 sk-circle"></div>
38
+ <div class="sk-circle8 sk-circle"></div>
39
+ <div class="sk-circle9 sk-circle"></div>
40
+ <div class="sk-circle10 sk-circle"></div>
41
+ <div class="sk-circle11 sk-circle"></div>
42
+ <div class="sk-circle12 sk-circle"></div>
43
+ </div>
44
+ </ion-avatar>
45
+ <ion-label part="message-text" class="waiting-for-network-msg"> Waiting for network</ion-label>
46
+ </ion-item>
25
47
 
26
- <ion-item button="true" lines="none" class="ion-no-padding" [class.ion-selected]="conversation.uid === uidConvSelected" *ngFor="let conversation of listConversations"
27
- (click)="openConversationByID(conversation)">
28
- <!-- (mouseup)="openMessageList()" -->
48
+ <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)">
50
+ <div tabindex="0"></div>
29
51
 
30
-
31
52
  <!-- <div [class.selected]="conversation.uid === uidConvSelected"></div> -->
32
53
  <ion-avatar item-start>
33
- <div #avatarPlaceholder class="avatar-placeholder" [style.background-color]="conversation.color"
54
+ <!-- [style.background-color]="conversation.color" -->
55
+ <div #avatarPlaceholder class="avatar-placeholder"
56
+ [ngStyle]="{'background': 'linear-gradient(rgb(255,255,255) -125%,' + conversation.color + ')'}"
34
57
  [innerHTML]="conversation.avatar"></div>
35
58
  <div *ngIf="conversation.image" #avatarImage class="avatar-profile"
36
59
  [style.background-image]="'url(' + conversation.image + ')'"></div>
@@ -50,12 +73,14 @@
50
73
  [innerHTML]="conversation.last_message_text"></p> -->
51
74
 
52
75
  <!-- <div *ngIf="conversation.type === 'image'" class="icon-image-before-msg-wpr"> -->
53
- <ion-icon *ngIf="conversation.type === 'image' && conversation.type !== 'file' " name="image-outline" class="icon-image-before-msg"></ion-icon>
54
- <ion-icon *ngIf="conversation.type === 'file' && conversation.type !== 'image'" name="attach-outline" class="icon-attach-before-msg"></ion-icon>
76
+ <ion-icon *ngIf="conversation.type === 'image' && conversation.type !== 'file' " name="image-outline"
77
+ class="icon-image-before-msg"></ion-icon>
78
+ <ion-icon *ngIf="conversation.type === 'file' && conversation.type !== 'image'" name="attach-outline"
79
+ class="icon-attach-before-msg"></ion-icon>
55
80
  <!-- </div> -->
56
81
  <!-- [innerHTML]="conversation.last_message_text" -->
57
82
  <span [class.not-read]="conversation.is_new">
58
- {{ conversation.last_message_text }}
83
+ {{ conversation.last_message_text }}
59
84
  </span>
60
85
  </div>
61
86
  </ion-label>
@@ -78,20 +103,22 @@
78
103
 
79
104
  <div item-end *ngIf="conversation?.archived" class="achived-icon-wpr">
80
105
  <span *ngIf="(conversation.timestamp | amDateFormat:'YYYY') === currentYear" class="time-in-archived">
81
- {{browserLang === 'it' ? (conversation.timestamp| amDateFormat:'DD MMM') : (conversation.timestamp | amDateFormat:'MMM DD')}}
82
-
106
+ {{browserLang === 'it' ? (conversation.timestamp| amDateFormat:'DD MMM') : (conversation.timestamp |
107
+ amDateFormat:'MMM DD')}}
108
+
83
109
  <!-- {{conversation.timestamp | amDateFormat:'DD MMM'}} -->
84
110
  </span>
85
111
  <span *ngIf="(conversation.timestamp | amDateFormat:'YYYY') !== currentYear" class="time-in-archived">
86
- {{browserLang === 'it' ? (conversation.timestamp| amDateFormat:'DD MMM') : (conversation.timestamp | amDateFormat:'MMM DD YYYY')}}
112
+ {{browserLang === 'it' ? (conversation.timestamp| amDateFormat:'DD MMM') : (conversation.timestamp |
113
+ amDateFormat:'MMM DD YYYY')}}
87
114
  <!-- {{conversation.timestamp | amDateFormat:'DD MMM YYYY'}} -->
88
115
  </span>
89
116
  <i class="material-icons" item-end style="font-size: 15px;font-weight: 400;color: #666666;"> history </i>
90
117
  </div>
91
118
 
92
119
  <!-- && !conversation?.archived -->
93
- <div item-end class="notification_point"
94
- [ngClass]="{'notification_point-on-desktop': !isApp }" *ngIf="conversation.is_new">
120
+ <div item-end class="notification_point" [ngClass]="{'notification_point-on-desktop': !isApp }"
121
+ *ngIf="conversation.is_new">
95
122
  </div>
96
123
 
97
124
  </ion-item>