@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.
- package/CHANGELOG.md +95 -1
- package/package.json +1 -1
- package/src/app/app.component.scss +1 -0
- package/src/app/app.component.ts +615 -515
- package/src/app/app.module.ts +1 -1
- package/src/app/chatlib/conversation-detail/conversation-content/conversation-content.component.ts +2 -1
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.html +44 -24
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.scss +7 -8
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.ts +9 -7
- package/src/app/chatlib/conversation-detail/message/avatar/avatar.component.ts +1 -1
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.html +22 -14
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.ts +85 -45
- package/src/app/chatlib/conversation-detail/message/buttons/action-button/action-button.component.scss +1 -1
- package/src/app/chatlib/conversation-detail/message/buttons/action-button/action-button.component.ts +1 -1
- package/src/app/chatlib/conversation-detail/message/buttons/link-button/link-button.component.scss +4 -4
- package/src/app/chatlib/conversation-detail/message/buttons/link-button/link-button.component.ts +1 -1
- package/src/app/chatlib/conversation-detail/message/buttons/text-button/text-button.component.scss +1 -1
- package/src/app/chatlib/conversation-detail/message/buttons/text-button/text-button.component.ts +1 -1
- package/src/app/chatlib/conversation-detail/message/frame/frame.component.ts +4 -2
- package/src/app/chatlib/conversation-detail/message/image/image.component.html +9 -8
- package/src/app/chatlib/conversation-detail/message/image/image.component.scss +3 -2
- package/src/app/chatlib/conversation-detail/message/image/image.component.ts +35 -3
- package/src/app/chatlib/conversation-detail/message/info-message/info-message.component.ts +1 -1
- package/src/app/chatlib/conversation-detail/message/message-attachment/message-attachment.component.html +56 -0
- package/src/app/chatlib/conversation-detail/message/message-attachment/message-attachment.component.scss +169 -0
- package/src/app/chatlib/conversation-detail/message/message-attachment/message-attachment.component.spec.ts +33 -0
- package/src/app/chatlib/conversation-detail/message/message-attachment/message-attachment.component.ts +80 -0
- package/src/app/chatlib/conversation-detail/message/return-receipt/return-receipt.component.ts +1 -1
- package/src/app/chatlib/conversation-detail/message/text/text.component.html +2 -1
- package/src/app/chatlib/conversation-detail/message/text/text.component.ts +4 -4
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.html +40 -13
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.scss +147 -1
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.ts +47 -2
- package/src/app/components/authentication/login/login.component.scss +1 -1
- package/src/app/components/contacts-directory/contacts-directory.component.html +3 -2
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.html +2 -2
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.ts +28 -13
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.html +1 -2
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.scss +10 -6
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.ts +46 -43
- package/src/app/components/conversation-info/advanced-info-accordion/advanced-info-accordion.component.html +2 -2
- package/src/app/components/conversation-info/info-content/info-content.component.ts +15 -5
- package/src/app/components/conversation-info/info-group/info-group.component.ts +4 -4
- package/src/app/components/utils/avatar-profile/avatar-profile.component.html +2 -1
- package/src/app/components/utils/user-presence/user-presence.component.ts +8 -6
- package/src/app/pages/contacts-directory/contacts-directory.page.ts +1 -1
- package/src/app/pages/conversation-detail/conversation-detail.page.html +4 -1
- package/src/app/pages/conversation-detail/conversation-detail.page.ts +218 -42
- package/src/app/pages/conversations-list/conversations-list.page.html +1 -1
- package/src/app/pages/conversations-list/conversations-list.page.ts +135 -45
- package/src/app/pages/loader-preview/loader-preview.page.html +1 -1
- package/src/app/pages/loader-preview/loader-preview.page.ts +18 -5
- package/src/app/pages/profile-info/profile-info.page.html +2 -0
- package/src/app/services/nav-proxy.service.ts +2 -2
- package/src/app/services/network-service/network.service.spec.ts +12 -0
- package/src/app/services/network-service/network.service.ts +46 -0
- package/src/app/shared/shared.module.ts +2 -0
- package/src/assets/i18n/en.json +4 -2
- package/src/assets/i18n/it.json +5 -3
- package/src/chat21-core/providers/abstract/app-storage.service.ts +2 -2
- package/src/chat21-core/providers/chat-manager.ts +2 -1
- package/src/chat21-core/providers/firebase/firebase-archivedconversations-handler.ts +3 -2
- package/src/chat21-core/providers/firebase/firebase-auth-service.ts +112 -69
- package/src/chat21-core/providers/firebase/firebase-conversations-handler.ts +4 -4
- package/src/chat21-core/providers/firebase/firebase-image-repo.ts +1 -1
- package/src/chat21-core/providers/firebase/firebase-notifications.ts +29 -29
- package/src/chat21-core/providers/firebase/firebase-presence.service.ts +1 -0
- package/src/chat21-core/providers/localSessionStorage.ts +155 -154
- package/src/chat21-core/providers/tiledesk/tiledesk-auth.service.ts +42 -12
- package/src/chat21-core/utils/user-typing/user-typing.component.html +6 -11
- package/src/chat21-core/utils/utils.ts +3 -3
- package/src/global.scss +17 -0
- package/src/index.html +27 -59
|
@@ -209,4 +209,150 @@ ion-item:hover {
|
|
|
209
209
|
font-size: 10px;
|
|
210
210
|
position: relative;
|
|
211
211
|
top: -4px;
|
|
212
|
-
}
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
|
|
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
|
+
}
|
|
@@ -8,6 +8,9 @@ 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
|
import * as moment from 'moment';
|
|
11
|
+
// import { EventsService } from 'src/app/services/events-service';
|
|
12
|
+
// import { TiledeskService } from '../../../services/tiledesk/tiledesk.service';
|
|
13
|
+
import { NetworkService } from '../../../services/network-service/network.service';
|
|
11
14
|
// import { LoggerService } from 'src/chat21-core/providers/abstract/logger.service';
|
|
12
15
|
// import { LoggerInstance } from 'src/chat21-core/providers/logger/loggerInstance';
|
|
13
16
|
|
|
@@ -24,8 +27,11 @@ export class IonListConversationsComponent extends ListConversationsComponent im
|
|
|
24
27
|
convertMessage = convertMessage;
|
|
25
28
|
isApp: boolean = false;
|
|
26
29
|
public logger: LoggerService = LoggerInstance.getInstance();
|
|
27
|
-
public currentYear: any
|
|
28
|
-
public browserLang: string
|
|
30
|
+
public currentYear: any;
|
|
31
|
+
public browserLang: string;
|
|
32
|
+
public isOnline: boolean = true;
|
|
33
|
+
public checkInternet: boolean;
|
|
34
|
+
|
|
29
35
|
/**
|
|
30
36
|
*
|
|
31
37
|
* @param iterableDiffers
|
|
@@ -37,6 +43,9 @@ export class IonListConversationsComponent extends ListConversationsComponent im
|
|
|
37
43
|
public kvDiffers: KeyValueDiffers,
|
|
38
44
|
public platform: Platform,
|
|
39
45
|
private translate: TranslateService,
|
|
46
|
+
// private events: EventsService,
|
|
47
|
+
// private tiledeskService: TiledeskService,
|
|
48
|
+
private networkService: NetworkService
|
|
40
49
|
) {
|
|
41
50
|
super(iterableDiffers, kvDiffers)
|
|
42
51
|
this.browserLang = this.translate.getBrowserLang();
|
|
@@ -59,8 +68,44 @@ export class IonListConversationsComponent extends ListConversationsComponent im
|
|
|
59
68
|
this.isApp = this.platform.is('ios') || this.platform.is('android')
|
|
60
69
|
this.logger.log('[ION-LIST-CONVS-COMP] - ngOnInit - IS-APP ', this.isApp)
|
|
61
70
|
this.logger.log('[ION-LIST-CONVS-COMP] - ngOnInit - Platform', this.platform.platforms());
|
|
71
|
+
this.watchToConnectionStatus();
|
|
62
72
|
}
|
|
63
73
|
|
|
74
|
+
|
|
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
|
+
|
|
81
|
+
// checking internet connection
|
|
82
|
+
if (this.checkInternet == true) {
|
|
83
|
+
|
|
84
|
+
this.isOnline = true;
|
|
85
|
+
} else {
|
|
86
|
+
this.isOnline = false;
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
// --------------------------------------------------
|
|
91
|
+
// subdsribe to event
|
|
92
|
+
// --------------------------------------------------
|
|
93
|
+
// subdcribeToWatchToConnectionStatus() {
|
|
94
|
+
// this.logger.log('[ION-LIST-CONVS-COMP] subdcribeToWatchToConnectionStatus ');
|
|
95
|
+
// // this.events.subscribe('uidConvSelected:changed', this.subscribeChangedConversationSelected);
|
|
96
|
+
// this.events.subscribe('internetisonline', (internetisonline) => {
|
|
97
|
+
// // user and time are the same arguments passed in `events.publish(user, time)`
|
|
98
|
+
// this.logger.log('[ION-LIST-CONVS-COMP] internetisonline ',internetisonline);
|
|
99
|
+
// if (internetisonline === true) {
|
|
100
|
+
// this.isOnline = true;
|
|
101
|
+
// } else {
|
|
102
|
+
// this.isOnline = false;
|
|
103
|
+
// }
|
|
104
|
+
// });
|
|
105
|
+
// }
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
64
109
|
closeConversation(conversation: ConversationModel) {
|
|
65
110
|
var conversationId = conversation.uid;
|
|
66
111
|
this.logger.log('[ION-LIST-CONVS-COMP] - closeConversation - conversationId ', conversationId)
|
|
@@ -4,9 +4,10 @@
|
|
|
4
4
|
<ion-list>
|
|
5
5
|
|
|
6
6
|
<ion-item button="true" lines="none" class="ion-no-padding" *ngFor="let user of contacts" (click)="goToChat(user)">
|
|
7
|
-
|
|
7
|
+
<div tabindex="0"></div>
|
|
8
|
+
<!-- <div [class.selected]="user.uid === uidUserSelected"></div> [style.background-color]="user.color"-->
|
|
8
9
|
<ion-avatar slot="start">
|
|
9
|
-
<div #avatarPlaceholder class="avatar-placeholder" [
|
|
10
|
+
<div #avatarPlaceholder class="avatar-placeholder" [ngStyle]="{'background': 'linear-gradient(rgb(255,255,255) -125%,' + user.color + ')'}" [innerHTML]="user.avatar"></div>
|
|
10
11
|
<div *ngIf="user.imageurl" #avatarImage class="avatar-profile" [style.background-image]="'url(' + user.imageurl + ')'"></div>
|
|
11
12
|
<!-- <div *ngIf="getImageAvatar(conversation.sender)" #avatarImage class="avatar-profile" [style.background-image]="'url(' + getImageAvatar(conversation.sender) + ')'"></div> -->
|
|
12
13
|
</ion-avatar>
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
[idUser] = conversationAvatar.conversation_with
|
|
24
24
|
[translationMap] = translationMap
|
|
25
25
|
[borderColor] = borderColor
|
|
26
|
-
[fontColor] = fontColor
|
|
27
|
-
|
|
26
|
+
[fontColor] = fontColor>
|
|
27
|
+
</app-user-presence>
|
|
28
28
|
</div>
|
|
29
29
|
|
|
30
30
|
<div *ngIf="conversationAvatar" class="user-typing">
|
|
@@ -5,6 +5,7 @@ import { ImageRepoService } from 'src/chat21-core/providers/abstract/image-repo.
|
|
|
5
5
|
// Logger
|
|
6
6
|
import { LoggerService } from 'src/chat21-core/providers/abstract/logger.service';
|
|
7
7
|
import { LoggerInstance } from 'src/chat21-core/providers/logger/loggerInstance';
|
|
8
|
+
import { setConversationAvatar, setChannelType } from 'src/chat21-core/utils/utils';
|
|
8
9
|
|
|
9
10
|
@Component({
|
|
10
11
|
selector: 'app-header-conversation-detail',
|
|
@@ -28,7 +29,9 @@ export class HeaderConversationDetailComponent implements OnInit, OnChanges {
|
|
|
28
29
|
borderColor = '#ffffff';
|
|
29
30
|
fontColor = '#949494';
|
|
30
31
|
membersConversation = ['SYSTEM'];
|
|
31
|
-
|
|
32
|
+
fullNameConv: string;
|
|
33
|
+
idConv: string;
|
|
34
|
+
|
|
32
35
|
private logger: LoggerService = LoggerInstance.getInstance();
|
|
33
36
|
|
|
34
37
|
/**
|
|
@@ -38,14 +41,17 @@ export class HeaderConversationDetailComponent implements OnInit, OnChanges {
|
|
|
38
41
|
constructor(
|
|
39
42
|
public imageRepoService: ImageRepoService,
|
|
40
43
|
private route: ActivatedRoute,
|
|
41
|
-
) {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
44
|
+
) {
|
|
45
|
+
this.route.paramMap.subscribe(params => {
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
// this.conversationWithFullname = params.get('FullNameConv');
|
|
49
|
+
this.logger.log('[CONVS-DETAIL][HEADER] -> params: ', params);
|
|
50
|
+
this.fullNameConv = params.get('FullNameConv')
|
|
51
|
+
this.logger.log('[CONVS-DETAIL][HEADER] -> params > conversation_with_fullname: ', this.fullNameConv);
|
|
52
|
+
this.idConv = params.get('IDConv');
|
|
53
|
+
this.logger.log('[CONVS-DETAIL][HEADER] -> params > conversation_with: ', this.idConv);
|
|
54
|
+
});
|
|
49
55
|
}
|
|
50
56
|
|
|
51
57
|
// ----------------------------------------------------
|
|
@@ -53,7 +59,7 @@ export class HeaderConversationDetailComponent implements OnInit, OnChanges {
|
|
|
53
59
|
// ----------------------------------------------------
|
|
54
60
|
ngOnInit() {
|
|
55
61
|
this.logger.log('[CONVS-DETAIL][HEADER] - (ngOnInit) - idLoggedUser', this.idLoggedUser);
|
|
56
|
-
this.logger.log('[CONVS-DETAIL][HEADER] - (ngOnInit) - conversationAvatar', this.conversationAvatar);
|
|
62
|
+
// this.logger.log('[CONVS-DETAIL][HEADER] - (ngOnInit) - conversationAvatar', this.conversationAvatar);
|
|
57
63
|
|
|
58
64
|
this.initialize();
|
|
59
65
|
}
|
|
@@ -62,6 +68,18 @@ export class HeaderConversationDetailComponent implements OnInit, OnChanges {
|
|
|
62
68
|
this.logger.log('[CONVS-DETAIL][HEADER] - (ngOnChanges) - conversationAvatar', this.conversationAvatar);
|
|
63
69
|
if (this.conversationAvatar) {
|
|
64
70
|
this.conversationAvatar.imageurl = this.imageRepoService.getImagePhotoUrl(this.conversationAvatar.uid)
|
|
71
|
+
} else {
|
|
72
|
+
const channelType = setChannelType(this.idConv);
|
|
73
|
+
this.logger.log('[CONVS-DETAIL][HEADER] - (ngOnChanges) - conversationAvatar usecase UNDEFINED channelType ', channelType);
|
|
74
|
+
this.conversationAvatar = setConversationAvatar(
|
|
75
|
+
this.idConv,
|
|
76
|
+
this.fullNameConv,
|
|
77
|
+
channelType,
|
|
78
|
+
);
|
|
79
|
+
if (this.conversationAvatar) {
|
|
80
|
+
this.conversationAvatar.imageurl = this.imageRepoService.getImagePhotoUrl(this.conversationAvatar.uid)
|
|
81
|
+
}
|
|
82
|
+
this.logger.log('[CONVS-DETAIL][HEADER] - (ngOnChanges) - conversationAvatar usecase UNDEFINED conversationAvatar', this.conversationAvatar);
|
|
65
83
|
}
|
|
66
84
|
|
|
67
85
|
this.logger.log('[CONVS-DETAIL][HEADER] - (ngOnChanges) - isOpenInfoConversation', this.isOpenInfoConversation);
|
|
@@ -74,9 +92,6 @@ export class HeaderConversationDetailComponent implements OnInit, OnChanges {
|
|
|
74
92
|
// ----------------------------------------------------
|
|
75
93
|
initialize() {
|
|
76
94
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
95
|
if (this.conversationAvatar && this.conversationAvatar.channelType === this.DIRECT) {
|
|
81
96
|
this.isDirect = true;
|
|
82
97
|
} else if (this.idLoggedUser) {
|
package/src/app/components/conversation-detail/message-text-area/message-text-area.component.html
CHANGED
|
@@ -33,9 +33,8 @@
|
|
|
33
33
|
<!-- autofocus="true" -->
|
|
34
34
|
<!-- autoFocus="true" // directive -->
|
|
35
35
|
|
|
36
|
-
<ion-textarea id="ion-textarea" #messageTextArea #textArea rows="1"
|
|
36
|
+
<ion-textarea id="ion-textarea" #messageTextArea #message_text_area #textArea rows="1"
|
|
37
37
|
[placeholder]="TEXAREA_PLACEHOLDER"
|
|
38
|
-
(ionFocus)="txtfocus('hasFocus')"
|
|
39
38
|
autosize="false"
|
|
40
39
|
auto-grow="true"
|
|
41
40
|
autofocus="true"
|
package/src/app/components/conversation-detail/message-text-area/message-text-area.component.scss
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
.buttons-left {
|
|
8
8
|
position: absolute;
|
|
9
9
|
left: 0;
|
|
10
|
-
bottom:
|
|
10
|
+
bottom: -3px;
|
|
11
11
|
width: 30px;
|
|
12
12
|
height: 100%;
|
|
13
13
|
.attach-button {
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
}
|
|
27
27
|
.buttons-right {
|
|
28
28
|
position: absolute;
|
|
29
|
-
bottom:
|
|
29
|
+
bottom: 3px;
|
|
30
30
|
right: 0;
|
|
31
31
|
width: 30px;
|
|
32
32
|
height: 100%;
|
|
@@ -47,18 +47,22 @@
|
|
|
47
47
|
margin: 0 35px;
|
|
48
48
|
width: calc(100% - 70px);
|
|
49
49
|
ion-textarea {
|
|
50
|
-
border-radius: 4px;
|
|
50
|
+
// border-radius: 4px;
|
|
51
|
+
border-radius: 20px; // NK edited
|
|
51
52
|
padding: 0;
|
|
52
53
|
margin: 0;
|
|
53
54
|
height: auto;
|
|
54
55
|
overflow: auto;
|
|
55
|
-
min-height: 30px;
|
|
56
|
+
// min-height: 30px;
|
|
57
|
+
min-height: 37px; // NK edited
|
|
56
58
|
max-height: 184px;
|
|
57
59
|
background-color: rgba(0, 0, 0, .05);
|
|
58
|
-
--padding-top: 5px;
|
|
60
|
+
// --padding-top: 5px; // NK edited
|
|
61
|
+
--padding-top: 8px;
|
|
59
62
|
--padding-bottom: 5px;
|
|
60
63
|
--padding-end: 5px;
|
|
61
|
-
--padding-start: 5px;
|
|
64
|
+
// --padding-start: 5px; // NK edited
|
|
65
|
+
--padding-start: 10px;
|
|
62
66
|
line-height: 1.34;
|
|
63
67
|
font-size: 15px;
|
|
64
68
|
}
|
package/src/app/components/conversation-detail/message-text-area/message-text-area.component.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { UserModel } from 'src/chat21-core/models/user';
|
|
|
2
2
|
import { Component, OnInit, Output, EventEmitter, Input, AfterViewInit, ViewChild, ElementRef, OnChanges, HostListener, Renderer2 } from '@angular/core';
|
|
3
3
|
|
|
4
4
|
import { Chooser } from '@ionic-native/chooser/ngx';
|
|
5
|
-
import { ModalController, ToastController } from '@ionic/angular';
|
|
5
|
+
import { IonTextarea, ModalController, ToastController } from '@ionic/angular';
|
|
6
6
|
|
|
7
7
|
// Pages
|
|
8
8
|
import { LoaderPreviewPage } from 'src/app/pages/loader-preview/loader-preview.page';
|
|
@@ -19,6 +19,7 @@ import { checkPlatformIsMobile } from 'src/chat21-core/utils/utils';
|
|
|
19
19
|
import { LoggerService } from 'src/chat21-core/providers/abstract/logger.service';
|
|
20
20
|
import { LoggerInstance } from 'src/chat21-core/providers/logger/loggerInstance';
|
|
21
21
|
|
|
22
|
+
|
|
22
23
|
@Component({
|
|
23
24
|
selector: 'app-message-text-area',
|
|
24
25
|
templateUrl: './message-text-area.component.html',
|
|
@@ -26,7 +27,9 @@ import { LoggerInstance } from 'src/chat21-core/providers/logger/loggerInstance'
|
|
|
26
27
|
})
|
|
27
28
|
export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChanges {
|
|
28
29
|
|
|
29
|
-
@ViewChild('textArea', { static: false }) messageTextArea:
|
|
30
|
+
@ViewChild('textArea', { static: false }) messageTextArea: IonTextarea
|
|
31
|
+
|
|
32
|
+
@ViewChild('message_text_area', { static: false }) message_text_area: ElementRef
|
|
30
33
|
// set textArea(element: ElementRef<HTMLInputElement>) {
|
|
31
34
|
// if(element) {
|
|
32
35
|
// this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] ViewChild element ", element);
|
|
@@ -105,9 +108,7 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
105
108
|
this.SHORTER_TEXAREA_PLACEHOLDER = this.translationMap.get('LABEL_ENTER_MSG_SHORTER')
|
|
106
109
|
}
|
|
107
110
|
|
|
108
|
-
// this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] ngOnChanges this.isOpenInfoConversation ", this.isOpenInfoConversation);
|
|
109
111
|
this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] ngOnChanges DROP EVENT ", this.dropEvent);
|
|
110
|
-
|
|
111
112
|
this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] ngOnChanges tagsCannedFilter ", this.tagsCannedFilter);
|
|
112
113
|
// use case drop
|
|
113
114
|
if (this.dropEvent) {
|
|
@@ -122,54 +123,36 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
122
123
|
// ngAfterViewInit() {
|
|
123
124
|
ngAfterViewInit() {
|
|
124
125
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
// this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] ngAfterViewInit element get with renderer ", element);
|
|
128
|
-
// const elemTexarea= <HTMLElement>document.querySelector('#ion-textarea');
|
|
129
|
-
// console.log('[CONVS-DETAIL][MSG-TEXT-AREA] elemTexarea ', elemTexarea)
|
|
130
|
-
// elemTexarea.focus()
|
|
131
|
-
// setTimeout(() => {
|
|
132
|
-
// (this.messageTextArea.nativeElement.shadowRoot as ShadowRoot).querySelector('input').focus();
|
|
133
|
-
// }, 100);
|
|
134
|
-
this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] ngAfterViewInit this.messageTextArea ", this.messageTextArea);
|
|
126
|
+
this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] ngAfterViewInit message_text_area ", this.message_text_area);
|
|
127
|
+
this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] ngAfterViewInit messageTextArea ", this.messageTextArea);
|
|
135
128
|
if (this.messageTextArea) {
|
|
136
129
|
setTimeout(() => {
|
|
137
|
-
// this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] set focus on ", this.messageTextArea);
|
|
138
|
-
// Keyboard.show() // for android
|
|
139
|
-
this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] ngAfterViewInit this.messageTextArea ", this.messageTextArea);
|
|
140
|
-
this.messageTextArea.setFocus();
|
|
141
130
|
|
|
142
131
|
|
|
143
|
-
|
|
144
|
-
// this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] ngAfterViewInit
|
|
145
|
-
// this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] ngAfterViewInit
|
|
146
|
-
|
|
132
|
+
const elTextArea = this.message_text_area['el'];
|
|
133
|
+
// this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] ngAfterViewInit elTextArea ", elTextArea);
|
|
134
|
+
// this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] ngAfterViewInit elTextArea children", elTextArea.children);
|
|
135
|
+
if (elTextArea.children.length === 1) {
|
|
147
136
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
137
|
+
const elTextAreaWrapper = elTextArea.children[0]
|
|
138
|
+
// this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] ngAfterViewInit elTextAreaWrapper", elTextAreaWrapper);
|
|
139
|
+
|
|
140
|
+
if (elTextAreaWrapper.children.length === 1) {
|
|
141
|
+
const elNativeTearea = elTextAreaWrapper.children[0]
|
|
142
|
+
// this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] ngAfterViewInit elNativeTearea", elNativeTearea);
|
|
143
|
+
elNativeTearea.setAttribute("style", "height: 37px !important; ");
|
|
144
|
+
}
|
|
145
|
+
}
|
|
157
146
|
|
|
158
|
-
// el = textarea.native-textarea.sc-ion-textarea-md
|
|
159
|
-
// dc = textarea.native-textarea.sc-ion-textarea-md
|
|
160
|
-
}, 1500); //a least 150ms.
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
147
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
// this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] ngAfterViewInit txtfocus string ", string);
|
|
167
|
-
// this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] ngAfterViewInit txtfocus document.activeElement ", document.activeElement);
|
|
168
|
-
// // this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] ngAfterViewInit document.activeElement === TEXAREa", document.activeElement === );
|
|
169
|
-
// this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] ngAfterViewInit txtfocus el ", el);
|
|
170
|
-
}
|
|
148
|
+
// this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] set focus on ", this.messageTextArea);
|
|
149
|
+
// Keyboard.show() // for android
|
|
171
150
|
|
|
151
|
+
this.messageTextArea.setFocus();
|
|
172
152
|
|
|
153
|
+
}, 1500); //a least 150ms.
|
|
154
|
+
}
|
|
155
|
+
}
|
|
173
156
|
|
|
174
157
|
|
|
175
158
|
getWindowWidth(): any {
|
|
@@ -458,6 +441,8 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
458
441
|
});
|
|
459
442
|
|
|
460
443
|
}
|
|
444
|
+
} else {
|
|
445
|
+
that.fileInput.nativeElement.value = '';
|
|
461
446
|
}
|
|
462
447
|
});
|
|
463
448
|
|
|
@@ -594,6 +579,24 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
594
579
|
this.modalController.dismiss({ confirmed: true });
|
|
595
580
|
}
|
|
596
581
|
|
|
582
|
+
@HostListener('document:keydown', ['$event'])
|
|
583
|
+
handleKeyboardEvent(event: KeyboardEvent) {
|
|
584
|
+
|
|
585
|
+
// Note: on mac keyboard "metakey" matches "cmd"
|
|
586
|
+
if (event.key === 'Enter' && event.altKey || event.key === 'Enter' && event.ctrlKey || event.key === 'Enter' && event.metaKey) {
|
|
587
|
+
|
|
588
|
+
|
|
589
|
+
|
|
590
|
+
this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] HAS PRESSED COMBO KEYS this.messageString', this.messageString);
|
|
591
|
+
|
|
592
|
+
if (this.messageString !== undefined && this.messageString.trim() !== '') {
|
|
593
|
+
this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] HAS PRESSED Enter + ALT this.messageString', this.messageString);
|
|
594
|
+
this.messageString = this.messageString + "\r\n"
|
|
595
|
+
}
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
}
|
|
599
|
+
|
|
597
600
|
|
|
598
601
|
/* NOT USED */
|
|
599
602
|
// getIfTexareaIsEmpty(calledby: string) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<ion-button expand="full" fill="clear" text-left class="advanced-info-accordion" (click)="openAdvancedInfoAccordion()">
|
|
2
2
|
<span class="absolute-text">
|
|
3
3
|
|
|
4
|
-
{{ translationMap
|
|
4
|
+
{{ translationMap?.get('LABEL_INFO_ADVANCED') }}
|
|
5
5
|
</span>
|
|
6
6
|
|
|
7
7
|
<ion-icon id="{{'absolute-icon_'+ teammateID}}" slot="end" name="chevron-down-outline" class="absolute-icon">
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
<div class="attributes-title-wpr">
|
|
43
43
|
<span class="attributes-title">
|
|
44
44
|
<!-- {{ attr.key }} -->
|
|
45
|
-
{{ translationMap
|
|
45
|
+
{{ translationMap?.get(attr.key) }}
|
|
46
46
|
</span>
|
|
47
47
|
</div>
|
|
48
48
|
|
|
@@ -78,14 +78,24 @@ export class InfoContentComponent implements OnInit {
|
|
|
78
78
|
this.logger.log('[INFO-CONTENT-COMP] - paramMap.subscribe conversationWith: ', this.conversationWith);
|
|
79
79
|
this.conversationWithFullname = params.get('FullNameConv');
|
|
80
80
|
this.conv_type = params.get('Convtype');
|
|
81
|
-
|
|
81
|
+
|
|
82
82
|
const conversationWith_segments = this.conversationWith.split('-');
|
|
83
83
|
|
|
84
84
|
// Removes the last element of the array if is = to the separator
|
|
85
|
+
|
|
85
86
|
if (conversationWith_segments[conversationWith_segments.length - 1] === '') {
|
|
86
87
|
conversationWith_segments.pop();
|
|
87
|
-
|
|
88
|
-
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
if (conversationWith_segments.length === 4) {
|
|
91
|
+
const lastArrayElement = conversationWith_segments[conversationWith_segments.length - 1]
|
|
92
|
+
this.logger.log('[INFO-CONTENT-COMP] - paramMap.subscribe lastArrayElement ', lastArrayElement);
|
|
93
|
+
this.logger.log('[INFO-CONTENT-COMP] - paramMap.subscribe lastArrayElement length', lastArrayElement.length);
|
|
94
|
+
if (lastArrayElement.length !== 32) {
|
|
95
|
+
conversationWith_segments.pop();
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
89
99
|
|
|
90
100
|
this.logger.log('[INFO-CONTENT-COMP] - paramMap.subscribe conversationWith_segments: ', conversationWith_segments);
|
|
91
101
|
|
|
@@ -160,7 +170,7 @@ export class InfoContentComponent implements OnInit {
|
|
|
160
170
|
this.IS_GROUP_PANEL = false;
|
|
161
171
|
this.logger.log('[INFO-CONTENT-COMP] - panelType IS_GROUP_PANEL: ', this.IS_GROUP_PANEL);
|
|
162
172
|
this.logger.log('[INFO-CONTENT-COMP] - panelType: ', this.panelType);
|
|
163
|
-
}
|
|
173
|
+
}
|
|
164
174
|
|
|
165
175
|
// ---------------------------------------------------
|
|
166
176
|
// START SET INFO COMPONENT
|
|
@@ -182,7 +192,7 @@ export class InfoContentComponent implements OnInit {
|
|
|
182
192
|
// this.logger.log('[INFO-CONTENT-COMP] - panelType: ', this.panelType);
|
|
183
193
|
|
|
184
194
|
// } else
|
|
185
|
-
|
|
195
|
+
if (conversationWith.startsWith("group-")) {
|
|
186
196
|
this.panelType = ''
|
|
187
197
|
this.logger.log('[INFO-CONTENT-COMP] - selectInfoContentTypeComponent - GROUP - conversationWith start with "group-" ', this.conversationWith.startsWith("group-"));
|
|
188
198
|
this.setInfoGroup();
|
|
@@ -70,18 +70,18 @@ export class InfoGroupComponent implements OnInit, AfterViewInit, OnChanges {
|
|
|
70
70
|
.pipe(filter(event => event instanceof NavigationEnd))
|
|
71
71
|
|
|
72
72
|
.subscribe((event: NavigationEnd) => {
|
|
73
|
-
console.log('InfoGroupComponent - router.events prev url :', event.url);
|
|
73
|
+
// console.log('InfoGroupComponent - router.events prev url :', event.url);
|
|
74
74
|
this.previousUrl = event.url;
|
|
75
75
|
|
|
76
76
|
|
|
77
77
|
this.unsubscribe$.next();
|
|
78
78
|
this.unsubscribe$.complete();
|
|
79
79
|
this.member_array = []
|
|
80
|
-
console.log('InfoGroupComponent - router.events member_array :', this.member_array);
|
|
80
|
+
// console.log('InfoGroupComponent - router.events member_array :', this.member_array);
|
|
81
81
|
// this.pleaseDeleteMeEvent.emit();
|
|
82
82
|
|
|
83
|
-
if (this.groupDetail.hasOwnProperty("member_array")) {
|
|
84
|
-
console.log('InfoGroupComponent - router.events has Property member_array :', this.groupDetail.hasOwnProperty("member_array"));
|
|
83
|
+
if (this.groupDetail && this.groupDetail.hasOwnProperty("member_array")) {
|
|
84
|
+
// console.log('InfoGroupComponent - router.events has Property member_array :', this.groupDetail.hasOwnProperty("member_array"));
|
|
85
85
|
delete this.groupDetail['member_array'];
|
|
86
86
|
}
|
|
87
87
|
});
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
<div *ngIf="itemAvatar" class="avatar-circle" [style.width]="itemAvatar.width" [style.height]="itemAvatar.height">
|
|
2
|
-
|
|
2
|
+
<!-- [style.background-color]="itemAvatar.color" -->
|
|
3
|
+
<div class="avatar avatar-placeholder" [ngStyle]="{'background': 'linear-gradient(rgb(255,255,255) -125%,' + itemAvatar.color + ')'}" [innerHTML]="itemAvatar.avatar" ></div>
|
|
3
4
|
<div class="avatar avatar-image" [style.background-image]="'url(' + itemAvatar.imageurl + ')'" ></div>
|
|
4
5
|
</div>
|