@7365admin1/layer-common 4.35.1-staging.399 → 4.35.1-staging.400
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.
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
</div>
|
|
21
21
|
|
|
22
22
|
<div v-if="error" class="hero-notice" role="alert">{{ error }}</div>
|
|
23
|
+
<div v-else-if="live && !live.ok && live.reason" class="hero-notice" role="status">Can't read this robot right now: {{ live.reason }}</div>
|
|
23
24
|
|
|
24
25
|
<div v-if="fault" class="hero-faultbar" role="alert">
|
|
25
26
|
<span class="hero-faultbar__code">{{ fault.code }}</span>
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@7365admin1/layer-common",
|
|
3
3
|
"license": "MIT",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"version": "4.35.1-staging.
|
|
5
|
+
"version": "4.35.1-staging.400",
|
|
6
6
|
"author": "7365admin1",
|
|
7
7
|
"main": "./nuxt.config.ts",
|
|
8
8
|
"//files": "What a consumer extending this layer actually loads. Without this npm ships the whole working tree - the changesets, the CI workflows, the render harness in tools/ and any scratch directory that happened to exist at publish time. Nuxt resolves a layer by directory, so every runtime directory below has to stay listed; adding a new top-level runtime directory means adding it here too.",
|
package/utils/robot-display.ts
CHANGED
|
@@ -598,6 +598,8 @@ export type TLiveRobotState = {
|
|
|
598
598
|
ok: boolean;
|
|
599
599
|
/** false = its brand has no interface: nothing to show, ever. */
|
|
600
600
|
monitorable?: boolean;
|
|
601
|
+
/** When `ok` is false: why, in words (e.g. "Ounitech rejected the robot list (sign-in) (code X: ...)"). */
|
|
602
|
+
reason?: string;
|
|
601
603
|
online?: boolean;
|
|
602
604
|
mode?: string;
|
|
603
605
|
batteryPercent?: number | null;
|
|
@@ -654,7 +656,13 @@ export function mergeLiveStates(
|
|
|
654
656
|
next[item.id] =
|
|
655
657
|
item.monitorable !== false && p?.ok && recent(p.readAt)
|
|
656
658
|
? { ...p, stale: true }
|
|
657
|
-
: {
|
|
659
|
+
: {
|
|
660
|
+
id: item.id,
|
|
661
|
+
ok: false,
|
|
662
|
+
monitorable: item.monitorable !== false,
|
|
663
|
+
// The API's plain reason, so the detail screen says WHY instead of only "Reconnecting".
|
|
664
|
+
...(typeof item.reason === "string" && item.reason ? { reason: item.reason.slice(0, 300) } : {}),
|
|
665
|
+
};
|
|
658
666
|
continue;
|
|
659
667
|
}
|
|
660
668
|
const s = { ...item, ok: true, readAt: now, stale: false } as TLiveRobotState;
|