@decentnetwork/beagle-ui 0.2.30 → 0.2.32
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.
- package/dist/beagle-ui.js +14 -5
- package/package.json +1 -1
package/dist/beagle-ui.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export const BEAGLE_UI_VERSION = "0.2.
|
|
1
|
+
export const BEAGLE_UI_VERSION = "0.2.32";
|
|
2
2
|
// src/icons.jsx
|
|
3
3
|
var ICON_PATHS = {
|
|
4
4
|
// ---- tab bar (the four must feel like one set) ----
|
|
@@ -1354,7 +1354,9 @@ var ASSISTANT_PEER = {
|
|
|
1354
1354
|
userId: ASSISTANT_ID,
|
|
1355
1355
|
alias: "Beagle Assistant",
|
|
1356
1356
|
address: "",
|
|
1357
|
-
online:
|
|
1357
|
+
// Not a peer, so not "online": there is no session, nothing to be present
|
|
1358
|
+
// on, and no dot is drawn for an `app` row anywhere in the UI.
|
|
1359
|
+
online: false,
|
|
1358
1360
|
app: true,
|
|
1359
1361
|
agent: false,
|
|
1360
1362
|
pending: false,
|
|
@@ -1798,7 +1800,7 @@ function PeerRow({ peer, T, active, onClick, muted, isProtocol, fix }) {
|
|
|
1798
1800
|
textOverflow: "ellipsis",
|
|
1799
1801
|
flex: 1,
|
|
1800
1802
|
minWidth: 0
|
|
1801
|
-
} }, dkRowPreview(row.preview)))), /* @__PURE__ */ React.createElement("div", { style: { display: "flex", flexDirection: "column", alignItems: "flex-end", gap: 4, flexShrink: 0 } }, /* @__PURE__ */ React.createElement("span", { style: { fontFamily: "var(--mono)", fontSize: 10.5, color: "var(--faint)" } }, row.lastTime), row.unread ? /* @__PURE__ */ React.createElement(Unread, { n: row.unread }) : peer.pending ? /* @__PURE__ */ React.createElement(Icon, { name: "clock", size: 11, stroke: 2.2, color: "var(--warn, #d29922)", title: "friend request pending" }) : /* @__PURE__ */ React.createElement(StatusDot, { online: peer.online })));
|
|
1803
|
+
} }, dkRowPreview(row.preview)))), /* @__PURE__ */ React.createElement("div", { style: { display: "flex", flexDirection: "column", alignItems: "flex-end", gap: 4, flexShrink: 0 } }, /* @__PURE__ */ React.createElement("span", { style: { fontFamily: "var(--mono)", fontSize: 10.5, color: "var(--faint)" } }, row.lastTime), peer.app ? null : row.unread ? /* @__PURE__ */ React.createElement(Unread, { n: row.unread }) : peer.pending ? /* @__PURE__ */ React.createElement(Icon, { name: "clock", size: 11, stroke: 2.2, color: "var(--warn, #d29922)", title: "friend request pending" }) : /* @__PURE__ */ React.createElement(StatusDot, { online: peer.online })));
|
|
1802
1804
|
}
|
|
1803
1805
|
function dkActivityTs(p, isProtocol, fix) {
|
|
1804
1806
|
const row = rosterRow(p, isProtocol || (() => false), fix);
|
|
@@ -4407,6 +4409,8 @@ function DkImgAvatar({ url, seed, size, radius }) {
|
|
|
4407
4409
|
}
|
|
4408
4410
|
function DkAvatar({ peer, size = 30, radius = 7, dot = true }) {
|
|
4409
4411
|
const d = Math.max(8, size * 0.3);
|
|
4412
|
+
if (peer && peer.app)
|
|
4413
|
+
dot = false;
|
|
4410
4414
|
return /* @__PURE__ */ React.createElement("div", { style: { position: "relative", width: size, height: size, flexShrink: 0 } }, peer.agent ? /* @__PURE__ */ React.createElement(DkBot, { seed: peer.id, size, radius }) : peer.avatarUrl ? /* @__PURE__ */ React.createElement(DkImgAvatar, { url: peer.avatarUrl, seed: peer.userId || peer.id, size, radius }) : peer.punkId != null ? /* @__PURE__ */ React.createElement(DkPunkAvatar, { id: peer.punkId, size, radius, fallbackSeed: peer.userId || peer.id }) : /* @__PURE__ */ React.createElement(DkIdenticon, { seed: peer.userId || peer.id, size, radius }), dot && /* @__PURE__ */ React.createElement("span", { style: {
|
|
4411
4415
|
position: "absolute",
|
|
4412
4416
|
right: -2,
|
|
@@ -6168,6 +6172,8 @@ function useIncomingAlerts({ T, peers, requests, loaded, activeId, sound = true,
|
|
|
6168
6172
|
return;
|
|
6169
6173
|
const byId = /* @__PURE__ */ new Map();
|
|
6170
6174
|
for (const p of peers || []) {
|
|
6175
|
+
if (p && p.app)
|
|
6176
|
+
continue;
|
|
6171
6177
|
const dir = p.lastDir || (String(p.lastMsg || "").startsWith("you: ") ? "out" : "in");
|
|
6172
6178
|
const quiet = typeof isProtocol === "function" && lastIsProtocol(p, isProtocol);
|
|
6173
6179
|
byId.set(p.id, { ts: p.lastTs || 0, dir, quiet });
|
|
@@ -7139,8 +7145,11 @@ function DkApp() {
|
|
|
7139
7145
|
/* @__PURE__ */ React.createElement(Icon, { name: "share", size: 16, stroke: 2, color: "var(--accent)" })
|
|
7140
7146
|
);
|
|
7141
7147
|
React.useEffect(() => {
|
|
7142
|
-
if (
|
|
7143
|
-
|
|
7148
|
+
if (phone || activeId)
|
|
7149
|
+
return;
|
|
7150
|
+
const first = (peers || []).find((p) => !p.app);
|
|
7151
|
+
if (first)
|
|
7152
|
+
setActiveId(first.id);
|
|
7144
7153
|
}, [peers, activeId, phone]);
|
|
7145
7154
|
React.useEffect(() => {
|
|
7146
7155
|
if (!phone)
|
package/package.json
CHANGED