URL for chatbot server deploy
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@ -9,9 +9,15 @@ export default {
|
||||
name: 'Chatbot',
|
||||
components: { },
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
mounted: () => {
|
||||
window.botpressWebChat.init({ host: 'http://localhost:3000', botId: 'joinbot' })
|
||||
window.botpressWebChat.init({ host: process.env.BOTPRESS_HOST, botId: 'joinbot', enableReset: false,
|
||||
enableTranscriptDownload: false,
|
||||
hideWidget: true,
|
||||
extraStylesheet: '/assets/modules/channel-web/chat.css',
|
||||
botName: 'Joe'
|
||||
})
|
||||
setTimeout(() => {
|
||||
window.botpressWebChat.sendEvent({
|
||||
type: 'show',
|
||||
@ -20,6 +26,9 @@ export default {
|
||||
// window.botpressWebChat.sendEvent({ type: 'message', text: 'Hallo!' })
|
||||
}, 1500)
|
||||
},
|
||||
beforeDestroy: () => {
|
||||
document.getElementById('bp-widget').parentElement.removeChild(document.getElementById('bp-widget'))
|
||||
},
|
||||
methods: {
|
||||
|
||||
}
|
||||
@ -48,11 +57,14 @@ export default {
|
||||
</style>
|
||||
<style>
|
||||
#bp-widget {
|
||||
top: 20%;
|
||||
left: 40%;
|
||||
bottom: 0px;
|
||||
right: 0px;
|
||||
width: 400px;
|
||||
height: 80% !important;
|
||||
width: 70%;
|
||||
height: 100% !important;
|
||||
}
|
||||
|
||||
#bp-web-widget {
|
||||
width:100%;
|
||||
height:100%
|
||||
}
|
||||
</style>
|
||||
|
Reference in New Issue
Block a user