@chat21/chat21-ionic 3.0.61-rc14 → 3.0.61-rc18

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,16 @@
1
1
  # chat21-ionic ver 3.0
2
2
 
3
+ ### 3.0.61-rc18
4
+ - Fix bugs: in the teammate settings drawer the logout button area is too large
5
+ - Fixed the bug: in the detail of the conversation the button messages are not aligned with the other messages
6
+
7
+ ### 3.0.61-rc16
8
+ - Does not allow teammates with agent role to access the "settings sidebar"
9
+
10
+ ### 3.0.61-rc15
11
+ - Increase the size of the emoji and remove the background color when it is sent or received without text
12
+ - Adds the ability to open sidebar menu items in a new tab by combining left mouse button + CMD keyboard key
13
+
3
14
  ### 3.0.61-rc14
4
15
  - Fixes the bug: the page to which the sidebar Settings menu item redirects is not correct for team members with agent role
5
16
  - Fixes the bug: right clicking on the sidebar menu items doesn't show the context menu
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chat21/chat21-ionic",
3
- "version": "3.0.61-rc14",
3
+ "version": "3.0.61-rc18",
4
4
  "author": "Tiledesk SRL",
5
5
  "homepage": "https://tiledesk.com/",
6
6
  "scripts": {
@@ -58,20 +58,19 @@
58
58
 
59
59
  <ng-container *ngIf="first || (messages[i - 1].timestamp | date:'d') !== (message.timestamp | date:'d')">
60
60
  <div class="long-date-divider-wpr">
61
- <div class="long-date-divider-border-b"></div>
62
- <div class="long-date-divider">
63
- <!-- {{message.timestamp | date: 'longDate' : 'it'}} -->
64
- {{message.timestamp | amDateFormat:'LL'}}
65
-
66
- </div>
67
- <div class="long-date-divider-border-b"></div>
61
+ <div class="long-date-divider-border-b"></div>
62
+ <div class="long-date-divider">
63
+ <!-- {{message.timestamp | date: 'longDate' : 'it'}} -->
64
+ {{message.timestamp | amDateFormat:'LL'}}
65
+
66
+ </div>
67
+ <div class="long-date-divider-border-b"></div>
68
68
  </div>
69
- </ng-container>
69
+ </ng-container>
70
70
 
71
71
  <div class="align-center" class="ion-text-center" *ngIf="messageType(MESSAGE_TYPE_INFO, message)"
72
72
  class="msg_info_container">
73
- <chat-info-message class="messages"
74
- [message]="message">
73
+ <chat-info-message class="messages" [message]="message">
75
74
  </chat-info-message>
76
75
  </div>
77
76
 
@@ -79,16 +78,15 @@
79
78
  <div role="messaggio" *ngIf="messageType(MESSAGE_TYPE_MINE, message)" class="msg_container base_sent">
80
79
 
81
80
  <!--backgroundColor non viene ancora usato -->
82
- <chat-bubble-message style="position: relative;" [ngClass]="{'has-metadata': (isImage(message) || isFrame(message))}"
83
- class="messages msg_sent" id="message_msg_sent"
84
- [ngClass]="{'button-in-msg' : message.metadata && message.metadata.button}" [message]="message"
85
- [textColor]="'col-msg-sent'"
86
- (onBeforeMessageRender)="returnOnBeforeMessageRender($event)"
87
- (onAfterMessageRender)="returnOnAfterMessageRender($event)"
88
- (onImageRendered)="onImageRenderedFN($event)"
89
- [addAsCannedResponseTooltipText]="addAsCannedResponseTooltipText"
90
- [areVisibleCAR]="areVisibleCAR"
91
- [support_mode]="support_mode">
81
+
82
+ <chat-bubble-message style="position: relative;"
83
+ [ngClass]="{'has-metadata': (isImage(message) || isFrame(message))}" class="messages msg_sent"
84
+ id="message_msg_sent" [ngClass]="{'button-in-msg' : message.metadata && message.metadata.button}"
85
+ [message]="message" [textColor]="'col-msg-sent'" (onBeforeMessageRender)="returnOnBeforeMessageRender($event)"
86
+ (onAfterMessageRender)="returnOnAfterMessageRender($event)" (onImageRendered)="onImageRenderedFN($event)"
87
+ [addAsCannedResponseTooltipText]="addAsCannedResponseTooltipText" [areVisibleCAR]="areVisibleCAR"
88
+ [support_mode]="support_mode"
89
+ [class.emoticon]="message?.emoticon">
92
90
  </chat-bubble-message>
93
91
 
94
92
  <!-- icon status message -->
@@ -113,35 +111,30 @@
113
111
  </chat-avatar-image> -->
114
112
 
115
113
  <!--backgroundColor non viene ancora usato -->
116
-
117
- <chat-bubble-message style="position: relative;" [ngClass]="{'has-metadata': (isImage(message) || isFrame(message))}" class="messages msg_receive" id="message_msg_receive"
118
- [message]="message"
119
- [textColor]="'black'"
114
+
115
+ <chat-bubble-message style="position: relative;"
116
+ [ngClass]="{'has-metadata': (isImage(message) || isFrame(message))}" class="messages msg_receive"
117
+ id="message_msg_receive" [message]="message" [textColor]="'black'"
120
118
  (onBeforeMessageRender)="returnOnBeforeMessageRender($event)"
121
- (onAfterMessageRender)="returnOnAfterMessageRender($event)"
122
- (onImageRendered)="onImageRenderedFN($event)"
123
- [addAsCannedResponseTooltipText]="addAsCannedResponseTooltipText"
124
- [areVisibleCAR]="areVisibleCAR"
125
- [support_mode]="support_mode" >
119
+ (onAfterMessageRender)="returnOnAfterMessageRender($event)" (onImageRendered)="onImageRenderedFN($event)"
120
+ [addAsCannedResponseTooltipText]="addAsCannedResponseTooltipText" [areVisibleCAR]="areVisibleCAR"
121
+ [support_mode]="support_mode"
122
+ [class.emoticon]="message?.emoticon">
126
123
  </chat-bubble-message>
127
124
  </div>
128
125
 
129
126
  <!-- message type:: button && -->
130
- <div *ngIf="message?.attributes && message?.attributes?.attachment " class="slide-in-left" >
131
- <chat-message-attachment
132
- style="height: 100%; display: block;"
133
- [message]="message"
134
- [isLastMessage] = "isLastMessage(message?.uid)"
135
- [stylesMap]="stylesMap"
136
- (onAttachmentButtonClicked)="returnOnAttachmentButtonClicked($event)">
127
+ <div *ngIf="message?.attributes && message?.attributes?.attachment " class="slide-in-left">
128
+ <chat-message-attachment style="height: 100%; display: block;" [message]="message"
129
+ [isLastMessage]="isLastMessage(message?.uid)" [stylesMap]="stylesMap"
130
+ (onAttachmentButtonClicked)="returnOnAttachmentButtonClicked($event)">
137
131
  </chat-message-attachment>
138
132
  </div>
139
133
  </div>
140
134
  <!-- (fileType === 'file' && uploadProgress !== 100) -->
141
135
 
142
136
  <!-- uploadProgress -> {{ uploadProgress }} -->
143
- <div *ngIf="uploadProgress !== 100" class="msg_container base_sent"
144
- style="margin-right: 20px;">
137
+ <div *ngIf="uploadProgress !== 100" class="msg_container base_sent" style="margin-right: 20px;">
145
138
  <div class="messages msg_sent">
146
139
  <div class="spinner">
147
140
  <div class="bounce1"></div>
@@ -91,10 +91,12 @@ ion-item {
91
91
  border-top-right-radius: 8px;
92
92
  border-bottom-right-radius: 0px;
93
93
  }
94
- // .msg_sent:hover {
95
- // background-color: rgba(0, 153, 255, 0.6);
96
- // }
97
-
94
+ .emoticon {
95
+ background: unset !important;
96
+ font-size: 4em;
97
+ padding-bottom: 21px;
98
+ padding-top: 30px;
99
+ }
98
100
  .has-metadata {
99
101
  max-width: 100% !important;
100
102
  }
@@ -144,9 +146,10 @@ ion-item {
144
146
  border-bottom-left-radius: 0px;
145
147
  }
146
148
 
147
- // .msg_receive:hover {
148
- // background-color: rgba(247, 247, 247, 0.6);
149
- // }
149
+ .emoticon {
150
+ background: unset !important;
151
+ font-size: 4em;
152
+ }
150
153
 
151
154
  .has-metadata {
152
155
  max-width: 100% !important;
@@ -290,3 +293,17 @@ ion-item {
290
293
  font-size: 10px;
291
294
  left: 0px;
292
295
  }
296
+ // ---------------------------------------------------------
297
+ // emoticon
298
+ // ---------------------------------------------------------
299
+
300
+ :host .base_sent .msg_sent ::ng-deep div > div > div > .chat-text-emoticon > p > p {
301
+ margin-bottom: 6px !important;
302
+ margin-right: -7px !important;
303
+ }
304
+
305
+ :host .base_receive .msg_receive ::ng-deep div > div > div > .chat-text-emoticon > p > p {
306
+ margin-bottom: 41px !important;
307
+ margin-left: -8px !important;
308
+ margin-top: 49px !important;
309
+ }
@@ -43,6 +43,7 @@
43
43
  </ng-template> -->
44
44
 
45
45
  <chat-text [text]="message?.text" [color]="textColor" [message]="message"
46
+ [class.chat-text-emoticon]="message?.emoticon"
46
47
  (onBeforeMessageRender)="returnOnBeforeMessageRender($event)"
47
48
  (onAfterMessageRender)="returnOnAfterMessageRender($event)">
48
49
  </chat-text>
@@ -21,7 +21,6 @@
21
21
  font-variant: normal;
22
22
  font-weight: 300;
23
23
  overflow: hidden;
24
-
25
24
  }
26
25
  img {
27
26
  border-radius: 8px;
@@ -32,30 +31,33 @@
32
31
  height: auto;
33
32
  object-fit: cover;
34
33
  }
34
+
35
35
  .message_innerhtml {
36
36
  margin: 0px;
37
37
  // padding: 0px 14px;
38
- &.marked{
39
- padding:8px;
40
- margin-block-start: -1em!important;
41
- margin-block-end: -1em!important;
38
+ &.marked {
39
+ padding: 8px;
40
+ margin-block-start: -1em !important;
41
+ margin-block-end: -1em !important;
42
42
  }
43
-
43
+
44
44
  .text-message {
45
45
  padding-top: 14px;
46
46
  }
47
47
  }
48
-
49
48
  }
50
49
  // > .button-native
51
- .btn-add-msg-as-canned-response {
50
+ .btn-add-msg-as-canned-response {
52
51
  // padding-left: 5px ;
53
52
  // padding-right: 5px ;
54
53
  border-radius: 50%;
55
- --padding-end: 7px ;
56
- --padding-start: 7px ;
57
- box-shadow: 0 1px 2px 0 rgb(0 0 0 / 6%)
58
-
54
+ --padding-end: 7px;
55
+ --padding-start: 7px;
56
+ box-shadow: 0 1px 2px 0 rgb(0 0 0 / 6%);
59
57
  }
60
58
 
59
+ // .emoticon {
60
+ // padding: 35px 0px !important;
61
+ // }
62
+
61
63
 
@@ -4,7 +4,7 @@
4
4
  margin-top: -6px;
5
5
  margin-bottom: 5px;
6
6
  height: auto;
7
-
7
+ padding-left: 8px;
8
8
 
9
9
  .div-button {
10
10
  display: inline-block;
@@ -71,10 +71,10 @@
71
71
  </li>
72
72
 
73
73
  <!-- ------------------------------------------- -->
74
- <!-- HOME target="_self" href="{{ dashboard_home_url }}" -->
74
+ <!-- HOME (click)="goToHome()"" -->
75
75
  <!-- ------------------------------------------- -->
76
-
77
- <li (click)="goToHome()" matTooltip="Home" #tooltip="matTooltip" matTooltipPosition='right'
76
+
77
+ <li matTooltip="Home" #tooltip="matTooltip" matTooltipPosition='right'
78
78
  matTooltipHideDelay="100" matTooltipClass="custom-mat-tooltip">
79
79
  <a target="_self" href="{{ dashboard_home_url }}" class="customAncor">
80
80
  <i class="material-icons sidebar-icons">
@@ -85,10 +85,10 @@
85
85
 
86
86
 
87
87
  <!-- ---------------------------------- -->
88
- <!-- Bot -->
88
+ <!-- Bot (click)="goToBots()" -->
89
89
  <!-- ---------------------------------- -->
90
90
  <ng-container *ngIf="USER_ROLE !== 'agent'">
91
- <li (click)="goToBots()" id="bot-anchor-wpr" matTooltipClass="custom-mat-tooltip" matTooltip="Bots"
91
+ <li id="bot-anchor-wpr" matTooltipClass="custom-mat-tooltip" matTooltip="Bots"
92
92
  #tooltip="matTooltip" matTooltipPosition='right' matTooltipHideDelay="100" style="text-align: center;">
93
93
  <a target="_self" href="{{ dashboard_bots_url }}" id="bot-anchor" #botbtn class="customAncor" style="height: 40px;margin-right: 0px !important;">
94
94
  <span class="bot-icon-wpr">
@@ -115,10 +115,10 @@
115
115
  </ng-container>
116
116
 
117
117
  <!-- ------------------------------------------- -->
118
- <!-- Conversations (VISITORS) {{ conversations_lbl }} -->
118
+ <!-- Conversations (MONITOR) (click)="goToConversations()" -->
119
119
  <!-- ------------------------------------------- -->
120
120
  <ng-container *ngIf="USER_ROLE !== 'agent'">
121
- <li (click)="goToConversations()" matTooltipClass="custom-mat-tooltip" matTooltip="Monitor"
121
+ <li matTooltipClass="custom-mat-tooltip" matTooltip="Monitor"
122
122
  #tooltip="matTooltip" matTooltipPosition='right' matTooltipHideDelay="100" style="text-align: center;">
123
123
  <a target="_self" href="{{ dashboard_convs_url }}" class="customAncor" style="height: 40px;margin-right: 0px !important;">
124
124
  <!-- <i class="material-icons sidebar-icons">forum</i> -->
@@ -137,9 +137,9 @@
137
137
  </ng-container>
138
138
 
139
139
  <!-- ------------------------------------------- -->
140
- <!-- CONTACTS (LEADS) -->
140
+ <!-- CONTACTS (LEADS) (click)="goToContacts()" -->
141
141
  <!-- ------------------------------------------- -->
142
- <li (click)="goToContacts()" matTooltipClass="custom-mat-tooltip" matTooltip="{{ contacts_lbl }}"
142
+ <li matTooltipClass="custom-mat-tooltip" matTooltip="{{ contacts_lbl }}"
143
143
  #tooltip="matTooltip" matTooltipPosition='right' matTooltipHideDelay="100" style="text-align: center;">
144
144
  <a target="_self" href="{{ dashboard_contacts_url }}" class="customAncor">
145
145
  <i class="material-icons sidebar-icons">contacts</i>
@@ -147,10 +147,10 @@
147
147
  </li>
148
148
 
149
149
  <!-- ------------------------------------------- -->
150
- <!-- APPS -->
150
+ <!-- APPS (click)="goToAppStore()" -->
151
151
  <!-- ------------------------------------------- -->
152
152
  <ng-container *ngIf="isVisibleAPP && USER_ROLE !== 'agent'">
153
- <li (click)="goToAppStore()" matTooltipClass="custom-mat-tooltip" matTooltip="{{ apps_lbl }}"
153
+ <li matTooltipClass="custom-mat-tooltip" matTooltip="{{ apps_lbl }}"
154
154
  #tooltip="matTooltip" matTooltipPosition='right' matTooltipHideDelay="100" style="text-align: center;">
155
155
  <a target="_self" href="{{ dashboard_app_url }}" class="customAncor" style="margin-right: 0px !important;">
156
156
  <!-- <i class="material-icons sidebar-icons">apps</i> -->
@@ -167,11 +167,11 @@
167
167
  </ng-container>
168
168
 
169
169
  <!-- ------------------------------------------- -->
170
- <!-- ANALYTICS -->
170
+ <!-- ANALYTICS (click)="goToAnalytics()" -->
171
171
  <!-- ------------------------------------------- -->
172
172
  <ng-container *ngIf="isVisibleANA && USER_ROLE !== 'agent'">
173
- <li (click)="goToAnalytics()" matTooltipClass="custom-mat-tooltip" matTooltip="{{ analytics_lbl }}"
174
- #tooltip="matTooltip" matTooltipPosition='right' matTooltipHideDelay="100" style="text-align: center;">
173
+ <li matTooltipClass="custom-mat-tooltip" matTooltip="{{ analytics_lbl }}"
174
+ #tooltip="matTooltip" matTooltipPosition='right' matTooltipHideDelay="100" style="text-align: center;" >
175
175
  <a target="_self" href="{{ dashboard_analytics_url }}" class="customAncor" style="margin-right: 0px !important;">
176
176
  <!-- <i class="material-icons sidebar-icons">trending_up</i> -->
177
177
  <!-- <i class="material-icons sidebar-icons"> analytics </i> -->
@@ -188,10 +188,10 @@
188
188
  </ng-container>
189
189
 
190
190
  <!-- ------------------------------------------- -->
191
- <!-- ACTIVITIES -->
191
+ <!-- ACTIVITIES (click)="goToActivities()" -->
192
192
  <!-- ------------------------------------------- -->
193
193
  <ng-container *ngIf="isVisibleACT">
194
- <li *ngIf="USER_ROLE !== 'agent'" (click)="goToActivities()" matTooltipClass="custom-mat-tooltip"
194
+ <li *ngIf="USER_ROLE !== 'agent'" matTooltipClass="custom-mat-tooltip"
195
195
  matTooltip="{{ activities_lbl }}" #tooltip="matTooltip" matTooltipPosition='right' matTooltipHideDelay="100" style="text-align: center;">
196
196
  <a target="_self" href="{{ dashboard_activities_url }}" class="customAncor">
197
197
  <i class="material-icons sidebar-icons">assignment</i>
@@ -201,9 +201,9 @@
201
201
 
202
202
 
203
203
  <!-- ------------------------------------------- -->
204
- <!-- REQUESTS HISTORY -->
204
+ <!-- REQUESTS HISTORY (click)="goToHistory()" -->
205
205
  <!-- ------------------------------------------- -->
206
- <li (click)="goToHistory()" matTooltipClass="custom-mat-tooltip" matTooltip="{{ history_lbl }}"
206
+ <li matTooltipClass="custom-mat-tooltip" matTooltip="{{ history_lbl }}"
207
207
  #tooltip="matTooltip" matTooltipPosition='right' matTooltipHideDelay="100" style="text-align: center;">
208
208
  <a target="_self" href="{{ dashboard_history_url }}" class="customAncor">
209
209
  <i class="material-icons sidebar-icons">history</i>
@@ -211,9 +211,9 @@
211
211
  </li>
212
212
 
213
213
  <!-- ----------------------------------------------------------------------------------- -->
214
- <!-- SETTINGS // old: goToSettings_CannedResponses() *ngIf="USER_ROLE !== 'agent'" -->
214
+ <!-- SETTINGS // old: goToSettings_CannedResponses() *ngIf="USER_ROLE !== 'agent'" (click)="goToWidgetSetUpOrToCannedResponses()" -->
215
215
  <!-- ----------------------------------------------------------------------------------- -->
216
- <li (click)="goToWidgetSetUpOrToCannedResponses()" matTooltipClass="custom-mat-tooltip"
216
+ <li *ngIf="USER_ROLE !== 'agent'" matTooltipClass="custom-mat-tooltip"
217
217
  matTooltip="{{ settings_lbl }}" #tooltip="matTooltip" matTooltipPosition='right' matTooltipHideDelay="100" style="text-align: center;">
218
218
  <a target="_self" href="{{ dashboard_settings_url }}" class="customAncor">
219
219
  <i class="material-icons sidebar-icons">settings</i>
@@ -21,11 +21,11 @@
21
21
 
22
22
  <!-- (click)="goToUserProfile()" -->
23
23
  <div role="button" class="user-details-avatar">
24
- <img *ngIf="USER_PHOTO_PROFILE_EXIST" class="user-img-in-sidebar-user-details" [src]="photo_profile_URL"
24
+ <img *ngIf="USER_PHOTO_PROFILE_EXIST" class="user-img-in-sidebar-user-details" [src]="photo_profile_URL"
25
25
  onerror="this.src='assets/images/no_image_user.png'" />
26
26
 
27
- <div *ngIf="!USER_PHOTO_PROFILE_EXIST" class="user-img-in-sidebar-user-details"
28
- [ngStyle]="{'background': 'linear-gradient(rgb(255,255,255) -125%,' + user?.fillColour + ')'}">
27
+ <div *ngIf="!USER_PHOTO_PROFILE_EXIST" class="user-img-in-sidebar-user-details"
28
+ [ngStyle]="{'background': 'linear-gradient(rgb(255,255,255) -125%,' + user?.fillColour + ')'}">
29
29
  <span id="sidebaravatar-altenative-user-avatar" class="sidebar-user-details-altenative-user-avatar">
30
30
  {{ user?.fullname_initial }}
31
31
  </span>
@@ -76,7 +76,7 @@
76
76
  <section *ngIf="isVisiblePAY" class="user-details-plan-info">
77
77
  <span>
78
78
  <div> {{prjct_name}} </div>
79
- <div style="display: inline-block;"> {{ profile_name_translated }} </div>
79
+ <div style="display: inline-block;"> {{ profile_name_translated }} </div>
80
80
 
81
81
  <div *ngIf="plan_type === 'payment' && plan_subscription_is_active === false"
82
82
  style="color:#f44336; position:relative; top: -1px;;display: inline-block;">
@@ -99,18 +99,22 @@
99
99
  border-top: 1px solid rgba(255, 255,255, 0.2);"> -->
100
100
 
101
101
 
102
- <section class="user-details-footer-section" (click)=onLogout()
102
+ <section class="user-details-footer-section"
103
103
  [ngClass]="{'footer-margin-top-pricing-no-visible': isVisiblePAY === false }">
104
- <i class="material-icons user-details-logout-icon">
105
- logout
106
- </i>
107
- <div> Logout</div>
104
+ <div role="button" class="logout-btn-wpr" (click)=onLogout()>
105
+ <i class="material-icons user-details-logout-icon" >
106
+ logout
107
+ </i>
108
+ <div class="user-details-logout-text">
109
+ {{LOGOUT_msg}}
110
+ </div>
111
+ </div>
108
112
  </section>
109
113
 
110
114
  <section class="user-details-footer-chat-version">
111
- <div class="chat-version">
112
- <!-- &copy; {{test | date: 'yyyy'}} {{company_name}} ver {{version}} -->
113
- ver {{version}}
115
+ <div class="chat-version">
116
+ <!-- &copy; {{test | date: 'yyyy'}} {{company_name}} ver {{version}} -->
117
+ ver {{version}}
114
118
  </div>
115
119
  </section>
116
120
 
@@ -253,7 +253,7 @@ button.user-details-btn-close {
253
253
  margin: auto;
254
254
  position: absolute;
255
255
  text-align: center;
256
- cursor: pointer;
256
+
257
257
  padding-bottom: 15px;
258
258
  padding-top: 200px;
259
259
  font-size: 16px;
@@ -262,13 +262,17 @@ button.user-details-btn-close {
262
262
  // top:355px
263
263
  }
264
264
 
265
+ .logout-btn-wpr {
266
+ cursor: pointer;
267
+ }
268
+
265
269
  .footer-margin-top-pricing-no-visible {
266
270
  padding-top: 240px;
267
271
  }
268
272
  .user-details-logout-icon {
269
273
  color: #a9afbb;
270
274
  font-size: 30px;
271
- margin-top: 30px;
275
+ // margin-top: 30px;
272
276
  }
273
277
 
274
278
  .user-details-logout-icon:hover {
@@ -41,6 +41,7 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
41
41
  PAYD_PLAN_NAME_ENTERPRISE_msg: string;
42
42
  PRO_PLAN_TRIAL_msg: string;
43
43
  FREE_PLAN_msg: string;
44
+ LOGOUT_msg: string;
44
45
  profile_name_translated: string;
45
46
  SubscriptionPaymentProblem: string;
46
47
  user: any
@@ -222,6 +223,7 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
222
223
  this.getIsBusyTranslation();
223
224
  this.getSubscriptionPaymentProblemTranslation();
224
225
  this.getThePlanHasExpiredTranslation();
226
+ this.getLogoutTranslation();
225
227
  }
226
228
 
227
229
 
@@ -280,6 +282,15 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
280
282
  });
281
283
  }
282
284
 
285
+ getLogoutTranslation() {
286
+ this.translate.get('LABEL_LOGOUT')
287
+ .subscribe((text: string) => {
288
+ // this.deleteContact_msg = text;
289
+ // console.log('[SIDEBAR-USER-DETAILS] - GET Logout label ', text)
290
+ this.LOGOUT_msg = text
291
+ });
292
+ }
293
+
283
294
  getSubscriptionPaymentProblemTranslation() {
284
295
  this.translate.get('SubscriptionPaymentProblem')
285
296
  .subscribe((text: string) => {
@@ -392,6 +403,7 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
392
403
  });
393
404
  }
394
405
 
406
+
395
407
 
396
408
 
397
409
  listenTocurrentProjectUserUserAvailability$() {
@@ -78,7 +78,7 @@
78
78
  "LABEL_ERROR_EMAIL": "Introduzca una dirección de correo electrónico válida.",
79
79
  "LABEL_ERROR_PASSWORD": "La contraseña debe tener al menos 6 caracteres.",
80
80
  "LABEL_LOGIN": "Ingresar",
81
- "LABEL_LOGOUT": "Cerrar sesión",
81
+ "LABEL_LOGOUT": "Finalizar la sesión",
82
82
  "LABEL_WELCOME_TO": "Bienvenido a",
83
83
  "LABEL_SIGNUP": "Regístrate",
84
84
  "LABEL_ALREDY_HAVE_AN_ACCOUNT": "¿Ya tienes una cuenta?",
@@ -78,7 +78,7 @@
78
78
  "LABEL_ERROR_EMAIL": "Entrez une adresse mail valide.",
79
79
  "LABEL_ERROR_PASSWORD": "Le mot de passe doit comporter au moins 6 caractères.",
80
80
  "LABEL_LOGIN": "Connexion",
81
- "LABEL_LOGOUT": "Se déconnecter",
81
+ "LABEL_LOGOUT": "Déconnexion",
82
82
  "LABEL_WELCOME_TO": "Bienvenue à",
83
83
  "LABEL_SIGNUP": "S'inscrire",
84
84
  "LABEL_ALREDY_HAVE_AN_ACCOUNT": "Vous avez déjà un compte?",
@@ -78,7 +78,7 @@
78
78
  "LABEL_ERROR_EMAIL": "Inserisci un indirizzo email valido.",
79
79
  "LABEL_ERROR_PASSWORD": "La password deve essere di almeno 6 caratteri.",
80
80
  "LABEL_LOGIN": "Login",
81
- "LABEL_LOGOUT": "Logout",
81
+ "LABEL_LOGOUT": "Disconnettersi",
82
82
  "LABEL_WELCOME_TO": "Benvenuto in",
83
83
  "LABEL_SIGNUP": "Registrati",
84
84
  "LABEL_ALREDY_HAVE_AN_ACCOUNT": "Hai già un account?",
@@ -78,7 +78,7 @@
78
78
  "LABEL_ERROR_EMAIL": "Digite um endereço de e-mail válido.",
79
79
  "LABEL_ERROR_PASSWORD": "A senha deve ter pelo menos 6 caracteres.",
80
80
  "LABEL_LOGIN": "Conecte-se",
81
- "LABEL_LOGOUT": "Sair",
81
+ "LABEL_LOGOUT": "Deslogar",
82
82
  "LABEL_WELCOME_TO": "Bem-vindo ao",
83
83
  "LABEL_SIGNUP": "Inscrever-se",
84
84
  "LABEL_ALREDY_HAVE_AN_ACCOUNT": "Já tem uma conta?",
@@ -78,7 +78,7 @@
78
78
  "LABEL_ERROR_EMAIL": "Введите действительный адрес электронной почты.",
79
79
  "LABEL_ERROR_PASSWORD": "Пароль должен быть не менее 6 символов.",
80
80
  "LABEL_LOGIN": "Авторизоваться",
81
- "LABEL_LOGOUT": "Выйти",
81
+ "LABEL_LOGOUT": "Выйти из системы",
82
82
  "LABEL_WELCOME_TO": "Добро пожаловать в",
83
83
  "LABEL_SIGNUP": "Зарегистрироваться",
84
84
  "LABEL_ALREDY_HAVE_AN_ACCOUNT": "У вас уже есть аккаунт?",
@@ -78,7 +78,7 @@
78
78
  "LABEL_ERROR_EMAIL": "Унесите исправну е-маил адресу.",
79
79
  "LABEL_ERROR_PASSWORD": "Лозинка мора имати најмање 6 знакова.",
80
80
  "LABEL_LOGIN": "Пријавите се",
81
- "LABEL_LOGOUT": "Одјавити се",
81
+ "LABEL_LOGOUT": "Одјава",
82
82
  "LABEL_WELCOME_TO": "Добродошли у",
83
83
  "LABEL_SIGNUP": "Пријави се",
84
84
  "LABEL_ALREDY_HAVE_AN_ACCOUNT": "Већ имате налог?",
@@ -18,11 +18,11 @@ import { ConversationHandlerService } from '../abstract/conversation-handler.ser
18
18
  import { LoggerService } from '../abstract/logger.service';
19
19
  import { LoggerInstance } from '../logger/loggerInstance';
20
20
  // utils
21
- import { MSG_STATUS_RECEIVED, CHAT_REOPENED, CHAT_CLOSED, MEMBER_JOINED_GROUP, TYPE_DIRECT, MESSAGE_TYPE_INFO , TOUCHING_OPERATOR} from '../../utils/constants';
21
+ import { MSG_STATUS_RECEIVED, CHAT_REOPENED, CHAT_CLOSED, MEMBER_JOINED_GROUP, TYPE_DIRECT, MESSAGE_TYPE_INFO, TOUCHING_OPERATOR } from '../../utils/constants';
22
22
  import { compareValues, searchIndexInArrayForUid, conversationMessagesRef } from '../../utils/utils';
23
23
 
24
24
 
25
- import { messageType } from 'src/chat21-core/utils/utils-message';
25
+ import { messageType, isEmojii } from 'src/chat21-core/utils/utils-message';
26
26
 
27
27
 
28
28
 
@@ -156,7 +156,8 @@ export class FirebaseConversationHandler extends ConversationHandlerService {
156
156
  typeMsg,
157
157
  attributes,
158
158
  channelType,
159
- false
159
+ false,
160
+ isEmojii(msg)
160
161
  );
161
162
  const messageRef = firebaseMessagesCustomUid.push({
162
163
  language: lang,
@@ -288,6 +289,10 @@ export class FirebaseConversationHandler extends ConversationHandlerService {
288
289
 
289
290
  // verifico che il sender è il logged user
290
291
  msg.isSender = this.isSender(msg.sender, this.loggedUser.uid);
292
+
293
+ //check if message contains only an emojii
294
+ msg.emoticon = isEmojii(msg.text)
295
+
291
296
  // traduco messaggi se sono del server
292
297
  if (msg.attributes && msg.attributes.subtype) {
293
298
  if (msg.attributes.subtype === 'info' || msg.attributes.subtype === 'info/support') {
@@ -85,6 +85,25 @@ export function messageType(msgType: string, message: any) {
85
85
  }
86
86
  }
87
87
 
88
+ export function isEmojii(message: any){
89
+ if (message.length > 2) {
90
+ return false;
91
+ }
92
+ let fistChar = '';
93
+ try {
94
+ fistChar = message.trim(); // .charAt(0);
95
+ } catch (e) {
96
+ return false;
97
+ }
98
+
99
+ const ranges = ['(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff]|[\u0023-\u0039]\ufe0f?\u20e3|\u3299|\u3297|\u303d|\u3030|\u24c2|\ud83c[\udd70-\udd71]|\ud83c[\udd7e-\udd7f]|\ud83c\udd8e|\ud83c[\udd91-\udd9a]|\ud83c[\udde6-\uddff]|[\ud83c[\ude01-\ude02]|\ud83c\ude1a|\ud83c\ude2f|[\ud83c[\ude32-\ude3a]|[\ud83c[\ude50-\ude51]|\u203c|\u2049|[\u25aa-\u25ab]|\u25b6|\u25c0|[\u25fb-\u25fe]|\u00a9|\u00ae|\u2122|\u2139|\ud83c\udc04|[\u2600-\u26FF]|\u2b05|\u2b06|\u2b07|\u2b1b|\u2b1c|\u2b50|\u2b55|\u231a|\u231b|\u2328|\u23cf|[\u23e9-\u23f3]|[\u23f8-\u23fa]|\ud83c\udccf|\u2934|\u2935|[\u2190-\u21ff])'];
100
+ if (fistChar.match(ranges.join('|'))) {
101
+ return true;
102
+ } else {
103
+ return false;
104
+ }
105
+ }
106
+
88
107
  /** */
89
108
  export function getSizeImg(message: any, maxWidthImage?: number): any {
90
109
  try {