@chat21/chat21-ionic 3.0.59-rc5 → 3.0.59-rc7
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 +11 -1
- package/env.sample +1 -0
- package/package.json +1 -1
- package/src/app/app.component.ts +7 -8
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.html +5 -2
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.ts +2 -1
- package/src/app/components/ddp-header/ddp-header.component.ts +4 -2
- package/src/app/components/project-item/project-item.component.html +44 -10
- package/src/app/components/project-item/project-item.component.scss +150 -23
- package/src/app/components/project-item/project-item.component.ts +14 -6
- package/src/app/pages/conversations-list/conversations-list.page.html +1 -1
- package/src/app/pages/conversations-list/conversations-list.page.ts +12 -5
- package/src/chat-config-pre-test.json +3 -1
- package/src/chat-config-template.json +2 -1
- package/src/chat-config.json +3 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,7 +1,17 @@
|
|
|
1
1
|
# chat21-ionic ver 3.0
|
|
2
2
|
|
|
3
|
+
### 3.0.59-rc7
|
|
4
|
+
- Fixes the bug "Cannot read properties of undefined (reading 'get')" in component template showing the number of new conversations
|
|
5
|
+
- Fixes the bug: the value of the "supportMode" property is passed hard-coded
|
|
6
|
+
|
|
7
|
+
### 3.0.59-rc6
|
|
8
|
+
- Outsources the websocket URL to environments
|
|
9
|
+
- Improves the graphic of the element, positioned at the top of the conversation list, which displays the number of new conversations
|
|
10
|
+
- Adds "wsUrl" property to env.sample, chat-config-template.json and chat-config.json
|
|
11
|
+
- Updates environments with "wsUrl" property
|
|
12
|
+
|
|
3
13
|
### 3.0.59-rc5
|
|
4
|
-
- Display a "toast message" of success after that the agent has joined to an unassigned conversation
|
|
14
|
+
- Display a "toast message" of success after that the agent has joined to an unassigned conversation and other minor improvements
|
|
5
15
|
|
|
6
16
|
### 3.0.59-rc4
|
|
7
17
|
- Adds an item to the top of the conversation list that shows the number of unassigned conversations for a selected project
|
package/env.sample
CHANGED
package/package.json
CHANGED
package/src/app/app.component.ts
CHANGED
|
@@ -261,12 +261,12 @@ export class AppComponent implements OnInit {
|
|
|
261
261
|
|
|
262
262
|
listenToPostMsgs() {
|
|
263
263
|
window.addEventListener("message", (event) => {
|
|
264
|
-
console.log("[APP-COMP] message event ", event);
|
|
264
|
+
// console.log("[APP-COMP] message event ", event);
|
|
265
265
|
|
|
266
266
|
if (event && event.data && event.data.action && event.data.parameter) {
|
|
267
267
|
if (event.data.action === 'openJoinConversationModal') {
|
|
268
|
-
console.log("[APP-COMP] message event action ", event.data.action);
|
|
269
|
-
console.log("[APP-COMP] message event parameter ", event.data.parameter);
|
|
268
|
+
// console.log("[APP-COMP] message event action ", event.data.action);
|
|
269
|
+
// console.log("[APP-COMP] message event parameter ", event.data.parameter);
|
|
270
270
|
this.presentAlertConfirmJoinRequest(event.data.parameter, event.data.calledBy)
|
|
271
271
|
}
|
|
272
272
|
}
|
|
@@ -531,7 +531,9 @@ export class AppComponent implements OnInit {
|
|
|
531
531
|
// }
|
|
532
532
|
|
|
533
533
|
connetWebsocket(tiledeskToken) {
|
|
534
|
-
const
|
|
534
|
+
const appconfig = this.appConfigProvider.getConfig();
|
|
535
|
+
this.logger.log('connetWebsocket appconfig wsUrl ', appconfig.wsUrl)
|
|
536
|
+
const WS_URL = appconfig.wsUrl + '?token=' + tiledeskToken
|
|
535
537
|
this.webSocketJs.init(
|
|
536
538
|
WS_URL,
|
|
537
539
|
undefined,
|
|
@@ -1013,7 +1015,7 @@ export class AppComponent implements OnInit {
|
|
|
1013
1015
|
// https://developer.mozilla.org/en-US/docs/Web/API/Window/storage_event
|
|
1014
1016
|
@HostListener('window:storage', ['$event'])
|
|
1015
1017
|
onStorageChanged(event: any) {
|
|
1016
|
-
|
|
1018
|
+
|
|
1017
1019
|
if (event.key !== 'chat_sv5__tiledeskToken') {
|
|
1018
1020
|
return;
|
|
1019
1021
|
}
|
|
@@ -1052,7 +1054,4 @@ export class AppComponent implements OnInit {
|
|
|
1052
1054
|
}
|
|
1053
1055
|
}
|
|
1054
1056
|
}
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
1057
|
}
|
|
@@ -74,6 +74,7 @@
|
|
|
74
74
|
</ion-item-options>
|
|
75
75
|
</ion-item-sliding> -->
|
|
76
76
|
|
|
77
|
+
|
|
77
78
|
<ion-item button="true" lines="none" class="ion-no-padding" [class.ion-selected]="conversation.uid === uidConvSelected"
|
|
78
79
|
*ngFor="let conversation of listConversations" (click)="openConversationByID(conversation)" detail=false>
|
|
79
80
|
<div tabindex="0"></div>
|
|
@@ -117,7 +118,8 @@
|
|
|
117
118
|
<ion-note *ngIf="!conversation.archived" class="conversation_time">{{conversation.timestamp | amTimeAgo}}</ion-note>
|
|
118
119
|
|
|
119
120
|
<ion-buttons slot="end">
|
|
120
|
-
<ion-button *ngIf="!conversation.archived"
|
|
121
|
+
<ion-button *ngIf="!conversation.archived"
|
|
122
|
+
[ngClass]="{'hide': !isApp, 'button-on-desktop': !isApp, 'button-on-mobile': isApp }"
|
|
121
123
|
id="{{ 'close_conversation_button' + conversation.uid }}" class="close-conversation-button" ion-button clear
|
|
122
124
|
item-end (click)="closeConversation(conversation);$event.stopPropagation();" padding>
|
|
123
125
|
<ion-icon slot="icon-only" style="display:block;" id="{{ 'close_button_icon' + conversation.uid }}"
|
|
@@ -146,7 +148,8 @@
|
|
|
146
148
|
</div>
|
|
147
149
|
|
|
148
150
|
<!-- && !conversation?.archived -->
|
|
149
|
-
<div item-end class="notification_point"
|
|
151
|
+
<div item-end class="notification_point"
|
|
152
|
+
[ngClass]="{'notification_point-on-desktop': !isApp, 'notification_point-on-mobile': isApp }"
|
|
150
153
|
*ngIf="conversation.is_new">
|
|
151
154
|
</div>
|
|
152
155
|
|
|
@@ -78,9 +78,10 @@ export class IonListConversationsComponent extends ListConversationsComponent im
|
|
|
78
78
|
this.isApp = this.platform.is('ios') || this.platform.is('android')
|
|
79
79
|
this.logger.log('[ION-LIST-CONVS-COMP] - ngOnInit - IS-APP ', this.isApp)
|
|
80
80
|
this.logger.log('[ION-LIST-CONVS-COMP] - ngOnInit - Platform', this.platform.platforms());
|
|
81
|
-
|
|
82
81
|
}
|
|
83
82
|
|
|
83
|
+
|
|
84
|
+
|
|
84
85
|
|
|
85
86
|
|
|
86
87
|
// --------------------------------------------------
|
|
@@ -7,14 +7,16 @@ import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
|
|
|
7
7
|
})
|
|
8
8
|
export class DdpHeaderComponent implements OnInit {
|
|
9
9
|
@Input() numberOpenConv: number;
|
|
10
|
-
@Input() supportMode
|
|
10
|
+
@Input() supportMode: boolean;
|
|
11
11
|
@Output() openContactsDirectory = new EventEmitter();
|
|
12
12
|
@Output() openProfileInfo = new EventEmitter();
|
|
13
13
|
|
|
14
14
|
constructor(
|
|
15
15
|
) { }
|
|
16
16
|
|
|
17
|
-
ngOnInit() {
|
|
17
|
+
ngOnInit() {
|
|
18
|
+
console.log('DDP HEADER SUPPORT MODE ', this.supportMode)
|
|
19
|
+
}
|
|
18
20
|
|
|
19
21
|
// START @Output() //
|
|
20
22
|
/** */
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
<div class="flex-child-left">
|
|
16
16
|
<!-- padding:6px; background: rgb(31,107,192); -->
|
|
17
17
|
<div class="unassigned-notifications-icon-wpr">
|
|
18
|
-
<svg viewBox="0 0 28 28" alt="" class="a8c37x1j ms05siws hwsy1cff b7h9ocf4 fzdkajry" height="40"
|
|
18
|
+
<!-- <svg viewBox="0 0 28 28" alt="" class="a8c37x1j ms05siws hwsy1cff b7h9ocf4 fzdkajry" height="40"
|
|
19
19
|
width="40"
|
|
20
20
|
style="vertical-align: middle;border-radius: 50%;">
|
|
21
21
|
<style type="text/css">
|
|
@@ -26,20 +26,39 @@
|
|
|
26
26
|
<path class="notifications-icons"
|
|
27
27
|
d="M7.847 23.488C9.207 23.488 11.443 23.363 14.467 22.806 13.944 24.228 12.581 25.247 10.98 25.247 9.649 25.247 8.483 24.542 7.825 23.488L7.847 23.488ZM24.923 15.73C25.17 17.002 24.278 18.127 22.27 19.076 21.17 19.595 18.724 20.583 14.684 21.369 11.568 21.974 9.285 22.113 7.848 22.113 7.421 22.113 7.068 22.101 6.79 22.085 4.574 21.958 3.324 21.248 3.077 19.976 2.702 18.049 3.295 17.305 4.278 16.073L4.537 15.748C5.2 14.907 5.459 14.081 5.035 11.902 4.086 7.022 6.284 3.687 11.064 2.753 15.846 1.83 19.134 4.096 20.083 8.977 20.506 11.156 21.056 11.824 21.986 12.355L21.986 12.356 22.348 12.561C23.72 13.335 24.548 13.802 24.923 15.73Z">
|
|
28
28
|
</path>
|
|
29
|
+
</svg> -->
|
|
30
|
+
|
|
31
|
+
<!-- <svg aria-hidden="true" focusable="false" data-prefix="far" data-icon="bell"
|
|
32
|
+
class="svg-inline--fa fa-bell fa-w-14" role="img" xmlns="http://www.w3.org/2000/svg"
|
|
33
|
+
viewBox="0 0 448 512" height="auto" width="24px">
|
|
34
|
+
<path fill="currentColor"
|
|
35
|
+
d="M439.39 362.29c-19.32-20.76-55.47-51.99-55.47-154.29 0-77.7-54.48-139.9-127.94-155.16V32c0-17.67-14.32-32-31.98-32s-31.98 14.33-31.98 32v20.84C118.56 68.1 64.08 130.3 64.08 208c0 102.3-36.15 133.53-55.47 154.29-6 6.45-8.66 14.16-8.61 21.71.11 16.4 12.98 32 32.1 32h383.8c19.12 0 32-15.6 32.1-32 .05-7.55-2.61-15.27-8.61-21.71zM67.53 368c21.22-27.97 44.42-74.33 44.53-159.42 0-.2-.06-.38-.06-.58 0-61.86 50.14-112 112-112s112 50.14 112 112c0 .2-.06.38-.06.58.11 85.1 23.31 131.46 44.53 159.42H67.53zM224 512c35.32 0 63.97-28.65 63.97-64H160.03c0 35.35 28.65 64 63.97 64z">
|
|
36
|
+
</path>
|
|
37
|
+
</svg> -->
|
|
38
|
+
|
|
39
|
+
<svg viewBox="0 0 24 24" preserveAspectRatio="xMidYMid meet" focusable="false"
|
|
40
|
+
class="style-scope yt-icon"
|
|
41
|
+
style="pointer-events: none; width: 37px; height:auto; fill: rgb(107,107,107);margin-left:4px">
|
|
42
|
+
<g class="style-scope yt-icon">
|
|
43
|
+
<path
|
|
44
|
+
d="M10,20h4c0,1.1-0.9,2-2,2S10,21.1,10,20z M20,17.35V19H4v-1.65l2-1.88v-5.15c0-2.92,1.56-5.22,4-5.98V3.96 c0-1.42,1.49-2.5,2.99-1.76C13.64,2.52,14,3.23,14,3.96l0,0.39c2.44,0.75,4,3.06,4,5.98v5.15L20,17.35z M19,17.77l-2-1.88v-5.47 c0-2.47-1.19-4.36-3.13-5.1c-1.26-0.53-2.64-0.5-3.84,0.03C8.15,6.11,7,7.99,7,10.42v5.47l-2,1.88V18h14V17.77z"
|
|
45
|
+
class="style-scope yt-icon"></path>
|
|
46
|
+
</g>
|
|
29
47
|
</svg>
|
|
48
|
+
|
|
30
49
|
</div>
|
|
31
50
|
<div class="unassigned-notifications-badge">
|
|
32
51
|
<!-- || currentUserRequestCount > 0 -->
|
|
33
52
|
<!-- <span *ngIf="unservedRequestCount > 0 "> -->
|
|
34
|
-
|
|
35
|
-
|
|
53
|
+
<!-- + currentUserRequestCount -->
|
|
54
|
+
<span class="notification-count">{{ unservedRequestCount }}</span>
|
|
36
55
|
<!-- </span> -->
|
|
37
|
-
|
|
56
|
+
|
|
38
57
|
</div>
|
|
39
58
|
|
|
40
59
|
</div>
|
|
41
60
|
|
|
42
|
-
|
|
61
|
+
|
|
43
62
|
<div class="flex-child-right" *ngIf="!window_width_is_60">
|
|
44
63
|
<div class="project-name-project-for-panel">
|
|
45
64
|
{{ project?.id_project?.name }}
|
|
@@ -62,31 +81,46 @@
|
|
|
62
81
|
</span>
|
|
63
82
|
</div> -->
|
|
64
83
|
<div class="availabily-and-busy-wpr">
|
|
65
|
-
<div class="onoffswitch"
|
|
84
|
+
<!-- <div class="onoffswitch"
|
|
66
85
|
(click)="$event.stopPropagation();changeAvailabilityState(project?.id_project?._id, project?.ws_projct_user_available)">
|
|
67
86
|
<input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="myonoffswitch"
|
|
68
87
|
tabindex="0" [checked]="project?.ws_projct_user_available">
|
|
69
88
|
<label class="onoffswitch-label" for="myonoffswitch"></label>
|
|
89
|
+
</div> -->
|
|
90
|
+
<div class="availabily---wpr" style=" ">
|
|
91
|
+
<!-- <div class="i_onoffswitch"
|
|
92
|
+
(click)="$event.stopPropagation();changeAvailabilityState(project?.id_project?._id, project?.ws_projct_user_available)">
|
|
93
|
+
<input type="checkbox" name="i_onoffswitch" class="i_onoffswitch-checkbox"
|
|
94
|
+
id="i_switch_availability" tabindex="0" [checked]="project?.ws_projct_user_available">
|
|
95
|
+
<label style="margin-bottom: 0px" class="i_onoffswitch-label" for="i_switch_availability"></label>
|
|
96
|
+
</div> -->
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
<div class="onoffswitch" (click)="$event.stopPropagation();changeAvailabilityState(project?.id_project?._id, project?.ws_projct_user_available)">
|
|
100
|
+
<input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="myonoffswitch" tabindex="0" [checked]="project?.ws_projct_user_available">
|
|
101
|
+
<label class="onoffswitch-label" for="myonoffswitch"></label>
|
|
102
|
+
</div>
|
|
70
103
|
</div>
|
|
71
104
|
|
|
105
|
+
|
|
72
106
|
<span *ngIf="project?.ws_projct_user_available === true" class="availibility-status-text"
|
|
73
107
|
[ngClass]="{'online-text-color' : project?.ws_projct_user_available === true, 'offline-text-color' : project?.ws_projct_user_available === false}"
|
|
74
108
|
(click)="$event.stopPropagation();changeAvailabilityState(project?.id_project?._id, project?.ws_projct_user_available)">
|
|
75
|
-
{{translationMap
|
|
109
|
+
{{translationMap?.get('Available') }}
|
|
76
110
|
</span>
|
|
77
111
|
<span *ngIf="project?.ws_projct_user_available === false" class="availibility-status-text"
|
|
78
112
|
[ngClass]="{'online-text-color' : project?.ws_projct_user_available === true, 'offline-text-color' : project?.ws_projct_user_available === false}"
|
|
79
113
|
(click)="$event.stopPropagation();changeAvailabilityState(project?.id_project?._id, project?.ws_projct_user_available)">
|
|
80
|
-
{{translationMap
|
|
114
|
+
{{translationMap?.get('Unavailable')}}
|
|
81
115
|
</span>
|
|
82
116
|
<div class="project-item--isBusy-icon-wpr" *ngIf="project?.ws_projct_user_isBusy === true">
|
|
83
117
|
<span class="material-icons project-item--isBusy-icon">
|
|
84
118
|
access_time
|
|
85
119
|
</span>
|
|
86
120
|
</div>
|
|
87
|
-
<span *ngIf="project?.ws_projct_user_isBusy === true" class="project-item--isBusy-busy-text text-pulse-animation">
|
|
121
|
+
<!-- <span *ngIf="project?.ws_projct_user_isBusy === true" class="project-item--isBusy-busy-text text-pulse-animation">
|
|
88
122
|
{{translationMap.get('Busy')}}
|
|
89
|
-
</span>
|
|
123
|
+
</span> -->
|
|
90
124
|
</div>
|
|
91
125
|
|
|
92
126
|
</div>
|
|
@@ -6,9 +6,13 @@
|
|
|
6
6
|
padding-bottom: 0px !important;
|
|
7
7
|
background: #fff;
|
|
8
8
|
padding-left: 0px;
|
|
9
|
-
min-height: 70px;
|
|
10
|
-
height: 70px;
|
|
11
9
|
width: 100%;
|
|
10
|
+
// min-height: 70px;
|
|
11
|
+
// height: 70px;
|
|
12
|
+
min-height: 55px;
|
|
13
|
+
height: 55px;
|
|
14
|
+
position: relative;
|
|
15
|
+
top: -4px;
|
|
12
16
|
}
|
|
13
17
|
|
|
14
18
|
.main-content-project-for-panel:hover {
|
|
@@ -283,6 +287,9 @@
|
|
|
283
287
|
overflow: hidden !important;
|
|
284
288
|
text-overflow: ellipsis !important;
|
|
285
289
|
font-family: Helvetica, Helvetica, Arial, sans-serif;
|
|
290
|
+
font-size: 14px;
|
|
291
|
+
position: relative;
|
|
292
|
+
top: -1px;
|
|
286
293
|
}
|
|
287
294
|
|
|
288
295
|
// .im-available-project-for-panel {
|
|
@@ -290,18 +297,26 @@
|
|
|
290
297
|
// }
|
|
291
298
|
|
|
292
299
|
.availabily-and-busy-wpr {
|
|
293
|
-
margin-top: 6px;
|
|
300
|
+
// margin-top: 6px;
|
|
301
|
+
margin-top: 4px;
|
|
294
302
|
margin-left: 11px;
|
|
295
303
|
}
|
|
296
304
|
|
|
305
|
+
.availabily---wpr {
|
|
306
|
+
display: inline-block;
|
|
307
|
+
position: relative;
|
|
308
|
+
top: -4px;
|
|
309
|
+
margin-right: 6px;
|
|
310
|
+
}
|
|
311
|
+
|
|
297
312
|
.availibility-status-text {
|
|
298
313
|
font-family: Helvetica, Helvetica, Arial, sans-serif;
|
|
299
|
-
font-size:
|
|
314
|
+
font-size: 11px;
|
|
300
315
|
margin-left: 3px;
|
|
301
|
-
position: relative;
|
|
302
|
-
top: -4px;
|
|
303
316
|
display: inline-block;
|
|
304
|
-
min-width:
|
|
317
|
+
min-width: 85px;
|
|
318
|
+
position: relative;
|
|
319
|
+
top: -5px;
|
|
305
320
|
}
|
|
306
321
|
|
|
307
322
|
.online-text-color {
|
|
@@ -321,9 +336,12 @@
|
|
|
321
336
|
|
|
322
337
|
.project-item--isBusy-icon {
|
|
323
338
|
border-radius: 50%;
|
|
324
|
-
background-color:
|
|
325
|
-
font-size:
|
|
339
|
+
background-color: rgb(254,185,44);
|
|
340
|
+
font-size: 14px;
|
|
326
341
|
color: #fff;
|
|
342
|
+
position: relative;
|
|
343
|
+
top: -1px;
|
|
344
|
+
// margin-left: 8px;
|
|
327
345
|
}
|
|
328
346
|
|
|
329
347
|
.project-item--isBusy-busy-text {
|
|
@@ -384,14 +402,18 @@
|
|
|
384
402
|
|
|
385
403
|
.unassigned-notifications-badge {
|
|
386
404
|
position: absolute;
|
|
387
|
-
top: 12px;
|
|
405
|
+
// top: 12px;
|
|
406
|
+
top: 14px;
|
|
388
407
|
border-radius: 50%;
|
|
389
408
|
background: #e41e3f;
|
|
390
|
-
width: 24px;
|
|
391
|
-
height: 24px;
|
|
409
|
+
// width: 24px;
|
|
410
|
+
// height: 24px;
|
|
411
|
+
width: 22px;
|
|
412
|
+
height: 22px;
|
|
392
413
|
color: #fff;
|
|
393
|
-
left: 28px;
|
|
394
|
-
|
|
414
|
+
// left: 28px;
|
|
415
|
+
left: 32px;
|
|
416
|
+
border: 1px solid #fff;
|
|
395
417
|
}
|
|
396
418
|
.notification-count {
|
|
397
419
|
font-size: 12px;
|
|
@@ -488,10 +510,62 @@
|
|
|
488
510
|
// ------------------------------------------------------------------
|
|
489
511
|
// on-off availability switch btn // https://proto.io/freebies/onoff/
|
|
490
512
|
// ------------------------------------------------------------------
|
|
513
|
+
// .onoffswitch {
|
|
514
|
+
// display: inline-block;
|
|
515
|
+
// position: relative;
|
|
516
|
+
// width: 36px;
|
|
517
|
+
// -webkit-user-select: none;
|
|
518
|
+
// -moz-user-select: none;
|
|
519
|
+
// -ms-user-select: none;
|
|
520
|
+
// }
|
|
521
|
+
// .onoffswitch-checkbox {
|
|
522
|
+
// position: absolute;
|
|
523
|
+
// opacity: 0;
|
|
524
|
+
// pointer-events: none;
|
|
525
|
+
// }
|
|
526
|
+
// .onoffswitch-label {
|
|
527
|
+
// display: block;
|
|
528
|
+
// overflow: hidden;
|
|
529
|
+
// cursor: pointer;
|
|
530
|
+
// height: 18px;
|
|
531
|
+
// padding: 0;
|
|
532
|
+
// line-height: 18px;
|
|
533
|
+
// border: 0px solid #ffffff;
|
|
534
|
+
// border-radius: 20px;
|
|
535
|
+
// background-color: #eeeeee;
|
|
536
|
+
// }
|
|
537
|
+
// .onoffswitch-label:before {
|
|
538
|
+
// content: "";
|
|
539
|
+
// display: block;
|
|
540
|
+
// width: 20px;
|
|
541
|
+
// margin: -1px;
|
|
542
|
+
// background: #f44336;
|
|
543
|
+
// position: absolute;
|
|
544
|
+
// top: 0;
|
|
545
|
+
// bottom: 0;
|
|
546
|
+
// // right: 14px;
|
|
547
|
+
// border-radius: 20px;
|
|
548
|
+
// // box-shadow: 0 6px 12px 0px #757575;
|
|
549
|
+
// }
|
|
550
|
+
// .onoffswitch-checkbox:checked + .onoffswitch-label {
|
|
551
|
+
// background-color: #eeeeee;
|
|
552
|
+
// }
|
|
553
|
+
// .onoffswitch-checkbox:checked + .onoffswitch-label,
|
|
554
|
+
// .onoffswitch-checkbox:checked + .onoffswitch-label:before {
|
|
555
|
+
// border-color: #eeeeee;
|
|
556
|
+
// }
|
|
557
|
+
// .onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-inner {
|
|
558
|
+
// margin-left: 0;
|
|
559
|
+
// }
|
|
560
|
+
// .onoffswitch-checkbox:checked + .onoffswitch-label:before {
|
|
561
|
+
// right: 0px;
|
|
562
|
+
// background-color: #4caf50;
|
|
563
|
+
// // box-shadow: 3px 6px 18px 0px rgba(0, 0, 0, 0.2);
|
|
564
|
+
// }
|
|
565
|
+
|
|
491
566
|
.onoffswitch {
|
|
492
|
-
display: inline-block;
|
|
493
567
|
position: relative;
|
|
494
|
-
width:
|
|
568
|
+
width: 30px;
|
|
495
569
|
-webkit-user-select: none;
|
|
496
570
|
-moz-user-select: none;
|
|
497
571
|
-ms-user-select: none;
|
|
@@ -505,24 +579,24 @@
|
|
|
505
579
|
display: block;
|
|
506
580
|
overflow: hidden;
|
|
507
581
|
cursor: pointer;
|
|
508
|
-
height:
|
|
582
|
+
height: 8px;
|
|
509
583
|
padding: 0;
|
|
510
|
-
line-height:
|
|
584
|
+
line-height: 8px;
|
|
511
585
|
border: 0px solid #ffffff;
|
|
512
|
-
border-radius:
|
|
586
|
+
border-radius: 16px;
|
|
513
587
|
background-color: #eeeeee;
|
|
514
588
|
}
|
|
515
589
|
.onoffswitch-label:before {
|
|
516
590
|
content: "";
|
|
517
591
|
display: block;
|
|
518
|
-
width:
|
|
519
|
-
margin: -
|
|
592
|
+
width: 16px;
|
|
593
|
+
margin: -4px;
|
|
520
594
|
background: #f44336;
|
|
521
595
|
position: absolute;
|
|
522
596
|
top: 0;
|
|
523
597
|
bottom: 0;
|
|
524
|
-
|
|
525
|
-
border-radius:
|
|
598
|
+
right: 18px;
|
|
599
|
+
border-radius: 16px;
|
|
526
600
|
// box-shadow: 0 6px 12px 0px #757575;
|
|
527
601
|
}
|
|
528
602
|
.onoffswitch-checkbox:checked + .onoffswitch-label {
|
|
@@ -540,3 +614,56 @@
|
|
|
540
614
|
background-color: #4caf50;
|
|
541
615
|
// box-shadow: 3px 6px 18px 0px rgba(0, 0, 0, 0.2);
|
|
542
616
|
}
|
|
617
|
+
|
|
618
|
+
// -----------------------
|
|
619
|
+
// i on-off switch
|
|
620
|
+
// -----------------------
|
|
621
|
+
.i_onoffswitch {
|
|
622
|
+
position: relative;
|
|
623
|
+
width: 33px;
|
|
624
|
+
-webkit-user-select: none;
|
|
625
|
+
-moz-user-select: none;
|
|
626
|
+
-ms-user-select: none;
|
|
627
|
+
}
|
|
628
|
+
.i_onoffswitch-checkbox {
|
|
629
|
+
position: absolute;
|
|
630
|
+
opacity: 0;
|
|
631
|
+
pointer-events: none;
|
|
632
|
+
}
|
|
633
|
+
.i_onoffswitch-label {
|
|
634
|
+
display: block;
|
|
635
|
+
overflow: hidden;
|
|
636
|
+
cursor: pointer;
|
|
637
|
+
height: 18px;
|
|
638
|
+
padding: 0;
|
|
639
|
+
line-height: 18px;
|
|
640
|
+
// border: 1px solid #e3e3e3;
|
|
641
|
+
border-radius: 18px;
|
|
642
|
+
background-color: #f44336;
|
|
643
|
+
transition: background-color 0.3s ease-in;
|
|
644
|
+
}
|
|
645
|
+
.i_onoffswitch-label:before {
|
|
646
|
+
content: "";
|
|
647
|
+
display: block;
|
|
648
|
+
// width: 18px;
|
|
649
|
+
width: 16px;
|
|
650
|
+
margin: 0px;
|
|
651
|
+
background: #ffffff;
|
|
652
|
+
position: absolute;
|
|
653
|
+
top: 0;
|
|
654
|
+
bottom: 0;
|
|
655
|
+
right: 15px;
|
|
656
|
+
border: 1px solid #e3e3e3;
|
|
657
|
+
border-radius: 18px;
|
|
658
|
+
transition: all 0.3s ease-in 0s;
|
|
659
|
+
}
|
|
660
|
+
.i_onoffswitch-checkbox:checked + .i_onoffswitch-label {
|
|
661
|
+
background-color: #4caf50;
|
|
662
|
+
}
|
|
663
|
+
.i_onoffswitch-checkbox:checked + .i_onoffswitch-label,
|
|
664
|
+
.i_onoffswitch-checkbox:checked + .i_onoffswitch-label:before {
|
|
665
|
+
border-color: #4caf50;
|
|
666
|
+
}
|
|
667
|
+
.i_onoffswitch-checkbox:checked + .i_onoffswitch-label:before {
|
|
668
|
+
right: 0px;
|
|
669
|
+
}
|
|
@@ -50,7 +50,7 @@ export class ProjectItemComponent implements OnInit {
|
|
|
50
50
|
listenToPostMsgs() {
|
|
51
51
|
window.addEventListener("message", (event) => {
|
|
52
52
|
// console.log("[PROJECT-ITEM] post message event ", event);
|
|
53
|
-
|
|
53
|
+
|
|
54
54
|
if (event && event.data && event.data) {
|
|
55
55
|
// console.log("[APP-COMP] message event data ", event.data);
|
|
56
56
|
if (event.data === 'hasChangedProject') {
|
|
@@ -114,15 +114,23 @@ export class ProjectItemComponent implements OnInit {
|
|
|
114
114
|
}
|
|
115
115
|
|
|
116
116
|
getLastProjectStoredAndSubscToWSAvailabilityAndConversations() {
|
|
117
|
-
|
|
117
|
+
let stored_project = ''
|
|
118
|
+
try {
|
|
119
|
+
stored_project = localStorage.getItem('last_project')
|
|
120
|
+
} catch (err) {
|
|
121
|
+
console.log('Get loacal storage item LAST PROJECT ', err)
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
|
|
118
125
|
if (!stored_project) {
|
|
126
|
+
console.log('PROJECT-ITEM - THERE IS NOT STORED LAST PROJECT ', stored_project)
|
|
119
127
|
const tiledeskToken = this.appStorageService.getItem('tiledeskToken');
|
|
120
128
|
this.logger.log('[INFO-CONTENT-COMP] - GET PROJECTS - tiledeskToken', tiledeskToken);
|
|
121
129
|
this.tiledeskService.getProjects(tiledeskToken).subscribe(projects => {
|
|
122
130
|
this.logger.log('[INFO-CONTENT-COMP] - GET PROJECTS - RES', projects);
|
|
123
131
|
this.project = projects[0];
|
|
124
132
|
this.logger.log('[INFO-CONTENT-COMP] - GET PROJECTS - RES this.project', this.project);
|
|
125
|
-
|
|
133
|
+
|
|
126
134
|
localStorage.setItem('last_project', JSON.stringify(projects[0]))
|
|
127
135
|
this.doProjectSubscriptions(this.project)
|
|
128
136
|
|
|
@@ -137,13 +145,13 @@ export class ProjectItemComponent implements OnInit {
|
|
|
137
145
|
|
|
138
146
|
|
|
139
147
|
if (stored_project) {
|
|
140
|
-
|
|
148
|
+
this.logger.log('PROJECT-ITEM - THERE IS STORED LAST PROJECT ', stored_project)
|
|
141
149
|
this.project = JSON.parse(stored_project)
|
|
142
150
|
this.doProjectSubscriptions(this.project)
|
|
143
151
|
this.logger.log('[PROJECT-ITEM] - LAST PROJECT PARSED ', this.project)
|
|
144
152
|
}
|
|
145
153
|
|
|
146
|
-
|
|
154
|
+
|
|
147
155
|
}
|
|
148
156
|
|
|
149
157
|
doProjectSubscriptions(project) {
|
|
@@ -208,7 +216,7 @@ export class ProjectItemComponent implements OnInit {
|
|
|
208
216
|
|
|
209
217
|
if (this.project['id_project']._id === projectUser.id_project) {
|
|
210
218
|
this.project['ws_projct_user_available'] = projectUser.user_available;
|
|
211
|
-
this.project['ws_projct_user_isBusy'] = projectUser['isBusy']
|
|
219
|
+
// this.project['ws_projct_user_isBusy'] = projectUser['isBusy']
|
|
212
220
|
}
|
|
213
221
|
|
|
214
222
|
}, (error) => {
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
<ion-label part="message-text" class="waiting-for-network-msg"> Waiting for network</ion-label>
|
|
43
43
|
</ion-item>
|
|
44
44
|
|
|
45
|
-
<ion-item class="ion-no-padding" style="padding-left:0px!important ;padding-right:0px!important" button="true"
|
|
45
|
+
<ion-item class="ion-no-padding" style="padding-left:0px!important ;padding-right:0px!important; height:55px" button="true"
|
|
46
46
|
(click)="openUnsevedConversationIframe()">
|
|
47
47
|
<div tabindex="0"></div>
|
|
48
48
|
<app-project-item (projectIdEvent)="getLastProjectId($event)"></app-project-item>
|
|
@@ -55,7 +55,7 @@ export class ConversationListPage implements OnInit {
|
|
|
55
55
|
public showPlaceholder = true;
|
|
56
56
|
public numberOpenConv = 0;
|
|
57
57
|
public loadingIsActive = true;
|
|
58
|
-
public supportMode
|
|
58
|
+
public supportMode: boolean;
|
|
59
59
|
|
|
60
60
|
public convertMessage = convertMessage;
|
|
61
61
|
private isShowMenuPage = false;
|
|
@@ -90,6 +90,7 @@ export class ConversationListPage implements OnInit {
|
|
|
90
90
|
public appConfigProvider: AppConfigProvider,
|
|
91
91
|
public platform: Platform,
|
|
92
92
|
private networkService: NetworkService,
|
|
93
|
+
|
|
93
94
|
) {
|
|
94
95
|
this.listenToAppCompConvsLengthOnInitConvs();
|
|
95
96
|
this.listenToLogoutEvent();
|
|
@@ -101,11 +102,17 @@ export class ConversationListPage implements OnInit {
|
|
|
101
102
|
// -----------------------------------------------
|
|
102
103
|
// @ Lifehooks
|
|
103
104
|
// -----------------------------------------------
|
|
104
|
-
ngOnInit() {
|
|
105
|
-
this.watchToConnectionStatus()
|
|
105
|
+
ngOnInit() {
|
|
106
|
+
this.watchToConnectionStatus();
|
|
107
|
+
this.getSupportMode();
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
getSupportMode() {
|
|
111
|
+
this.supportMode = this.appConfigProvider.getConfig().supportMode;
|
|
112
|
+
console.log('[ION-LIST-CONVS-COMP] - supportMode ', this.supportMode)
|
|
106
113
|
}
|
|
107
114
|
|
|
108
|
-
watchToConnectionStatus() {
|
|
115
|
+
watchToConnectionStatus() {
|
|
109
116
|
this.networkService.checkInternetFunc().subscribe(isOnline => {
|
|
110
117
|
this.checkInternet = isOnline
|
|
111
118
|
this.logger.log('[ION-LIST-CONVS-COMP] - watchToConnectionStatus - isOnline', this.checkInternet)
|
|
@@ -158,7 +165,7 @@ watchToConnectionStatus() {
|
|
|
158
165
|
// Opens the Unassigned Conversations iframe
|
|
159
166
|
// ---------------------------------------------------------
|
|
160
167
|
openUnassignedConversations(UNASSIGNED_CONVS_URL) {
|
|
161
|
-
|
|
168
|
+
|
|
162
169
|
if (checkPlatformIsMobile()) {
|
|
163
170
|
presentModal(this.modalController, UnassignedConversationsPage, { unassigned_convs_url: UNASSIGNED_CONVS_URL });
|
|
164
171
|
} else {
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
"logLevel": "info",
|
|
6
6
|
"fileUploadAccept":"*/*",
|
|
7
7
|
"authPersistence": "LOCAL",
|
|
8
|
+
"supportMode": false,
|
|
8
9
|
"firebaseConfig": {
|
|
9
10
|
"tenant": "tilechat",
|
|
10
11
|
"apiKey": "AIzaSyCoWXHNvP1-qOllCpTshhC6VjPXeRTK0T4",
|
|
@@ -25,6 +26,7 @@
|
|
|
25
26
|
},
|
|
26
27
|
"apiUrl": "https://tiledesk-server-pre.herokuapp.com/",
|
|
27
28
|
"baseImageUrl": "https://firebasestorage.googleapis.com/v0/b/",
|
|
28
|
-
"dashboardUrl": "
|
|
29
|
+
"dashboardUrl": "http://localhost:4204/",
|
|
30
|
+
"wsUrl": "wss://tiledesk-server-pre.herokuapp.com/"
|
|
29
31
|
}
|
|
30
32
|
|
package/src/chat-config.json
CHANGED
|
@@ -23,5 +23,7 @@
|
|
|
23
23
|
},
|
|
24
24
|
"apiUrl": "http://localhost:3000/",
|
|
25
25
|
"baseImageUrl": "https://firebasestorage.googleapis.com/v0/b/",
|
|
26
|
-
"dashboardUrl": "
|
|
26
|
+
"dashboardUrl": "https://support-pre.tiledesk.com/dashboard/",
|
|
27
|
+
"wsUrl": "ws://localhost:3000/"
|
|
28
|
+
|
|
27
29
|
}
|