Skip to content

Commit 73f30c4

Browse files
Update chatbot greetings and booking window position
- Center the Calendly popup window on screen instead of top-left - Calculate left/top positions based on screen size - Keep window size at 600x650px with scrollbars
1 parent c4ee98f commit 73f30c4

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

chatbot.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class PhoenixChatbot {
2929
<!-- Fenêtre du chatbot -->
3030
<div class="chatbot-window" id="chatbotWindow">
3131
<div class="chatbot-header">
32-
<h3 data-i18n="chatbot.title">Assistant Phoenix</h3>
32+
<h3 data-i18n="chatbot.title">Assistant de Phoenix</h3>
3333
<button class="chatbot-close" id="chatbotClose">
3434
<svg viewBox="0 0 24 24">
3535
<path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/>
@@ -74,7 +74,7 @@ class PhoenixChatbot {
7474
notification.style.display = 'none';
7575

7676
if (this.messages.length === 0) {
77-
this.addBotMessage("Bonjour ! 👋 Je suis l'assistant de ThePhoenixAgency. Comment puis-je vous aider aujourd'hui ?");
77+
this.addBotMessage("Bonjour ! 👋 Je suis l'assistant de Phoenix. Comment puis-je vous aider aujourd'hui ?");
7878
this.showQuickReplies([
7979
{ text: "📅 Prendre RDV", action: "booking" },
8080
{ text: "💬 Poser une question", action: "question" },
@@ -218,9 +218,11 @@ class PhoenixChatbot {
218218
case 'booking':
219219
this.addBotMessage("Excellent ! Je vous redirige vers notre système de réservation. 📅");
220220
setTimeout(() => {
221-
window.open('https://calendly.com/ethanbernier', '_blank', 'width=600,height=650,scrollbars=yes'); }, 1500);
222-
break;
223-
window.open('https://calendly.com/ethanbernier/', '_blank');
221+
const width = 600;
222+
const height = 650;
223+
const left = (screen.width - width) / 2;
224+
const top = (screen.height - height) / 2;
225+
window.open('https://calendly.com/ethanbernier', '_blank', `width=${width},height=${height},left=${left},top=${top},scrollbars=yes`); break;
224226
case 'question':
225227
this.showQuickReplies([
226228
{ text: "⚡ Services IA", action: "AI" },

0 commit comments

Comments
 (0)