diff --git a/controller/pricing.go b/controller/pricing.go index b6537e4c..d0736119 100644 --- a/controller/pricing.go +++ b/controller/pricing.go @@ -46,7 +46,7 @@ func GetPricing(c *gin.Context) { "usable_group": usableGroup, "supported_endpoint": model.GetSupportedEndpointMap(), "auto_groups": service.GetUserAutoGroup(group), - "_": "a42d372ccf0b5dd13ecf71203521f9d2", + "pricing_version": "a42d372ccf0b5dd13ecf71203521f9d2", }) } diff --git a/web/src/components/table/channels/modals/EditChannelModal.jsx b/web/src/components/table/channels/modals/EditChannelModal.jsx index 8558b734..cf57aadd 100644 --- a/web/src/components/table/channels/modals/EditChannelModal.jsx +++ b/web/src/components/table/channels/modals/EditChannelModal.jsx @@ -558,6 +558,10 @@ const EditChannelModal = (props) => { }; const pasteFromClipboard = async () => { + if (!navigator?.clipboard?.readText) { + showError(t('无法读取剪贴板')); + return; + } try { const text = await navigator.clipboard.readText(); const parsed = parseChannelConnectionString(text); @@ -1302,13 +1306,14 @@ const EditChannelModal = (props) => { loadChannel(); } else { formApiRef.current?.setValues(getInitValues()); - // best-effort clipboard auto-detect for new channels - navigator.clipboard.readText().then((text) => { - const parsed = parseChannelConnectionString(text); - if (parsed) { - setClipboardConfig(parsed); - } - }).catch(() => {}); + try { + navigator?.clipboard?.readText()?.then((text) => { + const parsed = parseChannelConnectionString(text); + if (parsed) { + setClipboardConfig(parsed); + } + }).catch(() => {}); + } catch {} } fetchModelGroups(); // 重置手动输入模式状态