@chat21/chat21-ionic 3.0.61-rc21 → 3.0.61-rc25
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 +14 -0
- package/README.md +6 -0
- package/deploy_pre.sh +18 -18
- package/env.sample +1 -1
- package/package.json +1 -1
- package/src/app/app.component.ts +10 -7
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.ts +8 -1
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.ts +17 -12
- package/src/app/components/project-item/project-item.component.ts +3 -3
- package/src/app/components/sidebar/sidebar.component.ts +4 -2
- package/src/app/components/sidebar-user-details/sidebar-user-details.component.scss +1 -0
- package/src/app/components/sidebar-user-details/sidebar-user-details.component.ts +1 -1
- package/src/app/pages/conversation-detail/conversation-detail.page.ts +9 -2
- package/src/app/pages/conversations-list/conversations-list.page.ts +32 -20
- package/src/chat-config-mqtt.json +25 -16
- package/src/chat-config-template.json +5 -4
- package/src/chat-config.json +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# chat21-ionic ver 3.0
|
|
2
2
|
|
|
3
|
+
### 3.0.61-rc25
|
|
4
|
+
- Handles the case that in the storage the value of the "last_project" key is undefined
|
|
5
|
+
|
|
6
|
+
### 3.0.61-rc24
|
|
7
|
+
- Handles the "writeToButton" and the 'archivedButton' environment variables if are returned as a string
|
|
8
|
+
- Adds the "authPersistence" key in the chat-config-template.json, chat-config.json and env.sample files
|
|
9
|
+
|
|
10
|
+
### 3.0.61-rc23
|
|
11
|
+
- Handles the "supportMode" environment variable if returned as a string (fixes the Docker image bugs: part of the conversation details go under the sidebar in mobile mode, the "add message as canned response" button is not displayed)
|
|
12
|
+
- Fixes the position of the emoji selection window pop up when the canned responses button is not visible
|
|
13
|
+
|
|
14
|
+
### 3.0.61-rc22
|
|
15
|
+
- Minor improvements
|
|
16
|
+
|
|
3
17
|
### 3.0.61-rc21
|
|
4
18
|
- Removes cordova-plugin-device
|
|
5
19
|
|
package/README.md
CHANGED
|
@@ -36,6 +36,12 @@ In progress git
|
|
|
36
36
|
* A Firebase project. Create one free on `https://firebase.google.com`
|
|
37
37
|
* "Chat21 Firebase cloud functions" installed. Instructions:`https://github.com/chat21/chat21-cloud-functions`
|
|
38
38
|
|
|
39
|
+
# Run Tiledesk with Docker Compose
|
|
40
|
+
|
|
41
|
+
Do you want to install all the Tiledesk components on your server with just one click?
|
|
42
|
+
Use [Docker Compose Tiledesk installation guide](https://github.com/Tiledesk/tiledesk-deployment/blob/master/docker-compose/README.md)
|
|
43
|
+
|
|
44
|
+
|
|
39
45
|
# Installation #
|
|
40
46
|
* Install the latest stable release. Check on Github page the last release under the Releases tab and then run
|
|
41
47
|
- `git clone https://github.com/frontiere21/chat21-ionic.git --branch <LATEST-RELEASE-VERSION>`
|
package/deploy_pre.sh
CHANGED
|
@@ -32,20 +32,20 @@ ionic cordova build -c=pre browser --prod
|
|
|
32
32
|
cp -p src/firebase-messaging-sw.js platforms/browser/www/
|
|
33
33
|
cp -p src/manifest.json platforms/browser/www/
|
|
34
34
|
cp -p src/chat-config.json platforms/browser/www/
|
|
35
|
-
|
|
35
|
+
# cp -p config.xml platforms/browser/www/
|
|
36
36
|
|
|
37
37
|
######### chat-ionic5 - the good one - publish in pre
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
38
|
+
cd platforms/browser/www
|
|
39
|
+
aws s3 sync . s3://tiledesk-dashboard-pre/chat-ionic5/$version/
|
|
40
|
+
aws s3 sync . s3://tiledesk-dashboard-pre/chat-ionic5/
|
|
41
|
+
cd ../../../
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
aws cloudfront create-invalidation --distribution-id E2DTAKWHWQ7C3J --paths "/*"
|
|
44
44
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
45
|
+
echo new version deployed on s3://tiledesk-dashboard-pre/chat-ionic5/$version/
|
|
46
|
+
echo available on https://s3.eu-west-1.amazonaws.com/tiledesk-dashboard-pre/chat-ionic5/$version/index.html
|
|
47
|
+
echo available on https://support-pre.tiledesk.com/chat-ionic5/$version/index.html
|
|
48
|
+
echo available on https://support-pre.tiledesk.com/chat-ionic5/index.html
|
|
49
49
|
|
|
50
50
|
######### chat-ionic5-panel - publish in pre with the projects right panel
|
|
51
51
|
# cd platforms/browser/www
|
|
@@ -73,11 +73,11 @@ cp -p src/chat-config.json platforms/browser/www/
|
|
|
73
73
|
|
|
74
74
|
|
|
75
75
|
####### chat ionic FIREBASE in pre da aggiungere in deploy_pre.sh
|
|
76
|
-
cd platforms/browser/www
|
|
77
|
-
aws s3 sync . s3://tiledesk-dashboard-pre/chat5/
|
|
78
|
-
aws s3 sync . s3://tiledesk-dashboard-pre/chat5/$version
|
|
79
|
-
cd ../../../
|
|
80
|
-
echo new version deployed on s3://tiledesk-dashboard-pre/chat5/$version
|
|
81
|
-
echo new version deployed on s3://tiledesk-dashboard-pre/chat5/
|
|
82
|
-
echo available on http://support-pre.tiledesk.com/chat5/index.html
|
|
83
|
-
echo available on http://support-pre.tiledesk.com/chat5/$version/index.html
|
|
76
|
+
# cd platforms/browser/www
|
|
77
|
+
# aws s3 sync . s3://tiledesk-dashboard-pre/chat5/
|
|
78
|
+
# aws s3 sync . s3://tiledesk-dashboard-pre/chat5/$version
|
|
79
|
+
# cd ../../../
|
|
80
|
+
# echo new version deployed on s3://tiledesk-dashboard-pre/chat5/$version
|
|
81
|
+
# echo new version deployed on s3://tiledesk-dashboard-pre/chat5/
|
|
82
|
+
# echo available on http://support-pre.tiledesk.com/chat5/index.html
|
|
83
|
+
# echo available on http://support-pre.tiledesk.com/chat5/$version/index.html
|
package/env.sample
CHANGED
package/package.json
CHANGED
package/src/app/app.component.ts
CHANGED
|
@@ -158,7 +158,7 @@ export class AppComponent implements OnInit {
|
|
|
158
158
|
if (/Android|iPhone/i.test(window.navigator.userAgent)) {
|
|
159
159
|
this.IS_ON_MOBILE_DEVICE = true;
|
|
160
160
|
}
|
|
161
|
-
|
|
161
|
+
this.logger.log('[APP-COMP] IS_ON_MOBILE_DEVICE', this.IS_ON_MOBILE_DEVICE)
|
|
162
162
|
return this.IS_ON_MOBILE_DEVICE;
|
|
163
163
|
}
|
|
164
164
|
|
|
@@ -298,12 +298,13 @@ export class AppComponent implements OnInit {
|
|
|
298
298
|
*/
|
|
299
299
|
ngOnInit() {
|
|
300
300
|
const appconfig = this.appConfigProvider.getConfig();
|
|
301
|
-
|
|
302
|
-
if (appconfig && appconfig.supportMode) {
|
|
303
|
-
this.SUPPORT_MODE =
|
|
304
|
-
|
|
301
|
+
this.logger.log('[APP-COMP] ngOnInit appconfig', appconfig)
|
|
302
|
+
if (appconfig && appconfig.supportMode && (appconfig.supportMode === true || appconfig.supportMode === 'true' )) {
|
|
303
|
+
this.SUPPORT_MODE = true;
|
|
304
|
+
this.logger.log('[APP-COMP] appconfig > SUPPORT_MODE', this.SUPPORT_MODE)
|
|
305
305
|
} else {
|
|
306
306
|
this.SUPPORT_MODE = false;
|
|
307
|
+
this.logger.log('[APP-COMP] appconfig > SUPPORT_MODE', this.SUPPORT_MODE)
|
|
307
308
|
}
|
|
308
309
|
this.persistence = appconfig.authPersistence;
|
|
309
310
|
this.appStorageService.initialize(environment.storage_prefix, this.persistence, '')
|
|
@@ -435,7 +436,7 @@ export class AppComponent implements OnInit {
|
|
|
435
436
|
// this.logger.log('[APP-COMP] - X - initializeApp !!! CALLED-BY: ', calledby);
|
|
436
437
|
// console.log('[APP-COMP] appconfig platform is cordova: ', this.platform.is('cordova'))
|
|
437
438
|
|
|
438
|
-
if (!this.platform.is('
|
|
439
|
+
if (!this.platform.is('desktop')) {
|
|
439
440
|
this.splashScreen.show();
|
|
440
441
|
}
|
|
441
442
|
this.tabTitle = document.title;
|
|
@@ -723,6 +724,7 @@ export class AppComponent implements OnInit {
|
|
|
723
724
|
|
|
724
725
|
this.logger.log('[APP-COMP] checkPlatformIsMobile', checkPlatformIsMobile());
|
|
725
726
|
this.platformIs = PLATFORM_MOBILE;
|
|
727
|
+
this.logger.log('[APP-COMP] this.platformIs', this.platformIs);
|
|
726
728
|
const IDConv = this.route.snapshot.firstChild.paramMap.get('IDConv');
|
|
727
729
|
|
|
728
730
|
// console.log('[APP-COMP] platformIs', this.platformIs);
|
|
@@ -736,7 +738,7 @@ export class AppComponent implements OnInit {
|
|
|
736
738
|
this.chatManager.startApp();
|
|
737
739
|
this.logger.log('[APP-COMP] checkPlatformIsMobile', checkPlatformIsMobile());
|
|
738
740
|
this.platformIs = PLATFORM_DESKTOP;
|
|
739
|
-
|
|
741
|
+
this.logger.log('[APP-COMP] platformIs', this.platformIs);
|
|
740
742
|
// console.log('[APP-COMP] PLATFORM', PLATFORM_DESKTOP, 'route.snapshot', this.route.snapshot);
|
|
741
743
|
this.logger.log('[APP-COMP] PLATFORM_DESKTOP ', this.navService);
|
|
742
744
|
|
|
@@ -1005,6 +1007,7 @@ export class AppComponent implements OnInit {
|
|
|
1005
1007
|
let platformIsNow = PLATFORM_DESKTOP;
|
|
1006
1008
|
if (checkPlatformIsMobile()) {
|
|
1007
1009
|
platformIsNow = PLATFORM_MOBILE;
|
|
1010
|
+
this.logger.log('onResize platformIsNow ', platformIsNow)
|
|
1008
1011
|
}
|
|
1009
1012
|
if (!this.platformIs || this.platformIs === '') {
|
|
1010
1013
|
this.platformIs = platformIsNow;
|
|
@@ -69,7 +69,14 @@ export class IonConversationDetailComponent extends ConversationContentComponent
|
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
getOSCODE() {
|
|
72
|
-
this.support_mode =
|
|
72
|
+
this.support_mode = null
|
|
73
|
+
if( this.appConfigProvider.getConfig().supportMode === true || this.appConfigProvider.getConfig().supportMode === 'true') {
|
|
74
|
+
this.support_mode = true
|
|
75
|
+
} else if ( this.appConfigProvider.getConfig().supportMode === false || this.appConfigProvider.getConfig().supportMode === 'false') {
|
|
76
|
+
this.support_mode = false
|
|
77
|
+
} else if ( !this.appConfigProvider.getConfig().supportMode ) {
|
|
78
|
+
this.support_mode = false
|
|
79
|
+
}
|
|
73
80
|
this.public_Key = this.appConfigProvider.getConfig().t2y12PruGU9wUtEGzBJfolMIgK
|
|
74
81
|
this.logger.log('[CONVS-DETAIL][ION-CONVS-DETAIL] AppConfigService getAppConfig public_Key', this.public_Key)
|
|
75
82
|
|
package/src/app/components/conversation-detail/message-text-area/message-text-area.component.ts
CHANGED
|
@@ -109,7 +109,12 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
109
109
|
|
|
110
110
|
ngOnInit() {
|
|
111
111
|
// this.setSubscriptions();
|
|
112
|
+
|
|
112
113
|
this.logger.log("[CONVS-DETAIL] [MSG-TEXT-AREA] HELLO !!!!! ");
|
|
114
|
+
this.logger.log("[CONVS-DETAIL] [MSG-TEXT-AREA] areVisibleCAR ", this.areVisibleCAR);
|
|
115
|
+
if (this.areVisibleCAR === false) {
|
|
116
|
+
this.emojiPerLine = 7
|
|
117
|
+
}
|
|
113
118
|
// this.events.subscribe((cannedmessage) => {
|
|
114
119
|
// this.logger.log("[CONVS-DETAIL] [MSG-TEXT-AREA] events.subscribe cannedmessage ", cannedmessage);
|
|
115
120
|
// })
|
|
@@ -236,7 +241,7 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
236
241
|
@HostListener('window:resize', ['$event'])
|
|
237
242
|
onResize(event) {
|
|
238
243
|
// this.getIfTexareaIsEmpty('onResize')
|
|
239
|
-
|
|
244
|
+
// console.log("[CONVS-DETAIL][MSG-TEXT-AREA] event.target.innerWidth; ", event.target.innerWidth);
|
|
240
245
|
|
|
241
246
|
|
|
242
247
|
|
|
@@ -598,7 +603,7 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
598
603
|
this.addWhiteSpaceBefore = false;
|
|
599
604
|
// console.log('[CONVS-DETAIL][MSG-TEXT-AREA] ADD EMOJI addWhiteSpaceBefore ', this.addWhiteSpaceBefore)
|
|
600
605
|
} else {
|
|
601
|
-
this.addWhiteSpaceBefore = true
|
|
606
|
+
this.addWhiteSpaceBefore = true
|
|
602
607
|
// console.log('[CONVS-DETAIL][MSG-TEXT-AREA] ADD EMOJI addWhiteSpaceBefore ', this.addWhiteSpaceBefore)
|
|
603
608
|
}
|
|
604
609
|
const elTextArea = this.message_text_area['el'];
|
|
@@ -607,13 +612,13 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
607
612
|
}
|
|
608
613
|
|
|
609
614
|
insertAtCursor(myField, myValue) {
|
|
610
|
-
this.logger.log('[CANNED-RES-EDIT-CREATE] - insertAtCursor - myValue ', myValue
|
|
611
|
-
|
|
615
|
+
this.logger.log('[CANNED-RES-EDIT-CREATE] - insertAtCursor - myValue ', myValue);
|
|
616
|
+
|
|
612
617
|
if (this.addWhiteSpaceBefore === true) {
|
|
613
618
|
myValue = ' ' + myValue;
|
|
614
|
-
this.logger.log('[CANNED-RES-EDIT-CREATE] - GET TEXT AREA - QUI ENTRO myValue ', myValue
|
|
619
|
+
this.logger.log('[CANNED-RES-EDIT-CREATE] - GET TEXT AREA - QUI ENTRO myValue ', myValue);
|
|
615
620
|
}
|
|
616
|
-
|
|
621
|
+
|
|
617
622
|
//IE support
|
|
618
623
|
if (myField.selection) {
|
|
619
624
|
myField.focus();
|
|
@@ -625,23 +630,23 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
625
630
|
else if (myField.selectionStart || myField.selectionStart == '0') {
|
|
626
631
|
var startPos = myField.selectionStart;
|
|
627
632
|
this.logger.log('[CANNED-RES-EDIT-CREATE] - insertAtCursor - startPos ', startPos);
|
|
628
|
-
|
|
633
|
+
|
|
629
634
|
var endPos = myField.selectionEnd;
|
|
630
635
|
this.logger.log('[CANNED-RES-EDIT-CREATE] - insertAtCursor - endPos ', endPos);
|
|
631
|
-
|
|
636
|
+
|
|
632
637
|
myField.value = myField.value.substring(0, startPos) + myValue + myField.value.substring(endPos, myField.value.length);
|
|
633
|
-
|
|
638
|
+
|
|
634
639
|
// place cursor at end of text in text input element
|
|
635
640
|
myField.focus();
|
|
636
641
|
var val = myField.value; //store the value of the element
|
|
637
642
|
myField.value = ''; //clear the value of the element
|
|
638
643
|
myField.value = val + ' '; //set that value back.
|
|
639
|
-
|
|
640
|
-
|
|
644
|
+
|
|
645
|
+
|
|
641
646
|
// myField.select();
|
|
642
647
|
} else {
|
|
643
648
|
myField.value += myValue;
|
|
644
|
-
|
|
649
|
+
|
|
645
650
|
}
|
|
646
651
|
}
|
|
647
652
|
|
|
@@ -179,8 +179,8 @@ export class ProjectItemComponent implements OnInit {
|
|
|
179
179
|
}
|
|
180
180
|
|
|
181
181
|
|
|
182
|
-
if (!stored_project) {
|
|
183
|
-
this.logger.log('PROJECT-ITEM - THERE IS NOT STORED LAST PROJECT ', stored_project)
|
|
182
|
+
if (!stored_project || stored_project === 'undefined') {
|
|
183
|
+
this.logger.log('PROJECT-ITEM - THERE IS NOT STORED LAST PROJECT OR IS UNDEFINED ', stored_project)
|
|
184
184
|
const tiledeskToken = this.appStorageService.getItem('tiledeskToken');
|
|
185
185
|
this.logger.log('[PROJECT-ITEM] - GET PROJECTS - tiledeskToken', tiledeskToken);
|
|
186
186
|
this.tiledeskService.getProjects(tiledeskToken).subscribe(projects => {
|
|
@@ -204,7 +204,7 @@ export class ProjectItemComponent implements OnInit {
|
|
|
204
204
|
}
|
|
205
205
|
|
|
206
206
|
|
|
207
|
-
if (stored_project) {
|
|
207
|
+
if (stored_project && stored_project !== 'undefined') {
|
|
208
208
|
this.logger.log('PROJECT-ITEM - THERE IS STORED LAST PROJECT ', stored_project)
|
|
209
209
|
if (stored_project) {
|
|
210
210
|
this.project = JSON.parse(stored_project)
|
|
@@ -100,8 +100,8 @@ export class SidebarComponent implements OnInit {
|
|
|
100
100
|
|
|
101
101
|
getStoredProjectAndUserRole() {
|
|
102
102
|
const stored_project = localStorage.getItem('last_project')
|
|
103
|
-
|
|
104
|
-
if (stored_project) {
|
|
103
|
+
this.logger.log('[SIDEBAR] stored_project ', stored_project)
|
|
104
|
+
if (stored_project && stored_project !== 'undefined') {
|
|
105
105
|
const project = JSON.parse(stored_project)
|
|
106
106
|
this.logger.log('[SIDEBAR] project ', project)
|
|
107
107
|
|
|
@@ -111,6 +111,8 @@ export class SidebarComponent implements OnInit {
|
|
|
111
111
|
this.USER_ROLE = project.role;
|
|
112
112
|
this.logger.log('[SIDEBAR] USER_ROLE ', this.USER_ROLE)
|
|
113
113
|
this.buildURLs(this.USER_ROLE)
|
|
114
|
+
} else {
|
|
115
|
+
this.logger.log('[SIDEBAR] stored_project ', stored_project)
|
|
114
116
|
}
|
|
115
117
|
}
|
|
116
118
|
|
|
@@ -313,7 +313,7 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
|
|
|
313
313
|
getCurrentStoredProject() {
|
|
314
314
|
try {
|
|
315
315
|
const project = localStorage.getItem('last_project')
|
|
316
|
-
if (project) {
|
|
316
|
+
if (project && project !== 'undefined') {
|
|
317
317
|
const projectObjct = JSON.parse(localStorage.getItem('last_project'))
|
|
318
318
|
// console.log('[SIDEBAR-USER-DETAILS] - GET STORED PROJECT ', projectObjct)
|
|
319
319
|
|
|
@@ -257,7 +257,7 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
257
257
|
getStoredProjectAndUserRole() {
|
|
258
258
|
const stored_project = localStorage.getItem('last_project')
|
|
259
259
|
// console.log('[SIDEBAR] stored_project ', stored_project)
|
|
260
|
-
if (stored_project) {
|
|
260
|
+
if (stored_project && stored_project !== undefined) {
|
|
261
261
|
const project = JSON.parse(stored_project)
|
|
262
262
|
// this.logger.log('[CONVS-DETAIL] project ', project)
|
|
263
263
|
|
|
@@ -307,7 +307,14 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
307
307
|
}
|
|
308
308
|
|
|
309
309
|
getOSCODE() {
|
|
310
|
-
this.support_mode =
|
|
310
|
+
this.support_mode = null
|
|
311
|
+
if( this.appConfigProvider.getConfig().supportMode === true || this.appConfigProvider.getConfig().supportMode === 'true') {
|
|
312
|
+
this.support_mode = true
|
|
313
|
+
} else if ( this.appConfigProvider.getConfig().supportMode === false || this.appConfigProvider.getConfig().supportMode === 'false') {
|
|
314
|
+
this.support_mode = false
|
|
315
|
+
} else if ( !this.appConfigProvider.getConfig().supportMode ) {
|
|
316
|
+
this.support_mode = false
|
|
317
|
+
}
|
|
311
318
|
this.logger.log('[CONVS-DETAIL] AppConfigService getAppConfig support_mode', this.support_mode)
|
|
312
319
|
this.public_Key = this.appConfigProvider.getConfig().t2y12PruGU9wUtEGzBJfolMIgK
|
|
313
320
|
this.logger.log('[CONVS-DETAIL] AppConfigService getAppConfig public_Key', this.public_Key)
|
|
@@ -227,29 +227,44 @@ export class ConversationListPage implements OnInit {
|
|
|
227
227
|
|
|
228
228
|
getConversationListHeight() {
|
|
229
229
|
var scrollbar2element = document.getElementById('scrollbar2')
|
|
230
|
-
this.logger.log(
|
|
231
|
-
'[CONVS-LIST-PAGE] getConversationListHeight scrollbar2element',
|
|
232
|
-
scrollbar2element,
|
|
233
|
-
)
|
|
230
|
+
this.logger.log('[CONVS-LIST-PAGE] getConversationListHeight scrollbar2element',scrollbar2element)
|
|
234
231
|
}
|
|
235
232
|
|
|
233
|
+
// this.support_mode = null
|
|
234
|
+
// if( this.appConfigProvider.getConfig().supportMode === true || this.appConfigProvider.getConfig().supportMode === 'true') {
|
|
235
|
+
// this.support_mode = true
|
|
236
|
+
// } else if ( this.appConfigProvider.getConfig().supportMode === false || this.appConfigProvider.getConfig().supportMode === 'false') {
|
|
237
|
+
// this.support_mode = false
|
|
238
|
+
// } else if ( !this.appConfigProvider.getConfig().supportMode ) {
|
|
239
|
+
// this.support_mode = false
|
|
240
|
+
// }
|
|
241
|
+
|
|
236
242
|
getAppConfigToHideDiplayBtns() {
|
|
237
243
|
const appConfig = this.appConfigProvider.getConfig()
|
|
238
|
-
// console.log('[
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
244
|
+
// console.log('[CONVS-LIST-PAGE] - appConfig ', appConfig)
|
|
245
|
+
this.supportMode = null
|
|
246
|
+
if (appConfig && appConfig.supportMode === true || appConfig.supportMode === 'true') {
|
|
247
|
+
this.supportMode = true;
|
|
248
|
+
this.logger.log('[CONVS-LIST-PAGE] getAppConfigToHideDiplayBtns supportMode ', this.supportMode)
|
|
249
|
+
} else if (appConfig && appConfig.supportMode === false || appConfig.supportMode === 'false') {
|
|
242
250
|
this.supportMode = false
|
|
251
|
+
this.logger.log('[CONVS-LIST-PAGE] getAppConfigToHideDiplayBtns supportMode ', this.supportMode)
|
|
243
252
|
}
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
this.archived_btn
|
|
253
|
+
this.archived_btn = null
|
|
254
|
+
if (appConfig && appConfig.archivedButton === true || appConfig.archivedButton === 'true') {
|
|
255
|
+
this.archived_btn = true;
|
|
256
|
+
this.logger.log('[CONVS-LIST-PAGE] getAppConfigToHideDiplayBtns archived_btn ', this.archived_btn)
|
|
257
|
+
} else if (appConfig && appConfig.archivedButton === false || appConfig.archivedButton === 'false') {
|
|
258
|
+
this.archived_btn = false;
|
|
259
|
+
this.logger.log('[CONVS-LIST-PAGE] getAppConfigToHideDiplayBtns archived_btn ', this.archived_btn)
|
|
248
260
|
}
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
this.writeto_btn
|
|
261
|
+
this.writeto_btn = null
|
|
262
|
+
if (appConfig && appConfig.writeToButton === true || appConfig.writeToButton === 'true') {
|
|
263
|
+
this.writeto_btn = true;
|
|
264
|
+
this.logger.log('[CONVS-LIST-PAGE] getAppConfigToHideDiplayBtns writeto_btn ', this.writeto_btn)
|
|
265
|
+
} else if (appConfig && appConfig.writeToButton === false || appConfig.writeToButton === 'false') {
|
|
266
|
+
this.writeto_btn = false;
|
|
267
|
+
this.logger.log('[CONVS-LIST-PAGE] getAppConfigToHideDiplayBtns writeto_btn ', this.writeto_btn)
|
|
253
268
|
}
|
|
254
269
|
// console.log('[ION-LIST-CONVS-COMP] - supportMode ', this.supportMode)
|
|
255
270
|
}
|
|
@@ -257,10 +272,7 @@ export class ConversationListPage implements OnInit {
|
|
|
257
272
|
watchToConnectionStatus() {
|
|
258
273
|
this.networkService.checkInternetFunc().subscribe((isOnline) => {
|
|
259
274
|
this.checkInternet = isOnline
|
|
260
|
-
this.logger.log(
|
|
261
|
-
'[ION-LIST-CONVS-COMP] - watchToConnectionStatus - isOnline',
|
|
262
|
-
this.checkInternet,
|
|
263
|
-
)
|
|
275
|
+
this.logger.log('[ION-LIST-CONVS-COMP] - watchToConnectionStatus - isOnline', this.checkInternet)
|
|
264
276
|
|
|
265
277
|
// checking internet connection
|
|
266
278
|
if (this.checkInternet == true) {
|
|
@@ -1,27 +1,36 @@
|
|
|
1
1
|
{
|
|
2
|
+
"t2y12PruGU9wUtEGzBJfolMIgK": "",
|
|
2
3
|
"chatEngine": "mqtt",
|
|
3
4
|
"uploadEngine": "native",
|
|
4
|
-
"pushEngine":
|
|
5
|
+
"pushEngine":"none",
|
|
5
6
|
"fileUploadAccept":"*/*",
|
|
6
|
-
"logLevel":
|
|
7
|
+
"logLevel":"info",
|
|
8
|
+
"authPersistence": "LOCAL",
|
|
9
|
+
"supportMode": "true",
|
|
10
|
+
"writeToButton": "true",
|
|
11
|
+
"archivedButton": "true",
|
|
7
12
|
"firebaseConfig": {
|
|
8
|
-
"tenant":
|
|
9
|
-
"apiKey": "
|
|
10
|
-
"authDomain": "
|
|
11
|
-
"databaseURL": "
|
|
12
|
-
"projectId": "
|
|
13
|
-
"storageBucket": "
|
|
14
|
-
"messagingSenderId": "
|
|
15
|
-
"appId": "
|
|
16
|
-
"chat21ApiUrl": "
|
|
13
|
+
"tenant":"tilechat",
|
|
14
|
+
"apiKey": "",
|
|
15
|
+
"authDomain": "",
|
|
16
|
+
"databaseURL": "",
|
|
17
|
+
"projectId": "",
|
|
18
|
+
"storageBucket": "",
|
|
19
|
+
"messagingSenderId": "",
|
|
20
|
+
"appId": "",
|
|
21
|
+
"chat21ApiUrl": "",
|
|
22
|
+
"vapidKey": ""
|
|
17
23
|
},
|
|
18
24
|
"chat21Config": {
|
|
19
25
|
"appId": "tilechat",
|
|
20
|
-
"MQTTendpoint": "ws://
|
|
21
|
-
"APIendpoint": "
|
|
26
|
+
"MQTTendpoint": "ws://localhost:8081/mqws/ws",
|
|
27
|
+
"APIendpoint": "/chatapi/api"
|
|
22
28
|
},
|
|
23
|
-
"apiUrl": "
|
|
24
|
-
"baseImageUrl": "
|
|
25
|
-
"dashboardUrl": "
|
|
29
|
+
"apiUrl": "/api/",
|
|
30
|
+
"baseImageUrl": "/api/",
|
|
31
|
+
"dashboardUrl": "/dashboard/",
|
|
32
|
+
"wsUrl": "",
|
|
33
|
+
"wsUrlRel": ""
|
|
26
34
|
}
|
|
27
35
|
|
|
36
|
+
|
|
@@ -5,6 +5,10 @@
|
|
|
5
5
|
"pushEngine":"${PUSH_ENGINE}",
|
|
6
6
|
"fileUploadAccept":"${FILE_UPLOAD_ACCEPT}",
|
|
7
7
|
"logLevel":"${LOG_LEVEL}",
|
|
8
|
+
"authPersistence": "${AUTH_PERSISTENCE}",
|
|
9
|
+
"supportMode": "${SUPPORT_MODE}",
|
|
10
|
+
"writeToButton": "${WRITE_TO_BUTTON}",
|
|
11
|
+
"archivedButton": "${ARCHIVED_BUTTON}",
|
|
8
12
|
"firebaseConfig": {
|
|
9
13
|
"tenant":"${FIREBASE_TENANT}",
|
|
10
14
|
"apiKey": "${FIREBASE_APIKEY}",
|
|
@@ -26,8 +30,5 @@
|
|
|
26
30
|
"baseImageUrl": "${API_BASEIMAGE_URL}",
|
|
27
31
|
"dashboardUrl": "${DASHBOARD_URL}",
|
|
28
32
|
"wsUrl": "${WS_URL}",
|
|
29
|
-
"wsUrlRel": "${WS_URL_RELATIVE}"
|
|
30
|
-
"supportMode": "${SUPPORT_MODE}",
|
|
31
|
-
"writeToButton": "${WRITE_TO_BUTTON}",
|
|
32
|
-
"archivedButton": "${ARCHIVED_BUTTON}"
|
|
33
|
+
"wsUrlRel": "${WS_URL_RELATIVE}"
|
|
33
34
|
}
|