label: source 'phone' → 'web' (page works from any browser)
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -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) {}
|
||||
|
||||
Reference in New Issue
Block a user