Skip to content

Commit 91cba6e

Browse files
committed
Wire host ID, TLS, WS, audio, clipboard, file transfer into Remote Desktop GUI
Host panel: - Prominent Host ID display with a 'Copy' button so users can read it out (formatted as '123 456 789') and paste it into the viewer. - Transport dropdown (TCP / WebSocket) routes Start through either RemoteDesktopHost or WebSocketDesktopHost. - TLS cert / key fields with file pickers; both required to opt in, otherwise the connection stays plain. - 'Stream system audio' checkbox (greyed when sounddevice is unavailable) flows through to enable_audio. Viewer panel: - Host ID input that accepts '123 456 789' / '123-456-789' / etc. and uses parse_host_id to verify the announced ID after AUTH_OK. - Transport dropdown (TCP / WebSocket / TLS / WSS) plus a 'Skip cert verification' checkbox for self-signed deployments. WSS reuses the same SSLContext path; TLS/WSS hosts that present a real cert just uncheck the box. - 'Play received audio' checkbox spins up an AudioPlayer per session and routes incoming AUDIO frames to it via a Qt signal. - 'Push clipboard text' button sends the local clipboard to the host; incoming CLIPBOARD messages from the host are applied to the local clipboard and surfaced as a status line. - 'Send file...' opens a file picker + destination prompt and runs the upload on a QThread, with a QProgressBar bound to FileSender's progress events. - The frame display widget now accepts dragEnter/drop of local files; each dropped file kicks off the same upload flow. The receiver thread's host_id / clipboard / audio / file callbacks all marshal back to the GUI thread via Qt signals so the recv loop never touches widgets directly. Translations added for English, Traditional Chinese, Simplified Chinese, and Japanese. remote_desktop_tab.py is now ~950 lines, over CLAUDE.md's 750-line limit; splitting into gui/remote_desktop/{host_panel,viewer_panel, frame_display}.py is a logical follow-up — left as one file here so the diff stays scoped to the feature additions.
1 parent f6b50be commit 91cba6e

5 files changed

Lines changed: 526 additions & 16 deletions

File tree

je_auto_control/gui/language_wrapper/english.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -401,6 +401,28 @@
401401
"rd_host_status_running": "Running on port {port} — {n} viewer(s)",
402402
"rd_host_status_stopped": "Host is stopped",
403403
"rd_host_preview_label": "Preview (what viewers see):",
404+
"rd_host_id_group": "Host ID (share with viewers)",
405+
"rd_host_id_label": "Host ID:",
406+
"rd_host_id_copy": "Copy",
407+
"rd_transport_label": "Transport:",
408+
"rd_tls_cert_label": "TLS cert:",
409+
"rd_tls_cert_placeholder": "PEM certificate path (optional)",
410+
"rd_tls_key_label": "TLS key:",
411+
"rd_tls_key_placeholder": "PEM private key path (optional)",
412+
"rd_tls_both_required": "TLS cert and key must both be provided",
413+
"rd_tls_insecure": "Skip cert verification (self-signed)",
414+
"rd_browse": "Browse...",
415+
"rd_enable_audio": "Stream system audio (sounddevice)",
416+
"rd_viewer_audio_play": "Play received audio (sounddevice)",
417+
"rd_viewer_push_clipboard": "Push my clipboard text to host",
418+
"rd_viewer_send_file": "Send file...",
419+
"rd_dest_path_prompt": "Destination path on remote for {name}:",
420+
"rd_clipboard_empty": "Local clipboard is empty",
421+
"rd_clipboard_sent": "Clipboard sent to host",
422+
"rd_viewer_clipboard_received": "Clipboard updated from host",
423+
"rd_progress_label": "Transfer: {done} / {total} bytes",
424+
"rd_progress_done": "Transfer complete: {path}",
425+
"rd_progress_failed": "Transfer failed: {error}",
404426
"rd_viewer_connect": "Connect",
405427
"rd_viewer_disconnect": "Disconnect",
406428
"rd_viewer_required_fields": (

je_auto_control/gui/language_wrapper/japanese.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -401,6 +401,28 @@
401401
"rd_host_status_running": "稼働中 ポート {port} — ビューア {n} 名",
402402
"rd_host_status_stopped": "ホストは停止中",
403403
"rd_host_preview_label": "プレビュー(ビューアの表示):",
404+
"rd_host_id_group": "ホスト ID(ビューアに伝える)",
405+
"rd_host_id_label": "ホスト ID:",
406+
"rd_host_id_copy": "コピー",
407+
"rd_transport_label": "トランスポート:",
408+
"rd_tls_cert_label": "TLS 証明書:",
409+
"rd_tls_cert_placeholder": "PEM 証明書パス(任意)",
410+
"rd_tls_key_label": "TLS キー:",
411+
"rd_tls_key_placeholder": "PEM 秘密鍵パス(任意)",
412+
"rd_tls_both_required": "TLS 証明書とキーは両方必要",
413+
"rd_tls_insecure": "証明書検証をスキップ(自己署名用)",
414+
"rd_browse": "参照...",
415+
"rd_enable_audio": "システム音声をストリーム(sounddevice)",
416+
"rd_viewer_audio_play": "受信音声を再生(sounddevice)",
417+
"rd_viewer_push_clipboard": "ローカルのクリップボード文字をホストへ送信",
418+
"rd_viewer_send_file": "ファイル送信...",
419+
"rd_dest_path_prompt": "{name} のリモート保存先:",
420+
"rd_clipboard_empty": "ローカルのクリップボードが空です",
421+
"rd_clipboard_sent": "クリップボードをホストへ送信しました",
422+
"rd_viewer_clipboard_received": "ホストからクリップボードを同期しました",
423+
"rd_progress_label": "転送中: {done} / {total} バイト",
424+
"rd_progress_done": "転送完了: {path}",
425+
"rd_progress_failed": "転送失敗: {error}",
404426
"rd_viewer_connect": "接続",
405427
"rd_viewer_disconnect": "切断",
406428
"rd_viewer_required_fields": "アドレス・ポート・トークンはすべて必須です。",

je_auto_control/gui/language_wrapper/simplified_chinese.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,28 @@
395395
"rd_host_status_running": "运行中 端口 {port} — {n} 个 viewer",
396396
"rd_host_status_stopped": "Host 已停止",
397397
"rd_host_preview_label": "预览(viewer 看到的画面):",
398+
"rd_host_id_group": "Host ID(给远程的人)",
399+
"rd_host_id_label": "Host ID:",
400+
"rd_host_id_copy": "复制",
401+
"rd_transport_label": "传输协议:",
402+
"rd_tls_cert_label": "TLS 证书:",
403+
"rd_tls_cert_placeholder": "PEM 证书路径(选填)",
404+
"rd_tls_key_label": "TLS 密钥:",
405+
"rd_tls_key_placeholder": "PEM 私钥路径(选填)",
406+
"rd_tls_both_required": "TLS 证书与密钥必须一并提供",
407+
"rd_tls_insecure": "忽略证书验证(自签用)",
408+
"rd_browse": "浏览...",
409+
"rd_enable_audio": "串流系统音频(sounddevice)",
410+
"rd_viewer_audio_play": "播放接收的音频(sounddevice)",
411+
"rd_viewer_push_clipboard": "把本机剪贴板文字发送到 Host",
412+
"rd_viewer_send_file": "发送文件...",
413+
"rd_dest_path_prompt": "{name} 在远程的目的路径:",
414+
"rd_clipboard_empty": "本机剪贴板是空的",
415+
"rd_clipboard_sent": "剪贴板已发送到 Host",
416+
"rd_viewer_clipboard_received": "已从 Host 同步剪贴板",
417+
"rd_progress_label": "传输进度: {done} / {total} bytes",
418+
"rd_progress_done": "传输完成: {path}",
419+
"rd_progress_failed": "传输失败: {error}",
398420
"rd_viewer_connect": "连接",
399421
"rd_viewer_disconnect": "断开",
400422
"rd_viewer_required_fields": "地址、端口、token 都必须填写。",

je_auto_control/gui/language_wrapper/traditional_chinese.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,28 @@
396396
"rd_host_status_running": "運行中 port {port} — {n} 個 viewer",
397397
"rd_host_status_stopped": "Host 已停止",
398398
"rd_host_preview_label": "預覽(viewer 看到的畫面):",
399+
"rd_host_id_group": "Host ID(給遠端的人)",
400+
"rd_host_id_label": "Host ID:",
401+
"rd_host_id_copy": "複製",
402+
"rd_transport_label": "傳輸協定:",
403+
"rd_tls_cert_label": "TLS 憑證:",
404+
"rd_tls_cert_placeholder": "PEM 憑證路徑(選填)",
405+
"rd_tls_key_label": "TLS 金鑰:",
406+
"rd_tls_key_placeholder": "PEM 私鑰路徑(選填)",
407+
"rd_tls_both_required": "TLS 憑證與金鑰必須一併提供",
408+
"rd_tls_insecure": "忽略憑證驗證(自簽用)",
409+
"rd_browse": "瀏覽...",
410+
"rd_enable_audio": "串流系統音訊(sounddevice)",
411+
"rd_viewer_audio_play": "播放接收的音訊(sounddevice)",
412+
"rd_viewer_push_clipboard": "把本機剪貼簿文字送到 Host",
413+
"rd_viewer_send_file": "傳送檔案...",
414+
"rd_dest_path_prompt": "{name} 在遠端的目的路徑:",
415+
"rd_clipboard_empty": "本機剪貼簿是空的",
416+
"rd_clipboard_sent": "剪貼簿已送到 Host",
417+
"rd_viewer_clipboard_received": "已從 Host 同步剪貼簿",
418+
"rd_progress_label": "傳輸進度:{done} / {total} bytes",
419+
"rd_progress_done": "傳輸完成:{path}",
420+
"rd_progress_failed": "傳輸失敗:{error}",
399421
"rd_viewer_connect": "連線",
400422
"rd_viewer_disconnect": "中斷連線",
401423
"rd_viewer_required_fields": "位址、port、token 都必須填寫。",

0 commit comments

Comments
 (0)