@decentnetwork/beagle-ui 0.2.18 → 0.2.19

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.
Files changed (2) hide show
  1. package/dist/beagle-ui.js +19 -12
  2. package/package.json +1 -1
package/dist/beagle-ui.js CHANGED
@@ -1,4 +1,4 @@
1
- export const BEAGLE_UI_VERSION = "0.2.18";
1
+ export const BEAGLE_UI_VERSION = "0.2.19";
2
2
  // src/icons.jsx
3
3
  var ICON_PATHS = {
4
4
  // ---- tab bar (the four must feel like one set) ----
@@ -415,10 +415,13 @@ function useDaemonData() {
415
415
  // Pass the real state through. Collapsing everything that was not
416
416
  // 'queued' to 'read' meant a message still in flight — or one that
417
417
  // never went out at all — rendered as delivered.
418
- status: m.dir === "out" ? m.status === "queued" || m.status === "sending" || m.status === "failed" ? m.status : "read" : void 0,
418
+ status: m.dir === "out" ? m.status === "queued" || m.status === "sending" || m.status === "failed" || m.status === "sent" ? m.status : "read" : void 0,
419
419
  error: m.error,
420
+ // false = went to a live session but nobody acknowledged it (one tick).
421
+ // Dropped here before, so that state could never render.
422
+ confirmed: m.confirmed,
420
423
  // Delivery path: "online" = live session, "offline" = express relay.
421
- // Incoming messages carry this; the bubble colors them differently.
424
+ // Both directions carry it now; the bubble labels them the same way.
422
425
  via: m.via,
423
426
  // Brief 30: a validated component form, already whitelisted host-side.
424
427
  // Passed through untouched — the renderer treats every string as text,
@@ -1574,14 +1577,14 @@ function Msg({ m, peer, T, onTheater, onDelete, onCancel, onRetry, onRetryMsg, o
1574
1577
  letterSpacing: -0.1,
1575
1578
  wordBreak: "break-word"
1576
1579
  } }, /* @__PURE__ */ React.createElement(MarkdownText, { text: read.text, onNameCard })));
1577
- })(), read.form && /* @__PURE__ */ React.createElement("div", { style: { marginTop: 6 } }, /* @__PURE__ */ React.createElement(DkChatForm, { form: read.form, submitted, peer, onSubmit: onFormSubmit })), /* @__PURE__ */ React.createElement("div", { style: { display: "flex", alignItems: "center", gap: 4, margin: "3px 3px 0" } }, /* @__PURE__ */ React.createElement("span", { style: { fontFamily: "var(--mono)", fontSize: 10, color: "var(--faint)" } }, m.time), !mine && m.via && /* @__PURE__ */ React.createElement(
1578
- "span",
1579
- {
1580
- title: m.via === "offline" ? "delivered via express relay (offline)" : "delivered over a live session (online)",
1581
- style: { fontFamily: "var(--mono)", fontSize: 9, color: m.via === "offline" ? "#f59e0b" : "var(--faint)" }
1582
- },
1583
- m.via === "offline" ? "\u79BB\u7EBF" : "\u5728\u7EBF"
1584
- ), !selMode && m.id && /* @__PURE__ */ React.createElement(
1580
+ })(), read.form && /* @__PURE__ */ React.createElement("div", { style: { marginTop: 6 } }, /* @__PURE__ */ React.createElement(DkChatForm, { form: read.form, submitted, peer, onSubmit: onFormSubmit })), /* @__PURE__ */ React.createElement("div", { style: { display: "flex", alignItems: "center", gap: 4, margin: "3px 3px 0" } }, /* @__PURE__ */ React.createElement("span", { style: { fontFamily: "var(--mono)", fontSize: 10, color: "var(--faint)" } }, m.time), (() => {
1581
+ const sentDone = mine && m.status && m.status !== "queued" && m.status !== "sending" && m.status !== "failed";
1582
+ const via = !mine ? m.via : sentDone ? m.via === "offline" ? "offline" : "online" : null;
1583
+ if (!via)
1584
+ return null;
1585
+ const title = mine ? via === "offline" ? T.viaOutOffline || "posted to the offline relay \u2014 they get it when they come online" : T.viaOutOnline || "sent over a live session (online)" : via === "offline" ? "delivered via express relay (offline)" : "delivered over a live session (online)";
1586
+ return /* @__PURE__ */ React.createElement("span", { title, style: { fontFamily: "var(--mono)", fontSize: 9, color: via === "offline" ? "#f59e0b" : "var(--faint)" } }, via === "offline" ? "\u79BB\u7EBF" : "\u5728\u7EBF");
1587
+ })(), !selMode && m.id && /* @__PURE__ */ React.createElement(
1585
1588
  "button",
1586
1589
  {
1587
1590
  title: T.delete || "delete",
@@ -1616,7 +1619,7 @@ function Msg({ m, peer, T, onTheater, onDelete, onCancel, onRetry, onRetryMsg, o
1616
1619
  },
1617
1620
  /* @__PURE__ */ React.createElement(Icon, { name: "clock", size: 11, stroke: 2.2, color: "var(--faint)" }),
1618
1621
  /* @__PURE__ */ React.createElement("span", { style: { fontFamily: "var(--mono)", fontSize: 10, color: "var(--faint)" } }, m.status === "sending" ? T.sendingMsg || "sending" : T.queued || "queued")
1619
- ) : mine && m.status === "sent" && m.confirmed === false ? /* @__PURE__ */ React.createElement(Icon, { name: "check", size: 12, stroke: 2.2, color: "var(--faint)", title: T.sentUnconfirmed || "sent \u2014 not confirmed by the peer" }) : mine && m.status && /* @__PURE__ */ React.createElement(Icon, { name: "checkCheck", size: 12, stroke: 2.2, color: m.status === "read" ? "var(--accent)" : "var(--faint)" })))
1622
+ ) : mine && m.via === "offline" && m.status !== "queued" && m.status !== "sending" ? /* @__PURE__ */ React.createElement(Icon, { name: "check", size: 12, stroke: 2.2, color: "#f59e0b", title: T.viaOutOffline || "posted to the offline relay \u2014 they get it when they come online" }) : mine && m.status === "sent" && m.confirmed === false ? /* @__PURE__ */ React.createElement(Icon, { name: "check", size: 12, stroke: 2.2, color: "var(--faint)", title: T.sentUnconfirmed || "sent \u2014 not confirmed by the peer" }) : mine && m.status && /* @__PURE__ */ React.createElement(Icon, { name: "checkCheck", size: 12, stroke: 2.2, color: m.status === "read" ? "var(--accent)" : "var(--faint)" })))
1620
1623
  );
1621
1624
  }
1622
1625
  function Conversation({ T, peer, lang, peers, onOpenChat, thread: threadProp, onSend, onSendFile, onSendRtcFile, onAlias, onRemove, onOpenNet, onCall, onReloadThread, muted, onToggleMute, phone, onBack }) {
@@ -4988,6 +4991,8 @@ var STR = {
4988
4991
  updTitle: "Update available",
4989
4992
  updLater: "Later",
4990
4993
  brandAbout: "What is Beagle?",
4994
+ viaOutOffline: "posted to the offline relay \u2014 they get it when they come online",
4995
+ viaOutOnline: "sent over a live session (online)",
4991
4996
  updNow: "Update now",
4992
4997
  updRestart: "Restart",
4993
4998
  updBusy: "Updating\u2026 (about a minute)",
@@ -5178,6 +5183,8 @@ var STR = {
5178
5183
  updTitle: "\u53D1\u73B0\u65B0\u7248\u672C",
5179
5184
  updLater: "\u7A0D\u540E",
5180
5185
  brandAbout: "Beagle \u662F\u4EC0\u4E48?",
5186
+ viaOutOffline: "\u5DF2\u5B58\u5230\u79BB\u7EBF\u4E2D\u8F6C\u2014\u2014\u5BF9\u65B9\u4E0A\u7EBF\u540E\u6536\u5230",
5187
+ viaOutOnline: "\u5728\u7EBF\u76F4\u63A5\u9001\u8FBE",
5181
5188
  updNow: "\u7ACB\u5373\u66F4\u65B0",
5182
5189
  updRestart: "\u91CD\u542F",
5183
5190
  updBusy: "\u66F4\u65B0\u4E2D\u2026(\u7EA6\u4E00\u5206\u949F)",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@decentnetwork/beagle-ui",
3
- "version": "0.2.18",
3
+ "version": "0.2.19",
4
4
  "description": "The Beagle chat UI, minus the machine it runs on — shared by the desktop install and the browser build.",
5
5
  "license": "MIT",
6
6
  "type": "module",