diff --git a/demo/main.js b/demo/main.js index b1442999..21df1656 100755 --- a/demo/main.js +++ b/demo/main.js @@ -1,12 +1,12 @@ 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.initialize("ogWhNhuiZcGWrva5nlDS8l7a78OfaLlV"); +Gleap.initialize("rinrKZAvjqOheSjpdUjFnp01tSOF3WTd"); /*Gleap.setUrlHandler((url, newTab) => { alert("URL: " + url + " newTab: " + newTab); diff --git a/package.json b/package.json index 3bfffa81..43e3f9ff 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gleap", - "version": "13.0.5", + "version": "13.0.6", "main": "build/index.js", "scripts": { "start": "webpack serve", diff --git a/src/GleapProductTours.js b/src/GleapProductTours.js index a4d931db..7837d912 100644 --- a/src/GleapProductTours.js +++ b/src/GleapProductTours.js @@ -80,6 +80,16 @@ export default class GleapProductTours { driverSteps.push(driverStep); } + var buttons = [ + 'next', + 'close' + ]; + + console.log("config.backButton", config); + if (config.backButton) { + buttons.push('previous'); + } + const gleapTourObj = GleapTours({ showProgress: true, steps: driverSteps, @@ -87,10 +97,8 @@ export default class GleapProductTours { allowClose: config.allowClose, nextBtnText: config.nextText, doneBtnText: config.doneText, - showButtons: [ - 'next', - 'close' - ], + prevBtnText: config.prevText, + showButtons: buttons, onDestroyStarted: () => { if (!gleapTourObj.hasNextStep()) { gleapTourObj.destroy(); diff --git a/src/UI.js b/src/UI.js index b6a8e386..0badbe10 100644 --- a/src/UI.js +++ b/src/UI.js @@ -1607,6 +1607,12 @@ export const injectStyledCSS = ( } } + .gleap-tour-message, + .gleap-tour-message p, + .gleap-tour-message ul { + color: ${contrastBackgroundColor}; + } + .gleap-tour-message p { line-height: 1.3; } @@ -1928,6 +1934,17 @@ export const injectStyledCSS = ( box-shadow: none !important; outline: none !important; } + + .gleap-tour-popover-prev-btn { + color: ${contrastBackgroundColor} !important; + background-color: ${backgroundColorHover} !important; + margin-right: 3px; + } + + .gleap-tour-popover-prev-btn:hover { + background-color: ${primaryColor}22 !important; + color: ${primaryColor} !important; + } .gleap-tour-popover-footer .gleap-tour-popover-btn-disabled { opacity: 0.5;