diff --git a/Gemfile.lock b/Gemfile.lock index 4e60ff3e3..d6692e402 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -325,7 +325,7 @@ GEM pry-rails (0.3.9) pry (>= 0.10.4) public_suffix (4.0.5) - puma (4.3.5) + puma (4.3.6) nio4r (~> 2.0) pundit (2.1.0) activesupport (>= 3.0.0) diff --git a/app/javascript/sdk/IFrameHelper.js b/app/javascript/sdk/IFrameHelper.js index 666fbf952..64f788968 100644 --- a/app/javascript/sdk/IFrameHelper.js +++ b/app/javascript/sdk/IFrameHelper.js @@ -34,7 +34,10 @@ export const IFrameHelper = { iframe.id = 'chatwoot_live_chat_widget'; iframe.style.visibility = 'hidden'; - const holderClassName = `woot-widget-holder woot--hide woot-elements--${window.$chatwoot.position}`; + let holderClassName = `woot-widget-holder woot--hide woot-elements--${window.$chatwoot.position}`; + if (window.$chatwoot.hideMessageBubble) { + holderClassName += ` woot-widget--without-bubble`; + } addClass(widgetHolder, holderClassName); widgetHolder.appendChild(iframe); body.appendChild(widgetHolder); @@ -114,6 +117,9 @@ export const IFrameHelper = { }, setBubbleLabel(message) { + if (window.$chatwoot.hideMessageBubble) { + return; + } setBubbleText(window.$chatwoot.launcherTitle || message.label); }, diff --git a/app/javascript/sdk/sdk.js b/app/javascript/sdk/sdk.js index aeb3d41db..4f4c3a6ca 100644 --- a/app/javascript/sdk/sdk.js +++ b/app/javascript/sdk/sdk.js @@ -115,6 +115,10 @@ export const SDK_CSS = `.woot-widget-holder { z-index: -1 !important; } +.woot-widget--without-bubble { + bottom: 20px !important; +} + @media only screen and (max-width: 667px) { .woot-widget-holder { height: 100%; diff --git a/app/javascript/widget/assets/scss/woot.scss b/app/javascript/widget/assets/scss/woot.scss index 089b7817c..b65fea2d3 100755 --- a/app/javascript/widget/assets/scss/woot.scss +++ b/app/javascript/widget/assets/scss/woot.scss @@ -34,6 +34,14 @@ body { } } +.is-bubble-hidden { + .actions { + .close-button { + display: block !important; + } + } +} + .cursor-pointer { cursor: pointer; } diff --git a/app/javascript/widget/views/Router.vue b/app/javascript/widget/views/Router.vue index 64558efb7..cb72daca1 100644 --- a/app/javascript/widget/views/Router.vue +++ b/app/javascript/widget/views/Router.vue @@ -2,7 +2,11 @@