diff --git a/web/src/app/home/bots/components/bot-form/BotForm.tsx b/web/src/app/home/bots/components/bot-form/BotForm.tsx index 999be35b..bf330257 100644 --- a/web/src/app/home/bots/components/bot-form/BotForm.tsx +++ b/web/src/app/home/bots/components/bot-form/BotForm.tsx @@ -142,8 +142,12 @@ export default function BotForm({ // 尝试使用现代API if (navigator.clipboard && navigator.clipboard.writeText) { - console.log('[Copy] Using Clipboard API with input value:', inputElement.value); - navigator.clipboard.writeText(inputElement.value) + console.log( + '[Copy] Using Clipboard API with input value:', + inputElement.value, + ); + navigator.clipboard + .writeText(inputElement.value) .then(() => { console.log('[Copy] Clipboard API success'); inputElement.blur(); // 取消选中 @@ -151,7 +155,10 @@ export default function BotForm({ toast.success(t('bots.webhookUrlCopied')); }) .catch((err) => { - console.error('[Copy] Clipboard API failed, trying execCommand:', err); + console.error( + '[Copy] Clipboard API failed, trying execCommand:', + err, + ); // 降级到execCommand const successful = document.execCommand('copy'); console.log('[Copy] execCommand result:', successful); @@ -165,7 +172,10 @@ export default function BotForm({ }); } else { // 直接使用execCommand - console.log('[Copy] Using execCommand with input value:', inputElement.value); + console.log( + '[Copy] Using execCommand with input value:', + inputElement.value, + ); const successful = document.execCommand('copy'); console.log('[Copy] execCommand result:', successful); inputElement.blur(); @@ -300,7 +310,8 @@ export default function BotForm({ enable: bot.enable ?? true, use_pipeline_uuid: bot.use_pipeline_uuid ?? '', webhook_full_url: bot.adapter_runtime_values - ? (bot.adapter_runtime_values as any).webhook_full_url + ? ((bot.adapter_runtime_values as Record) + .webhook_full_url as string) : undefined, }); }) @@ -479,7 +490,10 @@ export default function BotForm({ {pipelineNameList.map((item) => ( - + {item.label} ))} diff --git a/web/src/i18n/locales/en-US.ts b/web/src/i18n/locales/en-US.ts index 6b6e25b5..3e8af0ef 100644 --- a/web/src/i18n/locales/en-US.ts +++ b/web/src/i18n/locales/en-US.ts @@ -153,7 +153,8 @@ const enUS = { logs: 'Logs', webhookUrl: 'Webhook Callback URL', webhookUrlCopied: 'Webhook URL copied', - webhookUrlHint: 'Click the input to select all, then press Ctrl+C (Mac: Cmd+C) to copy, or click the button', + webhookUrlHint: + 'Click the input to select all, then press Ctrl+C (Mac: Cmd+C) to copy, or click the button', }, plugins: { title: 'Plugins', diff --git a/web/src/i18n/locales/ja-JP.ts b/web/src/i18n/locales/ja-JP.ts index 2ddcaad7..ecc98d7c 100644 --- a/web/src/i18n/locales/ja-JP.ts +++ b/web/src/i18n/locales/ja-JP.ts @@ -155,7 +155,8 @@ const jaJP = { logs: 'ログ', webhookUrl: 'Webhook コールバック URL', webhookUrlCopied: 'Webhook URL をコピーしました', - webhookUrlHint: '入力ボックスをクリックして全選択し、Ctrl+C (Mac: Cmd+C) でコピーするか、右側のボタンをクリックしてください', + webhookUrlHint: + '入力ボックスをクリックして全選択し、Ctrl+C (Mac: Cmd+C) でコピーするか、右側のボタンをクリックしてください', }, plugins: { title: 'プラグイン', diff --git a/web/src/i18n/locales/zh-Hans.ts b/web/src/i18n/locales/zh-Hans.ts index 5906f334..5c7d8a15 100644 --- a/web/src/i18n/locales/zh-Hans.ts +++ b/web/src/i18n/locales/zh-Hans.ts @@ -150,7 +150,8 @@ const zhHans = { logs: '日志', webhookUrl: 'Webhook 回调地址', webhookUrlCopied: 'Webhook 地址已复制', - webhookUrlHint: '点击输入框自动全选,然后按 Ctrl+C (Mac: Cmd+C) 复制,或点击右侧按钮', + webhookUrlHint: + '点击输入框自动全选,然后按 Ctrl+C (Mac: Cmd+C) 复制,或点击右侧按钮', }, plugins: { title: '插件管理', diff --git a/web/src/i18n/locales/zh-Hant.ts b/web/src/i18n/locales/zh-Hant.ts index a59d90cd..0446dd51 100644 --- a/web/src/i18n/locales/zh-Hant.ts +++ b/web/src/i18n/locales/zh-Hant.ts @@ -150,7 +150,8 @@ const zhHant = { logs: '日誌', webhookUrl: 'Webhook 回調位址', webhookUrlCopied: 'Webhook 位址已複製', - webhookUrlHint: '點擊輸入框自動全選,然後按 Ctrl+C (Mac: Cmd+C) 複製,或點擊右側按鈕', + webhookUrlHint: + '點擊輸入框自動全選,然後按 Ctrl+C (Mac: Cmd+C) 複製,或點擊右側按鈕', }, plugins: { title: '外掛管理',