diff --git a/package.json b/package.json
index b72435e9..73354eaa 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "vocechat-web",
- "version": "0.9.59",
+ "version": "0.9.60",
"homepage": "https://voce.chat",
"dependencies": {
"@metamask/onboarding": "^1.0.1",
diff --git a/public/locales/en/setting.json b/public/locales/en/setting.json
index e70abf6a..5f51f4e2 100644
--- a/public/locales/en/setting.json
+++ b/public/locales/en/setting.json
@@ -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"
},
diff --git a/public/locales/zh/setting.json b/public/locales/zh/setting.json
index 3ad0cba8..354125c1 100644
--- a/public/locales/zh/setting.json
+++ b/public/locales/zh/setting.json
@@ -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": "允许公开注册"
},
diff --git a/public/widget.js b/public/widget.js
index 79d1cf18..322bdf4d 100644
--- a/public/widget.js
+++ b/public/widget.js
@@ -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;
diff --git a/src/routes/setting/Widget/ConfigDetails.tsx b/src/routes/setting/Widget/ConfigDetails.tsx
index c9dce61c..59fe08d8 100644
--- a/src/routes/setting/Widget/ConfigDetails.tsx
+++ b/src/routes/setting/Widget/ConfigDetails.tsx
@@ -115,24 +115,24 @@ const ConfigDetails = ({}: Props) => {
remarks: t("param_welcome")
},
{
- paramKey: "icon-title",
+ paramKey: "popup-title",
paramDefault: "Need help?",
- remarks: t("param_icon_title")
+ remarks: t("param_popup_title")
},
{
- paramKey: "icon-subtitle",
+ paramKey: "popup-subtitle",
paramDefault: "Our staff are always ready to help!",
- remarks: t("param_icon_subtitle")
+ remarks: t("param_popup_subtitle")
},
{
- paramKey: "icon-image",
+ paramKey: "popup-image",
paramDefault: "-",
- remarks: t("param_icon_image")
+ remarks: t("param_popup_image")
},
{
- paramKey: "icon-closable",
+ paramKey: "popup-closable",
paramDefault: "true",
- remarks: t("param_icon_closable")
+ remarks: t("param_popup_closable")
}
].map((row) => (