@chat21/chat21-ionic 3.0.61-rc5 → 3.0.61
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 +90 -0
- package/README.md +6 -0
- package/angular.json +2 -0
- package/config.xml +4 -5
- package/deploy_pre.sh +10 -10
- package/deploy_prod.sh +4 -0
- package/env.sample +1 -1
- package/package.json +8 -8
- package/resources/{Android → android}/icon/drawable-hdpi-icon.png +0 -0
- package/resources/{Android → android}/icon/drawable-ldpi-icon.png +0 -0
- package/resources/{Android → android}/icon/drawable-mdpi-icon.png +0 -0
- package/resources/{Android → android}/icon/drawable-xhdpi-icon.png +0 -0
- package/resources/{Android → android}/icon/drawable-xxhdpi-icon.png +0 -0
- package/resources/{Android → android}/icon/drawable-xxxhdpi-icon.png +0 -0
- package/resources/{Android → android}/icon.png +0 -0
- package/resources/{Android → android}/splash/drawable-land-hdpi-screen.png +0 -0
- package/resources/{Android → android}/splash/drawable-land-ldpi-screen.png +0 -0
- package/resources/{Android → android}/splash/drawable-land-mdpi-screen.png +0 -0
- package/resources/{Android → android}/splash/drawable-land-xhdpi-screen.png +0 -0
- package/resources/{Android → android}/splash/drawable-land-xxhdpi-screen.png +0 -0
- package/resources/{Android → android}/splash/drawable-land-xxxhdpi-screen.png +0 -0
- package/resources/{Android → android}/splash/drawable-port-hdpi-screen.png +0 -0
- package/resources/{Android → android}/splash/drawable-port-ldpi-screen.png +0 -0
- package/resources/{Android → android}/splash/drawable-port-mdpi-screen.png +0 -0
- package/resources/{Android → android}/splash/drawable-port-xhdpi-screen.png +0 -0
- package/resources/{Android → android}/splash/drawable-port-xxhdpi-screen.png +0 -0
- package/resources/{Android → android}/splash/drawable-port-xxxhdpi-screen.png +0 -0
- package/resources/{Android → android}/splash.png +0 -0
- package/src/app/app-routing.module.ts +15 -0
- package/src/app/app.component.html +2 -2
- package/src/app/app.component.scss +2 -1
- package/src/app/app.component.ts +34 -20
- package/src/app/app.module.ts +11 -3
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.html +36 -25
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.scss +160 -50
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.ts +108 -18
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.html +21 -36
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.scss +19 -7
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.ts +35 -40
- package/src/app/chatlib/conversation-detail/message/message-attachment/message-attachment.component.scss +1 -1
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.ts +78 -15
- package/src/app/chatlib/list-conversations-component/list-conversations/list-conversations.component.ts +13 -10
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.html +11 -4
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.scss +3 -1
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.ts +142 -71
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.html +59 -22
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.scss +32 -9
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.ts +107 -23
- package/src/app/components/ddp-header/ddp-header.component.html +9 -2
- package/src/app/components/ddp-header/ddp-header.component.ts +93 -18
- package/src/app/components/project-item/project-item.component.html +1 -1
- package/src/app/components/project-item/project-item.component.scss +1 -1
- package/src/app/components/project-item/project-item.component.ts +3 -3
- package/src/app/components/sidebar/sidebar.component.html +151 -86
- package/src/app/components/sidebar/sidebar.component.scss +60 -3
- package/src/app/components/sidebar/sidebar.component.ts +173 -47
- package/src/app/components/sidebar-user-details/sidebar-user-details.component.html +26 -7
- package/src/app/components/sidebar-user-details/sidebar-user-details.component.scss +44 -19
- package/src/app/components/sidebar-user-details/sidebar-user-details.component.ts +109 -35
- package/src/app/pages/conversation-detail/conversation-detail.module.ts +5 -1
- package/src/app/pages/conversation-detail/conversation-detail.page.html +19 -9
- package/src/app/pages/conversation-detail/conversation-detail.page.scss +28 -0
- package/src/app/pages/conversation-detail/conversation-detail.page.ts +1124 -778
- package/src/app/pages/conversations-list/conversations-list.page.html +3 -1
- package/src/app/pages/conversations-list/conversations-list.page.ts +647 -445
- package/src/app/pages/create-canned-response/create-canned-response-routing.module.ts +17 -0
- package/src/app/pages/create-canned-response/create-canned-response.module.ts +30 -0
- package/src/app/pages/create-canned-response/create-canned-response.page.html +150 -0
- package/src/app/pages/create-canned-response/create-canned-response.page.scss +55 -0
- package/src/app/pages/create-canned-response/create-canned-response.page.spec.ts +24 -0
- package/src/app/pages/create-canned-response/create-canned-response.page.ts +319 -0
- package/src/app/pages/create-requester/create-requester-routing.module.ts +17 -0
- package/src/app/pages/create-requester/create-requester.module.ts +28 -0
- package/src/app/pages/create-requester/create-requester.page.html +67 -0
- package/src/app/pages/create-requester/create-requester.page.scss +30 -0
- package/src/app/pages/create-requester/create-requester.page.spec.ts +24 -0
- package/src/app/pages/create-requester/create-requester.page.ts +138 -0
- package/src/app/pages/create-ticket/create-ticket-routing.module.ts +17 -0
- package/src/app/pages/create-ticket/create-ticket.module.ts +28 -0
- package/src/app/pages/create-ticket/create-ticket.page.html +171 -0
- package/src/app/pages/create-ticket/create-ticket.page.scss +52 -0
- package/src/app/pages/create-ticket/create-ticket.page.spec.ts +24 -0
- package/src/app/pages/create-ticket/create-ticket.page.ts +432 -0
- package/src/app/pages/loader-preview/loader-preview.page.ts +226 -166
- package/src/app/pages/profile-info/profile-info.page.html +2 -2
- package/src/app/pages/profile-info/profile-info.page.scss +13 -2
- package/src/app/services/tiledesk/tiledesk.service.ts +209 -0
- package/src/app/shared/shared.module.ts +1 -1
- package/src/assets/i18n/de.json +45 -7
- package/src/assets/i18n/en.json +41 -3
- package/src/assets/i18n/es.json +41 -3
- package/src/assets/i18n/fr.json +44 -6
- package/src/assets/i18n/it.json +41 -3
- package/src/assets/i18n/pt.json +41 -3
- package/src/assets/i18n/ru.json +42 -4
- package/src/assets/i18n/sr.json +265 -0
- package/src/assets/i18n/tr.json +41 -4
- package/src/assets/images/default-avatar-x-select.png +0 -0
- package/src/assets/images/priority_icons/high.svg +3 -0
- package/src/assets/images/priority_icons/high_v2.svg +14 -0
- package/src/assets/images/priority_icons/low.svg +10 -0
- package/src/assets/images/priority_icons/low_v2.svg +14 -0
- package/src/assets/images/priority_icons/medium.svg +16 -0
- package/src/assets/images/priority_icons/medium_v2.svg +11 -0
- package/src/assets/images/priority_icons/urgent.svg +4 -0
- package/src/assets/images/priority_icons/urgent_v2.svg +16 -0
- package/src/chat-config-mqtt.json +25 -16
- package/src/chat-config-template.json +5 -4
- package/src/chat-config.json +1 -0
- package/src/chat21-core/providers/firebase/firebase-conversation-handler.ts +8 -3
- package/src/chat21-core/utils/constants.ts +6 -1
- package/src/chat21-core/utils/utils-message.ts +19 -0
- package/src/global.scss +65 -76
- package/publish_pre.sh +0 -33
- package/publish_prod.sh +0 -33
|
@@ -10,8 +10,9 @@ import { WebsocketService } from 'src/app/services/websocket/websocket.service';
|
|
|
10
10
|
import { skip } from 'rxjs/operators';
|
|
11
11
|
import { AppConfigProvider } from 'src/app/services/app-config';
|
|
12
12
|
import { EventsService } from 'src/app/services/events-service';
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
import { tranlatedLanguage } from '../../../chat21-core/utils/constants';
|
|
14
|
+
import { avatarPlaceholder, getColorBck } from 'src/chat21-core/utils/utils-user';
|
|
15
|
+
import * as PACKAGE from 'package.json';
|
|
15
16
|
@Component({
|
|
16
17
|
selector: 'app-sidebar-user-details',
|
|
17
18
|
templateUrl: './sidebar-user-details.component.html',
|
|
@@ -40,6 +41,7 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
|
|
|
40
41
|
PAYD_PLAN_NAME_ENTERPRISE_msg: string;
|
|
41
42
|
PRO_PLAN_TRIAL_msg: string;
|
|
42
43
|
FREE_PLAN_msg: string;
|
|
44
|
+
LOGOUT_msg: string;
|
|
43
45
|
profile_name_translated: string;
|
|
44
46
|
SubscriptionPaymentProblem: string;
|
|
45
47
|
user: any
|
|
@@ -53,6 +55,10 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
|
|
|
53
55
|
public_Key: any
|
|
54
56
|
plan_name: string;
|
|
55
57
|
plan_subscription_is_active: boolean;
|
|
58
|
+
USER_PHOTO_PROFILE_EXIST: boolean;
|
|
59
|
+
version: string
|
|
60
|
+
test: Date = new Date();
|
|
61
|
+
company_name: string = 'Tiledesk'
|
|
56
62
|
constructor(
|
|
57
63
|
private translate: TranslateService,
|
|
58
64
|
public tiledeskAuthService: TiledeskAuthService,
|
|
@@ -66,6 +72,7 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
|
|
|
66
72
|
) { }
|
|
67
73
|
|
|
68
74
|
ngOnInit() {
|
|
75
|
+
this.version = PACKAGE.version;
|
|
69
76
|
this.getCurrentChatLangAndTranslateLabels();
|
|
70
77
|
this.subcribeToAuthStateChanged();
|
|
71
78
|
this.listenTocurrentProjectUserUserAvailability$();
|
|
@@ -74,6 +81,67 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
|
|
|
74
81
|
// this.listenOpenUserSidebarEvent();
|
|
75
82
|
}
|
|
76
83
|
|
|
84
|
+
subcribeToAuthStateChanged() {
|
|
85
|
+
this.messagingAuthService.BSAuthStateChanged.subscribe((state) => {
|
|
86
|
+
this.logger.log('[SIDEBAR-USER-DETAILS] BSAuthStateChanged ', state)
|
|
87
|
+
|
|
88
|
+
if (state === 'online') {
|
|
89
|
+
const currentUser = JSON.parse(this.appStorageService.getItem('currentUser'));
|
|
90
|
+
this.logger.log('[SIDEBAR-USER-DETAILS] currentUser ', currentUser)
|
|
91
|
+
if (currentUser) {
|
|
92
|
+
this.user = currentUser;
|
|
93
|
+
this.createUserAvatar(this.user)
|
|
94
|
+
this.photo_profile_URL = this.imageRepoService.getImagePhotoUrl(currentUser.uid)
|
|
95
|
+
this.logger.log('[SIDEBAR-USER-DETAILS] photo_profile_URL ', this.photo_profile_URL);
|
|
96
|
+
this.checkIfExistPhotoProfile(this.photo_profile_URL)
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
})
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
checkIfExistPhotoProfile(imageUrl) {
|
|
103
|
+
this.verifyImageURL(imageUrl, (imageExists) => {
|
|
104
|
+
|
|
105
|
+
if (imageExists === true) {
|
|
106
|
+
this.USER_PHOTO_PROFILE_EXIST = true;
|
|
107
|
+
this.logger.log('[SIDEBAR-USER-DETAILS] photo_profile_URL IMAGE EXIST ', imageExists)
|
|
108
|
+
|
|
109
|
+
} else {
|
|
110
|
+
this.USER_PHOTO_PROFILE_EXIST = false;
|
|
111
|
+
this.logger.log('[SIDEBAR-USER-DETAILS] photo_profile_URL IMAGE EXIST ', imageExists)
|
|
112
|
+
}
|
|
113
|
+
})
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
createUserAvatar(currentUser) {
|
|
118
|
+
this.logger.log('[SIDEBAR-USER-DETAILS] - createProjectUserAvatar ', currentUser)
|
|
119
|
+
let fullname = ''
|
|
120
|
+
if (currentUser && currentUser.firstname && currentUser.lastname) {
|
|
121
|
+
fullname = currentUser.firstname + ' ' + currentUser.lastname
|
|
122
|
+
currentUser['fullname_initial'] = avatarPlaceholder(fullname)
|
|
123
|
+
currentUser['fillColour'] = getColorBck(fullname)
|
|
124
|
+
} else if (currentUser && currentUser.firstname) {
|
|
125
|
+
fullname = currentUser.firstname
|
|
126
|
+
currentUser['fullname_initial'] = avatarPlaceholder(fullname)
|
|
127
|
+
currentUser['fillColour'] = getColorBck(fullname)
|
|
128
|
+
} else {
|
|
129
|
+
currentUser['fullname_initial'] = 'N/A'
|
|
130
|
+
currentUser['fillColour'] = 'rgb(98, 100, 167)'
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
verifyImageURL(image_url, callBack) {
|
|
135
|
+
const img = new Image();
|
|
136
|
+
img.src = image_url;
|
|
137
|
+
img.onload = function () {
|
|
138
|
+
callBack(true);
|
|
139
|
+
};
|
|
140
|
+
img.onerror = function () {
|
|
141
|
+
callBack(false);
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
|
|
77
145
|
// listenOpenUserSidebarEvent() {
|
|
78
146
|
// this.events.subscribe('userdetailsidebar:opened', (openUserDetailsSidebar) => {
|
|
79
147
|
// this.logger.log('[SIDEBAR-USER-DETAILS] - listenOpenUserSidebarEvent - openUserDetailsSidebar', openUserDetailsSidebar);
|
|
@@ -89,11 +157,11 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
|
|
|
89
157
|
if (this.eRef.nativeElement.contains(event.target)) {
|
|
90
158
|
// this.logger.log('[SIDEBAR-USER-DETAILS] clicked inside')
|
|
91
159
|
} else {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
160
|
+
if (!clicked_element_id.startsWith("sidebaravatar")) {
|
|
161
|
+
this.closeUserDetailSidePanel();
|
|
162
|
+
}
|
|
163
|
+
// this.logger.log('[SIDEBAR-USER-DETAILS] clicked outside')
|
|
164
|
+
|
|
97
165
|
}
|
|
98
166
|
}
|
|
99
167
|
|
|
@@ -124,18 +192,28 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
|
|
|
124
192
|
this.chat_lang = ''
|
|
125
193
|
if (this.browserLang && !stored_preferred_lang) {
|
|
126
194
|
this.chat_lang = this.browserLang
|
|
127
|
-
this.flag_url = "assets/images/language_flag/" + this.chat_lang + ".png"
|
|
195
|
+
// this.flag_url = "assets/images/language_flag/" + this.chat_lang + ".png"
|
|
128
196
|
|
|
129
197
|
this.logger.log('[SIDEBAR-USER-DETAILS] flag_url: ', this.flag_url);
|
|
130
198
|
this.logger.log('[SIDEBAR-USER-DETAILS] chat_lang: ', this.chat_lang);
|
|
131
199
|
} else if (this.browserLang && stored_preferred_lang) {
|
|
132
200
|
this.chat_lang = stored_preferred_lang
|
|
133
|
-
this.flag_url = "assets/images/language_flag/" + this.chat_lang + ".png"
|
|
201
|
+
// this.flag_url = "assets/images/language_flag/" + this.chat_lang + ".png"
|
|
134
202
|
this.logger.log('[SIDEBAR-USER-DETAILS] flag_url: ', this.flag_url);
|
|
135
203
|
this.logger.log('[SIDEBAR-USER-DETAILS] chat_lang: ', this.chat_lang);
|
|
136
204
|
}
|
|
137
205
|
|
|
138
|
-
|
|
206
|
+
|
|
207
|
+
if (tranlatedLanguage.includes(this.chat_lang)) {
|
|
208
|
+
this.logger.log('[SIDEBAR-USER-DETAILS] tranlatedLanguage includes', this.chat_lang, ': ', tranlatedLanguage.includes(this.chat_lang))
|
|
209
|
+
this.translate.use(this.chat_lang);
|
|
210
|
+
this.flag_url = "assets/images/language_flag/" + this.chat_lang + ".png"
|
|
211
|
+
} else {
|
|
212
|
+
this.logger.log('[SIDEBAR-USER-DETAILS] tranlatedLanguage includes', this.chat_lang, ': ', tranlatedLanguage.includes(this.chat_lang))
|
|
213
|
+
this.translate.use('en');
|
|
214
|
+
this.flag_url = "assets/images/language_flag/en.png"
|
|
215
|
+
this.chat_lang = 'en'
|
|
216
|
+
}
|
|
139
217
|
this.translateLabels()
|
|
140
218
|
}
|
|
141
219
|
|
|
@@ -145,6 +223,7 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
|
|
|
145
223
|
this.getIsBusyTranslation();
|
|
146
224
|
this.getSubscriptionPaymentProblemTranslation();
|
|
147
225
|
this.getThePlanHasExpiredTranslation();
|
|
226
|
+
this.getLogoutTranslation();
|
|
148
227
|
}
|
|
149
228
|
|
|
150
229
|
|
|
@@ -180,7 +259,7 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
|
|
|
180
259
|
getAvailableTranslation() {
|
|
181
260
|
this.translate.get('Available')
|
|
182
261
|
.subscribe((text: string) => {
|
|
183
|
-
|
|
262
|
+
|
|
184
263
|
// console.log('[SIDEBAR-USER-DETAILS] - GET GTTTTTN ', text)
|
|
185
264
|
this.IS_AVAILABLE_msg = text
|
|
186
265
|
});
|
|
@@ -188,7 +267,7 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
|
|
|
188
267
|
getUnavailableTranslation() {
|
|
189
268
|
this.translate.get('Unavailable')
|
|
190
269
|
.subscribe((text: string) => {
|
|
191
|
-
|
|
270
|
+
|
|
192
271
|
// console.log('[SIDEBAR-USER-DETAILS] - GET GTTTTTN ', text)
|
|
193
272
|
this.IS_UNAVAILABLE_msg = text
|
|
194
273
|
});
|
|
@@ -197,16 +276,25 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
|
|
|
197
276
|
getIsBusyTranslation() {
|
|
198
277
|
this.translate.get('Busy')
|
|
199
278
|
.subscribe((text: string) => {
|
|
200
|
-
|
|
279
|
+
|
|
201
280
|
// console.log('[SIDEBAR-USER-DETAILS] - GET GTTTTTN ', text)
|
|
202
281
|
this.IS_BUSY_msg = text
|
|
203
282
|
});
|
|
204
283
|
}
|
|
205
284
|
|
|
285
|
+
getLogoutTranslation() {
|
|
286
|
+
this.translate.get('LABEL_LOGOUT')
|
|
287
|
+
.subscribe((text: string) => {
|
|
288
|
+
// this.deleteContact_msg = text;
|
|
289
|
+
// console.log('[SIDEBAR-USER-DETAILS] - GET Logout label ', text)
|
|
290
|
+
this.LOGOUT_msg = text
|
|
291
|
+
});
|
|
292
|
+
}
|
|
293
|
+
|
|
206
294
|
getSubscriptionPaymentProblemTranslation() {
|
|
207
295
|
this.translate.get('SubscriptionPaymentProblem')
|
|
208
296
|
.subscribe((text: string) => {
|
|
209
|
-
|
|
297
|
+
|
|
210
298
|
// console.log('[SIDEBAR-USER-DETAILS] - GET GTTTTTN ', text)
|
|
211
299
|
this.SUBSCRIPTION_PAYMENT_PROBLEM_msg = text
|
|
212
300
|
});
|
|
@@ -215,7 +303,7 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
|
|
|
215
303
|
getThePlanHasExpiredTranslation() {
|
|
216
304
|
this.translate.get('ThePlanHasExpired')
|
|
217
305
|
.subscribe((text: string) => {
|
|
218
|
-
|
|
306
|
+
|
|
219
307
|
// console.log('[SIDEBAR-USER-DETAILS] - GET GTTTTTN ', text)
|
|
220
308
|
this.THE_PLAN_HAS_EXPIRED_msg = text
|
|
221
309
|
});
|
|
@@ -225,7 +313,7 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
|
|
|
225
313
|
getCurrentStoredProject() {
|
|
226
314
|
try {
|
|
227
315
|
const project = localStorage.getItem('last_project')
|
|
228
|
-
if (project) {
|
|
316
|
+
if (project && project !== 'undefined') {
|
|
229
317
|
const projectObjct = JSON.parse(localStorage.getItem('last_project'))
|
|
230
318
|
// console.log('[SIDEBAR-USER-DETAILS] - GET STORED PROJECT ', projectObjct)
|
|
231
319
|
|
|
@@ -279,7 +367,7 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
|
|
|
279
367
|
// this.profile_name_translated = this.PRO_PLAN_TRIAL_msg;
|
|
280
368
|
this.translate.get('ProPlanTrial')
|
|
281
369
|
.subscribe((text: string) => {
|
|
282
|
-
|
|
370
|
+
|
|
283
371
|
// console.log('[SIDEBAR-USER-DETAILS] - GET GTTTTTN ', text)
|
|
284
372
|
this.profile_name_translated = text
|
|
285
373
|
});
|
|
@@ -289,7 +377,7 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
|
|
|
289
377
|
// this.profile_name_translated = this.FREE_PLAN_msg;
|
|
290
378
|
this.translate.get('FreePlan')
|
|
291
379
|
.subscribe((text: string) => {
|
|
292
|
-
|
|
380
|
+
|
|
293
381
|
// console.log('[SIDEBAR-USER-DETAILS] - GET GTTTTTN ', text)
|
|
294
382
|
this.profile_name_translated = text
|
|
295
383
|
});
|
|
@@ -315,6 +403,7 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
|
|
|
315
403
|
});
|
|
316
404
|
}
|
|
317
405
|
|
|
406
|
+
|
|
318
407
|
|
|
319
408
|
|
|
320
409
|
listenTocurrentProjectUserUserAvailability$() {
|
|
@@ -331,7 +420,7 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
|
|
|
331
420
|
this.translateUserRole(this.USER_ROLE)
|
|
332
421
|
}
|
|
333
422
|
|
|
334
|
-
|
|
423
|
+
|
|
335
424
|
|
|
336
425
|
}, (error) => {
|
|
337
426
|
this.logger.error('[SIDEBAR-USER-DETAILS] - $UBSC TO WS USER AVAILABILITY & BUSY STATUS error ', error);
|
|
@@ -344,7 +433,7 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
|
|
|
344
433
|
// console.log('[SIDEBAR-USER-DETAILS] -translateUserRole ', role)
|
|
345
434
|
this.translate.get(role)
|
|
346
435
|
.subscribe((text: string) => {
|
|
347
|
-
|
|
436
|
+
|
|
348
437
|
// console.log('[SIDEBAR-USER-DETAILS] - GET GTTTTTN ', text)
|
|
349
438
|
this.USER_ROLE_LABEL = text
|
|
350
439
|
});
|
|
@@ -362,22 +451,7 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
|
|
|
362
451
|
// }
|
|
363
452
|
}
|
|
364
453
|
|
|
365
|
-
subcribeToAuthStateChanged() {
|
|
366
|
-
this.messagingAuthService.BSAuthStateChanged.subscribe((state) => {
|
|
367
|
-
this.logger.log('[SIDEBAR] BSAuthStateChanged ', state)
|
|
368
|
-
|
|
369
|
-
if (state === 'online') {
|
|
370
|
-
const currentUser = JSON.parse(this.appStorageService.getItem('currentUser'));
|
|
371
|
-
this.logger.log('[SIDEBAR-USER-DETAILS] currentUser ', currentUser)
|
|
372
|
-
if (currentUser) {
|
|
373
|
-
this.user = currentUser;
|
|
374
|
-
this.photo_profile_URL = this.imageRepoService.getImagePhotoUrl(currentUser.uid)
|
|
375
|
-
this.logger.log('[SIDEBAR-USER-DETAILS] photo_profile_URL ', this.photo_profile_URL)
|
|
376
|
-
}
|
|
377
454
|
|
|
378
|
-
}
|
|
379
|
-
})
|
|
380
|
-
}
|
|
381
455
|
|
|
382
456
|
// closeUserDetailSidePanel() {
|
|
383
457
|
// var element = document.getElementById('user-details');
|
|
@@ -35,6 +35,9 @@ import { SharedModule } from 'src/app/shared/shared.module';
|
|
|
35
35
|
// import { SharedConversationInfoModule } from 'src/app/shared/shared-conversation-info.module';
|
|
36
36
|
import { NgxLinkifyjsModule } from 'ngx-linkifyjs';
|
|
37
37
|
import { ScrollbarThemeModule } from '../../utils/scrollbar-theme.directive';
|
|
38
|
+
import { PickerModule } from '@ctrl/ngx-emoji-mart';
|
|
39
|
+
|
|
40
|
+
|
|
38
41
|
@NgModule({
|
|
39
42
|
imports: [
|
|
40
43
|
CommonModule,
|
|
@@ -43,6 +46,7 @@ import { ScrollbarThemeModule } from '../../utils/scrollbar-theme.directive';
|
|
|
43
46
|
TooltipModule,
|
|
44
47
|
ConversationDetailPageRoutingModule,
|
|
45
48
|
ScrollbarThemeModule,
|
|
49
|
+
PickerModule,
|
|
46
50
|
TranslateModule.forChild({
|
|
47
51
|
loader: {
|
|
48
52
|
provide: TranslateLoader,
|
|
@@ -58,7 +62,7 @@ import { ScrollbarThemeModule } from '../../utils/scrollbar-theme.directive';
|
|
|
58
62
|
declarations: [
|
|
59
63
|
ConversationDetailPage,
|
|
60
64
|
HeaderConversationDetailComponent,
|
|
61
|
-
MessageTextAreaComponent
|
|
65
|
+
MessageTextAreaComponent
|
|
62
66
|
// BubbleDayMessageComponent,
|
|
63
67
|
// BubbleSystemMessageComponent,
|
|
64
68
|
// BubbleMyMessageComponent,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<span *ngIf="conversationWith && loggedUser; then showConversation else showPlaceholder"></span>
|
|
2
2
|
<ng-template #showPlaceholder>
|
|
3
3
|
<!-- class="splash-page" -->
|
|
4
|
-
<ion-content
|
|
4
|
+
<ion-content padding>
|
|
5
5
|
<!-- <div padding class="image-splash-page"></div>
|
|
6
6
|
<div padding class="title-splash-page">
|
|
7
7
|
text new conversation + button
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
|
|
10
10
|
<ion-grid style="height: 100%;">
|
|
11
11
|
<ion-row class="ion-justify-content-center ion-align-items-center" style="height: 100%; flex-direction: column">
|
|
12
|
-
<span *ngIf="isOnline === true && !showSpinner"
|
|
12
|
+
<span *ngIf="isOnline === true && !showSpinner"
|
|
13
|
+
style="color: #92949c; font-size: 16px;line-height: 18px;margin-top: -160px;">
|
|
13
14
|
<span *ngIf="conversation_count > 0 ">
|
|
14
15
|
{{'PleaseSelectChatToStartMessaging' | translate }}
|
|
15
16
|
</span>
|
|
@@ -34,7 +35,7 @@
|
|
|
34
35
|
<app-header-conversation-detail [isMobile]="isMobile" [idLoggedUser]="loggedUser.uid"
|
|
35
36
|
[conversationAvatar]="conversationAvatar" [translationMap]="translationMap"
|
|
36
37
|
(eventOpenCloseInfoConversation)="returnOpenCloseInfoConversation($event)"
|
|
37
|
-
[isOpenInfoConversation]="isOpenInfoConversation">
|
|
38
|
+
[isOpenInfoConversation]="isOpenInfoConversation" [conv_type]="conv_type">
|
|
38
39
|
</app-header-conversation-detail>
|
|
39
40
|
|
|
40
41
|
<ion-content id="conv-details">
|
|
@@ -136,15 +137,24 @@
|
|
|
136
137
|
<!-- ----------------------------------------------------------- -->
|
|
137
138
|
<!-- Canned responses -->
|
|
138
139
|
<!-- ----------------------------------------------------------- -->
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
<ion-list class="canned-list">
|
|
140
|
+
<div id="canned">
|
|
141
|
+
<ion-list class="canned-list" *ngIf="tagsCannedFilter.length > 0 && HIDE_CANNED_RESPONSES === false">
|
|
142
142
|
<ion-item button="true" [ngClass]="{'is_active_item': i == arrowkeyLocation}" lines="none"
|
|
143
143
|
class="canned-item" id="{{'canned-item_'+ i }}"
|
|
144
144
|
*ngFor="let canned of tagsCannedFilter; let i = index;" [innerHtml]="canned.title"
|
|
145
145
|
(click)="replaceTagInMessage(canned, $event)">
|
|
146
146
|
</ion-item>
|
|
147
|
+
<ion-item class="canned-item add-canned-response-wpr" button="true" lines="none" (click)="presentCreateCannedResponseModal()">
|
|
148
|
+
<ion-icon class="add-canned-response-icon" name="flash-outline"></ion-icon>
|
|
149
|
+
<span class="add-canned-response-add-icon">+</span>
|
|
150
|
+
<label class="add-canned-response-label" >{{translationMap?.get('AddNewCannedResponse')}}</label>
|
|
151
|
+
</ion-item>
|
|
147
152
|
</ion-list>
|
|
153
|
+
<!-- <ion-list class="canned-list" *ngIf="tagsCannedFilter.length === 0 && HIDE_CANNED_RESPONSES === false">
|
|
154
|
+
<ion-item button="true" >
|
|
155
|
+
There are no canned responses available
|
|
156
|
+
</ion-item>
|
|
157
|
+
</ion-list> -->
|
|
148
158
|
</div>
|
|
149
159
|
|
|
150
160
|
|
|
@@ -155,14 +165,14 @@
|
|
|
155
165
|
<!-- openInfoConversation {{openInfoConversation}} - isMobile {{isMobile}} -->
|
|
156
166
|
<app-message-text-area
|
|
157
167
|
*ngIf="(openInfoConversation === false && isMobile === true) || (openInfoConversation === true && isMobile === false) || (openInfoConversation === false && isMobile === false)"
|
|
158
|
-
[tagsCannedCount]="tagsCannedCount" [areVisibleCAR]="areVisibleCAR" [
|
|
159
|
-
[conversationWith]="conversationWith" [tagsCannedFilter]="tagsCannedFilter"
|
|
168
|
+
[tagsCannedCount]="tagsCannedCount" [areVisibleCAR]="areVisibleCAR" [support_mode]="support_mode"
|
|
169
|
+
[loggedUser]="loggedUser" [conversationWith]="conversationWith" [tagsCannedFilter]="tagsCannedFilter"
|
|
160
170
|
(eventChangeTextArea)="returnChangeTextArea($event)"
|
|
161
171
|
(hasClickedOpenCannedResponses)="hasClickedOpenCannedResponses($event)"
|
|
162
172
|
(eventSendMessage)="returnSendMessage($event)" [translationMap]="translationMap"
|
|
163
173
|
[fileUploadAccept]="appConfigProvider.getConfig().fileUploadAccept"
|
|
164
174
|
[isOpenInfoConversation]="isOpenInfoConversation" [dropEvent]="dropEvent"
|
|
165
|
-
(onPresentModalScrollToBottom)="onPresentModalScrollToBottom($event)">
|
|
175
|
+
(onPresentModalScrollToBottom)="onPresentModalScrollToBottom($event)" [disableTextarea]="disableTextarea">
|
|
166
176
|
</app-message-text-area>
|
|
167
177
|
<!-- [events]="eventsReplaceTexareaText.asObservable()" -->
|
|
168
178
|
</ion-row>
|
|
@@ -25,6 +25,34 @@
|
|
|
25
25
|
font-size: 24px;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
+
.add-canned-response-icon {
|
|
29
|
+
color: #b3bfd0;
|
|
30
|
+
cursor: pointer;
|
|
31
|
+
font-size: 18px;
|
|
32
|
+
}
|
|
33
|
+
.add-canned-response-label {
|
|
34
|
+
color: #b3bfd0;
|
|
35
|
+
cursor: pointer;
|
|
36
|
+
}
|
|
37
|
+
.add-canned-response-add-icon {
|
|
38
|
+
color: #b3bfd0;
|
|
39
|
+
cursor: pointer;
|
|
40
|
+
position: relative;
|
|
41
|
+
top: 4px;
|
|
42
|
+
left: -6px;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
#canned > ion-list > ion-item.canned-item.add-canned-response-wpr:hover > span {
|
|
46
|
+
color: #1877f2;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
#canned > ion-list > ion-item.canned-item.add-canned-response-wpr:hover > ion-icon {
|
|
50
|
+
color: #1877f2;
|
|
51
|
+
}
|
|
52
|
+
#canned > ion-list > ion-item.canned-item.add-canned-response-wpr:hover > label {
|
|
53
|
+
color: #1877f2;
|
|
54
|
+
}
|
|
55
|
+
|
|
28
56
|
// ion-back-button{
|
|
29
57
|
// display: none!important;
|
|
30
58
|
// }
|