Skip to content

Commit 9f512e8

Browse files
committed
v7.0.7
1 parent 8059ba1 commit 9f512e8

File tree

7 files changed

+22
-9
lines changed

7 files changed

+22
-9
lines changed

build/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "gleap",
3-
"version": "7.0.6",
3+
"version": "7.0.7",
44
"main": "build/index.js",
55
"scripts": {
66
"start": "webpack serve",

published/7.0.7/index.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

published/latest/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/GleapFrameManager.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,12 @@ export default class GleapFrameManager {
9999
showWidget() {
100100
if (this.gleapFrameContainer.classList) {
101101
this.gleapFrameContainer.classList.remove('gleap-frame-container--hidden');
102+
103+
setTimeout(() => {
104+
this.gleapFrameContainer.classList.add('gleap-frame-container--animate');
105+
}, 500);
102106
}
107+
103108
this.widgetOpened = true;
104109
GleapFeedbackButtonManager.getInstance().updateFeedbackButtonState();
105110
GleapEventManager.notifyEvent("open");
@@ -117,6 +122,7 @@ export default class GleapFrameManager {
117122
this.hideMarkerManager();
118123
if (this.gleapFrameContainer) {
119124
this.gleapFrameContainer.classList.add('gleap-frame-container--hidden');
125+
this.gleapFrameContainer.classList.remove('gleap-frame-container--animate');
120126
}
121127
this.widgetOpened = false;
122128
GleapFeedbackButtonManager.getInstance().updateFeedbackButtonState();

src/GleapTranslationManager.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,19 @@ export default class GleapTranslationManager {
4141
static translateText(key) {
4242
const instance = GleapTranslationManager.getInstance();
4343

44-
var language = navigator.language;
45-
if (instance.overrideLanguage !== "") {
46-
language = instance.overrideLanguage;
44+
var language = "en";
45+
if (typeof navigator !== "undefined") {
46+
navigator.language.substring(0, 2).toLowerCase();
47+
}
48+
if (instance.overrideLanguage && instance.overrideLanguage !== "") {
49+
language = instance.overrideLanguage.toLowerCase();
4750
}
4851

4952
var customTranslation = {};
5053
const translationKeys = Object.keys(instance.customTranslation);
5154
for (var i = 0; i < translationKeys.length; i++) {
5255
const translationKey = translationKeys[i];
53-
if (language && language.includes(translationKey)) {
56+
if (language && translationKey && language === translationKey.toLowerCase()) {
5457
if (instance.customTranslation[translationKey]) {
5558
customTranslation = instance.customTranslation[translationKey];
5659
}

src/UI.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,16 @@ export const injectStyledCSS = (
7373
box-shadow: 0px 5px 30px rgba(0, 0, 0, 0.16);
7474
border-radius: ${borderRadius}px;
7575
overflow: hidden;
76-
transition: max-height 0.3s ease-in;
7776
animation-duration: .3s;
7877
animation-fill-mode: both;
7978
animation-name: gleapFadeInUp;
8079
user-select: none;
8180
}
8281
82+
.gleap-frame-container--animate {
83+
transition: max-height 0.3s ease-in;
84+
}
85+
8386
@keyframes gleapFadeInUp {
8487
from {
8588
opacity: 0;
@@ -132,7 +135,7 @@ export const injectStyledCSS = (
132135
}
133136
134137
.gleap-frame-container--hidden {
135-
opacity: 0;
138+
display: none !important;
136139
pointer-events: none;
137140
animation: none !important;
138141
}

0 commit comments

Comments
 (0)