This commit is contained in:
Oliver
2025-07-28 18:46:28 -03:00
parent 1798c48d3b
commit 4629df910a
4 changed files with 8 additions and 1 deletions

View File

@@ -7,6 +7,8 @@
<script>const configUrl = `https://od8n.com/widget/custom/brandize.json`;</script>
<script src="widget/widget.js"></script>
<script type="module" src="widget/brandize.js"></script>
<link rel="stylesheet" href="widget/custom/brandize.css">

View File

@@ -1,3 +1,8 @@
console.log('INIT ELEVENLABS')
import { Conversation } from 'https://cdn.skypack.dev/@elevenlabs/client';
const callBtn = document.getElementById('callBtn');
let conversation = null;

View File

@@ -1,6 +1,6 @@
{
"api": "https://brandize.n8n.odoo4projects.com/webhook/81742473-b50b-4845-a5f9-916d9fe60876/chat",
"preamble": "Welcome to Brandize",
"widgetHTML": "<button id='cw-chatToggle' aria-label='Toggle chat widget' type='button'>\n <img height='50px' src='widget/custom/brandize.svg' alt='Logo'></button>\n<div id='cw-chatWidget' style='display: none;' role='region' aria-live='polite' aria-label='Chat widget'>\n <div class='logo-container'><img src='widget/custom/brandize.svg' alt='Logo' /><button id='callBtn'>📞</button></div>\n <div class='header'>Support</div>\n <div id='cw-status' style='transition: all 0.3s ease; overflow: hidden;'></div>\n <div id='cw-chatMessages' style='max-height: 200px; overflow-y: auto; padding: 10px;'></div>\n <form id='cw-chatForm' autocomplete='off'>\n <input type='text' id='cw-chatInput' placeholder='Type your message...' required autocomplete='off' />\n <button type='submit'>Send</button>\n </form>\n</div><script type='module'>\nimport { Conversation } from 'https://cdn.skypack.dev/@elevenlabs/client';\n window.ElevenLabs = { Conversation };\n</script><script type='module' src='widget/custom/brandize.js'></script>"
"widgetHTML": "<button id='cw-chatToggle' aria-label='Toggle chat widget' type='button'>\n <img height='50px' src='widget/custom/brandize.svg' alt='Logo'></button>\n<div id='cw-chatWidget' style='display: none;' role='region' aria-live='polite' aria-label='Chat widget'>\n <div class='logo-container'><img src='widget/custom/brandize.svg' alt='Logo' /><button id='callBtn'>📞</button></div>\n <div class='header'>Support</div>\n <div id='cw-status' style='transition: all 0.3s ease; overflow: hidden;'></div>\n <div id='cw-chatMessages' style='max-height: 200px; overflow-y: auto; padding: 10px;'></div>\n <form id='cw-chatForm' autocomplete='off'>\n <input type='text' id='cw-chatInput' placeholder='Type your message...' required autocomplete='off' />\n <button type='submit'>Send</button>\n </form>\n</div>"
}

View File