@ai-ecoverse/slicc-spectrum 1.86.3 → 1.86.4
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/README.md +1 -1
- package/dist/slicc-ui.js +11 -5
- package/dist/slicc-ui.js.map +3 -3
- package/dist/types/app/follow.d.ts +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -522,7 +522,7 @@ With `guests` and no `network`, it shows only the Guests section (no connection,
|
|
|
522
522
|
|
|
523
523
|
#### `<slicc-tray>`
|
|
524
524
|
|
|
525
|
-
The tray items in the header, each opening a panel when that panel is in `panels`: the connection (`#chip`, a status light with the float's name and followers, `data-surface="network"`) opens Network at its **Sync** section, and the budget (`#usage`, `data-surface="monitor"`) opens the Monitor.
|
|
525
|
+
The tray items in the header, each opening a panel when that panel is in `panels`: the connection (`#chip`, a status light with the float's name and followers, `data-surface="network"`, neutral and labelled "…, can’t follow" while the follow is `refused` and `connected`, exactly when the follow light reads "Can’t follow") opens Network at its **Sync** section, and the budget (`#usage`, `data-surface="monitor"`) opens the Monitor.
|
|
526
526
|
Without the panel an item is a plain status with its label.
|
|
527
527
|
|
|
528
528
|
#### `<slicc-confirm>`
|
package/dist/slicc-ui.js
CHANGED
|
@@ -9759,9 +9759,11 @@ var lights = {
|
|
|
9759
9759
|
unlinked: ["negative", (owner) => `Unlinked from ${owner}`],
|
|
9760
9760
|
failed: ["negative", (owner) => `Can\u2019t reach ${owner}`]
|
|
9761
9761
|
};
|
|
9762
|
+
function refusedNow(state2) {
|
|
9763
|
+
return !!state2?.refused && state2.link === "connected";
|
|
9764
|
+
}
|
|
9762
9765
|
function followLight(state2) {
|
|
9763
|
-
if (state2
|
|
9764
|
-
return { variant: "neutral", text: `Can\u2019t follow ${state2.owner}` };
|
|
9766
|
+
if (refusedNow(state2)) return { variant: "neutral", text: `Can\u2019t follow ${state2.owner}` };
|
|
9765
9767
|
const [variant, text2] = lights[state2.link];
|
|
9766
9768
|
return { variant, text: text2(state2.owner) };
|
|
9767
9769
|
}
|
|
@@ -13524,7 +13526,10 @@ var SliccTray = class extends ModelElement {
|
|
|
13524
13526
|
`
|
|
13525
13527
|
];
|
|
13526
13528
|
subscribe(model) {
|
|
13527
|
-
return [
|
|
13529
|
+
return [
|
|
13530
|
+
model.tray.on("status", () => this.requestUpdate()),
|
|
13531
|
+
...model.follow ? [model.follow.on("follow", () => this.requestUpdate())] : []
|
|
13532
|
+
];
|
|
13528
13533
|
}
|
|
13529
13534
|
#open(id, section) {
|
|
13530
13535
|
this.dispatchEvent(
|
|
@@ -13542,7 +13547,8 @@ var SliccTray = class extends ModelElement {
|
|
|
13542
13547
|
const model = this.model;
|
|
13543
13548
|
if (!model) return b``;
|
|
13544
13549
|
const status2 = model.tray.status();
|
|
13545
|
-
const
|
|
13550
|
+
const refused2 = refusedNow(model.follow?.state());
|
|
13551
|
+
const connection = `${connectionLabel[status2.connection]}${refused2 ? ", can\u2019t follow" : ""}`;
|
|
13546
13552
|
const followers = `${status2.followers.length} ${status2.followers.length === 1 ? "follower" : "followers"}`;
|
|
13547
13553
|
const light = status2.connection === "live" ? status2.name : `${status2.name}, ${connection}`;
|
|
13548
13554
|
const budget = shownBudget(status2);
|
|
@@ -13551,7 +13557,7 @@ var SliccTray = class extends ModelElement {
|
|
|
13551
13557
|
"network",
|
|
13552
13558
|
`Tray ${status2.name}: ${connection}, ${followers}`,
|
|
13553
13559
|
b`<span>
|
|
13554
|
-
<swc-status-light size="s" variant=${connectionVariant[status2.connection]}>
|
|
13560
|
+
<swc-status-light size="s" variant=${refused2 ? "neutral" : connectionVariant[status2.connection]}>
|
|
13555
13561
|
<span class="detail">${light}</span>
|
|
13556
13562
|
</swc-status-light>
|
|
13557
13563
|
<span class="detail muted followers"><swc-icon-user-group size="s"></swc-icon-user-group>${status2.followers.length}</span>
|