fix: Add missing close button if bubble is hidden (#1435)

This commit is contained in:
Pranav Raj S 2020-11-23 10:49:28 +05:30 committed by GitHub
parent fcf91f60fb
commit 4fe29fefb4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 25 additions and 3 deletions

View file

@ -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)

View file

@ -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);
},

View file

@ -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%;

View file

@ -34,6 +34,14 @@ body {
}
}
.is-bubble-hidden {
.actions {
.close-button {
display: block !important;
}
}
}
.cursor-pointer {
cursor: pointer;
}

View file

@ -2,7 +2,11 @@
<div
id="app"
class="woot-widget-wrap"
:class="{ 'is-mobile': isMobile, 'is-widget-right': !isLeftAligned }"
:class="{
'is-mobile': isMobile,
'is-widget-right': !isLeftAligned,
'is-bubble-hidden': hideMessageBubble,
}"
>
<home
v-if="!showUnreadView"