@7365admin1/layer-common 4.34.1-staging.368 → 4.34.1-staging.369

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.
@@ -433,12 +433,16 @@
433
433
 
434
434
  /* ------------------------------------------- network view (phase b) */
435
435
 
436
- /* A whole robot page inside an app layout's padded container. */
436
+ /*
437
+ * A whole robot page inside an app layout's padded container. Never a negative
438
+ * margin: the apps' containers pad 8-24px, and pulling the page above its
439
+ * content box slid the header under the app's fixed top bar.
440
+ */
437
441
  .hero-page {
438
442
  display: flex;
439
443
  flex-direction: column;
440
444
  gap: 20px;
441
- margin: -24px;
445
+ margin: 0;
442
446
  padding: 20px 24px 40px;
443
447
  min-height: calc(100vh - 64px);
444
448
  }
@@ -489,10 +493,6 @@
489
493
  .hero-live__dot { width: 8px; height: 8px; display: inline-block; background: var(--hero-accent); animation: heroPulse 2s ease-out infinite; }
490
494
  .hero-live__dot--off { background: var(--hero-neutral-300); animation: none; }
491
495
 
492
- .hero-bell.v-btn { gap: 8px; padding: 5px 10px; min-height: 0; height: auto; }
493
- .hero-bell.v-btn .v-btn__content { gap: 8px; }
494
- .hero-bell--on.v-btn { color: var(--hero-accent); border-color: var(--hero-accent); }
495
-
496
496
  /* Two columns that stack below ~900px: main + aside. */
497
497
  .hero-split { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
498
498
  .hero-split__main { display: flex; flex-direction: column; gap: 12px; min-width: 0; flex: 999 1 560px; }
@@ -581,11 +581,11 @@
581
581
 
582
582
  /* ---------------------------------------- site fleet + detail (phase c) */
583
583
 
584
- /* The whole screen inside an app layout: header edge to edge, then main. */
584
+ /* The whole screen inside an app layout: header, then main. No negative margin (see .hero-page). */
585
585
  .hero-screen {
586
586
  display: flex;
587
587
  flex-direction: column;
588
- margin: -24px;
588
+ margin: 0;
589
589
  min-height: calc(100vh - 64px);
590
590
  }
591
591
  .hero-main { display: flex; flex-direction: column; gap: 20px; padding: 20px 24px 40px; min-width: 0; }
@@ -3,7 +3,9 @@
3
3
  The shared shell header (README "Shared shell"), inside the app's own
4
4
  layout: HERO mark + org line, Site select (only with more than one site),
5
5
  Cleaning | Security (only when the account has both types), then the live
6
- indicator, the bell with the open-fault count and the role tag.
6
+ indicator and the role tag. No bell: the app's own top-bar bell is the
7
+ only one (owner, 2026-09-24); open faults show on Alerts. A stray `faults`
8
+ prop or `@bell` from an older page just falls through to <header> unused.
7
9
  -->
8
10
  <header class="hero-header">
9
11
  <div class="hero-brand">
@@ -34,7 +36,6 @@
34
36
  <span class="hero-head__spacer" />
35
37
  <div class="hero-header__right">
36
38
  <RobotLiveIndicator :connected="connected" />
37
- <RobotBell :count="faults" @click="emit('bell')" />
38
39
  <span class="hero-tag hero-tag--neutral">{{ role }}</span>
39
40
  </div>
40
41
  <span class="hero-bar__sweep" :class="{ 'hero-bar__sweep--off': !connected }" aria-hidden="true" />
@@ -44,7 +45,6 @@
44
45
  <script setup lang="ts">
45
46
  import RobotMark from "./Mark.vue";
46
47
  import RobotLiveIndicator from "./LiveIndicator.vue";
47
- import RobotBell from "./Bell.vue";
48
48
  import { typeLabel, type TRobotType } from "../../utils/robot-display";
49
49
 
50
50
  withDefaults(
@@ -55,10 +55,9 @@ withDefaults(
55
55
  types?: TRobotType[];
56
56
  type?: TRobotType;
57
57
  connected?: boolean;
58
- faults?: number;
59
58
  role?: string;
60
59
  }>(),
61
- { orgName: "", sites: () => [], site: "", types: () => ["cleaning"], type: "cleaning", connected: true, faults: 0, role: "View-only" },
60
+ { orgName: "", sites: () => [], site: "", types: () => ["cleaning"], type: "cleaning", connected: true, role: "View-only" },
62
61
  );
63
- const emit = defineEmits<{ "update:site": [id: string]; "update:type": [type: TRobotType]; bell: [] }>();
62
+ const emit = defineEmits<{ "update:site": [id: string]; "update:type": [type: TRobotType] }>();
64
63
  </script>
@@ -16,11 +16,9 @@
16
16
  :types="types"
17
17
  :type="type"
18
18
  :connected="connected"
19
- :faults="alertCount"
20
19
  :role="role"
21
20
  @update:site="(id) => emit('update:site', id)"
22
21
  @update:type="setType"
23
- @bell="emit('bell')"
24
22
  />
25
23
  <main class="hero-main">
26
24
  <RobotDetail
@@ -120,7 +118,7 @@
120
118
  </template>
121
119
 
122
120
  <script setup lang="ts">
123
- import { computed, onBeforeUnmount, ref, watch } from "vue";
121
+ import { computed, ref, watch } from "vue";
124
122
  import RobotHero from "./Hero.vue";
125
123
  import RobotSiteHeader from "./SiteHeader.vue";
126
124
  import RobotSiteFleet from "./SiteFleet.vue";
@@ -183,7 +181,6 @@ const emit = defineEmits<{
183
181
  open: [id: string];
184
182
  back: [];
185
183
  network: [];
186
- bell: [];
187
184
  /** Live feed health + open faults, for a host drawing its own header. */
188
185
  status: [status: { connected: boolean; faults: number }];
189
186
  }>();
@@ -205,12 +202,7 @@ function onFleetStatus(s: { connected: boolean; faults: number; siteName: string
205
202
  }
206
203
  watch([connected, faults], ([c, f]) => emit("status", { connected: c, faults: f }));
207
204
 
208
- /*
209
- * The bell: the site's open faults (not robots merely offline - they are on
210
- * Alerts too) for every robot type this app presents, the same count on every
211
- * view. Read every 30 s while visible; clicking it opens Alerts (`bell`).
212
- */
213
- const { getSiteFaults, getSiteSummary } = useRobots();
205
+ const { getSiteSummary } = useRobots();
214
206
 
215
207
  // The client and site names for the Alerts / Activity log kickers, known even
216
208
  // before a fleet view has reported them.
@@ -227,21 +219,6 @@ watch(
227
219
  },
228
220
  { immediate: true },
229
221
  );
230
- const alertCount = ref(0);
231
- async function loadAlertCount() {
232
- if (!props.site) return;
233
- try {
234
- alertCount.value = Number((await getSiteFaults(props.site, { limit: 1 }))?.faults ?? 0);
235
- } catch {
236
- // Keep the last count; the views say what failed.
237
- }
238
- }
239
- watch(() => props.site, loadAlertCount, { immediate: true });
240
- const bellTimer = setInterval(() => {
241
- if (typeof document !== "undefined" && document.visibilityState === "hidden") return;
242
- loadAlertCount();
243
- }, 30000);
244
- onBeforeUnmount(() => clearInterval(bellTimer));
245
222
 
246
223
  const addOpen = ref(false);
247
224
  const toast = ref("");
@@ -297,7 +297,7 @@ export default function useRobots() {
297
297
 
298
298
  /**
299
299
  * The site's open faults and robots not reporting (Alerts, README §6),
300
- * faults first, paged; `faults` = real faults only (the header bell).
300
+ * faults first, paged; `faults` = real faults only (robots merely offline are not counted).
301
301
  * Narrowed to this app's robot types.
302
302
  */
303
303
  function getSiteFaults(site: string, { page = 1, limit = 25, type = "" }: { page?: number; limit?: number; type?: string } = {}) {
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.34.1-staging.368",
5
+ "version": "4.34.1-staging.369",
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.",
@@ -1,21 +0,0 @@
1
- <template>
2
- <!-- The header bell: open faults network-wide; accent while any are open. -->
3
- <v-btn
4
- variant="outlined"
5
- class="hero-bell"
6
- :class="{ 'hero-bell--on': count > 0 }"
7
- :aria-label="`${count} open ${count === 1 ? 'fault' : 'faults'}`"
8
- @click="emit('click')"
9
- >
10
- <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true">
11
- <path d="M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9" />
12
- <path d="M10.3 21a1.94 1.94 0 0 0 3.4 0" />
13
- </svg>
14
- <span>{{ count }}</span>
15
- </v-btn>
16
- </template>
17
-
18
- <script setup lang="ts">
19
- withDefaults(defineProps<{ count?: number }>(), { count: 0 });
20
- const emit = defineEmits<{ click: [] }>();
21
- </script>