@chat21/chat21-ionic 3.0.65-rc1 → 3.0.66
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 +23 -1
- package/deploy_amazon_beta.sh +0 -0
- package/deploy_amazon_prod.sh +3 -3
- package/package.json +3 -3
- package/src/app/app.component.ts +18 -61
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.ts +0 -10
- package/src/app/chatlib/conversation-detail/message/return-receipt/return-receipt.component.html +49 -4
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.html +1 -1
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.ts +18 -30
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.html +6 -4
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.scss +2 -0
- package/src/app/components/project-item/project-item.component.ts +5 -0
- package/src/app/components/sidebar/sidebar.component.ts +28 -29
- package/src/app/components/sidebar-user-details/sidebar-user-details.component.html +12 -23
- package/src/app/components/sidebar-user-details/sidebar-user-details.component.scss +3 -0
- package/src/app/components/sidebar-user-details/sidebar-user-details.component.ts +88 -136
- package/src/app/directives/truncate.pipe.ts +0 -1
- package/src/app/pages/authentication/login/login.page.ts +0 -1
- package/src/app/pages/conversation-detail/conversation-detail.page.ts +44 -48
- package/src/app/pages/conversations-list/conversations-list.page.ts +27 -3
- package/src/assets/i18n/ar.json +266 -0
- package/src/assets/i18n/uk.json +266 -0
- package/src/assets/js/chat21client.js +57 -59
- package/src/chat21-core/models/conversation.ts +1 -1
- package/src/chat21-core/providers/firebase/firebase-archivedconversations-handler.ts +26 -21
- package/src/chat21-core/providers/firebase/firebase-conversations-handler.ts +72 -56
- package/src/chat21-core/providers/mqtt/mqtt-conversations-handler.ts +16 -13
- package/src/chat21-core/utils/constants.ts +1 -1
- package/src/global.scss +2 -2
- package/deploy_prod.sh +0 -14
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,28 @@
|
|
|
1
1
|
# chat21-ionic ver 3.0
|
|
2
2
|
|
|
3
|
-
### 3.0.
|
|
3
|
+
### 3.0.66 in PROD
|
|
4
|
+
- added: control to 'foregroundCount' locale storage variable from dashboard
|
|
5
|
+
- added: uk translations
|
|
6
|
+
|
|
7
|
+
### 3.0.65 in PROD
|
|
8
|
+
- bug-fixed: icons in sidebar were not alignet correctly on Safari
|
|
9
|
+
- bug-fixed: missing translations on sidebar-detail component and login-modal page on start when user logged in for the first time
|
|
10
|
+
- bug-fixed: some icons not showed in side-bar user detail component: replaced material-design-icons with material-icons
|
|
11
|
+
- bug-fixed: if removed conversation.uid is the selected ones, change url from /active to /archived with navigateByUrl after archivedConversation is completed
|
|
12
|
+
- bug-fixed: truncate sender_fullname in conversation-list and conversation-detail header components
|
|
13
|
+
- added: arabic translations language
|
|
14
|
+
- changed: behaviour of is_new of a conversation (not update 'is_new' conversation property if conv is the selected one or if sender is me)
|
|
15
|
+
|
|
16
|
+
### 3.0.65-rc3 - LATEST
|
|
17
|
+
- changed: retrive conversations with 'onces' firebase event and remove lastTimestamp from added, changed and removed fireabase subscriptions event
|
|
18
|
+
- bug-fixed: conversation not archived due to conversation_removed unhandled event
|
|
19
|
+
- bug-fixed: if removed conversation.uid is the selected ones, change url from /active to /archived with navigateByUrl after archivedConversation is completed
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### 3.0.65-rc2 - LATEST
|
|
23
|
+
- changed: behaviour of is_new of a conversation (not update 'is_new' conversation property if conv is the selected one or if sender is me)
|
|
24
|
+
|
|
25
|
+
### 3.0.65-rc1 - LATEST
|
|
4
26
|
- added: improves chat performance by caching conversations
|
|
5
27
|
- added: Displays balloon messages with a light orange background for "internal notes" type message
|
|
6
28
|
- added: the html component
|
package/deploy_amazon_beta.sh
CHANGED
|
File without changes
|
package/deploy_amazon_prod.sh
CHANGED
|
@@ -15,9 +15,9 @@ cp -p src/manifest.json platforms/browser/www/
|
|
|
15
15
|
cp -p src/chat-config.json platforms/browser/www/
|
|
16
16
|
|
|
17
17
|
cd platforms/browser/www
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
aws s3 sync . s3://tiledesk-console/v2/chat/latest/
|
|
18
|
+
aws s3 sync . s3://tiledesk-console/v2/chat/
|
|
19
|
+
aws s3 sync . s3://tiledesk-console/v2/chat/$version/
|
|
20
|
+
# aws s3 sync . s3://tiledesk-console/v2/chat/latest/
|
|
21
21
|
cd ../../../
|
|
22
22
|
# aws cloudfront create-invalidation --distribution-id E36UIP90GOSFPM --paths "/*"
|
|
23
23
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chat21/chat21-ionic",
|
|
3
3
|
"author": "Tiledesk SRL",
|
|
4
|
-
"version": "3.0.
|
|
4
|
+
"version": "3.0.66",
|
|
5
5
|
"license": "AGPL-3.0",
|
|
6
6
|
"homepage": "https://tiledesk.com/",
|
|
7
7
|
"repository": {
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"file-saver": "^2.0.5",
|
|
61
61
|
"firebase": "^8.6.7",
|
|
62
62
|
"marked": "^2.0.1",
|
|
63
|
-
"material-
|
|
63
|
+
"material-icons": "^1.11.2",
|
|
64
64
|
"moment": "^2.24.0",
|
|
65
65
|
"moment-timezone": "^0.5.28",
|
|
66
66
|
"ng-connection-service": "^1.0.4",
|
|
@@ -119,4 +119,4 @@
|
|
|
119
119
|
"ios"
|
|
120
120
|
]
|
|
121
121
|
}
|
|
122
|
-
}
|
|
122
|
+
}
|
package/src/app/app.component.ts
CHANGED
|
@@ -37,7 +37,7 @@ import { LoginPage } from './pages/authentication/login/login.page';
|
|
|
37
37
|
import { ConversationListPage } from './pages/conversations-list/conversations-list.page';
|
|
38
38
|
|
|
39
39
|
// utils
|
|
40
|
-
import {
|
|
40
|
+
import { checkPlatformIsMobile, isGroup, getParameterByName, searchIndexInArrayForUid, compareValues } from '../chat21-core/utils/utils';
|
|
41
41
|
import { STORAGE_PREFIX, PLATFORM_MOBILE, PLATFORM_DESKTOP, CHAT_ENGINE_FIREBASE, AUTH_STATE_OFFLINE, AUTH_STATE_ONLINE } from '../chat21-core/utils/constants';
|
|
42
42
|
import { environment } from '../environments/environment';
|
|
43
43
|
import { UserModel } from '../chat21-core/models/user';
|
|
@@ -99,6 +99,7 @@ export class AppComponent implements OnInit {
|
|
|
99
99
|
private hadBeenCalledOpenModal: boolean = false;
|
|
100
100
|
public missingConnectionToast: any
|
|
101
101
|
public executedInitializeAppByWatchConnection: boolean = false;
|
|
102
|
+
// private isInitialized: boolean = false;
|
|
102
103
|
private version: string;
|
|
103
104
|
IS_ONLINE: boolean;
|
|
104
105
|
IS_ON_MOBILE_DEVICE: boolean;
|
|
@@ -481,6 +482,7 @@ export class AppComponent implements OnInit {
|
|
|
481
482
|
}
|
|
482
483
|
this.uploadService.initialize();
|
|
483
484
|
|
|
485
|
+
this.setLanguage(null)
|
|
484
486
|
this.initAuthentication();
|
|
485
487
|
this.initSubscriptions();
|
|
486
488
|
this.initAudio();
|
|
@@ -627,16 +629,13 @@ export class AppComponent implements OnInit {
|
|
|
627
629
|
|
|
628
630
|
|
|
629
631
|
translateToastMsgs() {
|
|
630
|
-
this.translate.get('AnErrorOccurredWhileUnsubscribingFromNotifications')
|
|
631
|
-
.subscribe((text: string) => {
|
|
632
|
+
this.translate.get('AnErrorOccurredWhileUnsubscribingFromNotifications').subscribe((text: string) => {
|
|
632
633
|
this.toastMsgErrorWhileUnsubscribingFromNotifications = text;
|
|
633
634
|
});
|
|
634
|
-
this.translate.get('CLOSE_TOAST')
|
|
635
|
-
.subscribe((text: string) => {
|
|
635
|
+
this.translate.get('CLOSE_TOAST').subscribe((text: string) => {
|
|
636
636
|
this.toastMsgCloseToast = text;
|
|
637
637
|
});
|
|
638
|
-
this.translate.get('WAITING_FOR_NETWORK')
|
|
639
|
-
.subscribe((text: string) => {
|
|
638
|
+
this.translate.get('WAITING_FOR_NETWORK').subscribe((text: string) => {
|
|
640
639
|
this.toastMsgWaitingForNetwork = text;
|
|
641
640
|
});
|
|
642
641
|
}
|
|
@@ -851,6 +850,7 @@ export class AppComponent implements OnInit {
|
|
|
851
850
|
}, 1000);
|
|
852
851
|
this.soundMessage()
|
|
853
852
|
}
|
|
853
|
+
// if(this.isInitialized) this.soundMessage()
|
|
854
854
|
}
|
|
855
855
|
|
|
856
856
|
soundMessage() {
|
|
@@ -867,7 +867,7 @@ export class AppComponent implements OnInit {
|
|
|
867
867
|
}).catch((error: any) => {
|
|
868
868
|
that.logger.error('[APP-COMP] ***soundMessage error*', error);
|
|
869
869
|
});
|
|
870
|
-
},
|
|
870
|
+
}, 4000);
|
|
871
871
|
}
|
|
872
872
|
/**---------------- SOUND FUNCTIONS --> END <--- +*/
|
|
873
873
|
/***************************************************+*/
|
|
@@ -922,8 +922,8 @@ export class AppComponent implements OnInit {
|
|
|
922
922
|
// that.conversationsChanged(conversations);
|
|
923
923
|
if (conversation && conversation.is_new === true) {
|
|
924
924
|
this.manageTabNotification()
|
|
925
|
-
this.updateConversationsOnStorage()
|
|
926
925
|
}
|
|
926
|
+
if(conversation) this.updateConversationsOnStorage()
|
|
927
927
|
});
|
|
928
928
|
|
|
929
929
|
this.conversationsHandlerService.conversationChanged.subscribe((conversation: ConversationModel) => {
|
|
@@ -1145,33 +1145,6 @@ export class AppComponent implements OnInit {
|
|
|
1145
1145
|
}
|
|
1146
1146
|
|
|
1147
1147
|
|
|
1148
|
-
// listenToLogoutEvent() {
|
|
1149
|
-
// this.events.subscribe('profileInfoButtonClick:logout', (hasclickedlogout) => {
|
|
1150
|
-
// this.logger.debug('[APP-COMP] hasclickedlogout', hasclickedlogout);
|
|
1151
|
-
// if (hasclickedlogout === true) {
|
|
1152
|
-
// // ----------------------------------------------
|
|
1153
|
-
// // PUSH NOTIFICATIONS
|
|
1154
|
-
// // ----------------------------------------------
|
|
1155
|
-
// const that = this;
|
|
1156
|
-
// const pushEngine = this.appConfigProvider.getConfig().pushEngine
|
|
1157
|
-
// if( pushEngine && pushEngine !== 'none'){
|
|
1158
|
-
// this.notificationsService.removeNotificationsInstance(function (res) {
|
|
1159
|
-
// that.logger.debug('[APP-COMP] FIREBASE-NOTIFICATION >>>> removeNotificationsInstance > CALLBACK RES', res);
|
|
1160
|
-
|
|
1161
|
-
// if (res === 'success') {
|
|
1162
|
-
// that.removePresenceAndLogout();
|
|
1163
|
-
// } else {
|
|
1164
|
-
// that.removePresenceAndLogout();
|
|
1165
|
-
// that.presentToast();
|
|
1166
|
-
// }
|
|
1167
|
-
// })
|
|
1168
|
-
// }
|
|
1169
|
-
|
|
1170
|
-
// }
|
|
1171
|
-
// });
|
|
1172
|
-
// }
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
1148
|
async presentToast() {
|
|
1176
1149
|
const toast = await this.toastController.create({
|
|
1177
1150
|
message: this.toastMsgErrorWhileUnsubscribingFromNotifications,
|
|
@@ -1195,9 +1168,7 @@ export class AppComponent implements OnInit {
|
|
|
1195
1168
|
// 1 - init chatConversationsHandler and archviedConversationsHandler
|
|
1196
1169
|
this.conversationsHandlerService.initialize(this.tenant, userId, translationMap);
|
|
1197
1170
|
// this.subscribeToConvs()
|
|
1198
|
-
|
|
1199
|
-
this.logger.log('[APP-COMP] initConversationsHandler: get lastTimestamp', lastTimestamp)
|
|
1200
|
-
this.conversationsHandlerService.subscribeToConversations(lastTimestamp, () => {
|
|
1171
|
+
this.conversationsHandlerService.subscribeToConversations(null, () => {
|
|
1201
1172
|
// this.logger.log('[APP-COMP] - CONVS - INIT CONV')
|
|
1202
1173
|
const conversations = this.conversationsHandlerService.conversations;
|
|
1203
1174
|
this.logger.info('initialize FROM [APP-COMP] - [APP-COMP]-CONVS - INIT CONV CONVS', conversations)
|
|
@@ -1211,34 +1182,19 @@ export class AppComponent implements OnInit {
|
|
|
1211
1182
|
|
|
1212
1183
|
}
|
|
1213
1184
|
|
|
1214
|
-
// START: manage conversations on firebase upon last timestamp from stored conversations
|
|
1215
|
-
private manageStoredConversations(): number {
|
|
1216
|
-
let timestamp = 0
|
|
1217
|
-
if(this.appStorageService.getItem('conversations')){
|
|
1218
|
-
const conversationsStored = JSON.parse(this.appStorageService.getItem('conversations'))
|
|
1219
|
-
if(conversationsStored && conversationsStored.length > 0) {
|
|
1220
|
-
this.conversationsHandlerService.conversations = conversationsStored
|
|
1221
|
-
timestamp = conversationsStored[0].timestamp
|
|
1222
|
-
this.events.publish('appcompSubscribeToConvs:loadingIsActive', false);
|
|
1223
|
-
}
|
|
1224
|
-
}
|
|
1225
|
-
return timestamp
|
|
1226
|
-
}
|
|
1227
|
-
|
|
1228
1185
|
private updateConversationsOnStorage(){
|
|
1229
1186
|
const that = this
|
|
1230
|
-
//reset timer and save conversation on storage after 2s
|
|
1231
|
-
clearTimeout(this.setTimeoutConversationsEvent);
|
|
1232
|
-
this.setTimeoutConversationsEvent = setTimeout(() => {
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1187
|
+
// reset timer and save conversation on storage after 2s
|
|
1188
|
+
// clearTimeout(this.setTimeoutConversationsEvent);
|
|
1189
|
+
// this.setTimeoutConversationsEvent = setTimeout(() => {
|
|
1190
|
+
// that.logger.debug('[APP-COMP] updateConversationsOnStorage: reset timer and save conversations -> ', this.conversationsHandlerService.conversations.length)
|
|
1191
|
+
// that.appStorageService.setItem('conversations', JSON.stringify(that.conversationsHandlerService.conversations))
|
|
1192
|
+
// that.isInitialized = true;
|
|
1193
|
+
// }, 2000);
|
|
1236
1194
|
}
|
|
1237
|
-
// END: manage conversations on firebase upon last timestamp from stored conversations
|
|
1238
1195
|
|
|
1239
1196
|
private initArchivedConversationsHandler(userId: string) {
|
|
1240
1197
|
const keys = ['YOU'];
|
|
1241
|
-
|
|
1242
1198
|
const translationMap = this.translateService.translateLanguage(keys);
|
|
1243
1199
|
|
|
1244
1200
|
this.logger.debug('[APP-COMP] initArchivedConversationsHandler ------------->', userId, this.tenant);
|
|
@@ -1305,3 +1261,4 @@ export class AppComponent implements OnInit {
|
|
|
1305
1261
|
}
|
|
1306
1262
|
}
|
|
1307
1263
|
}
|
|
1264
|
+
|
package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.ts
CHANGED
|
@@ -59,16 +59,12 @@ export class BubbleMessageComponent implements OnInit, OnChanges {
|
|
|
59
59
|
setMomentLocale() {
|
|
60
60
|
this.browserLang = this.translate.getBrowserLang();
|
|
61
61
|
const currentUser = this.tiledeskAuthService.getCurrentUser();
|
|
62
|
-
this.logger.log('[BUBBLE-MESSAGE] - ngOnInit - currentUser ', currentUser)
|
|
63
62
|
let currentUserId = ''
|
|
64
63
|
if (currentUser) {
|
|
65
64
|
currentUserId = currentUser.uid
|
|
66
|
-
this.logger.log('[BUBBLE-MESSAGE] - ngOnInit - currentUserId ', currentUserId)
|
|
67
65
|
}
|
|
68
66
|
|
|
69
67
|
const stored_preferred_lang = localStorage.getItem(currentUserId + '_lang');
|
|
70
|
-
this.logger.log('[BUBBLE-MESSAGE] stored_preferred_lang: ', stored_preferred_lang);
|
|
71
|
-
|
|
72
68
|
|
|
73
69
|
let chat_lang = ''
|
|
74
70
|
if (this.browserLang && !stored_preferred_lang) {
|
|
@@ -81,15 +77,9 @@ export class BubbleMessageComponent implements OnInit, OnChanges {
|
|
|
81
77
|
sameElse: 'LLLL'
|
|
82
78
|
}
|
|
83
79
|
});
|
|
84
|
-
// this.translate.getTranslation(chat_lang).subscribe((labels: string) => {
|
|
85
|
-
// console.log('[BUBBLE-MESSAGE] translations: ', labels);
|
|
86
|
-
// });
|
|
87
80
|
}
|
|
88
81
|
|
|
89
82
|
ngOnChanges() {
|
|
90
|
-
this.logger.log('BUBBLE-MSG Hello !!!! this.message ', this.message)
|
|
91
|
-
this.logger.log('BUBBLE-MSG ngOnChanges areVisibleCAR', this.areVisibleCAR)
|
|
92
|
-
this.logger.log('BUBBLE-MSG ngOnChanges supportMode', this.supportMode)
|
|
93
83
|
if (this.message && this.message.metadata && typeof this.message.metadata === 'object') {
|
|
94
84
|
this.getMetadataSize(this.message.metadata)
|
|
95
85
|
}
|
package/src/app/chatlib/conversation-detail/message/return-receipt/return-receipt.component.html
CHANGED
|
@@ -1,18 +1,63 @@
|
|
|
1
1
|
<div class="status-message">
|
|
2
2
|
<!-- c21-ico-schedule -->
|
|
3
3
|
<div *ngIf="!status" class="icon">
|
|
4
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18"
|
|
4
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18">
|
|
5
|
+
<defs>
|
|
6
|
+
<style>.cls-1{fill:none;}</style>
|
|
7
|
+
</defs>
|
|
8
|
+
<!-- <title>ic_schedule</title> -->
|
|
9
|
+
<g id="Livello_2" data-name="Livello 2">
|
|
10
|
+
<g id="Livello_1-2" data-name="Livello 1">
|
|
11
|
+
<path d="M9,1.5A7.5,7.5,0,1,0,16.5,9,7.5,7.5,0,0,0,9,1.5ZM9,15a6,6,0,1,1,6-6A6,6,0,0,1,9,15Z"/>
|
|
12
|
+
<path class="cls-1" d="M0,0H18V18H0Z"/>
|
|
13
|
+
<path d="M9.38,5.25H8.25v4.5l3.94,2.36.56-.92-3.37-2Z"/>
|
|
14
|
+
</g>
|
|
15
|
+
</g>
|
|
16
|
+
</svg>
|
|
5
17
|
</div>
|
|
6
18
|
<!-- c21-ico-done -->
|
|
7
19
|
<div *ngIf="status == MSG_STATUS_SENT" class="icon">
|
|
8
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18"
|
|
20
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18">
|
|
21
|
+
<defs>
|
|
22
|
+
<style>.cls-1{fill:none;}</style>
|
|
23
|
+
</defs>
|
|
24
|
+
<!-- <title>ic_done</title> -->
|
|
25
|
+
<g id="Livello_2" data-name="Livello 2">
|
|
26
|
+
<g id="Livello_1-2" data-name="Livello 1">
|
|
27
|
+
<path class="cls-1" d="M0,0H18V18H0Z"/>
|
|
28
|
+
<path d="M6.75,12.15,3.6,9,2.55,10l4.2,4.2,9-9-1-1.05Z"/>
|
|
29
|
+
</g>
|
|
30
|
+
</g>
|
|
31
|
+
</svg>
|
|
9
32
|
</div>
|
|
10
33
|
<!-- c21-ico-done -->
|
|
11
34
|
<div *ngIf="status == MSG_STATUS_SENT_SERVER" class="icon">
|
|
12
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18"
|
|
35
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18">
|
|
36
|
+
<defs>
|
|
37
|
+
<style>.cls-1{fill:none;}</style>
|
|
38
|
+
</defs>
|
|
39
|
+
<!-- <title>ic_done</title> -->
|
|
40
|
+
<g id="Livello_2" data-name="Livello 2">
|
|
41
|
+
<g id="Livello_1-2" data-name="Livello 1">
|
|
42
|
+
<path class="cls-1" d="M0,0H18V18H0Z"/>
|
|
43
|
+
<path d="M6.75,12.15,3.6,9,2.55,10l4.2,4.2,9-9-1-1.05Z"/>
|
|
44
|
+
</g>
|
|
45
|
+
</g>
|
|
46
|
+
</svg>
|
|
13
47
|
</div>
|
|
14
48
|
<!-- c21-ico-done_all -->
|
|
15
49
|
<div *ngIf="status == MSG_STATUS_RETURN_RECEIPT" class="icon">
|
|
16
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18"
|
|
50
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18">
|
|
51
|
+
<defs>
|
|
52
|
+
<style>.cls-1{fill:none;}</style>
|
|
53
|
+
</defs>
|
|
54
|
+
<!-- <title>ic_done_all</title> -->
|
|
55
|
+
<g id="Livello_2" data-name="Livello 2">
|
|
56
|
+
<g id="Livello_1-2" data-name="Livello 1">
|
|
57
|
+
<path class="cls-1" d="M0,0H18V18H0Z"/>
|
|
58
|
+
<path d="M13.5,5.25,12.44,4.19,7.69,8.95,8.74,10Zm3.18-1.06L8.74,12.13,5.61,9,4.55,10.06l4.19,4.19,9-9ZM.31,10.06,4.5,14.25l1.06-1.06L1.37,9Z"/>
|
|
59
|
+
</g>
|
|
60
|
+
</g>
|
|
61
|
+
</svg>
|
|
17
62
|
</div>
|
|
18
63
|
</div>
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
|
|
77
77
|
|
|
78
78
|
<ion-item button="true" lines="none" class="ion-no-padding" [class.ion-selected]="conversation?.uid === uidConvSelected"
|
|
79
|
-
*ngFor="let conversation of listConversations" (click)="openConversationByID(conversation)" detail=false>
|
|
79
|
+
*ngFor="let conversation of listConversations; let index= index" (click)="openConversationByID(conversation)" detail=false>
|
|
80
80
|
<div tabindex="0"></div>
|
|
81
81
|
|
|
82
82
|
<!-- <div [class.selected]="conversation.uid === uidConvSelected"></div> -->
|
|
@@ -41,7 +41,7 @@ export class IonListConversationsComponent extends ListConversationsComponent im
|
|
|
41
41
|
public alert_lbl: string;
|
|
42
42
|
public actionNotAllowed_lbl: string;
|
|
43
43
|
public youAreNoLongerAmongTheTeammatesManagingThisConversation_lbl: string;
|
|
44
|
-
public ok_lbl: string;
|
|
44
|
+
public ok_lbl: string;
|
|
45
45
|
|
|
46
46
|
tooltip_options = {
|
|
47
47
|
'show-delay': 0,
|
|
@@ -119,35 +119,22 @@ public ok_lbl: string;
|
|
|
119
119
|
|
|
120
120
|
|
|
121
121
|
translateLbls() {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
this.
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
.subscribe((text: string) => {
|
|
139
|
-
this.actionNotAllowed_lbl = text;
|
|
140
|
-
});
|
|
141
|
-
|
|
142
|
-
this.translate.get('YouAreNoLongerAmongTheTeammatesManagingThisConversation')
|
|
143
|
-
.subscribe((text: string) => {
|
|
144
|
-
this.youAreNoLongerAmongTheTeammatesManagingThisConversation_lbl = text;
|
|
145
|
-
});
|
|
146
|
-
|
|
147
|
-
this.translate.get('CLOSE_ALERT_CONFIRM_LABEL')
|
|
148
|
-
.subscribe((text: string) => {
|
|
149
|
-
this.ok_lbl = text;
|
|
150
|
-
});
|
|
122
|
+
const translationKeys = [
|
|
123
|
+
'Resolve',
|
|
124
|
+
'Archive',
|
|
125
|
+
'ALERT_TITLE',
|
|
126
|
+
'ActionNotAllowed',
|
|
127
|
+
'CLOSE_ALERT_CONFIRM_LABEL',
|
|
128
|
+
'YouAreNoLongerAmongTheTeammatesManagingThisConversation'
|
|
129
|
+
]
|
|
130
|
+
this.translate.get(['Resolve', 'Archive', 'ALERT_TITLE']).subscribe((translations: string) => {
|
|
131
|
+
this.resolve_btn_tooltip = translations['Resolve'];
|
|
132
|
+
this.archive_btn_tooltip = translations['Archive'];
|
|
133
|
+
this.alert_lbl = translations['ALERT_TITLE']
|
|
134
|
+
this.actionNotAllowed_lbl = translations['ActionNotAllowed']
|
|
135
|
+
this.ok_lbl = translations['CLOSE_ALERT_CONFIRM_LABEL']
|
|
136
|
+
this.youAreNoLongerAmongTheTeammatesManagingThisConversation_lbl = translations['YouAreNoLongerAmongTheTeammatesManagingThisConversation']
|
|
137
|
+
});
|
|
151
138
|
}
|
|
152
139
|
|
|
153
140
|
setMomentLocale() {
|
|
@@ -227,6 +214,7 @@ public ok_lbl: string;
|
|
|
227
214
|
var conversationId = conversation.uid;
|
|
228
215
|
this.logger.log('[ION-LIST-CONVS-COMP] - closeConversation - conversationId ', conversationId)
|
|
229
216
|
this.onCloseConversation.emit(conversation)
|
|
217
|
+
let currentIndex = this.listConversations.findIndex(conv => conv.uid === conversation.uid)
|
|
230
218
|
}
|
|
231
219
|
|
|
232
220
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<ion-header no-border class="ion-no-border">
|
|
2
|
-
<ion-toolbar
|
|
3
|
-
<ion-buttons slot="start" style="height:60px">
|
|
2
|
+
<ion-toolbar>
|
|
3
|
+
<ion-buttons slot="start" style="height:60px" *ngIf="isMobile">
|
|
4
4
|
<!-- (click)="pushPage('conversations-list')" defaultHref="/conversations-list" -->
|
|
5
|
-
<ion-back-button style="display: block;" text=""
|
|
5
|
+
<ion-back-button style="display: block;" text="" (click)="goBackToConversationList()">
|
|
6
6
|
</ion-back-button>
|
|
7
7
|
</ion-buttons>
|
|
8
8
|
|
|
@@ -12,7 +12,9 @@
|
|
|
12
12
|
<!-- [ngStyle] = "{ 'left': platformName === 'ios' ? '55px' : '' }" -->
|
|
13
13
|
<div *ngIf="conversationAvatar" class="avatar-container" (click)="onOpenCloseInfoConversation()" style="cursor: pointer"
|
|
14
14
|
[ngClass]="{ 'avatar-container-ios': platformName === 'ios' }">
|
|
15
|
-
<app-avatar-profile
|
|
15
|
+
<app-avatar-profile
|
|
16
|
+
[itemAvatar]=conversationAvatar>
|
|
17
|
+
</app-avatar-profile>
|
|
16
18
|
</div>
|
|
17
19
|
<!-- [ngStyle] = "{ 'left': platformName === 'ios' ? '63px' : '' }" -->
|
|
18
20
|
<div *ngIf="isDirect" class="user-presence" [ngClass]="{ 'user-presence-ios': platformName === 'ios' }">
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { EventsService } from './../../services/events-service';
|
|
1
2
|
import { Component, EventEmitter, HostListener, OnInit, Output } from '@angular/core';
|
|
2
3
|
import { WebsocketService } from 'src/app/services/websocket/websocket.service';
|
|
3
4
|
import { Subject } from 'rxjs';
|
|
@@ -53,6 +54,7 @@ export class ProjectItemComponent implements OnInit {
|
|
|
53
54
|
public tiledeskService: TiledeskService,
|
|
54
55
|
public webSocketJs: WebSocketJs,
|
|
55
56
|
private appConfigProvider: AppConfigProvider,
|
|
57
|
+
public events: EventsService
|
|
56
58
|
) { }
|
|
57
59
|
|
|
58
60
|
ngOnInit() {
|
|
@@ -209,10 +211,13 @@ export class ProjectItemComponent implements OnInit {
|
|
|
209
211
|
this.logger.log('[PROJECT-ITEM] - LAST PROJECT PARSED ', this.project)
|
|
210
212
|
}
|
|
211
213
|
|
|
214
|
+
|
|
215
|
+
|
|
212
216
|
|
|
213
217
|
}
|
|
214
218
|
|
|
215
219
|
doProjectSubscriptions(project) {
|
|
220
|
+
this.events.publish('storage:last_project', project)
|
|
216
221
|
this.logger.log('[PROJECT-ITEM] doProjectSubscriptions project ', project)
|
|
217
222
|
if (project) {
|
|
218
223
|
const user_role = this.project.role
|
|
@@ -83,21 +83,14 @@ export class SidebarComponent implements OnInit {
|
|
|
83
83
|
|
|
84
84
|
|
|
85
85
|
getStoredProjectAndUserRole() {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
this.USER_ROLE = project.role;
|
|
96
|
-
this.logger.log('[SIDEBAR] USER_ROLE ', this.USER_ROLE)
|
|
97
|
-
this.buildURLs(this.USER_ROLE)
|
|
98
|
-
} else {
|
|
99
|
-
this.logger.error('[SIDEBAR] stored_project not found in storage', stored_project)
|
|
100
|
-
}
|
|
86
|
+
this.events.subscribe('storage:last_project',project =>{
|
|
87
|
+
this.logger.log('[SIDEBAR] stored_project ', project)
|
|
88
|
+
if (project && project !== 'undefined') {
|
|
89
|
+
this.project_id = project.id_project.id
|
|
90
|
+
this.USER_ROLE = project.role;
|
|
91
|
+
this.buildURLs(this.USER_ROLE)
|
|
92
|
+
}
|
|
93
|
+
})
|
|
101
94
|
}
|
|
102
95
|
|
|
103
96
|
buildURLs(USER_ROLE) {
|
|
@@ -134,6 +127,7 @@ export class SidebarComponent implements OnInit {
|
|
|
134
127
|
this.photo_profile_URL = this.imageRepoService.getImagePhotoUrl(this.currentUser.uid)
|
|
135
128
|
this.logger.log('[SIDEBAR] photo_profile_URL ', this.photo_profile_URL)
|
|
136
129
|
this.checkIfExistPhotoProfile(this.photo_profile_URL)
|
|
130
|
+
this.checkAndRemoveDashboardForegroundCount()
|
|
137
131
|
}
|
|
138
132
|
} else {
|
|
139
133
|
this.logger.error('[SIDEBAR] BSAuthStateChanged current user not found in storage')
|
|
@@ -156,6 +150,18 @@ export class SidebarComponent implements OnInit {
|
|
|
156
150
|
})
|
|
157
151
|
}
|
|
158
152
|
|
|
153
|
+
checkAndRemoveDashboardForegroundCount(){
|
|
154
|
+
try {
|
|
155
|
+
const dashboardForegroundCount = localStorage.getItem('dshbrd----foregroundcount')
|
|
156
|
+
this.logger.log('[SIDEBAR] - THERE IS DASHBOARD FOREGROUND COUNT', dashboardForegroundCount)
|
|
157
|
+
if (dashboardForegroundCount && dashboardForegroundCount !== 'undefined') {
|
|
158
|
+
localStorage.setItem('dshbrd----foregroundcount', '0')
|
|
159
|
+
}
|
|
160
|
+
} catch (err) {
|
|
161
|
+
this.logger.error('Get local storage dshbrd----foregroundcount ', err)
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
159
165
|
createUserAvatar(currentUser) {
|
|
160
166
|
this.logger.log('[SIDEBAR] - createProjectUserAvatar ', currentUser)
|
|
161
167
|
let fullname = ''
|
|
@@ -237,50 +243,43 @@ export class SidebarComponent implements OnInit {
|
|
|
237
243
|
}
|
|
238
244
|
|
|
239
245
|
getConversationsTranslation() {
|
|
240
|
-
this.translate.get('Conversations')
|
|
241
|
-
.subscribe((text: string) => {
|
|
246
|
+
this.translate.get('Conversations').subscribe((text: string) => {
|
|
242
247
|
this.conversations_lbl = text
|
|
243
248
|
});
|
|
244
249
|
}
|
|
245
250
|
|
|
246
251
|
getContactsTranslation() {
|
|
247
|
-
this.translate.get('LABEL_CONTACTS')
|
|
248
|
-
.subscribe((text: string) => {
|
|
252
|
+
this.translate.get('LABEL_CONTACTS').subscribe((text: string) => {
|
|
249
253
|
this.contacts_lbl = text
|
|
250
254
|
});
|
|
251
255
|
}
|
|
252
256
|
|
|
253
257
|
getAppsTranslation() {
|
|
254
|
-
this.translate.get('Apps')
|
|
255
|
-
.subscribe((text: string) => {
|
|
258
|
+
this.translate.get('Apps').subscribe((text: string) => {
|
|
256
259
|
this.apps_lbl = text
|
|
257
260
|
});
|
|
258
261
|
}
|
|
259
262
|
|
|
260
263
|
getAnalyticsTranslation() {
|
|
261
|
-
this.translate.get('Analytics')
|
|
262
|
-
.subscribe((text: string) => {
|
|
264
|
+
this.translate.get('Analytics').subscribe((text: string) => {
|
|
263
265
|
this.analytics_lbl = text
|
|
264
266
|
});
|
|
265
267
|
}
|
|
266
268
|
|
|
267
269
|
getActivitiesTranslation() {
|
|
268
|
-
this.translate.get('Activities')
|
|
269
|
-
.subscribe((text: string) => {
|
|
270
|
+
this.translate.get('Activities').subscribe((text: string) => {
|
|
270
271
|
this.activities_lbl = text
|
|
271
272
|
});
|
|
272
273
|
}
|
|
273
274
|
|
|
274
275
|
getHistoryTranslation() {
|
|
275
|
-
this.translate.get('History')
|
|
276
|
-
.subscribe((text: string) => {
|
|
276
|
+
this.translate.get('History').subscribe((text: string) => {
|
|
277
277
|
this.history_lbl = text
|
|
278
278
|
});
|
|
279
279
|
}
|
|
280
280
|
|
|
281
281
|
getSettingsTranslation() {
|
|
282
|
-
this.translate.get('Settings')
|
|
283
|
-
.subscribe((text: string) => {
|
|
282
|
+
this.translate.get('Settings').subscribe((text: string) => {
|
|
284
283
|
this.settings_lbl = text
|
|
285
284
|
});
|
|
286
285
|
}
|