Skip to content

Commit

Permalink
v6.8.10
Browse files Browse the repository at this point in the history
  • Loading branch information
boehlerlukas committed Apr 8, 2022
1 parent 9ade326 commit ca45e99
Show file tree
Hide file tree
Showing 11 changed files with 7,313 additions and 38 deletions.
41 changes: 29 additions & 12 deletions build/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1626,7 +1626,9 @@ var ReplayRecFrame = /*#__PURE__*/function () {
}, {
key: "flushObserver",
value: function flushObserver() {
this.rec.observerCallback(this.observer.takeRecords());
if (this.observer && typeof this.observer.takeRecords !== "undefined") {
this.rec.observerCallback(this.observer.takeRecords());
}
}
}]);

Expand Down Expand Up @@ -2869,7 +2871,11 @@ var Session = /*#__PURE__*/function () {
var userNameInfo = document.querySelector("#bb-user-name");

if (userNameInfo) {
userNameInfo.textContent = session.name ? session.name : "";
if (session.name && src_Gleap.getInstance().showUserName) {
userNameInfo.textContent = session.name;
} else {
userNameInfo.textContent = "";
}
}

_this.notifySessionReady();
Expand Down Expand Up @@ -2927,9 +2933,7 @@ var Session = /*#__PURE__*/function () {
if (_this.session.userId.toString() !== userId.toString()) {
return true;
}
} catch (exp) {
console.log("Gleap: warn");
}
} catch (exp) {}

if (userData) {
var userDataKeys = Object.keys(userData);
Expand Down Expand Up @@ -5177,13 +5181,14 @@ var AutoConfig = /*#__PURE__*/function () {
}();

AutoConfig_defineProperty(AutoConfig, "run", function () {
/*const session = Session.getInstance();
const cachedConfig = loadFromGleapCache(`config-${session.sdkKey}`);
var session = Session.getInstance();
/*const cachedConfig = loadFromGleapCache(`config-${session.sdkKey}`);
if (cachedConfig) {
AutoConfig.applyConfig(cachedConfig, false);
AutoConfig.loadConfigFromServer(true).catch(function (e) {});
return Promise.resolve();
}*/

return AutoConfig.loadConfigFromServer(false);
});

Expand Down Expand Up @@ -5552,7 +5557,13 @@ var Gleap_Gleap = /*#__PURE__*/function () {
var self = this;

window.onerror = function (msg, url, lineNo, columnNo, error) {
var message = ["Message: " + msg, "URL: " + url, "Line: " + lineNo, "Column: " + columnNo, "Stack: " + (error && error.stack) ? error.stack : 0];
var stackTrace = "";

if (error !== null && typeof error.stack !== "undefined") {
stackTrace = error.stack;
}

var message = ["Message: " + msg, "URL: " + url, "Line: " + lineNo, "Column: " + columnNo, "Stack: " + stackTrace];
self.addLog(message, "ERROR");

if (self.enabledCrashDetector && !self.appCrashDetected && !self.currentlySendingBug) {
Expand All @@ -5564,7 +5575,7 @@ var Gleap_Gleap = /*#__PURE__*/function () {
url: url,
lineNo: lineNo,
columnNo: columnNo,
stackTrace: error && error.stack ? error.stack : ""
stackTrace: stackTrace
}, Gleap.PRIORITY_MEDIUM, "CRASH", {
screenshot: true,
replays: true
Expand Down Expand Up @@ -6253,7 +6264,7 @@ var Gleap_Gleap = /*#__PURE__*/function () {
currentUrl: window.location.href,
language: navigator.language || navigator.userLanguage,
mobile: isMobile(),
sdkVersion: "6.8.9",
sdkVersion: "6.8.10",
sdkType: "javascript"
};
}
Expand Down Expand Up @@ -6956,9 +6967,15 @@ var Gleap_Gleap = /*#__PURE__*/function () {
instance.stopBugReportingAnalytics();
instance.widgetOpened = true;
instance.openedMenu = true;
instance.updateFeedbackButtonState(); // Start feedback type dialog
instance.updateFeedbackButtonState();
var displayUserName = "";

if (instance.showUserName && sessionInstance.session && sessionInstance.session.name) {
displayUserName = sessionInstance.session.name;
} // Start feedback type dialog


createFeedbackTypeDialog(instance.feedbackTypeActions, instance.overrideLanguage, instance.customLogoUrl, instance.poweredByHidden, function () {}, "".concat(translateText("Hi", instance.overrideLanguage), " <span id=\"bb-user-name\">").concat(instance.showUserName && sessionInstance.session.name ? sessionInstance.session.name : "", "</span> ").concat(instance.welcomeIcon), translateText(instance.widgetInfo.dialogSubtitle, instance.overrideLanguage), fromBack);
createFeedbackTypeDialog(instance.feedbackTypeActions, instance.overrideLanguage, instance.customLogoUrl, instance.poweredByHidden, function () {}, "".concat(translateText("Hi", instance.overrideLanguage), " <span id=\"bb-user-name\">").concat(displayUserName, "</span> ").concat(instance.welcomeIcon), translateText(instance.widgetInfo.dialogSubtitle, instance.overrideLanguage), fromBack);
}
/**
* Register custom action
Expand Down
4 changes: 3 additions & 1 deletion demo/main.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const Gleap = window.Gleap;

Gleap.initialize("a5yVbBAxZ3SxYRneqPnETvEG58veOyQs");
// Gleap.setApiUrl("http://localhost:9000");
Gleap.initialize("DUPaIr7s689BBblcFI4pc5aBgYJTm7Sc");

Gleap.identify("12938", {
email: "[email protected]",
Expand Down Expand Up @@ -39,4 +40,5 @@ setTimeout(() => {

setTimeout(() => {
console.warn("Failed to attach button listener.");
x();
}, 4000);
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gleap",
"version": "6.8.9",
"version": "6.8.10",
"main": "build/index.js",
"scripts": {
"start": "webpack serve",
Expand Down
1 change: 1 addition & 0 deletions published/6.8.10/appwidget.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit ca45e99

Please sign in to comment.