@chat21/chat21-ionic 3.0.61-rc4 → 3.0.61-rc5
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 +9 -0
- package/package.json +1 -1
- package/src/app/app.component.html +2 -1
- package/src/app/app.component.ts +1 -1
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.scss +1 -1
- package/src/app/components/project-item/project-item.component.html +1 -1
- package/src/app/components/sidebar/sidebar.component.scss +12 -1
- package/src/app/components/sidebar/sidebar.component.ts +39 -24
- package/src/app/components/sidebar-user-details/sidebar-user-details.component.html +4 -4
- package/src/app/components/sidebar-user-details/sidebar-user-details.component.scss +10 -10
- package/src/app/components/sidebar-user-details/sidebar-user-details.component.ts +33 -26
- package/src/app/pages/conversation-detail/conversation-detail.module.ts +2 -1
- package/src/app/pages/conversation-detail/conversation-detail.page.html +3 -3
- package/src/app/pages/conversation-detail/conversation-detail.page.ts +11 -3
- package/src/app/pages/conversations-list/conversations-list.module.ts +2 -1
- package/src/app/pages/conversations-list/conversations-list.page.html +1 -1
- package/src/app/pages/conversations-list/conversations-list.page.scss +9 -1
- package/src/app/pages/conversations-list/conversations-list.page.ts +21 -11
- package/src/app/utils/scrollbar-theme.directive.ts +58 -24
- package/src/global.scss +5 -40
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# chat21-ionic ver 3.0
|
|
2
2
|
|
|
3
|
+
### 3.0.61-rc5
|
|
4
|
+
- Fixes the bug: on mobile devices the chat content is shifted to the right
|
|
5
|
+
- Adds the ability to open and close the "user detail sidebar" by clicking on the avatar of the logged teammate present on the sidebar
|
|
6
|
+
- Fixes the bug: canned responses remain visible even if, after making a filter, the backslash is deleted
|
|
7
|
+
- Prevents the "open canned responses" button from inserting a backslash if another one exists before
|
|
8
|
+
- Hides the badge that displays the number of unassigned conversations if there are none
|
|
9
|
+
- Improves custom scrollbar displayed in the sidebar and in user detail sidebar
|
|
10
|
+
- Adds custom scrollbars to the conversation list and to the conversation detail
|
|
11
|
+
|
|
3
12
|
### 3.0.61-rc4
|
|
4
13
|
- Hides the item showing unassigned conversations in the list of archived conversations
|
|
5
14
|
- Adds in the list of conversations to the "archive" button the tooltip "Resolve" if the conversation is of type "support" and the tooltip "Archive" if the conversation is of type "direct" or "group"
|
package/package.json
CHANGED
|
@@ -20,7 +20,8 @@
|
|
|
20
20
|
<!-- <app-details></app-details> -->
|
|
21
21
|
<!-- </ion-router-outlet> -->
|
|
22
22
|
<!-- the main content -->
|
|
23
|
-
|
|
23
|
+
<!-- -->
|
|
24
|
+
<ion-router-outlet id="main" #detailNav animated="false" [ngClass]="{'router-outlet-margin-left': platformIs === 'mobile' && SUPPORT_MODE === true && IS_ON_MOBILE_DEVICE === false}">
|
|
24
25
|
</ion-router-outlet>
|
|
25
26
|
</ion-split-pane>
|
|
26
27
|
</div>
|
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
|
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
</g>
|
|
24
24
|
</svg>
|
|
25
25
|
</div>
|
|
26
|
-
<div class="unassigned-notifications-badge">
|
|
26
|
+
<div class="unassigned-notifications-badge" *ngIf="unservedRequestCount > 0">
|
|
27
27
|
<!-- || currentUserRequestCount > 0 -->
|
|
28
28
|
<!-- <span *ngIf="unservedRequestCount > 0 "> -->
|
|
29
29
|
<!-- + currentUserRequestCount -->
|
|
@@ -8,4 +8,15 @@
|
|
|
8
8
|
color: #feb92c;
|
|
9
9
|
background-color: #2d323e;
|
|
10
10
|
border-radius: 50%;
|
|
11
|
-
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
// #sidebar_wrapper::-webkit-scrollbar {
|
|
14
|
+
// width: 6px;
|
|
15
|
+
// }
|
|
16
|
+
// #sidebar_wrapper::-webkit-scrollbar-track {
|
|
17
|
+
// background-color: #1c2b45;
|
|
18
|
+
// }
|
|
19
|
+
// #sidebar_wrapper::-webkit-scrollbar-thumb {
|
|
20
|
+
// background-color: #3c485b;
|
|
21
|
+
// border-radius: 3px;
|
|
22
|
+
// }
|
|
@@ -32,7 +32,7 @@ export class SidebarComponent implements OnInit {
|
|
|
32
32
|
photo_profile_URL: string;
|
|
33
33
|
project_id: string;
|
|
34
34
|
DASHBOARD_URL: string;
|
|
35
|
-
HAS_CLICKED_OPEN_USER_DETAIL: boolean = false
|
|
35
|
+
// HAS_CLICKED_OPEN_USER_DETAIL: boolean = false
|
|
36
36
|
public translationMap: Map<string, string>;
|
|
37
37
|
public_Key: any;
|
|
38
38
|
conversations_lbl: string;
|
|
@@ -42,7 +42,7 @@ export class SidebarComponent implements OnInit {
|
|
|
42
42
|
activities_lbl: string;
|
|
43
43
|
history_lbl: string;
|
|
44
44
|
settings_lbl: string;
|
|
45
|
-
|
|
45
|
+
countClickOnOpenUserDetailSidebar: number = 0
|
|
46
46
|
constructor(
|
|
47
47
|
public imageRepoService: ImageRepoService,
|
|
48
48
|
public appStorageService: AppStorageService,
|
|
@@ -107,7 +107,7 @@ export class SidebarComponent implements OnInit {
|
|
|
107
107
|
getConversationsTranslation() {
|
|
108
108
|
this.translate.get('Conversations')
|
|
109
109
|
.subscribe((text: string) => {
|
|
110
|
-
console.log('[SIDEBAR] - translate Conversations', text)
|
|
110
|
+
// console.log('[SIDEBAR] - translate Conversations', text)
|
|
111
111
|
this.conversations_lbl = text
|
|
112
112
|
});
|
|
113
113
|
}
|
|
@@ -249,34 +249,49 @@ export class SidebarComponent implements OnInit {
|
|
|
249
249
|
}
|
|
250
250
|
|
|
251
251
|
openUserDetailSidePanel() {
|
|
252
|
-
this.
|
|
253
|
-
this.
|
|
254
|
-
this.logger.log('[SIDEBAR] OPEN
|
|
252
|
+
this.countClickOnOpenUserDetailSidebar++
|
|
253
|
+
this.logger.log('[SIDEBAR-CHAT] countClickOnOpenUserDetailSidebar', this.countClickOnOpenUserDetailSidebar)
|
|
254
|
+
this.logger.log('[SIDEBAR-CHAT] OPEN UESER DTLS SIDE PANEL')
|
|
255
|
+
// this.HAS_CLICKED_OPEN_USER_DETAIL = true
|
|
256
|
+
// console.log('[SIDEBAR-CHAT] OPEN USER DTLS SIDE PANEL ', this.HAS_CLICKED_OPEN_USER_DETAIL)
|
|
255
257
|
const elSidebarUserDtls = <HTMLElement>document.querySelector('#user-details');
|
|
256
258
|
this.logger.log('[SIDEBAR] OPEN USER DTLS SIDE PANEL elSidebarUserDtls ', elSidebarUserDtls)
|
|
257
|
-
if (elSidebarUserDtls) {
|
|
258
|
-
elSidebarUserDtls.classList.add("active");
|
|
259
|
-
this.events.publish('userdetailsidebar:opened', true);
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
}
|
|
263
259
|
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
this.
|
|
267
|
-
|
|
268
|
-
this.
|
|
269
|
-
|
|
270
|
-
elemNavbar.classList.remove("navbar-absolute-custom-class")
|
|
260
|
+
// if (elSidebarUserDtls) {
|
|
261
|
+
// elSidebarUserDtls.classList.add("active");
|
|
262
|
+
// this.events.publish('userdetailsidebar:opened', true);
|
|
263
|
+
// }
|
|
264
|
+
if (elSidebarUserDtls && this.countClickOnOpenUserDetailSidebar === 1) {
|
|
265
|
+
elSidebarUserDtls.classList.add("active");
|
|
271
266
|
}
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
267
|
+
if (elSidebarUserDtls && this.countClickOnOpenUserDetailSidebar > 1) {
|
|
268
|
+
// console.log('[SIDEBAR] this.countClickOnOpenUserDetailSidebar HERE', this.countClickOnOpenUserDetailSidebar)
|
|
269
|
+
if (elSidebarUserDtls.classList.contains('active')) {
|
|
270
|
+
this.logger.log('[SIDEBAR-CHAT] elSidebarUserDtls contains class ACTIVE', elSidebarUserDtls)
|
|
271
|
+
elSidebarUserDtls.classList.remove("active");
|
|
272
|
+
} else if (!elSidebarUserDtls.classList.contains('active')) {
|
|
273
|
+
this.logger.log('[SIDEBAR-CHAT] elSidebarUserDtls NOT contains class ACTIVE', elSidebarUserDtls)
|
|
274
|
+
elSidebarUserDtls.classList.add("active");
|
|
275
|
+
}
|
|
277
276
|
}
|
|
278
277
|
}
|
|
279
278
|
|
|
279
|
+
// onCloseUserDetailsSidebar($event) {
|
|
280
|
+
// this.logger.log('[SIDEBAR-CHAT] HAS_CLICKED_CLOSE_USER_DETAIL ', $event)
|
|
281
|
+
// this.HAS_CLICKED_OPEN_USER_DETAIL = $event
|
|
282
|
+
// const elemNavbar = <HTMLElement>document.querySelector('.navbar-absolute');
|
|
283
|
+
// this.logger.log('[SIDEBAR] elemNavBar ', elemNavbar)
|
|
284
|
+
// if (elemNavbar) {
|
|
285
|
+
// elemNavbar.classList.remove("navbar-absolute-custom-class")
|
|
286
|
+
// }
|
|
287
|
+
|
|
288
|
+
// const elemNavbarBrand = <HTMLElement>document.querySelector('.navbar-brand');
|
|
289
|
+
// this.logger.log('[SIDEBAR] elemNavbarBrand ', elemNavbarBrand)
|
|
290
|
+
// if (elemNavbarBrand) {
|
|
291
|
+
// elemNavbarBrand.classList.remove("navbar-brand-z-index-zero")
|
|
292
|
+
// }
|
|
293
|
+
// }
|
|
294
|
+
|
|
280
295
|
subcribeToAuthStateChanged() {
|
|
281
296
|
this.messagingAuthService.BSAuthStateChanged.subscribe((state) => {
|
|
282
297
|
this.logger.log('[SIDEBAR] BSAuthStateChanged ', state)
|
|
@@ -68,10 +68,10 @@
|
|
|
68
68
|
<section *ngIf="isVisiblePAY" class="user-details-plan-info">
|
|
69
69
|
<span>
|
|
70
70
|
<div> {{prjct_name}} </div>
|
|
71
|
-
<div> {{ profile_name_translated }} </div>
|
|
71
|
+
<div style="display: inline-block;"> {{ profile_name_translated }} </div>
|
|
72
72
|
|
|
73
|
-
<
|
|
74
|
-
style="color:#f44336; position:relative; top: -1px;">
|
|
73
|
+
<div *ngIf="plan_type === 'payment' && plan_subscription_is_active === false"
|
|
74
|
+
style="color:#f44336; position:relative; top: -1px;;display: inline-block;">
|
|
75
75
|
<i *ngIf="plan_name !== 'enterprise'" class="material-icons" style="vertical-align: middle; color:#f44336; cursor:pointer;
|
|
76
76
|
font-size: 16px;" matTooltipClass="custom-mat-tooltip"
|
|
77
77
|
matTooltip="{{ SUBSCRIPTION_PAYMENT_PROBLEM_msg }}" #tooltip="matTooltip" matTooltipPosition='right'
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
#tooltip="matTooltip" matTooltipPosition='right' matTooltipHideDelay="100">
|
|
84
84
|
error_outline
|
|
85
85
|
</i>
|
|
86
|
-
</
|
|
86
|
+
</div>
|
|
87
87
|
</span>
|
|
88
88
|
</section>
|
|
89
89
|
|
|
@@ -21,16 +21,16 @@
|
|
|
21
21
|
// display: none;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
#user-details::-webkit-scrollbar {
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
#user-details::-webkit-scrollbar-track {
|
|
28
|
-
|
|
29
|
-
}
|
|
30
|
-
#user-details::-webkit-scrollbar-thumb {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}
|
|
24
|
+
// #user-details::-webkit-scrollbar {
|
|
25
|
+
// width: 6px;
|
|
26
|
+
// }
|
|
27
|
+
// #user-details::-webkit-scrollbar-track {
|
|
28
|
+
// background-color: #1c2b45;
|
|
29
|
+
// }
|
|
30
|
+
// #user-details::-webkit-scrollbar-thumb {
|
|
31
|
+
// background-color: #3c485b;
|
|
32
|
+
// border-radius: 3px;
|
|
33
|
+
// }
|
|
34
34
|
|
|
35
35
|
#user-details.active {
|
|
36
36
|
// transform: translate(0);
|
|
@@ -18,7 +18,7 @@ import { EventsService } from 'src/app/services/events-service';
|
|
|
18
18
|
styleUrls: ['./sidebar-user-details.component.scss'],
|
|
19
19
|
})
|
|
20
20
|
export class SidebarUserDetailsComponent implements OnInit, OnChanges {
|
|
21
|
-
HAS_CLICKED_OPEN_USER_DETAIL: boolean = false;
|
|
21
|
+
// HAS_CLICKED_OPEN_USER_DETAIL: boolean = false;
|
|
22
22
|
// @Output() onCloseUserDetailsSidebar = new EventEmitter();
|
|
23
23
|
|
|
24
24
|
|
|
@@ -71,34 +71,41 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
|
|
|
71
71
|
this.listenTocurrentProjectUserUserAvailability$();
|
|
72
72
|
this.getCurrentStoredProject();
|
|
73
73
|
this.getOSCODE();
|
|
74
|
-
this.listenOpenUserSidebarEvent();
|
|
74
|
+
// this.listenOpenUserSidebarEvent();
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
listenOpenUserSidebarEvent() {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
}
|
|
77
|
+
// listenOpenUserSidebarEvent() {
|
|
78
|
+
// this.events.subscribe('userdetailsidebar:opened', (openUserDetailsSidebar) => {
|
|
79
|
+
// this.logger.log('[SIDEBAR-USER-DETAILS] - listenOpenUserSidebarEvent - openUserDetailsSidebar', openUserDetailsSidebar);
|
|
80
|
+
// this.HAS_CLICKED_OPEN_USER_DETAIL = true;
|
|
81
|
+
// });
|
|
82
|
+
// }
|
|
83
83
|
|
|
84
84
|
@HostListener('document:click', ['$event'])
|
|
85
85
|
clickout(event) {
|
|
86
|
-
this.logger.log('[SIDEBAR-USER-
|
|
87
|
-
this.logger.log('[SIDEBAR-USER-
|
|
86
|
+
this.logger.log('[SIDEBAR-USER-DETAILSS-CHAT] clickout event.target)', event.target)
|
|
87
|
+
this.logger.log('[SIDEBAR-USER-DETAILSS-CHAT] clickout event.target)', event.target.id)
|
|
88
88
|
const clicked_element_id = event.target.id
|
|
89
89
|
if (this.eRef.nativeElement.contains(event.target)) {
|
|
90
|
-
this.logger.log('[SIDEBAR-USER-DETAILS] clicked inside')
|
|
90
|
+
// this.logger.log('[SIDEBAR-USER-DETAILS] clicked inside')
|
|
91
91
|
} else {
|
|
92
|
-
this.logger.log('[SIDEBAR-USER-DETAILS] HAS_CLICKED_OPEN_USER_DETAIL ', this.HAS_CLICKED_OPEN_USER_DETAIL)
|
|
93
|
-
if (this.HAS_CLICKED_OPEN_USER_DETAIL === true) {
|
|
94
92
|
if (!clicked_element_id.startsWith("sidebaravatar")) {
|
|
95
93
|
this.closeUserDetailSidePanel();
|
|
96
94
|
}
|
|
97
95
|
// this.logger.log('[SIDEBAR-USER-DETAILS] clicked outside')
|
|
98
|
-
|
|
96
|
+
|
|
99
97
|
}
|
|
100
98
|
}
|
|
101
99
|
|
|
100
|
+
closeUserDetailSidePanel() {
|
|
101
|
+
var element = document.getElementById('user-details');
|
|
102
|
+
element.classList.remove("active");
|
|
103
|
+
this.logger.log('[SIDEBAR-USER-DETAILS] element', element);
|
|
104
|
+
// this.HAS_CLICKED_OPEN_USER_DETAIL === true
|
|
105
|
+
// this.onCloseUserDetailsSidebar.emit(false);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
|
|
102
109
|
getCurrentChatLangAndTranslateLabels() {
|
|
103
110
|
this.browserLang = this.translate.getBrowserLang();
|
|
104
111
|
const currentUser = JSON.parse(this.appStorageService.getItem('currentUser'));
|
|
@@ -348,11 +355,11 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
|
|
|
348
355
|
|
|
349
356
|
ngOnChanges() {
|
|
350
357
|
// console.log('[SIDEBAR-USER-DETAILS] HAS_CLICKED_OPEN_USER_DETAIL', this.HAS_CLICKED_OPEN_USER_DETAIL)
|
|
351
|
-
var element = document.getElementById('user-details');
|
|
352
|
-
// console.log('[SIDEBAR-USER-DETAILS] element', element)
|
|
353
|
-
if (this.HAS_CLICKED_OPEN_USER_DETAIL === true) {
|
|
354
|
-
|
|
355
|
-
}
|
|
358
|
+
// var element = document.getElementById('user-details');
|
|
359
|
+
// // console.log('[SIDEBAR-USER-DETAILS] element', element)
|
|
360
|
+
// if (this.HAS_CLICKED_OPEN_USER_DETAIL === true) {
|
|
361
|
+
// element.classList.add("active");
|
|
362
|
+
// }
|
|
356
363
|
}
|
|
357
364
|
|
|
358
365
|
subcribeToAuthStateChanged() {
|
|
@@ -372,13 +379,13 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
|
|
|
372
379
|
})
|
|
373
380
|
}
|
|
374
381
|
|
|
375
|
-
closeUserDetailSidePanel() {
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
}
|
|
382
|
+
// closeUserDetailSidePanel() {
|
|
383
|
+
// var element = document.getElementById('user-details');
|
|
384
|
+
// element.classList.remove("active");
|
|
385
|
+
// this.logger.log('[SIDEBAR-USER-DETAILS] element', element);
|
|
386
|
+
// this.HAS_CLICKED_OPEN_USER_DETAIL === true
|
|
387
|
+
// // this.onCloseUserDetailsSidebar.emit(false);
|
|
388
|
+
// }
|
|
382
389
|
|
|
383
390
|
|
|
384
391
|
|
|
@@ -34,7 +34,7 @@ import { InfoGroupComponent } from 'src/app/components/conversation-info/info-gr
|
|
|
34
34
|
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
38
|
@NgModule({
|
|
39
39
|
imports: [
|
|
40
40
|
CommonModule,
|
|
@@ -42,6 +42,7 @@ import { NgxLinkifyjsModule } from 'ngx-linkifyjs';
|
|
|
42
42
|
IonicModule,
|
|
43
43
|
TooltipModule,
|
|
44
44
|
ConversationDetailPageRoutingModule,
|
|
45
|
+
ScrollbarThemeModule,
|
|
45
46
|
TranslateModule.forChild({
|
|
46
47
|
loader: {
|
|
47
48
|
provide: TranslateLoader,
|
|
@@ -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
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
[isOpenInfoConversation]="isOpenInfoConversation">
|
|
38
38
|
</app-header-conversation-detail>
|
|
39
39
|
|
|
40
|
-
<ion-content>
|
|
40
|
+
<ion-content id="conv-details">
|
|
41
41
|
<ion-grid class="grid_content">
|
|
42
42
|
<ion-row class="row_content">
|
|
43
43
|
<ion-col id="chatArea" [class.mobile]="isMobile" [class.open]="openInfoConversation">
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
</ng-template>
|
|
92
92
|
|
|
93
93
|
<ng-template #content_messages>
|
|
94
|
-
<ion-content #ionContentChatArea class="ionContentChatArea" (drop)="drop($event)"
|
|
94
|
+
<ion-content #ionContentChatArea appScrollbarTheme class="ionContentChatArea" (drop)="drop($event)"
|
|
95
95
|
(dragover)="allowDrop($event)" (dragleave)="drag($event)" [scrollEvents]="true"
|
|
96
96
|
(ionScrollStart)="logScrollStart($event)" (ionScroll)="logScrolling($event)"
|
|
97
97
|
(ionScrollEnd)="logScrollEnd($event)" [class.active]="showIonContent">
|
|
@@ -972,8 +972,12 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
972
972
|
if (this.conversationWith.startsWith("support-group")) {
|
|
973
973
|
|
|
974
974
|
const pos = message.lastIndexOf("/");
|
|
975
|
-
|
|
975
|
+
this.logger.log("[CONVS-DETAIL] - returnChangeTextArea - canned responses pos of / (using lastIndexOf) ", pos);
|
|
976
976
|
|
|
977
|
+
if (pos === -1) {
|
|
978
|
+
this.tagsCannedFilter = [];
|
|
979
|
+
this.HIDE_CANNED_RESPONSES = true;
|
|
980
|
+
}
|
|
977
981
|
// test
|
|
978
982
|
// var rest = message.substring(0, message.lastIndexOf("/") + 1);
|
|
979
983
|
// var last = message.substring(message.lastIndexOf("/") + 1, message.length);
|
|
@@ -1237,8 +1241,12 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
1237
1241
|
const textArea = elTextArea.getElementsByTagName('ion-textarea')[0];
|
|
1238
1242
|
|
|
1239
1243
|
this.logger.log("[CONVS-DETAIL] hasClickedOpenCannedResponses textArea ", textArea);
|
|
1240
|
-
|
|
1241
|
-
|
|
1244
|
+
// console.log("[CONVS-DETAIL] hasClickedOpenCannedResponses textArea value", textArea.value)
|
|
1245
|
+
var lastChar = textArea.value[textArea.value.length - 1]
|
|
1246
|
+
// console.log('[CONVS-DETAIL] hasClickedOpenCannedResponses lastChar', lastChar)
|
|
1247
|
+
if (lastChar !== '/' ) {
|
|
1248
|
+
this.insertAtCursor(textArea, '/');
|
|
1249
|
+
}
|
|
1242
1250
|
// console.log('[CONVS-DETAIL] hasClickedOpenCannedResponses textArea.value', textArea.value)
|
|
1243
1251
|
// setTimeout(() => {
|
|
1244
1252
|
// // if (textArea.value === '/') {
|
|
@@ -18,7 +18,7 @@ import { ContactsDirectoryPageModule } from '../contacts-directory/contacts-dire
|
|
|
18
18
|
import { ProfileInfoPageModule } from '../profile-info/profile-info.module';
|
|
19
19
|
// import { ConversationDetailPageModule } from '../conversation-detail/conversation-detail.module';
|
|
20
20
|
import { SharedModule } from 'src/app/shared/shared.module';
|
|
21
|
-
|
|
21
|
+
import { ScrollbarThemeModule } from '../../utils/scrollbar-theme.directive';
|
|
22
22
|
@NgModule({
|
|
23
23
|
imports: [
|
|
24
24
|
CommonModule,
|
|
@@ -28,6 +28,7 @@ import { SharedModule } from 'src/app/shared/shared.module';
|
|
|
28
28
|
// ConversationDetailPageModule,
|
|
29
29
|
ContactsDirectoryPageModule,
|
|
30
30
|
ProfileInfoPageModule,
|
|
31
|
+
ScrollbarThemeModule,
|
|
31
32
|
TranslateModule.forChild({
|
|
32
33
|
loader: {
|
|
33
34
|
provide: TranslateLoader,
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
</ion-header>
|
|
16
16
|
|
|
17
17
|
<ion-content id="convs-list" #ioncontentconvlist class="list-avatar-page" appScrollbarTheme>
|
|
18
|
-
|
|
18
|
+
<!-- class="ps" style="position: relative; max-width: 600px; max-height: 100%;" [perfectScrollbar]="config" -->
|
|
19
19
|
<div id="scrollbar2">
|
|
20
20
|
<ion-list>
|
|
21
21
|
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
@import '~perfect-scrollbar/css/perfect-scrollbar.css';
|
|
2
|
+
|
|
1
3
|
ion-header {
|
|
2
4
|
border-bottom-style: solid;
|
|
3
5
|
border-color: var(--light-gray);
|
|
@@ -304,10 +306,16 @@ ion-list {
|
|
|
304
306
|
}
|
|
305
307
|
|
|
306
308
|
.pinned-project {
|
|
307
|
-
|
|
308
309
|
color: #3880ff;
|
|
309
310
|
position: absolute;
|
|
310
311
|
right: 8px;
|
|
311
312
|
top: 2px;
|
|
312
313
|
// font-size: 12px !important;
|
|
313
314
|
}
|
|
315
|
+
|
|
316
|
+
// #convs-list {
|
|
317
|
+
// overflow: hidden;
|
|
318
|
+
// }
|
|
319
|
+
// #convs-list:hover {
|
|
320
|
+
// overflow-y: scroll;
|
|
321
|
+
// }
|
|
@@ -120,13 +120,14 @@ export class ConversationListPage implements OnInit {
|
|
|
120
120
|
this.listenSupportConvIdHasChanged();
|
|
121
121
|
// this.listenDirectConvIdHasChanged();
|
|
122
122
|
this.listenToCloseConvFromHeaderConversation();
|
|
123
|
+
|
|
123
124
|
}
|
|
124
125
|
|
|
125
126
|
|
|
126
127
|
|
|
127
128
|
listenSupportConvIdHasChanged() {
|
|
128
129
|
this.events.subscribe('supportconvid:haschanged', (IDConv) => {
|
|
129
|
-
console.log('[CONVS-LIST-PAGE] - listen To convid:haschanged - convId', IDConv);
|
|
130
|
+
// console.log('[CONVS-LIST-PAGE] - listen To convid:haschanged - convId', IDConv);
|
|
130
131
|
if (IDConv) {
|
|
131
132
|
// const conversationSelected = this.conversations.find(item => item.uid === convId);
|
|
132
133
|
// this.onConversationSelected(conversationSelected)
|
|
@@ -206,6 +207,15 @@ export class ConversationListPage implements OnInit {
|
|
|
206
207
|
// });
|
|
207
208
|
}
|
|
208
209
|
|
|
210
|
+
ngOnChanges() {
|
|
211
|
+
this.getConversationListHeight()
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
getConversationListHeight() {
|
|
215
|
+
var scrollbar2element = document.getElementById('scrollbar2');
|
|
216
|
+
console.log('[CONVS-LIST-PAGE] getConversationListHeight scrollbar2element', scrollbar2element)
|
|
217
|
+
}
|
|
218
|
+
|
|
209
219
|
|
|
210
220
|
getAppConfigToHideDiplayBtns() {
|
|
211
221
|
const appConfig = this.appConfigProvider.getConfig();
|
|
@@ -873,10 +883,10 @@ export class ConversationListPage implements OnInit {
|
|
|
873
883
|
|
|
874
884
|
listenToCloseConvFromHeaderConversation() {
|
|
875
885
|
this.events.subscribe('hasclosedconversation', (convId) => {
|
|
876
|
-
|
|
886
|
+
this.logger.log('[CONVS-LIST-PAGE] hasclosedconversation convId', convId)
|
|
877
887
|
|
|
878
888
|
const conversation = this.conversations.find(conv => conv.uid === convId)
|
|
879
|
-
|
|
889
|
+
this.logger.log('[CONVS-LIST-PAGE] hasclosedconversation conversation', conversation)
|
|
880
890
|
this.onCloseConversation(conversation)
|
|
881
891
|
});
|
|
882
892
|
}
|
|
@@ -898,10 +908,10 @@ export class ConversationListPage implements OnInit {
|
|
|
898
908
|
|
|
899
909
|
const conversationId = conversation.uid;
|
|
900
910
|
|
|
901
|
-
|
|
911
|
+
this.logger.log('[CONVS-LIST-PAGE] onCloseConversation conversationId: ', conversationId)
|
|
902
912
|
|
|
903
913
|
const conversationWith_segments = conversationId.split('-');
|
|
904
|
-
|
|
914
|
+
this.logger.log('[CONVS-LIST-PAGE] - conversationId_segments: ', conversationWith_segments);
|
|
905
915
|
|
|
906
916
|
// Removes the last element of the array if is = to the separator
|
|
907
917
|
if (conversationWith_segments[conversationWith_segments.length - 1] === '') {
|
|
@@ -910,8 +920,8 @@ export class ConversationListPage implements OnInit {
|
|
|
910
920
|
|
|
911
921
|
if (conversationWith_segments.length === 4) {
|
|
912
922
|
const lastArrayElement = conversationWith_segments[conversationWith_segments.length - 1]
|
|
913
|
-
|
|
914
|
-
|
|
923
|
+
this.logger.log('[CONVS-LIST-PAGE] - lastArrayElement ', lastArrayElement);
|
|
924
|
+
this.logger.log('[CONVS-LIST-PAGE] - lastArrayElement length', lastArrayElement.length);
|
|
915
925
|
if (lastArrayElement.length !== 32) {
|
|
916
926
|
conversationWith_segments.pop();
|
|
917
927
|
}
|
|
@@ -937,19 +947,19 @@ export class ConversationListPage implements OnInit {
|
|
|
937
947
|
const tiledeskToken = this.tiledeskAuthService.getTiledeskToken();
|
|
938
948
|
|
|
939
949
|
this.tiledeskService.getProjectIdByConvRecipient(tiledeskToken, conversationId).subscribe(res => {
|
|
940
|
-
|
|
950
|
+
this.logger.log('[INFO-CONTENT-COMP] - GET PROJECTID BY CONV RECIPIENT RES', res);
|
|
941
951
|
|
|
942
952
|
if (res) {
|
|
943
953
|
const project_id = res.id_project
|
|
944
|
-
|
|
954
|
+
this.logger.log('[INFO-CONTENT-COMP] - GET PROJECTID BY CONV RECIPIENT project_id', project_id);
|
|
945
955
|
this.archiveSupportGroupConv(tiledeskToken, project_id, conversationId);
|
|
946
956
|
}
|
|
947
957
|
|
|
948
958
|
}, (error) => {
|
|
949
|
-
|
|
959
|
+
this.logger.error('[INFO-CONTENT-COMP] - GET PROJECTID BY CONV RECIPIENT - ERROR ', error);
|
|
950
960
|
|
|
951
961
|
}, () => {
|
|
952
|
-
|
|
962
|
+
this.logger.log('[INFO-CONTENT-COMP] - GET PROJECTID BY CONV RECIPIENT * COMPLETE *');
|
|
953
963
|
|
|
954
964
|
});
|
|
955
965
|
}
|
|
@@ -4,42 +4,76 @@ import { NgModule, Directive, ElementRef } from '@angular/core';
|
|
|
4
4
|
})
|
|
5
5
|
export class ScrollbarThemeDirective {
|
|
6
6
|
constructor(el: ElementRef) {
|
|
7
|
+
// ::-webkit-scrollbar {
|
|
8
|
+
// width: 6px;
|
|
9
|
+
// height: 8px;
|
|
10
|
+
// }
|
|
11
|
+
// ::-webkit-scrollbar-track {
|
|
12
|
+
// background-color: #f9f9f9;
|
|
13
|
+
// }
|
|
14
|
+
// ::-webkit-scrollbar-thumb {
|
|
15
|
+
// background-color: #b9b9b9;
|
|
16
|
+
// border-radius: 0px;
|
|
17
|
+
// }
|
|
18
|
+
|
|
19
|
+
// ::-webkit-scrollbar-thumb:hover {
|
|
20
|
+
// background-color: #727272;
|
|
21
|
+
// }
|
|
22
|
+
|
|
7
23
|
const stylesheet = `
|
|
8
24
|
::-webkit-scrollbar {
|
|
9
|
-
|
|
25
|
+
width: 6px;
|
|
26
|
+
height: 8px;
|
|
10
27
|
}
|
|
11
28
|
::-webkit-scrollbar-track {
|
|
12
|
-
background: #
|
|
29
|
+
background: #f9f9f9;
|
|
13
30
|
}
|
|
14
31
|
::-webkit-scrollbar-thumb {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
border: 4px solid #020202;
|
|
32
|
+
background-color: #b9b9b9;
|
|
33
|
+
border-radius: 0px;
|
|
18
34
|
}
|
|
19
35
|
::-webkit-scrollbar-thumb:hover {
|
|
36
|
+
background-color: #727272;
|
|
20
37
|
}
|
|
38
|
+
`;
|
|
21
39
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
40
|
+
|
|
41
|
+
// const stylesheet = `
|
|
42
|
+
// ::-webkit-scrollbar {
|
|
43
|
+
// width: 10px;
|
|
44
|
+
// }
|
|
45
|
+
// ::-webkit-scrollbar-track {
|
|
46
|
+
// background: #0f0f0f;
|
|
47
|
+
// }
|
|
48
|
+
// ::-webkit-scrollbar-thumb {
|
|
49
|
+
// border-radius: 1rem;
|
|
50
|
+
// background: linear-gradient(var(--ion-color-light-tint), var(--ion-color-light));
|
|
51
|
+
// border: 4px solid #020202;
|
|
52
|
+
// }
|
|
53
|
+
// ::-webkit-scrollbar-thumb:hover {
|
|
54
|
+
// }
|
|
55
|
+
|
|
56
|
+
// ::-webkit-scrollbar {
|
|
57
|
+
// width: 20px;
|
|
58
|
+
// }
|
|
25
59
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
60
|
+
// /* Track */
|
|
61
|
+
// ::-webkit-scrollbar-track {
|
|
62
|
+
// box-shadow: inset 0 0 5px grey;
|
|
63
|
+
// border-radius: 10px;
|
|
64
|
+
// }
|
|
31
65
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
66
|
+
// /* Handle */
|
|
67
|
+
// ::-webkit-scrollbar-thumb {
|
|
68
|
+
// background: red;
|
|
69
|
+
// border-radius: 10px;
|
|
70
|
+
// }
|
|
37
71
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
`;
|
|
72
|
+
// /* Handle on hover */
|
|
73
|
+
// ::-webkit-scrollbar-thumb:hover {
|
|
74
|
+
// background: #b30000;
|
|
75
|
+
// }
|
|
76
|
+
// `;
|
|
43
77
|
|
|
44
78
|
setTimeout(() => {
|
|
45
79
|
const styleElmt = el.nativeElement.shadowRoot.querySelector('style');
|
|
@@ -50,7 +84,7 @@ export class ScrollbarThemeDirective {
|
|
|
50
84
|
barStyle.append(stylesheet);
|
|
51
85
|
el.nativeElement.shadowRoot.appendChild(barStyle);
|
|
52
86
|
}
|
|
53
|
-
},
|
|
87
|
+
}, 0);
|
|
54
88
|
|
|
55
89
|
}
|
|
56
90
|
}
|
package/src/global.scss
CHANGED
|
@@ -58,7 +58,6 @@ body {
|
|
|
58
58
|
// -webkit-font-smoothing: subpixel-antialiased !important;
|
|
59
59
|
// text-shadow: 0px 0px 0px !important;
|
|
60
60
|
// -webkit-text-stroke-width: 0.01px !important;
|
|
61
|
-
|
|
62
61
|
}
|
|
63
62
|
|
|
64
63
|
// Ionic 'Split Pane' styles need to be tweaked to
|
|
@@ -871,26 +870,16 @@ select:-webkit-autofill:focus {
|
|
|
871
870
|
/* // NK end NEW: AVATAR ON THE SIDEBAR */
|
|
872
871
|
|
|
873
872
|
/* NK start CUSTOM SCROLL BAR */
|
|
874
|
-
|
|
873
|
+
|
|
875
874
|
::-webkit-scrollbar {
|
|
876
|
-
width:
|
|
875
|
+
width: 6px;
|
|
877
876
|
}
|
|
878
|
-
|
|
879
|
-
/* Track */
|
|
880
877
|
::-webkit-scrollbar-track {
|
|
881
|
-
background: #
|
|
878
|
+
background-color: #1c2b45;
|
|
882
879
|
}
|
|
883
|
-
|
|
884
|
-
/* Handle */
|
|
885
880
|
::-webkit-scrollbar-thumb {
|
|
886
|
-
background: #
|
|
887
|
-
|
|
888
|
-
}
|
|
889
|
-
|
|
890
|
-
/* Handle on hover */
|
|
891
|
-
::-webkit-scrollbar-thumb:hover {
|
|
892
|
-
background: #555;
|
|
893
|
-
/* width: 10px !important; */
|
|
881
|
+
background-color: #3c485b;
|
|
882
|
+
border-radius: 3px;
|
|
894
883
|
}
|
|
895
884
|
/* NK end CUSTOM SCROLL BAR */
|
|
896
885
|
|
|
@@ -959,30 +948,6 @@ select:-webkit-autofill:focus {
|
|
|
959
948
|
}
|
|
960
949
|
/* // NK end NEW: AVATAR ON THE SIDEBAR */
|
|
961
950
|
|
|
962
|
-
/* NK start CUSTOM SCROLL BAR */
|
|
963
|
-
/* width */
|
|
964
|
-
::-webkit-scrollbar {
|
|
965
|
-
width: 8px;
|
|
966
|
-
}
|
|
967
|
-
|
|
968
|
-
/* Track */
|
|
969
|
-
::-webkit-scrollbar-track {
|
|
970
|
-
background: #f1f1f1;
|
|
971
|
-
}
|
|
972
|
-
|
|
973
|
-
/* Handle */
|
|
974
|
-
::-webkit-scrollbar-thumb {
|
|
975
|
-
background: #888;
|
|
976
|
-
/* border-radius: 6px; */
|
|
977
|
-
}
|
|
978
|
-
|
|
979
|
-
/* Handle on hover */
|
|
980
|
-
::-webkit-scrollbar-thumb:hover {
|
|
981
|
-
background: #555;
|
|
982
|
-
/* width: 10px !important; */
|
|
983
|
-
}
|
|
984
|
-
/* NK end CUSTOM SCROLL BAR */
|
|
985
|
-
|
|
986
951
|
/* SIDEBAR NAV ITEMS */
|
|
987
952
|
|
|
988
953
|
.item-active a {
|