chore: bump version to v0.9.60 and update widget tooltip parameters

This commit is contained in:
haorwen
2026-03-13 23:27:18 +08:00
committed by cnb
parent f439c5650a
commit 67782712e2
8 changed files with 42 additions and 42 deletions
+4 -4
View File
@@ -372,10 +372,10 @@
"param_open_height": "The height while widget opened",
"param_welcome": "Custom welcome message",
"param_position": "Widget position: left/right",
"param_icon_title": "Hover tooltip title on closed widget icon",
"param_icon_subtitle": "Hover tooltip subtitle on closed widget icon",
"param_icon_image": "Hover tooltip image URL on closed widget icon",
"param_icon_closable": "Whether the tooltip can be closed (true/false)",
"param_popup_title": "Popup tooltip title displayed next to the closed widget icon",
"param_popup_subtitle": "Popup tooltip subtitle displayed next to the closed widget icon",
"param_popup_image": "Popup tooltip image URL displayed next to the closed widget icon (optional)",
"param_popup_closable": "Whether the popup tooltip can be closed (true/false)",
"share_link": "Share the widget link so that people can chat with you directly",
"widget_faq": "Enable Let Everyone Join First"
},
+4 -4
View File
@@ -371,10 +371,10 @@
"param_open_height": "挂件打开态的高度",
"param_welcome": "自定义欢迎语",
"param_position": "设置挂件位置,居左 (left) 或居右 (right)",
"param_icon_title": "关闭状态悬浮提示框标题",
"param_icon_subtitle": "关闭状态悬浮提示框副标题",
"param_icon_image": "关闭状态悬浮提示框图片地址",
"param_icon_closable": "提示框是否可关闭 (true/false)",
"param_popup_title": "关闭状态悬浮提示框标题",
"param_popup_subtitle": "关闭状态悬浮提示框副标题",
"param_popup_image": "关闭状态悬浮提示框图片地址",
"param_popup_closable": "提示框是否可关闭 (true/false)",
"share_link": "分享此链接,别人可以通过该地址直接与你对话",
"widget_faq": "允许公开注册"
},
+6 -6
View File
@@ -14,17 +14,17 @@
logo = "",
position = "right",
welcome = "",
iconTitle = "Need help?",
iconSubtitle = "Our staff are always ready to help!",
iconImage = "",
iconClosable = "true"
popupTitle = "Need help?",
popupSubtitle = "Our staff are always ready to help!",
popupImage = "",
popupClosable = "true"
} = d.currentScript.dataset;
const _src = d.currentScript.src;
const wrapper = d.createElement("iframe");
wrapper.id = "VOCECHAT_WIDGET";
// 如果有提示框内容,关闭状态的宽度和高度需要更大
const hasTooltip = iconTitle || iconSubtitle;
const hasTooltip = popupTitle || popupSubtitle;
const actualCloseWidth = hasTooltip ? 320 : closeWidth;
const actualCloseHeight = hasTooltip ? 120 : closeHeight;
@@ -43,7 +43,7 @@
new URL(_src).origin
}/widget.html?id=${id}&host=${hostId}&autoReg=${autoReg}&token=${loginToken}&themeColor=${encodeURIComponent(
themeColor
)}&from=${encodeURIComponent(location.hostname)}&welcome=${encodeURIComponent(welcome)}&title=${encodeURIComponent(title)}&logo=${encodeURIComponent(logo)}&iconTitle=${encodeURIComponent(iconTitle)}&iconSubtitle=${encodeURIComponent(iconSubtitle)}&iconImage=${encodeURIComponent(iconImage)}&iconClosable=${iconClosable}`;
)}&from=${encodeURIComponent(location.hostname)}&welcome=${encodeURIComponent(welcome)}&title=${encodeURIComponent(title)}&logo=${encodeURIComponent(logo)}&popupTitle=${encodeURIComponent(popupTitle)}&popupSubtitle=${encodeURIComponent(popupSubtitle)}&popupImage=${encodeURIComponent(popupImage)}&popupClosable=${popupClosable}`;
wrapper.width = actualCloseWidth;
wrapper.height = actualCloseHeight;
wrapper.frameborder = 0;