chore: bump version to v0.9.60 and update widget tooltip parameters
This commit is contained in:
+6
-6
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user