Skip to content

Commit

Permalink
v13.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
boehlerlukas committed Dec 18, 2023
1 parent 5dd9ec8 commit e4685e6
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 7 deletions.
2 changes: 1 addition & 1 deletion build/index.js

Large diffs are not rendered by default.

12 changes: 8 additions & 4 deletions demo/main.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
const Gleap = window.Gleap;

Gleap.setFrameUrl("http://0.0.0.0:3001");
/*Gleap.setFrameUrl("http://0.0.0.0:3001");
Gleap.setApiUrl("http://0.0.0.0:9000");
Gleap.setWSApiUrl("ws://0.0.0.0:8080");
Gleap.setWSApiUrl("ws://0.0.0.0:8080");*/

// Gleap.setLanguage("en");
Gleap.setLanguage("en");

Gleap.initialize("rinrKZAvjqOheSjpdUjFnp01tSOF3WTd");
Gleap.initialize("ogWhNhuiZcGWrva5nlDS8l7a78OfaLlV");

/*Gleap.setUrlHandler((url, newTab) => {
alert("URL: " + url + " newTab: " + newTab);
});*/

Gleap.registerCustomAction((customAction) => {
console.log("Custom action: ", customAction);
});

Gleap.on("unread-count-changed", (unreadCount) => {
console.log("Unread count changed: ", unreadCount);
});
5 changes: 5 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,12 @@ export namespace Gleap {
replays: Boolean;
}
): void;
function startClassicForm(
formId: string,
showBackButton?: boolean
): void;
function startBot(botId: string, showBackButton?: boolean): void;
function startConversation(showBackButton?: boolean): void;
function attachCustomData(customData: any): void;
function setCustomData(key: string, value: string): void;
function removeCustomData(key: string): void;
Expand Down
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": "13.0.6",
"version": "13.1.0",
"main": "build/index.js",
"scripts": {
"start": "webpack serve",
Expand Down
1 change: 1 addition & 0 deletions published/13.1.0/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion published/latest/index.js

Large diffs are not rendered by default.

16 changes: 16 additions & 0 deletions src/Gleap.js
Original file line number Diff line number Diff line change
Expand Up @@ -652,6 +652,15 @@ class Gleap {
);
}

/**
* Starts a classic feedback form.
*/
static startClassicForm(formId, showBackButton) {
Gleap.startFeedbackFlowWithOptions(formId, {
hideBackButton: !showBackButton,
});
}

/**
* Starts the bug reporting flow.
*/
Expand Down Expand Up @@ -751,6 +760,13 @@ class Gleap {
GleapFrameManager.getInstance().showWidget();
}

/**
* Starts a new conversation
*/
static startConversation(showBackButton = true) {
Gleap.startBot("", showBackButton);
}

/**
* Starts a new conversation and attaches the bot with the given id.
*/
Expand Down

0 comments on commit e4685e6

Please sign in to comment.