File tree Expand file tree Collapse file tree 5 files changed +43
-20
lines changed Expand file tree Collapse file tree 5 files changed +43
-20
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ Gleap.setApiUrl("http://0.0.0.0:9000");
5
5
6
6
Gleap . setLanguage ( "de" ) ;
7
7
8
- Gleap . initialize ( "zhkMPoY1k41yhOus4BRwVKE7Qas5zbyA " ) ;
8
+ Gleap . initialize ( "ogWhNhuiZcGWrva5nlDS8l7a78OfaLlV " ) ;
9
9
//Gleap.setEnvironment("dev");
10
10
11
11
/*Gleap.setUrlHandler((url, newTab) => {
@@ -27,14 +27,14 @@ Gleap.attachCustomData({
27
27
} ,
28
28
} ) ;
29
29
30
- Gleap . identify ( "@testinglukasaa" , {
30
+ /* Gleap.identify("@testinglukasaa", {
31
31
name: "Max Doe",
32
32
email: "lukas+atestaaa@gleap .io",
33
33
value: 1234,
34
34
phone: "+49123456789",
35
35
testing: { "fun": 1123 },
36
36
luki: 19283
37
- } ) ;
37
+ });*/
38
38
39
39
Gleap . log ( "Test log" ) ;
40
40
Gleap . log ( "Test log info" , "INFO" ) ;
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " gleap" ,
3
- "version" : " 10.5 .0" ,
3
+ "version" : " 11.0 .0" ,
4
4
"main" : " build/index.js" ,
5
5
"scripts" : {
6
6
"start" : " webpack serve" ,
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ import { widgetMaxHeight } from "./UI";
20
20
import { runFunctionWhenDomIsReady } from "./GleapHelper" ;
21
21
22
22
export default class GleapFrameManager {
23
- frameUrl = "https://messenger.gleap.io" ;
23
+ frameUrl = "https://messenger-app .gleap.io" ;
24
24
gleapFrameContainer = null ;
25
25
gleapFrame = null ;
26
26
injectedFrame = false ;
@@ -116,7 +116,7 @@ export default class GleapFrameManager {
116
116
117
117
autoWhiteListCookieManager = ( ) => {
118
118
if ( window && window . cmp_block_ignoredomains ) {
119
- window . cmp_block_ignoredomains . concat ( [ "messenger.gleap.io" ] ) ;
119
+ window . cmp_block_ignoredomains . concat ( [ "messenger-app .gleap.io" ] ) ;
120
120
}
121
121
} ;
122
122
Original file line number Diff line number Diff line change @@ -145,20 +145,28 @@ export default class GleapNotificationManager {
145
145
} ;
146
146
147
147
if ( notification . data . news ) {
148
+ const renderDescription = ( ) => {
149
+ if ( notification . data . previewText && notification . data . previewText . length > 0 ) {
150
+ return `<div class="gleap-notification-item-news-preview">${ notification . data . previewText } </div>` ;
151
+ }
152
+
153
+ return `${ notification . data . sender ? `
154
+ <div class="gleap-notification-item-news-sender">
155
+ ${ notification . data . sender . profileImageUrl &&
156
+ `<img src="${ notification . data . sender . profileImageUrl } " />`
157
+ } ${ notification . data . sender . name } </div>`
158
+ : ""
159
+ } `;
160
+ } ;
161
+
148
162
// News preview
149
163
elem . className = "gleap-notification-item-news" ;
150
164
elem . innerHTML = `
151
165
<div class="gleap-notification-item-news-container">
152
- ${ notification . data . coverImageUrl ? `<img class="gleap-notification-item-news-image" src="${ notification . data . coverImageUrl } " />` : '' }
166
+ ${ notification . data . coverImageUrl && notification . data . coverImageUrl !== "" && ! notification . data . coverImageUrl . includes ( "NewsImagePlaceholder" ) ? `<img class="gleap-notification-item-news-image" src="${ notification . data . coverImageUrl } " />` : '' }
153
167
<div class="gleap-notification-item-news-content">
154
168
<div class="gleap-notification-item-news-content-title">${ content } </div>
155
- ${ notification . data . sender ? `
156
- <div class="gleap-notification-item-news-sender">
157
- ${ notification . data . sender . profileImageUrl &&
158
- `<img src="${ notification . data . sender . profileImageUrl } " />`
159
- } ${ notification . data . sender . name } </div>`
160
- : ""
161
- }
169
+ ${ renderDescription ( ) }
162
170
</div>
163
171
</div>` ;
164
172
} else {
Original file line number Diff line number Diff line change @@ -340,24 +340,39 @@ export const injectStyledCSS = (
340
340
padding: 15px;
341
341
}
342
342
343
+ .gleap-notification-item-news-preview {
344
+ color: ${ subTextColor } ;
345
+ font-size: 15px;
346
+ line-height: 21px;
347
+ font-weight: 400;
348
+ overflow-wrap: break-word;
349
+ word-break: break-word;
350
+ display: block;
351
+ display: -webkit-box;
352
+ -webkit-line-clamp: 2;
353
+ -webkit-box-orient: vertical;
354
+ overflow: hidden;
355
+ }
356
+
343
357
.gleap-notification-item-news-sender {
344
358
display: flex;
345
359
align-items: center;
346
360
color: ${ subTextColor } ;
347
- font-size: 14px;
361
+ font-size: 15px;
362
+ line-height: 21px;
348
363
font-weight: 400;
349
364
}
350
365
351
366
.gleap-notification-item-news-content-title {
352
- font-size: 14px;
367
+ color: ${ contrastBackgroundColor } ;
368
+ font-size: 15px;
353
369
font-weight: 500;
354
- line-height: 18px ;
370
+ line-height: 21px ;
355
371
margin-bottom: 6px;
356
372
max-width: 100%;
373
+ -webkit-line-clamp: 3;
374
+ -webkit-box-orient: vertical;
357
375
overflow: hidden;
358
- text-overflow: ellipsis;
359
- white-space: nowrap;
360
- color: ${ contrastBackgroundColor } ;
361
376
}
362
377
363
378
.gleap-notification-item-news-sender img {
You can’t perform that action at this time.
0 commit comments