@chat21/chat21-ionic 3.0.78-rc.2 → 3.0.78-rc.4
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 +13 -0
- package/package.json +1 -1
- package/src/app/app.component.scss +1 -0
- package/src/app/app.component.ts +2 -7
- package/src/app/chatlib/conversation-detail/conversation-content/conversation-content.component.ts +8 -1
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.html +25 -10
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.scss +62 -39
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.html +1 -1
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.ts +3 -1
- package/src/app/chatlib/conversation-detail/message/buttons/action-button/action-button.component.html +5 -1
- package/src/app/chatlib/conversation-detail/message/buttons/action-button/action-button.component.scss +22 -15
- package/src/app/chatlib/conversation-detail/message/buttons/action-button/action-button.component.ts +25 -5
- package/src/app/chatlib/conversation-detail/message/buttons/link-button/link-button.component.html +2 -1
- package/src/app/chatlib/conversation-detail/message/buttons/link-button/link-button.component.scss +14 -15
- package/src/app/chatlib/conversation-detail/message/buttons/link-button/link-button.component.ts +24 -5
- package/src/app/chatlib/conversation-detail/message/buttons/text-button/text-button.component.html +6 -1
- package/src/app/chatlib/conversation-detail/message/buttons/text-button/text-button.component.scss +12 -13
- package/src/app/chatlib/conversation-detail/message/buttons/text-button/text-button.component.ts +26 -5
- package/src/app/chatlib/conversation-detail/message/message-attachment/message-attachment.component.html +16 -6
- package/src/app/chatlib/conversation-detail/message/message-attachment/message-attachment.component.ts +2 -0
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.html +18 -20
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.scss +3 -3
- package/src/app/components/canned-response/canned-response.component.html +4 -4
- package/src/app/components/canned-response/canned-response.component.scss +1 -1
- package/src/app/components/canned-response/canned-response.component.ts +1 -0
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.html +4 -13
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.scss +5 -2
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.ts +3 -5
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.scss +4 -4
- package/src/app/components/ddp-header/ddp-header.component.html +1 -1
- package/src/app/components/ddp-header/ddp-header.component.scss +4 -0
- package/src/app/components/project-item/project-item.component.html +1 -1
- package/src/app/components/project-item/project-item.component.ts +2 -1
- package/src/app/components/utils/user-presence/user-presence.component.html +1 -1
- package/src/app/pages/conversation-detail/conversation-detail.page.html +14 -5
- package/src/app/pages/conversation-detail/conversation-detail.page.scss +1 -1
- package/src/app/pages/conversation-detail/conversation-detail.page.ts +103 -20
- package/src/app/pages/conversations-list/conversations-list.page.ts +1 -17
- package/src/app/pages/loader-preview/loader-preview.page.html +1 -1
- package/src/app/pages/loader-preview/loader-preview.page.scss +4 -0
- package/src/chat21-core/providers/firebase/firebase-typing.service.ts +7 -9
- package/src/chat21-core/utils/constants.ts +4 -0
- package/src/chat21-core/utils/user-typing/user-typing.component.html +8 -5
- package/src/chat21-core/utils/user-typing/user-typing.component.scss +87 -17
- package/src/chat21-core/utils/user-typing/user-typing.component.ts +12 -94
- package/src/global.scss +47 -43
- package/src/variables.scss +19 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# chat21-ionic ver 3.0
|
|
2
2
|
|
|
3
|
+
### 3.0.78-rc.4
|
|
4
|
+
- bug-fixed: unassigned request not sound the if is the first at all
|
|
5
|
+
- bug-fixed: translations missed
|
|
6
|
+
- bug-fixed: direct info not showed in conversation-header component
|
|
7
|
+
- removed: conversation-footer border top
|
|
8
|
+
- changed: colors to message-text-area icons and message-attachment components
|
|
9
|
+
|
|
10
|
+
### 3.0.78-rc.3
|
|
11
|
+
- changed: user-typing location moved from conversation-header to conversation-detail component
|
|
12
|
+
- changed: replace includes with startsWith for check what type of conversation is in project info conversation-list component
|
|
13
|
+
- added: styleMap integrations to some elements
|
|
14
|
+
- bug-fixed: no tooltip showed if no unserved request are present
|
|
15
|
+
|
|
3
16
|
### 3.0.78-rc.2
|
|
4
17
|
- changed: project item UI and tooltip msg
|
|
5
18
|
- changed: conversation UI in conversations list component
|
package/package.json
CHANGED
package/src/app/app.component.ts
CHANGED
|
@@ -102,7 +102,6 @@ export class AppComponent implements OnInit {
|
|
|
102
102
|
public missingConnectionToast: any
|
|
103
103
|
public executedInitializeAppByWatchConnection: boolean = false;
|
|
104
104
|
private isInitialized: boolean = false;
|
|
105
|
-
private hasToSoundUnservedRequestCount: boolean = false;
|
|
106
105
|
private version: string;
|
|
107
106
|
IS_ONLINE: boolean;
|
|
108
107
|
IS_ON_MOBILE_DEVICE: boolean;
|
|
@@ -1125,7 +1124,6 @@ export class AppComponent implements OnInit {
|
|
|
1125
1124
|
if (hasClickedLogout === true) {
|
|
1126
1125
|
this.appStorageService.removeItem('conversations')
|
|
1127
1126
|
this.isInitialized = false;
|
|
1128
|
-
this.hasToSoundUnservedRequestCount = false;
|
|
1129
1127
|
// ----------------------------------------------
|
|
1130
1128
|
// PUSH NOTIFICATIONS
|
|
1131
1129
|
// ----------------------------------------------
|
|
@@ -1150,12 +1148,9 @@ export class AppComponent implements OnInit {
|
|
|
1150
1148
|
|
|
1151
1149
|
subscribeUnservedRequestCount = (unservedRequestCount) => {
|
|
1152
1150
|
if(unservedRequestCount && unservedRequestCount > 0){
|
|
1153
|
-
this.logger.debug("
|
|
1154
|
-
if(this.
|
|
1151
|
+
this.logger.debug("appIsInitialized::::",this.isInitialized)
|
|
1152
|
+
if(this.isInitialized){
|
|
1155
1153
|
this.manageTabNotification(unservedRequestCount) //sound and alternate title
|
|
1156
|
-
} else {
|
|
1157
|
-
//not sound the first time
|
|
1158
|
-
this.hasToSoundUnservedRequestCount = true
|
|
1159
1154
|
}
|
|
1160
1155
|
}
|
|
1161
1156
|
}
|
package/src/app/chatlib/conversation-detail/conversation-content/conversation-content.component.ts
CHANGED
|
@@ -17,11 +17,18 @@ export class ConversationContentComponent implements OnInit {
|
|
|
17
17
|
@Input() messages: MessageModel[]
|
|
18
18
|
@Input() senderId: string;
|
|
19
19
|
@Input() baseLocation: string;
|
|
20
|
+
@Input() isConversationArchived: boolean;
|
|
21
|
+
@Input() isTypings: boolean;
|
|
22
|
+
@Input() idUserTypingNow: string;
|
|
23
|
+
@Input() nameUserTypingNow: string;
|
|
24
|
+
@Input() typingLocation: string;
|
|
25
|
+
@Input() fullscreenMode: boolean;
|
|
20
26
|
@Input() translationMap: Map<string, string>;
|
|
21
27
|
@Input() stylesMap: Map<string, string>;
|
|
22
28
|
@Output() onBeforeMessageRender = new EventEmitter();
|
|
23
29
|
@Output() onAfterMessageRender = new EventEmitter();
|
|
24
|
-
@Output() onMenuOptionShow = new EventEmitter();
|
|
30
|
+
@Output() onMenuOptionShow = new EventEmitter<boolean>();
|
|
31
|
+
@Output() onEmojiiPickerShow = new EventEmitter<boolean>()
|
|
25
32
|
@Output() onAttachmentButtonClicked = new EventEmitter();
|
|
26
33
|
@Output() onScrollContent = new EventEmitter();
|
|
27
34
|
|
|
@@ -92,9 +92,12 @@
|
|
|
92
92
|
<chat-bubble-message class="messages msg_sent" id="message_msg_sent" style="position: relative;"
|
|
93
93
|
[ngClass]="{'has-metadata': (isImage(message) || isFrame(message)), 'privateMsg': (message?.attributes && message?.attributes?.subtype === 'private')}"
|
|
94
94
|
[class.emoticon]="isEmojii(message?.text)"
|
|
95
|
+
[ngStyle]="{'background': stylesMap.get('bubbleSentBackground'), 'color': stylesMap.get('bubbleSentTextColor')}"
|
|
95
96
|
[ngClass]="{'button-in-msg' : message.metadata && message.metadata.button}"
|
|
96
97
|
[message]="message"
|
|
97
|
-
[
|
|
98
|
+
[fontColor]="stylesMap.get('bubbleSentTextColor')"
|
|
99
|
+
[fontSize]="stylesMap.get('fontSize')"
|
|
100
|
+
[fontFamily]="stylesMap.get('fontFamily')"
|
|
98
101
|
[addAsCannedResponseTooltipText]="addAsCannedResponseTooltipText"
|
|
99
102
|
[areVisibleCAR]="areVisibleCAR"
|
|
100
103
|
[supportMode]="supportMode"
|
|
@@ -117,8 +120,6 @@
|
|
|
117
120
|
class="message_sender_fullname">
|
|
118
121
|
{{message.sender_fullname}}
|
|
119
122
|
</div>
|
|
120
|
-
|
|
121
|
-
|
|
122
123
|
<div role="messaggio" *ngIf="messageType(MESSAGE_TYPE_OTHERS, message)" class="msg_container base_receive">
|
|
123
124
|
|
|
124
125
|
<!-- <chat-avatar-image class="slide-in-left"
|
|
@@ -132,8 +133,11 @@
|
|
|
132
133
|
<chat-bubble-message class="messages msg_receive" id="message_msg_receive" style="position: relative;"
|
|
133
134
|
[ngClass]="{'has-metadata': (isImage(message) || isFrame(message)), 'privateMsg': (message?.attributes && message?.attributes?.subtype === 'private')}"
|
|
134
135
|
[class.emoticon]="isEmojii(message?.text)"
|
|
136
|
+
[ngStyle]="{'background': stylesMap?.get('bubbleReceivedBackground'), 'color': stylesMap.get('bubbleReceivedTextColor')}"
|
|
135
137
|
[message]="message"
|
|
136
|
-
[
|
|
138
|
+
[fontColor]="stylesMap?.get('bubbleReceivedTextColor')"
|
|
139
|
+
[fontSize]="stylesMap?.get('fontSize')"
|
|
140
|
+
[fontFamily]="stylesMap?.get('fontFamily')"
|
|
137
141
|
[addAsCannedResponseTooltipText]="addAsCannedResponseTooltipText"
|
|
138
142
|
[areVisibleCAR]="areVisibleCAR"
|
|
139
143
|
[supportMode]="supportMode"
|
|
@@ -158,15 +162,26 @@
|
|
|
158
162
|
|
|
159
163
|
<!-- uploadProgress -> {{ uploadProgress }} -->
|
|
160
164
|
<div *ngIf="uploadProgress !== 100" class="msg_container base_sent" style="margin-right: 20px;">
|
|
161
|
-
<div class="
|
|
162
|
-
<div class="
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
</div>
|
|
165
|
+
<div class="chat21-spinner active" id="chat21-spinner" style="margin: 0px 6px 0px;">
|
|
166
|
+
<div class="chat21-bounce1" [ngStyle]="{'background-color': stylesMap.get('themeColor')}"></div>
|
|
167
|
+
<div class="chat21-bounce2" [ngStyle]="{'background-color': stylesMap.get('themeColor'), 'opacity': 0.4}"></div>
|
|
168
|
+
<div class="chat21-bounce3" [ngStyle]="{'background-color': stylesMap.get('themeColor'), 'opacity': 0.6}"></div>
|
|
169
|
+
<!-- <span [ngStyle]="{'color': stylesMap.get('themeColor')}">{{translationMap.get('LABEL_LOADING')}}</span> -->
|
|
167
170
|
</div>
|
|
168
171
|
</div>
|
|
169
172
|
|
|
173
|
+
<div *ngIf="isTypings" class="msg_container base_receive typing_container">
|
|
174
|
+
<!-- !isSameSender(idUserTypingNow, i) -->
|
|
175
|
+
<!-- <div *ngIf="nameUserTypingNow">{{nameUserTypingNow}}</div> -->
|
|
176
|
+
<user-typing
|
|
177
|
+
[themeColor]="stylesMap?.get('themeColor')"
|
|
178
|
+
[translationMap]="translationMap"
|
|
179
|
+
[idUserTypingNow]="idUserTypingNow"
|
|
180
|
+
[nameUserTypingNow]="nameUserTypingNow">
|
|
181
|
+
</user-typing>
|
|
182
|
+
<div class="typing_info" *ngIf="nameUserTypingNow"> {{nameUserTypingNow}} {{translationMap.get('LABEL_IS_WRITING')}}</div>
|
|
183
|
+
</div>
|
|
184
|
+
|
|
170
185
|
</div>
|
|
171
186
|
|
|
172
187
|
<!-- fileType > {{fileType }} uploadProgress {{uploadProgress}} -->
|
|
@@ -65,10 +65,11 @@
|
|
|
65
65
|
|
|
66
66
|
ion-button {
|
|
67
67
|
text-transform: unset;
|
|
68
|
+
color: var(--basic-blue);
|
|
68
69
|
&:hover {
|
|
69
70
|
--background-hover: transparent;
|
|
70
71
|
text-decoration: underline;
|
|
71
|
-
text-decoration-color: var(--
|
|
72
|
+
text-decoration-color: var(--basic-blue);
|
|
72
73
|
}
|
|
73
74
|
}
|
|
74
75
|
|
|
@@ -105,12 +106,33 @@ ion-item {
|
|
|
105
106
|
|
|
106
107
|
.message_sender_fullname {
|
|
107
108
|
font-size: 0.9em;
|
|
108
|
-
margin: 0 0 1px
|
|
109
|
+
margin: 0 0 1px 20px;
|
|
109
110
|
// color: var(--gray);
|
|
110
111
|
font-weight: 500;
|
|
111
112
|
color: #080f1a;
|
|
112
113
|
}
|
|
113
114
|
|
|
115
|
+
.typing_container{
|
|
116
|
+
display:flex;
|
|
117
|
+
align-items: center;
|
|
118
|
+
|
|
119
|
+
user-typing {
|
|
120
|
+
text-align: right;
|
|
121
|
+
}
|
|
122
|
+
.typing_info{
|
|
123
|
+
color: var(--basic-gray);
|
|
124
|
+
margin-left: 10px;
|
|
125
|
+
font-size: 12px;
|
|
126
|
+
animation: blinker 1s linear infinite;
|
|
127
|
+
|
|
128
|
+
@keyframes blinker {
|
|
129
|
+
50% {
|
|
130
|
+
opacity: 0;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
114
136
|
.messages {
|
|
115
137
|
border-radius: 18px;
|
|
116
138
|
padding: 0;
|
|
@@ -158,7 +180,7 @@ ion-item {
|
|
|
158
180
|
/** recive message **/
|
|
159
181
|
.base_receive {
|
|
160
182
|
// padding: 0px 0px 6px 0px;
|
|
161
|
-
padding: 0px 0px 15px
|
|
183
|
+
padding: 0px 0px 15px 10px; // edited to display the date at the bottom of the "message bubble"
|
|
162
184
|
/* avatar */
|
|
163
185
|
.content-avatar {
|
|
164
186
|
position: relative;
|
|
@@ -187,8 +209,8 @@ ion-item {
|
|
|
187
209
|
}
|
|
188
210
|
/* message */
|
|
189
211
|
.msg_receive {
|
|
190
|
-
background-color: var(--
|
|
191
|
-
color:
|
|
212
|
+
background-color: var(--bck-msg-received);
|
|
213
|
+
color: var(--col-msg-received);
|
|
192
214
|
// max-width: 260px;
|
|
193
215
|
max-width: calc(100% - 70px);
|
|
194
216
|
min-width: 14px;
|
|
@@ -212,63 +234,64 @@ ion-item {
|
|
|
212
234
|
.has-metadata {
|
|
213
235
|
max-width: 100% !important;
|
|
214
236
|
}
|
|
237
|
+
|
|
215
238
|
}
|
|
216
239
|
|
|
217
240
|
.time {
|
|
218
241
|
margin-bottom: 20px;
|
|
219
242
|
}
|
|
220
243
|
|
|
221
|
-
|
|
222
|
-
.
|
|
223
|
-
|
|
224
|
-
|
|
244
|
+
/* LOADING */
|
|
245
|
+
/*http://tobiasahlin.com/spinkit/*/
|
|
246
|
+
#chat21-spinner {
|
|
247
|
+
display: none;
|
|
248
|
+
width: 70px;
|
|
225
249
|
min-height: 20px;
|
|
226
|
-
|
|
250
|
+
margin: 20px auto 0;
|
|
227
251
|
text-align: center;
|
|
228
252
|
}
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
253
|
+
#chat21-spinner.active {
|
|
254
|
+
display: block;
|
|
255
|
+
}
|
|
256
|
+
#chat21-spinner > div {
|
|
257
|
+
width: 12px;
|
|
258
|
+
height: 12px;
|
|
259
|
+
background-color: var(--bubble-blue);
|
|
235
260
|
border-radius: 100%;
|
|
236
261
|
display: inline-block;
|
|
237
262
|
-webkit-animation: sk-bouncedelay 1.4s infinite ease-in-out both;
|
|
238
263
|
animation: sk-bouncedelay 1.4s infinite ease-in-out both;
|
|
239
264
|
}
|
|
240
|
-
|
|
241
|
-
.spinner .bounce1 {
|
|
265
|
+
#chat21-spinner .chat21-bounce1 {
|
|
242
266
|
-webkit-animation-delay: -0.32s;
|
|
243
267
|
animation-delay: -0.32s;
|
|
244
268
|
}
|
|
245
|
-
|
|
246
|
-
.spinner .bounce2 {
|
|
269
|
+
#chat21-spinner .chat21-bounce2 {
|
|
247
270
|
-webkit-animation-delay: -0.16s;
|
|
248
271
|
animation-delay: -0.16s;
|
|
249
272
|
}
|
|
250
|
-
|
|
273
|
+
#chat21-spinner span {
|
|
274
|
+
display: block;
|
|
275
|
+
margin: 0.5em 0 0 0;
|
|
276
|
+
color: var(--col-msg-sent);
|
|
277
|
+
/* text-transform: uppercase; */
|
|
278
|
+
font-family: 'Roboto', sans-serif;
|
|
279
|
+
-webkit-animation: pulse 2000ms linear infinite;
|
|
280
|
+
-moz-animation: pulse 2000ms linear infinite;
|
|
281
|
+
animation: pulse 2000ms linear infinite;
|
|
282
|
+
text-align: center;
|
|
283
|
+
}
|
|
251
284
|
@-webkit-keyframes sk-bouncedelay {
|
|
252
|
-
0%,
|
|
253
|
-
|
|
254
|
-
100% {
|
|
255
|
-
-webkit-transform: scale(0);
|
|
256
|
-
}
|
|
257
|
-
40% {
|
|
258
|
-
-webkit-transform: scale(1);
|
|
259
|
-
}
|
|
285
|
+
0%, 80%, 100% { -webkit-transform: scale(0) }
|
|
286
|
+
40% { -webkit-transform: scale(1.0) }
|
|
260
287
|
}
|
|
261
|
-
|
|
262
288
|
@keyframes sk-bouncedelay {
|
|
263
|
-
0%,
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
40% {
|
|
270
|
-
-webkit-transform: scale(1);
|
|
271
|
-
transform: scale(1);
|
|
289
|
+
0%, 80%, 100% {
|
|
290
|
+
-webkit-transform: scale(0);
|
|
291
|
+
transform: scale(0);
|
|
292
|
+
} 40% {
|
|
293
|
+
-webkit-transform: scale(1.0);
|
|
294
|
+
transform: scale(1.0);
|
|
272
295
|
}
|
|
273
296
|
}
|
|
274
297
|
|
package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.html
CHANGED
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
|
|
51
51
|
<chat-text *ngIf="message?.type !=='html'"
|
|
52
52
|
[text]="message?.text"
|
|
53
|
-
[color]="
|
|
53
|
+
[color]="fontColor"
|
|
54
54
|
[message]="message"
|
|
55
55
|
(onBeforeMessageRender)="returnOnBeforeMessageRender($event)"
|
|
56
56
|
(onAfterMessageRender)="returnOnAfterMessageRender($event)">
|
package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.ts
CHANGED
|
@@ -18,7 +18,9 @@ import { ModalController } from '@ionic/angular';
|
|
|
18
18
|
export class BubbleMessageComponent implements OnInit, OnChanges {
|
|
19
19
|
|
|
20
20
|
@Input() message: MessageModel;
|
|
21
|
-
@Input()
|
|
21
|
+
@Input() fontColor: string;
|
|
22
|
+
@Input() fontSize: string;
|
|
23
|
+
@Input() fontFamily: string;
|
|
22
24
|
@Input() areVisibleCAR: boolean;
|
|
23
25
|
@Input() supportMode: boolean;
|
|
24
26
|
@Output() onBeforeMessageRender = new EventEmitter();
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
-
<div #actionButton id="actionButton" class="button-in-msg action"
|
|
1
|
+
<div #actionButton id="actionButton" class="button-in-msg action"
|
|
2
|
+
title="{{button?.value}}"
|
|
3
|
+
(click)="actionButtonAction()"
|
|
4
|
+
(mouseover)="onMouseOver($event)"
|
|
5
|
+
(mouseout)="onMouseOut($event)">
|
|
2
6
|
{{button.value}}
|
|
3
7
|
</div>
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
// @import '../../../../../sass/variables';
|
|
2
2
|
|
|
3
3
|
div {
|
|
4
|
-
--
|
|
5
|
-
--
|
|
6
|
-
--
|
|
7
|
-
--
|
|
8
|
-
--
|
|
9
|
-
--blue: rgb(42, 106, 193);
|
|
4
|
+
--backgroundColor: --basic-blue;
|
|
5
|
+
--textColor: --bck-msg-sent;
|
|
6
|
+
--hoverBackgroundColor: --bck-msg-sent;
|
|
7
|
+
--hoverTextColor: --basic-blue;
|
|
8
|
+
--buttonFontSize: --button-in-msg-font-size;
|
|
10
9
|
}
|
|
11
10
|
|
|
12
11
|
.button-in-msg {
|
|
@@ -15,32 +14,32 @@ div {
|
|
|
15
14
|
max-width: 300px;
|
|
16
15
|
min-width: inherit;
|
|
17
16
|
cursor: pointer;
|
|
18
|
-
border: 1px solid var(--
|
|
17
|
+
border: 1px solid var(--textColor);
|
|
19
18
|
border-radius: 20px;
|
|
20
19
|
margin: 3px;
|
|
21
|
-
background:
|
|
20
|
+
background: var(--backgroundColor);
|
|
22
21
|
overflow: hidden;
|
|
23
22
|
font-family: 'Muli', sans-serif;
|
|
24
|
-
font-size:
|
|
23
|
+
font-size: var(--buttonFontSize);
|
|
25
24
|
-o-text-overflow: ellipsis;
|
|
26
25
|
text-overflow: ellipsis;
|
|
27
26
|
white-space: nowrap;
|
|
28
27
|
letter-spacing: -0.24px;
|
|
29
28
|
-webkit-font-smoothing: antialiased;
|
|
30
|
-
color: var(--
|
|
29
|
+
color: var(--textColor);
|
|
31
30
|
line-height: 16px;
|
|
32
31
|
}
|
|
33
32
|
|
|
34
33
|
.action {
|
|
35
|
-
background:
|
|
34
|
+
background: var(--backgroundColor);
|
|
36
35
|
transition: background-color .6s ease;
|
|
37
36
|
&:focus,
|
|
38
37
|
&:hover {
|
|
39
|
-
color:
|
|
40
|
-
background: var(--
|
|
38
|
+
color: var(--hoverTextColor);
|
|
39
|
+
background: var(--hoverBackgroundColor);
|
|
41
40
|
.icon-button-action {
|
|
42
41
|
svg {
|
|
43
|
-
fill:
|
|
42
|
+
fill: var(--hoverTextColor);
|
|
44
43
|
}
|
|
45
44
|
}
|
|
46
45
|
}
|
|
@@ -80,4 +79,12 @@ div {
|
|
|
80
79
|
// height: 200px;
|
|
81
80
|
// }
|
|
82
81
|
// }
|
|
83
|
-
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
.disabled {
|
|
86
|
+
// border: 1px solid #999999;
|
|
87
|
+
// background-color: #cccccc;
|
|
88
|
+
// color: #666666;
|
|
89
|
+
pointer-events: none;
|
|
90
|
+
}
|
package/src/app/chatlib/conversation-detail/message/buttons/action-button/action-button.component.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, ElementRef, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
|
1
|
+
import { Component, ElementRef, EventEmitter, Input, OnInit, Output, SimpleChanges } from '@angular/core';
|
|
2
2
|
|
|
3
3
|
@Component({
|
|
4
4
|
selector: 'chat-action-button-attachment',
|
|
@@ -8,16 +8,36 @@ import { Component, ElementRef, EventEmitter, Input, OnInit, Output } from '@ang
|
|
|
8
8
|
export class ActionButtonComponent implements OnInit {
|
|
9
9
|
|
|
10
10
|
@Input() button: any;
|
|
11
|
-
@Input()
|
|
12
|
-
@Input()
|
|
11
|
+
@Input() fontSize: string;
|
|
12
|
+
@Input() backgroundColor: string;
|
|
13
|
+
@Input() textColor: string;
|
|
14
|
+
@Input() hoverBackgroundColor: string;
|
|
15
|
+
@Input() hoverTextColor: string;
|
|
13
16
|
@Output() onButtonClicked = new EventEmitter();
|
|
17
|
+
|
|
14
18
|
public type: string = "action"
|
|
15
19
|
constructor(private elementRef: ElementRef) { }
|
|
16
20
|
|
|
17
21
|
ngOnInit() {
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
ngOnChanges(changes: SimpleChanges){
|
|
18
25
|
//decomment if element should have same color of themeColor and fregroundColor
|
|
19
|
-
|
|
20
|
-
|
|
26
|
+
if(this.fontSize) this.elementRef.nativeElement.querySelector('.action').style.setProperty('--buttonFontSize', this.fontSize);
|
|
27
|
+
if(this.backgroundColor) this.elementRef.nativeElement.querySelector('.action').style.setProperty('--backgroundColor', this.backgroundColor);
|
|
28
|
+
if(this.textColor) this.elementRef.nativeElement.querySelector('.action').style.setProperty('--textColor', this.textColor);
|
|
29
|
+
if(this.hoverBackgroundColor) this.elementRef.nativeElement.querySelector('.action').style.setProperty('--hoverBackgroundColor', this.hoverBackgroundColor);
|
|
30
|
+
if(this.hoverTextColor) this.elementRef.nativeElement.querySelector('.action').style.setProperty('--hoverTextColor', this.hoverTextColor);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
onMouseOver(event){
|
|
34
|
+
// if(this.themeColor) this.elementRef.nativeElement.querySelector('.action').style.background = this.themeColor
|
|
35
|
+
// if(this.foregroundColor) this.elementRef.nativeElement.querySelector('.action').style.color = this.foregroundColor
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
onMouseOut(event){
|
|
39
|
+
// this.elementRef.nativeElement.querySelector('.action').style.color = '';
|
|
40
|
+
// this.elementRef.nativeElement.querySelector('.action').style.background = ''
|
|
21
41
|
}
|
|
22
42
|
|
|
23
43
|
actionButtonAction(){
|
package/src/app/chatlib/conversation-detail/message/buttons/link-button/link-button.component.html
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
<div class="button-in-msg url" (click)="actionButtonUrl()" title="{{button?.value}}"
|
|
1
|
+
<div class="button-in-msg url" (click)="actionButtonUrl()" title="{{button?.value}}"
|
|
2
|
+
(mouseover)="onMouseOver($event)" (mouseout)="onMouseOut($event)">
|
|
2
3
|
<span *ngIf="button?.target !== 'self'" class="icon-button-action">
|
|
3
4
|
<!-- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="black" width="12px" height="12px">
|
|
4
5
|
<path d="M0 0h24v24H0z" fill="none"/>
|
package/src/app/chatlib/conversation-detail/message/buttons/link-button/link-button.component.scss
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
// @import '../../../../../sass/variables';
|
|
2
2
|
|
|
3
3
|
div {
|
|
4
|
-
--
|
|
5
|
-
--
|
|
6
|
-
--
|
|
7
|
-
--
|
|
8
|
-
--
|
|
9
|
-
--blue: rgb(42, 106, 193);
|
|
4
|
+
--backgroundColor: --basic-blue;
|
|
5
|
+
--textColor: --bck-msg-sent;
|
|
6
|
+
--hoverBackgroundColor: --bck-msg-sent;
|
|
7
|
+
--hoverTextColor: --basic-blue;
|
|
8
|
+
--buttonFontSize: --button-in-msg-font-size;
|
|
10
9
|
}
|
|
11
10
|
|
|
12
11
|
.button-in-msg {
|
|
@@ -15,19 +14,19 @@ div {
|
|
|
15
14
|
max-width: 300px;
|
|
16
15
|
min-width: inherit;
|
|
17
16
|
cursor: pointer;
|
|
18
|
-
border: 1px solid var(--
|
|
17
|
+
border: 1px solid var(--textColor);
|
|
19
18
|
border-radius: 20px;
|
|
20
19
|
margin: 3px;
|
|
21
|
-
background:
|
|
20
|
+
background: var(--backgroundColor);
|
|
22
21
|
overflow: hidden;
|
|
23
22
|
font-family: 'Muli', sans-serif;
|
|
24
|
-
font-size:
|
|
23
|
+
font-size: var(--buttonFontSize);
|
|
25
24
|
-o-text-overflow: ellipsis;
|
|
26
25
|
text-overflow: ellipsis;
|
|
27
26
|
white-space: nowrap;
|
|
28
27
|
letter-spacing: -0.24px;
|
|
29
28
|
-webkit-font-smoothing: antialiased;
|
|
30
|
-
color: var(--
|
|
29
|
+
color: var(--textColor);
|
|
31
30
|
line-height: 16px;
|
|
32
31
|
}
|
|
33
32
|
|
|
@@ -38,23 +37,23 @@ div {
|
|
|
38
37
|
top: -1px;
|
|
39
38
|
right: 1px;
|
|
40
39
|
svg {
|
|
41
|
-
fill: var(--
|
|
40
|
+
fill: var(--textColor);
|
|
42
41
|
}
|
|
43
42
|
}
|
|
44
43
|
.icon-button-action-self{
|
|
45
44
|
position: absolute;
|
|
46
45
|
right: 1px;
|
|
47
46
|
svg {
|
|
48
|
-
fill: var(--
|
|
47
|
+
fill: var(--textColor);
|
|
49
48
|
}
|
|
50
49
|
}
|
|
51
50
|
&:focus,
|
|
52
51
|
&:hover {
|
|
53
|
-
color:
|
|
54
|
-
background: var(--
|
|
52
|
+
color: var(--hoverTextColor);
|
|
53
|
+
background: var(--hoverBackgroundColor);
|
|
55
54
|
.icon-button-action, .icon-button-action-self {
|
|
56
55
|
svg {
|
|
57
|
-
fill:
|
|
56
|
+
fill: var(--hoverTextColor);
|
|
58
57
|
}
|
|
59
58
|
}
|
|
60
59
|
}
|
package/src/app/chatlib/conversation-detail/message/buttons/link-button/link-button.component.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, ElementRef, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
|
1
|
+
import { Component, ElementRef, EventEmitter, Input, OnInit, Output, SimpleChanges } from '@angular/core';
|
|
2
2
|
|
|
3
3
|
@Component({
|
|
4
4
|
selector: 'chat-link-button-attachment',
|
|
@@ -8,16 +8,35 @@ import { Component, ElementRef, EventEmitter, Input, OnInit, Output } from '@ang
|
|
|
8
8
|
export class LinkButtonComponent implements OnInit {
|
|
9
9
|
|
|
10
10
|
@Input() button: any;
|
|
11
|
-
@Input()
|
|
12
|
-
@Input()
|
|
11
|
+
@Input() fontSize: string;
|
|
12
|
+
@Input() backgroundColor: string;
|
|
13
|
+
@Input() textColor: string;
|
|
14
|
+
@Input() hoverBackgroundColor: string;
|
|
15
|
+
@Input() hoverTextColor: string;
|
|
13
16
|
@Output() onButtonClicked = new EventEmitter();
|
|
14
17
|
public type: string = "url"
|
|
15
18
|
constructor(private elementRef: ElementRef) { }
|
|
16
19
|
|
|
17
20
|
ngOnInit() {
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
ngOnChanges(changes: SimpleChanges){
|
|
18
24
|
//decomment if element should have same color of themeColor and fregroundColor
|
|
19
|
-
|
|
20
|
-
|
|
25
|
+
if(this.fontSize) this.elementRef.nativeElement.querySelector('.url').style.setProperty('--buttonFontSize', this.fontSize);
|
|
26
|
+
if(this.backgroundColor) this.elementRef.nativeElement.querySelector('.url').style.setProperty('--backgroundColor', this.backgroundColor);
|
|
27
|
+
if(this.textColor) this.elementRef.nativeElement.querySelector('.url').style.setProperty('--textColor', this.textColor);
|
|
28
|
+
if(this.hoverBackgroundColor) this.elementRef.nativeElement.querySelector('.url').style.setProperty('--hoverBackgroundColor', this.hoverBackgroundColor);
|
|
29
|
+
if(this.hoverTextColor) this.elementRef.nativeElement.querySelector('.url').style.setProperty('--hoverTextColor', this.hoverTextColor);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
onMouseOver(event){
|
|
33
|
+
// if(this.themeColor) this.elementRef.nativeElement.querySelector('.url').style.background = this.themeColor
|
|
34
|
+
// if(this.foregroundColor) this.elementRef.nativeElement.querySelector('.url').style.color = this.foregroundColor
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
onMouseOut(event){
|
|
38
|
+
// this.elementRef.nativeElement.querySelector('.url').style.color = '';
|
|
39
|
+
// this.elementRef.nativeElement.querySelector('.url').style.background = ''
|
|
21
40
|
}
|
|
22
41
|
|
|
23
42
|
actionButtonUrl(){
|
package/src/app/chatlib/conversation-detail/message/buttons/text-button/text-button.component.html
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
-
<div class="button-in-msg text"
|
|
1
|
+
<div class="button-in-msg text"
|
|
2
|
+
[ngClass]="{'disabled': isConversationArchived}"
|
|
3
|
+
title="{{button?.value}}"
|
|
4
|
+
(click)="actionButtonText()"
|
|
5
|
+
(mouseover)="onMouseOver($event)"
|
|
6
|
+
(mouseout)="onMouseOut($event)">
|
|
2
7
|
{{button?.value}}
|
|
3
8
|
</div>
|