Fix WebCRT copy/paste on HTTP LAN by falling back off Clipboard API.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
oliver 2026-08-06 11:02:10 +08:00
parent 4ea3b737f2
commit ba33ab5c4f
6 changed files with 227 additions and 40 deletions

View file

@ -1334,7 +1334,11 @@ const en = {
copy: "Copy",
paste: "Paste",
pasteEmpty: "Clipboard is empty",
pasteFailed: "Cannot read clipboard (try Ctrl+Shift+V or check browser permission)",
pasteFailed: "Cannot read clipboard (on HTTP use the paste box, or Ctrl+V)",
pasteBridgeHint:
"This page is not HTTPS, so the browser blocks clipboard reads. Press Ctrl+V in this box to send text to the terminal.",
pasteBridgePh: "Press Ctrl+V here…",
pasteBridgeCancel: "Cancel",
clear: "Clear",
pasting: "Pasting {{done}}/{{total}} lines…",
wsError: "[WebSocket error]",

View file

@ -1326,7 +1326,10 @@ const zh = {
copy: "复制",
paste: "粘贴",
pasteEmpty: "剪贴板为空",
pasteFailed: "无法读取剪贴板(请用 Ctrl+Shift+V 或检查浏览器权限)",
pasteFailed: "无法读取剪贴板(HTTP 远程请用下方粘贴框,或 Ctrl+V)",
pasteBridgeHint: "当前为非 HTTPS 访问,浏览器禁止直接读剪贴板。请在此框按 Ctrl+V 粘贴,内容会发送到终端。",
pasteBridgePh: "在此按 Ctrl+V…",
pasteBridgeCancel: "取消",
clear: "清空",
pasting: "粘贴中 {{done}}/{{total}} 行…",
wsError: "[WebSocket 错误]",