@chat21/chat21-ionic 3.0.61-rc24 → 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 CHANGED
@@ -1,5 +1,8 @@
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
+
3
6
  ### 3.0.61-rc24
4
7
  - Handles the "writeToButton" and the 'archivedButton' environment variables if are returned as a string
5
8
  - Adds the "authPersistence" key in the chat-config-template.json, chat-config.json and env.sample files
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
- cp -p config.xml platforms/browser/www/
35
+ # cp -p config.xml platforms/browser/www/
36
36
 
37
37
  ######### chat-ionic5 - the good one - publish in pre
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 ../../../
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
- # aws cloudfront create-invalidation --distribution-id E2DTAKWHWQ7C3J --paths "/*"
43
+ aws cloudfront create-invalidation --distribution-id E2DTAKWHWQ7C3J --paths "/*"
44
44
 
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
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 config.xml 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chat21/chat21-ionic",
3
- "version": "3.0.61-rc24",
3
+ "version": "3.0.61-rc25",
4
4
  "author": "Tiledesk SRL",
5
5
  "homepage": "https://tiledesk.com/",
6
6
  "scripts": {
@@ -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
- // console.log('[SIDEBAR] stored_project ', stored_project)
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
 
@@ -1,27 +1,36 @@
1
1
  {
2
+ "t2y12PruGU9wUtEGzBJfolMIgK": "",
2
3
  "chatEngine": "mqtt",
3
4
  "uploadEngine": "native",
4
- "pushEngine": "none",
5
+ "pushEngine":"none",
5
6
  "fileUploadAccept":"*/*",
6
- "logLevel": "Debug",
7
+ "logLevel":"info",
8
+ "authPersistence": "LOCAL",
9
+ "supportMode": "true",
10
+ "writeToButton": "true",
11
+ "archivedButton": "true",
7
12
  "firebaseConfig": {
8
- "tenant": "tilechat",
9
- "apiKey": "AIzaSyCoWXHNvP1-qOllCpTshhC6VjPXeRTK0T4",
10
- "authDomain": "chat21-pre-01.firebaseapp.com",
11
- "databaseURL": "https://chat21-pre-01.firebaseio.com",
12
- "projectId": "chat21-pre-01",
13
- "storageBucket": "chat21-pre-01.appspot.com",
14
- "messagingSenderId": "269505353043",
15
- "appId": "1:269505353043:web:b82af070572669e3707da6",
16
- "chat21ApiUrl": "https://us-central1-chat21-pre-01.cloudfunctions.net"
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://99.80.197.164:15675/ws",
21
- "APIendpoint": "http://99.80.197.164:8004/api"
26
+ "MQTTendpoint": "ws://localhost:8081/mqws/ws",
27
+ "APIendpoint": "/chatapi/api"
22
28
  },
23
- "apiUrl": "http://99.80.197.164:3000/",
24
- "baseImageUrl": "http://99.80.197.164:3000/",
25
- "dashboardUrl": "http://tiledesk-dashboard-pre.s3-eu-west-1.amazonaws.com/native-mqtt/dashboard/2.1.70-beta.1.6/index.html"
29
+ "apiUrl": "/api/",
30
+ "baseImageUrl": "/api/",
31
+ "dashboardUrl": "/dashboard/",
32
+ "wsUrl": "",
33
+ "wsUrlRel": ""
26
34
  }
27
35
 
36
+