@decentnetwork/beagle 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- window.__DK_UI_VERSION="0.1.1";
1
+ window.__DK_UI_VERSION="0.1.2";
2
2
  const ICON_PATHS = {
3
3
  // ---- tab bar (the four must feel like one set) ----
4
4
  users: '<path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"/><circle cx="9" cy="7" r="4"/><path d="M22 21v-2a4 4 0 0 0-3-3.87"/><path d="M16 3.13a4 4 0 0 1 0 7.75"/>',
@@ -1440,7 +1440,7 @@ function DkChatForm({ form, submitted, peer, onSubmit }) {
1440
1440
  if (!f)
1441
1441
  continue;
1442
1442
  setStep("Sending " + f.name + "\u2026");
1443
- const up = await DK.sendFile(peer.userId || peer.id, f);
1443
+ const up = await dkApi.sendFile(peer.userId || peer.id, f);
1444
1444
  if (!up || !up.ok) {
1445
1445
  setErr(up && up.error || "file send failed");
1446
1446
  setBusy(false);
@@ -1457,11 +1457,7 @@ function DkChatForm({ form, submitted, peer, onSubmit }) {
1457
1457
  }
1458
1458
  setStep("");
1459
1459
  const text = CC.encodeInteraction(CC.buildInteraction(form.custom_id, componentId, answers));
1460
- const r = await fetch("/api/chat-send", {
1461
- method: "POST",
1462
- headers: { "content-type": "application/json" },
1463
- body: JSON.stringify({ userid: peer.userId || peer.id, text })
1464
- }).then((x) => x.json());
1460
+ const r = await dkApi.send(peer.userId || peer.id, text);
1465
1461
  if (!r.ok) {
1466
1462
  setErr(r.error || "submit failed");
1467
1463
  setBusy(false);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@decentnetwork/beagle",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Beagle — P2P chat, file transfer and calls for regular users, on the Decent Network. No admin privilege required.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",