mirror of
https://github.com/saphid/frame-control.git
synced 2026-10-06 04:04:21 +02:00
Devices: the app waits for its old server before starting the new one; clipboard sends keep their headset (review round 31)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
cb6f294299
commit
a9740ad6f2
4 files changed
+13
-5
No files matched your search
+2
-1
@@ -1503,9 +1503,10 @@ $("clipSend").onclick = () => {
|
||||
// In the app, Electron reads the clipboard; in a browser, the server does.
|
||||
async function sendComputerClipboard() {
|
||||
if (!window.frameApp) return api("/api/clipboard", { fromComputer: true });
|
||||
const device = window.connDevice; // the headset it was sent to, not one switched to while reading
|
||||
const text = await window.frameApp.readClipboard();
|
||||
if (!text) throw new Error("The clipboard is empty (or holds something other than text)");
|
||||
return api("/api/clipboard", { text });
|
||||
return api("/api/clipboard", { text }, device);
|
||||
}
|
||||
$("clipMac").onclick = () => act($("clipMac").textContent, sendComputerClipboard, $("clipMac"));
|
||||
|
||||
|
||||
Reference in new issue
Block a user