label: source 'phone' → 'web' (page works from any browser)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Claude Opus 4.7
2026-05-21 00:42:42 -05:00
parent 98dc2ca2a6
commit 137a81c6a8
2 changed files with 4 additions and 4 deletions

View File

@@ -147,7 +147,7 @@
const r = await fetch("/api/send", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ type: "clipboard", text, source: "phone" }),
body: JSON.stringify({ type: "clipboard", text, source: "web" }),
});
status(r.ok ? "delivered ✓" : "server returned " + r.status, r.ok ? "ok" : "err");
} catch (e) { status("network error", "err"); }
@@ -163,7 +163,7 @@
body: JSON.stringify({
type: "signal",
from: peerID,
source: "phone",
source: "web",
signal: JSON.stringify(payload),
}),
});
@@ -207,7 +207,7 @@
es.addEventListener("clipboard", (ev) => {
try {
const m = JSON.parse(ev.data);
if (m.source !== "phone") {
if (m.source !== "web") {
addIncoming(m.text, m.source, m.ts, false);
}
} catch (e) {}