@chat21/chat21-ionic 3.0.6-2.4-rc1 → 3.0.6-2.4-rc2
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 +6 -0
- package/deploy_prod.sh +2 -2
- package/package.json +1 -1
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.html +1 -1
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.scss +7 -1
- package/src/app/chatlib/conversation-detail/message/image/image.component.ts +1 -1
- package/src/app/chatlib/conversation-detail/message/return-receipt/return-receipt.component.scss +1 -1
- package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.html +1 -1
- package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.scss +4 -4
- package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.html +1 -1
- package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.scss +3 -3
- package/src/app/components/project-item/project-item.component.ts +6 -30
- package/src/app/components/sidebar/sidebar.component.ts +48 -82
- package/src/app/components/sidebar-user-details/sidebar-user-details.component.ts +58 -116
- package/src/app/pages/authentication/login/login.page.ts +12 -4
- package/src/app/pages/conversation-detail/conversation-detail.page.html +4 -2
- package/src/app/pages/conversation-detail/conversation-detail.page.scss +15 -6
- package/src/app/pages/conversation-detail/conversation-detail.page.ts +71 -34
- package/src/app/pages/conversations-list/conversations-list.page.html +10 -18
- package/src/app/pages/conversations-list/conversations-list.page.ts +181 -58
- package/src/app/services/nav-proxy.service.ts +15 -13
- package/src/chat21-core/providers/firebase/firebase-conversations-handler.ts +3 -18
- package/src/chat21-core/providers/tiledesk/tiledesk-auth.service.ts +1 -1
- package/src/chat21-core/utils/utils-message.ts +8 -5
- package/src/variables.scss +4 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# chat21-ionic ver 3.0
|
|
2
2
|
|
|
3
|
+
### 3.0.62.4-rc2
|
|
4
|
+
- Fixed bug: in the modal window showing the image preview before download, the image name is missing
|
|
5
|
+
- Add the ability to display the app sidebar in "wide mode"
|
|
6
|
+
- Displays balloon messages with a light orange background for "internal notes" type message
|
|
7
|
+
- Updates the regex that detects if the message contains only one or more emojis
|
|
8
|
+
|
|
3
9
|
### 3.0.62.4-rc1
|
|
4
10
|
- Fixes the bug: when the user profile is updated in the dashboard it is not updated in the chat
|
|
5
11
|
- Fixes the bug: when is sent a message with only emojis, some emojis have the chat balloon background
|
package/deploy_prod.sh
CHANGED
|
@@ -25,7 +25,7 @@ cp -p config.xml platforms/browser/www/
|
|
|
25
25
|
|
|
26
26
|
###### CHAT in prod
|
|
27
27
|
cd platforms/browser/www
|
|
28
|
-
|
|
28
|
+
aws s3 sync . s3://tiledesk-console/v2/chat/
|
|
29
29
|
aws s3 sync . s3://tiledesk-console/v2/chat/$version/
|
|
30
30
|
cd ../../../
|
|
31
31
|
# aws cloudfront create-invalidation --distribution-id E2DTAKWHWQ7C3J --paths "/*"
|
|
@@ -34,7 +34,7 @@ cd ../../../
|
|
|
34
34
|
echo new version deployed on s3://tiledesk-console/v2/chat/$version/
|
|
35
35
|
# echo new version deployed on s3://tiledesk-console/v2/chat/
|
|
36
36
|
echo available on https://console.tiledesk.com/v2/chat/$version/index.html
|
|
37
|
-
|
|
37
|
+
echo available on https://console.tiledesk.com/v2/chat/index.html
|
|
38
38
|
|
|
39
39
|
|
|
40
40
|
###### CHAT-IONIC5
|
package/package.json
CHANGED
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
|
|
80
80
|
<!--backgroundColor non viene ancora usato -->
|
|
81
81
|
<chat-bubble-message class="messages msg_sent" id="message_msg_sent" style="position: relative;"
|
|
82
|
-
[ngClass]="{'has-metadata': (isImage(message) || isFrame(message))}"
|
|
82
|
+
[ngClass]="{'has-metadata': (isImage(message) || isFrame(message)), 'privateMsg': (message?.attributes && message?.attributes?.subtype === 'private')}"
|
|
83
83
|
[class.emoticon]="isEmojii(message?.text)"
|
|
84
84
|
[ngClass]="{'button-in-msg' : message.metadata && message.metadata.button}"
|
|
85
85
|
[message]="message"
|
|
@@ -84,7 +84,7 @@ ion-item {
|
|
|
84
84
|
// padding: 2px 0px 4px 40px;
|
|
85
85
|
padding: 2px 0px 14px 40px; // edited to display the date at the bottom of the "message bubble"
|
|
86
86
|
.msg_sent {
|
|
87
|
-
background-color: var(--
|
|
87
|
+
background-color: var(--bubble-blue);
|
|
88
88
|
color: var(--col-msg-sent);
|
|
89
89
|
margin-right: 4px;
|
|
90
90
|
margin-left: 4px;
|
|
@@ -92,6 +92,12 @@ ion-item {
|
|
|
92
92
|
min-width: 14px;
|
|
93
93
|
border-top-right-radius: 8px;
|
|
94
94
|
border-bottom-right-radius: 0px;
|
|
95
|
+
|
|
96
|
+
&.privateMsg{
|
|
97
|
+
background-color: var(--bubble-privateMsg);
|
|
98
|
+
color: var(--bubble-privateMsgColor)
|
|
99
|
+
}
|
|
100
|
+
|
|
95
101
|
}
|
|
96
102
|
.emoticon {
|
|
97
103
|
background: unset !important;
|
|
@@ -68,7 +68,7 @@ export class ImageComponent implements OnInit {
|
|
|
68
68
|
modalImg.src = url
|
|
69
69
|
if (captionText) {
|
|
70
70
|
|
|
71
|
-
captionText.innerHTML = fileName ?
|
|
71
|
+
captionText.innerHTML = fileName ? fileName : decodeURIComponent(decodeURIComponent(url).split('/').pop());
|
|
72
72
|
// console.log('XXXX ', decodeURIComponent(decodeURIComponent(url).split('/').pop()))
|
|
73
73
|
}
|
|
74
74
|
|
package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.scss
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
.message {
|
|
2
|
-
.
|
|
2
|
+
.bubble-message {
|
|
3
3
|
position: relative;
|
|
4
4
|
border-radius: 15px;
|
|
5
5
|
font-size: 15px;
|
|
@@ -57,8 +57,8 @@
|
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
|
|
60
|
-
.
|
|
61
|
-
background-color: var(--
|
|
60
|
+
.bubble-message {
|
|
61
|
+
background-color: var(--bubble-blue);
|
|
62
62
|
color: white;
|
|
63
63
|
margin-right: 24px;
|
|
64
64
|
float: right;
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
}
|
|
68
68
|
&.first-message {
|
|
69
69
|
margin-top: 10px;
|
|
70
|
-
.
|
|
70
|
+
.bubble-message {
|
|
71
71
|
border-top-right-radius: 12px;
|
|
72
72
|
border-bottom-right-radius: 0px;
|
|
73
73
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
<span class="button-info" [ngClass]="message.uid" (click)="presentPopover($event, message)"></span>
|
|
4
4
|
|
|
5
|
-
<div class="
|
|
5
|
+
<div class="bubble-message"
|
|
6
6
|
[class.image]="message.type == 'image'"
|
|
7
7
|
[class.no-text]="!message.text"
|
|
8
8
|
(mouseover)="showButtonInfo()">
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
.message {
|
|
2
|
-
.
|
|
2
|
+
.bubble-message {
|
|
3
3
|
position: relative;
|
|
4
4
|
border-radius: 15px;
|
|
5
5
|
font-size: 15px;
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
.message-other {
|
|
51
51
|
width: 100%;
|
|
52
52
|
margin-top: 4px;
|
|
53
|
-
.
|
|
53
|
+
.bubble-message {
|
|
54
54
|
background-color: var(--light-gray);
|
|
55
55
|
color: var(--black);
|
|
56
56
|
margin-left: 24px;
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
}
|
|
73
73
|
&.first-message {
|
|
74
74
|
margin-top: 10px;
|
|
75
|
-
.
|
|
75
|
+
.bubble-message {
|
|
76
76
|
border-top-left-radius: 12px;
|
|
77
77
|
border-bottom-left-radius: 0px;
|
|
78
78
|
}
|
|
@@ -61,9 +61,7 @@ export class ProjectItemComponent implements OnInit {
|
|
|
61
61
|
this.translations();
|
|
62
62
|
this.listenToPostMsgs();
|
|
63
63
|
this.onInitWindowWidth();
|
|
64
|
-
|
|
65
|
-
this.isOnMobileDevice()
|
|
66
|
-
// console.log('[PROJECT-ITEM] - on INIT')
|
|
64
|
+
this.isOnMobileDevice();
|
|
67
65
|
}
|
|
68
66
|
|
|
69
67
|
isOnMobileDevice() {
|
|
@@ -71,7 +69,6 @@ export class ProjectItemComponent implements OnInit {
|
|
|
71
69
|
if (/Android|iPhone/i.test(window.navigator.userAgent)) {
|
|
72
70
|
this.IS_ON_MOBILE_DEVICE = true;
|
|
73
71
|
}
|
|
74
|
-
// console.log('[PROJECT-ITEM] IS_ON_MOBILE_DEVICE', this.IS_ON_MOBILE_DEVICE)
|
|
75
72
|
return this.IS_ON_MOBILE_DEVICE;
|
|
76
73
|
}
|
|
77
74
|
|
|
@@ -107,10 +104,7 @@ export class ProjectItemComponent implements OnInit {
|
|
|
107
104
|
|
|
108
105
|
listenToPostMsgs() {
|
|
109
106
|
window.addEventListener("message", (event) => {
|
|
110
|
-
// console.log("[PROJECT-ITEM] post message event ", event);
|
|
111
|
-
|
|
112
107
|
if (event && event.data) {
|
|
113
|
-
// console.log("[PROJECT-ITEM] message event data ", event.data);
|
|
114
108
|
if (event.data === 'hasChangedProject') {
|
|
115
109
|
this.unservedRequestCount = 0;
|
|
116
110
|
if (this.project) {
|
|
@@ -161,11 +155,13 @@ export class ProjectItemComponent implements OnInit {
|
|
|
161
155
|
getStoredCurrenUser() {
|
|
162
156
|
const storedCurrentUser = this.appStorageService.getItem('currentUser');
|
|
163
157
|
this.logger.log('[PROJECT-ITEM] - STORED CURRENT USER ', storedCurrentUser)
|
|
164
|
-
if (storedCurrentUser) {
|
|
158
|
+
if (storedCurrentUser && storedCurrentUser !== 'undefined') {
|
|
165
159
|
const currentUser = JSON.parse(storedCurrentUser)
|
|
166
160
|
this.logger.log('[PROJECT-ITEM] - STORED CURRENT USER OBJCT', currentUser);
|
|
167
161
|
this.currentUserId = currentUser.uid
|
|
168
162
|
this.logger.log('[PROJECT-ITEM] - CURRENT USER ID', this.currentUserId);
|
|
163
|
+
} else {
|
|
164
|
+
this.logger.error('[PROJECT-ITEM] - STORED CURRENT USER OBJCT NOT FOUND IN STORAGE');
|
|
169
165
|
}
|
|
170
166
|
}
|
|
171
167
|
|
|
@@ -298,28 +294,19 @@ export class ProjectItemComponent implements OnInit {
|
|
|
298
294
|
}
|
|
299
295
|
|
|
300
296
|
updateUnservedRequestCount() {
|
|
301
|
-
|
|
302
|
-
// this.requestsService.requestsList_bs.subscribe((requests) => {
|
|
297
|
+
|
|
303
298
|
this.wsService.wsRequestsList$
|
|
304
299
|
.subscribe((requests) => {
|
|
305
|
-
// console.log('[PROJECT-ITEM] requests ', requests)
|
|
306
300
|
if (requests) {
|
|
307
301
|
let count = 0;
|
|
308
302
|
requests.forEach(r => {
|
|
309
|
-
// this.logger.log('NAVBAR - UPDATE-UNSERVED-REQUEST-COUNT request agents', r.agents)
|
|
310
|
-
// *bug fix: when the user is an agent also for the unserved we have to consider if he is present in agents
|
|
311
|
-
// && this.ROLE_IS_AGENT === true
|
|
312
303
|
if (r['status'] === 100) {
|
|
313
304
|
if (this.hasmeInAgents(r['agents']) === true) {
|
|
314
305
|
count = count + 1;
|
|
315
306
|
}
|
|
316
307
|
}
|
|
317
|
-
// if (r['status'] === 100 && this.ROLE_IS_AGENT === false) {
|
|
318
|
-
// count = count + 1;
|
|
319
|
-
// }
|
|
320
308
|
});
|
|
321
309
|
this.unservedRequestCount = count;
|
|
322
|
-
// console.log('[PROJECT-ITEM] UNSERVED REQUEST COUNT - RES ', this.unservedRequestCount)
|
|
323
310
|
}
|
|
324
311
|
}, error => {
|
|
325
312
|
this.logger.error('[PROJECT-ITEM] UNSERVED REQUEST COUNT * error * ', error)
|
|
@@ -331,10 +318,7 @@ export class ProjectItemComponent implements OnInit {
|
|
|
331
318
|
hasmeInAgents(agents) {
|
|
332
319
|
if (agents) {
|
|
333
320
|
for (let j = 0; j < agents.length; j++) {
|
|
334
|
-
// this.logger.log('[PROJECT-ITEM] hasmeInAgents currentUserId ', this.currentUserId)
|
|
335
|
-
// this.logger.log('[PROJECT-ITEM] hasmeInAgents agent ', agents[j].id_user)
|
|
336
321
|
if (this.currentUserId === agents[j].id_user) {
|
|
337
|
-
// this.logger.log('[PROJECT-ITEM] hasmeInAgents ')
|
|
338
322
|
return true
|
|
339
323
|
}
|
|
340
324
|
}
|
|
@@ -344,7 +328,6 @@ export class ProjectItemComponent implements OnInit {
|
|
|
344
328
|
}
|
|
345
329
|
|
|
346
330
|
updateCurrentUserRequestCount() {
|
|
347
|
-
// this.requestsService.requestsList_bs.subscribe((requests) => {
|
|
348
331
|
this.wsService.wsRequestsList$
|
|
349
332
|
.pipe(
|
|
350
333
|
takeUntil(this.unsubscribe$)
|
|
@@ -353,15 +336,9 @@ export class ProjectItemComponent implements OnInit {
|
|
|
353
336
|
if (requests) {
|
|
354
337
|
let count = 0;
|
|
355
338
|
requests.forEach(r => {
|
|
356
|
-
|
|
357
|
-
// const membersArray = Object.keys(r.members);
|
|
358
339
|
const participantsArray = r['participants'] // new used with ws
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
// const currentUserIsInParticipants = membersArray.includes(this.user._id);
|
|
340
|
+
|
|
362
341
|
const currentUserIsInParticipants = participantsArray.includes(this.currentUserId); // new used with ws
|
|
363
|
-
|
|
364
|
-
// this.logger.log('[NAVBAR] »» WIDGET updateCurrentUserRequestCount REQUEST currentUserRequestCount currentUserIsInParticipants ', currentUserIsInParticipants);
|
|
365
342
|
if (currentUserIsInParticipants === true) {
|
|
366
343
|
count = count + 1;
|
|
367
344
|
}
|
|
@@ -374,7 +351,6 @@ export class ProjectItemComponent implements OnInit {
|
|
|
374
351
|
}, () => {
|
|
375
352
|
this.logger.log('[PROJECT-ITEM] CURRENT USER REQUEST COUNT */* COMPLETE */*')
|
|
376
353
|
})
|
|
377
|
-
|
|
378
354
|
}
|
|
379
355
|
|
|
380
356
|
|
|
@@ -79,22 +79,6 @@ export class SidebarComponent implements OnInit {
|
|
|
79
79
|
this.listenTocurrentProjectUserUserAvailability$()
|
|
80
80
|
this.getOSCODE();
|
|
81
81
|
this.getCurrentChatLangAndTranslateLabels();
|
|
82
|
-
|
|
83
|
-
// this.loggedUser = this.chatManager.getCurrentUser();
|
|
84
|
-
// if (this.loggedUser) {
|
|
85
|
-
// this.itemAvatar = {
|
|
86
|
-
// imageurl: this.imageRepoService.getImagePhotoUrl(this.loggedUser.uid),
|
|
87
|
-
// avatar: this.loggedUser.avatar,
|
|
88
|
-
// color: this.loggedUser.color,
|
|
89
|
-
// online: this.loggedUser.online,
|
|
90
|
-
// lastConnection: this.loggedUser.lastConnection,
|
|
91
|
-
// status: '',
|
|
92
|
-
// width: '35px',
|
|
93
|
-
// height: '35px'
|
|
94
|
-
// };
|
|
95
|
-
// }
|
|
96
|
-
|
|
97
|
-
|
|
98
82
|
}
|
|
99
83
|
|
|
100
84
|
|
|
@@ -112,7 +96,7 @@ export class SidebarComponent implements OnInit {
|
|
|
112
96
|
this.logger.log('[SIDEBAR] USER_ROLE ', this.USER_ROLE)
|
|
113
97
|
this.buildURLs(this.USER_ROLE)
|
|
114
98
|
} else {
|
|
115
|
-
this.logger.
|
|
99
|
+
this.logger.error('[SIDEBAR] stored_project not found in storage', stored_project)
|
|
116
100
|
}
|
|
117
101
|
}
|
|
118
102
|
|
|
@@ -139,15 +123,21 @@ export class SidebarComponent implements OnInit {
|
|
|
139
123
|
this.logger.log('[SIDEBAR] BSAuthStateChanged ', state)
|
|
140
124
|
|
|
141
125
|
if (state === 'online') {
|
|
142
|
-
|
|
143
|
-
this.logger.log('[SIDEBAR]
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
this.
|
|
147
|
-
this.logger.log('[SIDEBAR]
|
|
148
|
-
|
|
126
|
+
const storedCurrentUser = this.appStorageService.getItem('currentUser');
|
|
127
|
+
this.logger.log('[SIDEBAR] storedCurrentUser ', storedCurrentUser)
|
|
128
|
+
|
|
129
|
+
if (storedCurrentUser && storedCurrentUser !== 'undefined') {
|
|
130
|
+
this.currentUser = JSON.parse(storedCurrentUser);
|
|
131
|
+
this.logger.log('[SIDEBAR] subcribeToAuthStateChanged currentUser ', this.currentUser)
|
|
132
|
+
if (this.currentUser) {
|
|
133
|
+
this.createUserAvatar(this.currentUser)
|
|
134
|
+
this.photo_profile_URL = this.imageRepoService.getImagePhotoUrl(this.currentUser.uid)
|
|
135
|
+
this.logger.log('[SIDEBAR] photo_profile_URL ', this.photo_profile_URL)
|
|
136
|
+
this.checkIfExistPhotoProfile(this.photo_profile_URL)
|
|
137
|
+
}
|
|
138
|
+
} else {
|
|
139
|
+
this.logger.error('[SIDEBAR] BSAuthStateChanged current user not found in storage')
|
|
149
140
|
}
|
|
150
|
-
|
|
151
141
|
}
|
|
152
142
|
})
|
|
153
143
|
}
|
|
@@ -196,32 +186,41 @@ export class SidebarComponent implements OnInit {
|
|
|
196
186
|
|
|
197
187
|
getCurrentChatLangAndTranslateLabels() {
|
|
198
188
|
const browserLang = this.translate.getBrowserLang();
|
|
199
|
-
const currentUser = JSON.parse(this.appStorageService.getItem('currentUser'));
|
|
200
|
-
// console.log('[SIDEBAR] - ngOnInit - currentUser ', currentUser)
|
|
201
|
-
// console.log('[SIDEBAR] - ngOnInit - browserLang ', browserLang)
|
|
202
|
-
let currentUserId = ''
|
|
203
|
-
if (currentUser) {
|
|
204
|
-
currentUserId = currentUser.uid
|
|
205
|
-
// console.log('[SIDEBAR] - ngOnInit - currentUserId ', currentUserId)
|
|
206
|
-
}
|
|
207
189
|
|
|
208
|
-
const
|
|
209
|
-
|
|
190
|
+
const storedCurrentUser = this.appStorageService.getItem('currentUser')
|
|
191
|
+
this.logger.log('[SIDEBAR] - ngOnInit - storedCurrentUser ', storedCurrentUser)
|
|
210
192
|
|
|
211
|
-
|
|
212
|
-
if (
|
|
213
|
-
|
|
214
|
-
this.logger.log('[SIDEBAR]
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
193
|
+
|
|
194
|
+
if (storedCurrentUser && storedCurrentUser !== 'undefined') {
|
|
195
|
+
const currentUser = JSON.parse(storedCurrentUser);
|
|
196
|
+
this.logger.log('[SIDEBAR] - ngOnInit - currentUser ', currentUser)
|
|
197
|
+
this.logger.log('[SIDEBAR] - ngOnInit - browserLang ', browserLang)
|
|
198
|
+
let currentUserId = ''
|
|
199
|
+
if (currentUser) {
|
|
200
|
+
currentUserId = currentUser.uid
|
|
201
|
+
this.logger.log('[SIDEBAR] - ngOnInit - getCurrentChatLangAndTranslateLabels - currentUserId ', currentUserId)
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
const stored_preferred_lang = localStorage.getItem(currentUserId + '_lang');
|
|
205
|
+
this.logger.log('[SIDEBAR] stored_preferred_lang: ', stored_preferred_lang);
|
|
206
|
+
|
|
207
|
+
let chat_lang = '';
|
|
208
|
+
if (browserLang && !stored_preferred_lang) {
|
|
209
|
+
chat_lang = browserLang
|
|
210
|
+
this.logger.log('[SIDEBAR] chat_lang: ', chat_lang);
|
|
211
|
+
} else if (browserLang && stored_preferred_lang) {
|
|
212
|
+
chat_lang = stored_preferred_lang
|
|
213
|
+
this.logger.log('[SIDEBAR] chat_lang: ', chat_lang);
|
|
214
|
+
}
|
|
215
|
+
if (tranlatedLanguage.includes(chat_lang)) {
|
|
216
|
+
this.logger.log('[SIDEBAR] tranlatedLanguage includes', chat_lang, ': ', tranlatedLanguage.includes(chat_lang))
|
|
217
|
+
this.translate.use(chat_lang);
|
|
218
|
+
} else {
|
|
219
|
+
this.logger.log('[SIDEBAR] tranlatedLanguage includes', chat_lang, ': ', tranlatedLanguage.includes(chat_lang))
|
|
220
|
+
this.translate.use('en');
|
|
221
|
+
}
|
|
222
222
|
} else {
|
|
223
|
-
this.logger.
|
|
224
|
-
this.translate.use('en');
|
|
223
|
+
this.logger.error('[SIDEBAR] - ngOnInit - currentUser not found in storage ')
|
|
225
224
|
}
|
|
226
225
|
this.translateLabels()
|
|
227
226
|
}
|
|
@@ -240,7 +239,6 @@ export class SidebarComponent implements OnInit {
|
|
|
240
239
|
getConversationsTranslation() {
|
|
241
240
|
this.translate.get('Conversations')
|
|
242
241
|
.subscribe((text: string) => {
|
|
243
|
-
// console.log('[SIDEBAR] - translate Conversations', text)
|
|
244
242
|
this.conversations_lbl = text
|
|
245
243
|
});
|
|
246
244
|
}
|
|
@@ -248,7 +246,6 @@ export class SidebarComponent implements OnInit {
|
|
|
248
246
|
getContactsTranslation() {
|
|
249
247
|
this.translate.get('LABEL_CONTACTS')
|
|
250
248
|
.subscribe((text: string) => {
|
|
251
|
-
// console.log('[SIDEBAR] - translate Contacts', text)
|
|
252
249
|
this.contacts_lbl = text
|
|
253
250
|
});
|
|
254
251
|
}
|
|
@@ -256,7 +253,6 @@ export class SidebarComponent implements OnInit {
|
|
|
256
253
|
getAppsTranslation() {
|
|
257
254
|
this.translate.get('Apps')
|
|
258
255
|
.subscribe((text: string) => {
|
|
259
|
-
// console.log('[SIDEBAR] - translate Apps', text)
|
|
260
256
|
this.apps_lbl = text
|
|
261
257
|
});
|
|
262
258
|
}
|
|
@@ -264,7 +260,6 @@ export class SidebarComponent implements OnInit {
|
|
|
264
260
|
getAnalyticsTranslation() {
|
|
265
261
|
this.translate.get('Analytics')
|
|
266
262
|
.subscribe((text: string) => {
|
|
267
|
-
// console.log('[SIDEBAR] - translate Analytics', text)
|
|
268
263
|
this.analytics_lbl = text
|
|
269
264
|
});
|
|
270
265
|
}
|
|
@@ -272,7 +267,6 @@ export class SidebarComponent implements OnInit {
|
|
|
272
267
|
getActivitiesTranslation() {
|
|
273
268
|
this.translate.get('Activities')
|
|
274
269
|
.subscribe((text: string) => {
|
|
275
|
-
// console.log('[SIDEBAR] - translate Activities', text)
|
|
276
270
|
this.activities_lbl = text
|
|
277
271
|
});
|
|
278
272
|
}
|
|
@@ -280,7 +274,6 @@ export class SidebarComponent implements OnInit {
|
|
|
280
274
|
getHistoryTranslation() {
|
|
281
275
|
this.translate.get('History')
|
|
282
276
|
.subscribe((text: string) => {
|
|
283
|
-
// console.log('[SIDEBAR] - translate History', text)
|
|
284
277
|
this.history_lbl = text
|
|
285
278
|
});
|
|
286
279
|
}
|
|
@@ -288,7 +281,6 @@ export class SidebarComponent implements OnInit {
|
|
|
288
281
|
getSettingsTranslation() {
|
|
289
282
|
this.translate.get('Settings')
|
|
290
283
|
.subscribe((text: string) => {
|
|
291
|
-
// console.log('[SIDEBAR] - translate Settings', text)
|
|
292
284
|
this.settings_lbl = text
|
|
293
285
|
});
|
|
294
286
|
}
|
|
@@ -385,20 +377,14 @@ export class SidebarComponent implements OnInit {
|
|
|
385
377
|
this.countClickOnOpenUserDetailSidebar++
|
|
386
378
|
this.logger.log('[SIDEBAR-CHAT] countClickOnOpenUserDetailSidebar', this.countClickOnOpenUserDetailSidebar)
|
|
387
379
|
this.logger.log('[SIDEBAR-CHAT] OPEN UESER DTLS SIDE PANEL')
|
|
388
|
-
// this.HAS_CLICKED_OPEN_USER_DETAIL = true
|
|
389
|
-
// console.log('[SIDEBAR-CHAT] OPEN USER DTLS SIDE PANEL ', this.HAS_CLICKED_OPEN_USER_DETAIL)
|
|
390
380
|
const elSidebarUserDtls = <HTMLElement>document.querySelector('#user-details');
|
|
391
381
|
this.logger.log('[SIDEBAR] OPEN USER DTLS SIDE PANEL elSidebarUserDtls ', elSidebarUserDtls)
|
|
392
382
|
|
|
393
|
-
|
|
394
|
-
// elSidebarUserDtls.classList.add("active");
|
|
395
|
-
// this.events.publish('userdetailsidebar:opened', true);
|
|
396
|
-
// }
|
|
383
|
+
|
|
397
384
|
if (elSidebarUserDtls && this.countClickOnOpenUserDetailSidebar === 1) {
|
|
398
385
|
elSidebarUserDtls.classList.add("active");
|
|
399
386
|
}
|
|
400
387
|
if (elSidebarUserDtls && this.countClickOnOpenUserDetailSidebar > 1) {
|
|
401
|
-
// console.log('[SIDEBAR] this.countClickOnOpenUserDetailSidebar HERE', this.countClickOnOpenUserDetailSidebar)
|
|
402
388
|
if (elSidebarUserDtls.classList.contains('active')) {
|
|
403
389
|
this.logger.log('[SIDEBAR-CHAT] elSidebarUserDtls contains class ACTIVE', elSidebarUserDtls)
|
|
404
390
|
elSidebarUserDtls.classList.remove("active");
|
|
@@ -409,24 +395,6 @@ export class SidebarComponent implements OnInit {
|
|
|
409
395
|
}
|
|
410
396
|
}
|
|
411
397
|
|
|
412
|
-
// onCloseUserDetailsSidebar($event) {
|
|
413
|
-
// this.logger.log('[SIDEBAR-CHAT] HAS_CLICKED_CLOSE_USER_DETAIL ', $event)
|
|
414
|
-
// this.HAS_CLICKED_OPEN_USER_DETAIL = $event
|
|
415
|
-
// const elemNavbar = <HTMLElement>document.querySelector('.navbar-absolute');
|
|
416
|
-
// this.logger.log('[SIDEBAR] elemNavBar ', elemNavbar)
|
|
417
|
-
// if (elemNavbar) {
|
|
418
|
-
// elemNavbar.classList.remove("navbar-absolute-custom-class")
|
|
419
|
-
// }
|
|
420
|
-
|
|
421
|
-
// const elemNavbarBrand = <HTMLElement>document.querySelector('.navbar-brand');
|
|
422
|
-
// this.logger.log('[SIDEBAR] elemNavbarBrand ', elemNavbarBrand)
|
|
423
|
-
// if (elemNavbarBrand) {
|
|
424
|
-
// elemNavbarBrand.classList.remove("navbar-brand-z-index-zero")
|
|
425
|
-
// }
|
|
426
|
-
// }
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
398
|
goToHome() {
|
|
431
399
|
let url = this.DASHBOARD_URL + this.project_id + '/home'
|
|
432
400
|
this.dashboard_home_url = url;
|
|
@@ -458,14 +426,12 @@ export class SidebarComponent implements OnInit {
|
|
|
458
426
|
myWindow.focus();
|
|
459
427
|
}
|
|
460
428
|
|
|
461
|
-
|
|
462
429
|
goToAnalytics() {
|
|
463
430
|
let url = this.DASHBOARD_URL + this.project_id + '/analytics'
|
|
464
431
|
const myWindow = window.open(url, '_self');
|
|
465
432
|
myWindow.focus();
|
|
466
433
|
}
|
|
467
434
|
|
|
468
|
-
|
|
469
435
|
goToActivities() {
|
|
470
436
|
let url = this.DASHBOARD_URL + this.project_id + '/activities'
|
|
471
437
|
const myWindow = window.open(url, '_self');
|