@7365admin1/layer-common 4.28.1-staging.358 → 4.28.1-staging.360
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/assets/css/robot-hero.css +466 -0
- package/components/Robot/Battery.vue +18 -0
- package/components/Robot/CapabilityTag.vue +14 -0
- package/components/Robot/Card.vue +56 -0
- package/components/Robot/CommandBar.vue +47 -0
- package/components/Robot/CredentialField.vue +37 -0
- package/components/Robot/FaultBadge.vue +26 -0
- package/components/Robot/FloorLabel.vue +12 -0
- package/components/Robot/Hero.vue +32 -0
- package/components/Robot/LiftQueueRow.vue +28 -0
- package/components/Robot/MapToolbar.vue +53 -0
- package/components/Robot/NoMonitoring.vue +14 -0
- package/components/Robot/Reconnecting.vue +7 -0
- package/components/Robot/StatusChip.vue +15 -0
- package/components/Robot/SummaryCell.vue +64 -0
- package/components/Robot/SummaryStrip.vue +19 -0
- package/components/Robot/Table.vue +115 -0
- package/components/Robot/Toast.vue +27 -0
- package/components/Robot/ViewOnlyNotice.vue +3 -0
- package/components/RolePermissionFormCreate.vue +78 -1
- package/components/RolePermissionFormPreviewUpdate.vue +83 -2
- package/components/VehicleManagement.vue +150 -10
- package/package.json +1 -1
- package/plugins/API.ts +7 -2
- package/plugins/vuetify.ts +8 -1
- package/types/vehicle.d.ts +11 -0
- package/utils/permission-refusal.ts +40 -0
- package/utils/robot-display.ts +304 -0
- package/utils/theme.ts +152 -0
|
@@ -0,0 +1,466 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HERO - the robot fleet's look, scoped to `.hero` and nothing else.
|
|
3
|
+
*
|
|
4
|
+
* Owner decision 2026-09-23: Archivo, square corners and the red accent on
|
|
5
|
+
* robot pages ONLY. Every rule below starts at `.hero` (the root that
|
|
6
|
+
* `components/Robot/Hero.vue` renders), except the `@keyframes`, whose names
|
|
7
|
+
* are all `hero*` and unused anywhere else. Outside that root the product
|
|
8
|
+
* keeps Manrope and its rounded radii.
|
|
9
|
+
*
|
|
10
|
+
* Colours are not restated here. They come from the `hero-light` /
|
|
11
|
+
* `hero-dark` Vuetify themes (`utils/theme.ts`), which the root's
|
|
12
|
+
* `v-theme-provider` puts in scope as `--v-theme-*` / `--v-hero-*`.
|
|
13
|
+
* Every size is the handoff's (`design_handoff_robot_fleet/README.md` and its
|
|
14
|
+
* token sheet `_ds/.../styles.css`).
|
|
15
|
+
*
|
|
16
|
+
* Overlays. Vuetify teleports every overlay (v-menu, v-dialog, v-tooltip,
|
|
17
|
+
* v-select's menu, v-snackbar) to <body>, OUTSIDE the `.hero` root. It does
|
|
18
|
+
* stamp the overlay with the theme it was opened under, so an overlay opened
|
|
19
|
+
* inside <RobotHero> carries `v-theme--hero-light|dark` and one opened
|
|
20
|
+
* anywhere else never does. The scope is therefore
|
|
21
|
+
* `.hero` OR `.v-overlay.v-theme--hero-* > .v-overlay__content`
|
|
22
|
+
* written as `:is(.hero, :where(...) > .v-overlay__content)`, which keeps
|
|
23
|
+
* every rule at the specificity it had with `.hero` alone. No content-class
|
|
24
|
+
* is needed; proven both ways by tools/hero-sheet/overlay-check.cjs.
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
:is(.hero, :where(.v-overlay.v-theme--hero-light, .v-overlay.v-theme--hero-dark) > .v-overlay__content) {
|
|
28
|
+
--hero-bg: rgb(var(--v-theme-background));
|
|
29
|
+
--hero-surface: rgb(var(--v-theme-surface));
|
|
30
|
+
--hero-text: rgb(var(--v-theme-on-surface));
|
|
31
|
+
--hero-accent: rgb(var(--v-theme-accent));
|
|
32
|
+
--hero-accent-600: rgb(var(--v-hero-accent-600));
|
|
33
|
+
--hero-accent-700: rgb(var(--v-hero-accent-700));
|
|
34
|
+
--hero-neutral-100: rgb(var(--v-hero-neutral-100));
|
|
35
|
+
--hero-neutral-300: rgb(var(--v-hero-neutral-300));
|
|
36
|
+
--hero-neutral-800: rgb(var(--v-hero-neutral-800));
|
|
37
|
+
--hero-neutral-900: rgb(var(--v-hero-neutral-900));
|
|
38
|
+
--hero-divider: rgba(var(--v-theme-on-surface), var(--v-hero-divider-opacity));
|
|
39
|
+
--hero-shadow-sm: var(--v-hero-shadow-sm);
|
|
40
|
+
--hero-shadow-lg: var(--v-hero-shadow-lg);
|
|
41
|
+
--hero-font: "Archivo", system-ui, sans-serif;
|
|
42
|
+
|
|
43
|
+
/* The layer's own tokens, re-pointed inside the scope only, so a shared
|
|
44
|
+
component that reads them (`var(--font-sans)`, `var(--r-card)`) draws
|
|
45
|
+
HERO here and the product's look everywhere else. */
|
|
46
|
+
--font-sans: var(--hero-font);
|
|
47
|
+
--r-card: 0px;
|
|
48
|
+
--r-inner: 0px;
|
|
49
|
+
--r-inner-sm: 0px;
|
|
50
|
+
--r-inner-lg: 0px;
|
|
51
|
+
--r-tag: 0px;
|
|
52
|
+
--r-pill: 0px;
|
|
53
|
+
--r-modal: 0px;
|
|
54
|
+
--r-menu: 0px;
|
|
55
|
+
|
|
56
|
+
font-family: var(--hero-font);
|
|
57
|
+
font-size: 13px;
|
|
58
|
+
line-height: 1.45;
|
|
59
|
+
}
|
|
60
|
+
/* Page ink and ground on the root only - an overlay keeps its own surface. */
|
|
61
|
+
:is(.hero, :where(.v-overlay.v-theme--hero-light, .v-overlay.v-theme--hero-dark) > .v-overlay__content) {
|
|
62
|
+
color: var(--hero-text);
|
|
63
|
+
background: var(--hero-bg);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/* Radius 0 on everything inside. Doubled class so it outranks Vuetify's
|
|
67
|
+
`rounded-*` utilities, which are `!important` at 0,1,0. */
|
|
68
|
+
.hero.hero,
|
|
69
|
+
.hero.hero *,
|
|
70
|
+
.hero.hero *::before,
|
|
71
|
+
.hero.hero *::after,
|
|
72
|
+
.v-overlay.v-theme--hero-light > .v-overlay__content,
|
|
73
|
+
.v-overlay.v-theme--hero-light > .v-overlay__content *,
|
|
74
|
+
.v-overlay.v-theme--hero-dark > .v-overlay__content,
|
|
75
|
+
.v-overlay.v-theme--hero-dark > .v-overlay__content * {
|
|
76
|
+
border-radius: 0 !important;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
:is(.hero, :where(.v-overlay.v-theme--hero-light, .v-overlay.v-theme--hero-dark) > .v-overlay__content) :focus { outline: none; }
|
|
80
|
+
:is(.hero, :where(.v-overlay.v-theme--hero-light, .v-overlay.v-theme--hero-dark) > .v-overlay__content) :focus-visible { outline: 2px solid var(--hero-accent); outline-offset: 2px; }
|
|
81
|
+
:is(.hero, :where(.v-overlay.v-theme--hero-light, .v-overlay.v-theme--hero-dark) > .v-overlay__content) ::selection { background: color-mix(in srgb, var(--hero-accent) 30%, transparent); }
|
|
82
|
+
:is(.hero, :where(.v-overlay.v-theme--hero-light, .v-overlay.v-theme--hero-dark) > .v-overlay__content) h1, :is(.hero, :where(.v-overlay.v-theme--hero-light, .v-overlay.v-theme--hero-dark) > .v-overlay__content) h2, :is(.hero, :where(.v-overlay.v-theme--hero-light, .v-overlay.v-theme--hero-dark) > .v-overlay__content) h3, :is(.hero, :where(.v-overlay.v-theme--hero-light, .v-overlay.v-theme--hero-dark) > .v-overlay__content) h4 {
|
|
83
|
+
font-family: var(--hero-font);
|
|
84
|
+
font-weight: 800;
|
|
85
|
+
line-height: 1.12;
|
|
86
|
+
letter-spacing: -0.015em;
|
|
87
|
+
margin: 0;
|
|
88
|
+
}
|
|
89
|
+
:is(.hero, :where(.v-overlay.v-theme--hero-light, .v-overlay.v-theme--hero-dark) > .v-overlay__content) h2 { font-size: 26px; }
|
|
90
|
+
|
|
91
|
+
/* ------------------------------------------------------------ text roles */
|
|
92
|
+
|
|
93
|
+
.hero-kicker {
|
|
94
|
+
font-size: 10px;
|
|
95
|
+
letter-spacing: 0.12em;
|
|
96
|
+
text-transform: uppercase;
|
|
97
|
+
white-space: nowrap;
|
|
98
|
+
opacity: 0.6;
|
|
99
|
+
}
|
|
100
|
+
.hero-kicker--accent { color: var(--hero-accent); opacity: 1; }
|
|
101
|
+
.hero-muted { opacity: 0.6; }
|
|
102
|
+
|
|
103
|
+
/* ------------------------------------------------- status tones (fills) */
|
|
104
|
+
|
|
105
|
+
.hero-tone--success { background: rgb(var(--v-theme-success)); color: rgb(var(--v-theme-on-success)); }
|
|
106
|
+
.hero-tone--warning { background: rgb(var(--v-theme-warning)); color: rgb(var(--v-theme-on-warning)); }
|
|
107
|
+
.hero-tone--info { background: rgb(var(--v-theme-info)); color: rgb(var(--v-theme-on-info)); }
|
|
108
|
+
.hero-tone--error { background: rgb(var(--v-theme-error)); color: rgb(var(--v-theme-on-error)); }
|
|
109
|
+
.hero-tone--accent { background: var(--hero-accent); color: #fff; }
|
|
110
|
+
/* The handoff's "primary" status tone: ink bg, page-bg text. */
|
|
111
|
+
.hero-tone--ink { background: var(--hero-text); color: var(--hero-bg); }
|
|
112
|
+
.hero-tone--neutral { background: var(--hero-neutral-300); color: var(--hero-neutral-900); }
|
|
113
|
+
|
|
114
|
+
/* --------------------------------------------------------- status chip */
|
|
115
|
+
|
|
116
|
+
.hero-chip {
|
|
117
|
+
display: inline-flex;
|
|
118
|
+
align-items: center;
|
|
119
|
+
gap: 6px;
|
|
120
|
+
font-size: 11px;
|
|
121
|
+
line-height: 1.45;
|
|
122
|
+
letter-spacing: 0.04em;
|
|
123
|
+
text-transform: uppercase;
|
|
124
|
+
white-space: nowrap;
|
|
125
|
+
padding: 3px 8px;
|
|
126
|
+
}
|
|
127
|
+
.hero-chip__dot { width: 6px; height: 6px; flex: none; background: currentColor; }
|
|
128
|
+
.hero-chip__dot--blink { animation: heroBlink 1.4s ease-in-out infinite; }
|
|
129
|
+
|
|
130
|
+
/* ----------------------------------------------------------------- tags */
|
|
131
|
+
|
|
132
|
+
.hero-tag {
|
|
133
|
+
display: inline-flex;
|
|
134
|
+
align-items: center;
|
|
135
|
+
font-size: 11px;
|
|
136
|
+
line-height: 1.45;
|
|
137
|
+
letter-spacing: 0.02em;
|
|
138
|
+
padding: 3px 10px;
|
|
139
|
+
white-space: nowrap;
|
|
140
|
+
}
|
|
141
|
+
.hero-tag--outline { border: 1px solid var(--hero-accent); color: var(--hero-accent); padding: 2px 9px; }
|
|
142
|
+
.hero-tag--neutral { background: var(--hero-neutral-100); color: var(--hero-neutral-800); }
|
|
143
|
+
.hero-tag--struck { text-decoration: line-through; }
|
|
144
|
+
|
|
145
|
+
/* -------------------------------------------------------------- battery */
|
|
146
|
+
|
|
147
|
+
.hero-battery { display: inline-flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; white-space: nowrap; }
|
|
148
|
+
.hero-battery__case { width: 26px; height: 11px; border: 1px solid var(--hero-text); padding: 1px; box-sizing: border-box; }
|
|
149
|
+
.hero-battery__fill { height: 100%; }
|
|
150
|
+
|
|
151
|
+
/* ---------------------------------------------------------------- floor */
|
|
152
|
+
|
|
153
|
+
.hero-floor--unknown { opacity: 0.5; }
|
|
154
|
+
|
|
155
|
+
/* ---------------------------------------------------------------- fault */
|
|
156
|
+
|
|
157
|
+
.hero-fault {
|
|
158
|
+
display: inline-flex;
|
|
159
|
+
align-items: center;
|
|
160
|
+
gap: 6px;
|
|
161
|
+
font-size: 11px;
|
|
162
|
+
line-height: 1.45;
|
|
163
|
+
font-weight: 600;
|
|
164
|
+
padding: 2px 7px;
|
|
165
|
+
white-space: nowrap;
|
|
166
|
+
border: 1px solid var(--hero-accent);
|
|
167
|
+
color: var(--hero-accent);
|
|
168
|
+
}
|
|
169
|
+
.hero-fault--compact { padding: 1px 7px; }
|
|
170
|
+
.hero-fault__msg { font-weight: 400; opacity: 0.9; }
|
|
171
|
+
.hero-fault--count { background: var(--hero-accent); color: #fff; }
|
|
172
|
+
|
|
173
|
+
/* -------------------------------------------------------------- buttons */
|
|
174
|
+
|
|
175
|
+
:is(.hero, :where(.v-overlay.v-theme--hero-light, .v-overlay.v-theme--hero-dark) > .v-overlay__content) .v-btn {
|
|
176
|
+
font-family: var(--hero-font);
|
|
177
|
+
font-weight: 800;
|
|
178
|
+
font-size: 14px;
|
|
179
|
+
line-height: 1.2;
|
|
180
|
+
letter-spacing: 0;
|
|
181
|
+
text-transform: none;
|
|
182
|
+
height: auto !important;
|
|
183
|
+
min-width: 0;
|
|
184
|
+
padding: 8px 14.4px;
|
|
185
|
+
}
|
|
186
|
+
:is(.hero, :where(.v-overlay.v-theme--hero-light, .v-overlay.v-theme--hero-dark) > .v-overlay__content) .v-btn .v-btn__content { justify-content: flex-start; }
|
|
187
|
+
:is(.hero, :where(.v-overlay.v-theme--hero-light, .v-overlay.v-theme--hero-dark) > .v-overlay__content) .v-btn--variant-outlined { border: 1px solid var(--hero-divider); color: var(--hero-text); }
|
|
188
|
+
:is(.hero, :where(.v-overlay.v-theme--hero-light, .v-overlay.v-theme--hero-dark) > .v-overlay__content) .v-btn--variant-flat.bg-primary:hover { background-color: var(--hero-accent-600) !important; }
|
|
189
|
+
:is(.hero, :where(.v-overlay.v-theme--hero-light, .v-overlay.v-theme--hero-dark) > .v-overlay__content) .v-btn--variant-flat.bg-primary:active { background-color: var(--hero-accent-700) !important; }
|
|
190
|
+
:is(.hero, :where(.v-overlay.v-theme--hero-light, .v-overlay.v-theme--hero-dark) > .v-overlay__content) .v-btn--variant-flat.bg-primary > .v-btn__overlay { opacity: 0 !important; }
|
|
191
|
+
:is(.hero, :where(.v-overlay.v-theme--hero-light, .v-overlay.v-theme--hero-dark) > .v-overlay__content) .v-btn--variant-text { color: var(--hero-accent); padding-inline: 4px; }
|
|
192
|
+
|
|
193
|
+
.hero-cmds { display: flex; flex-wrap: wrap; gap: 6px; }
|
|
194
|
+
|
|
195
|
+
/* ---------------------------------------------------- map-editor toolbar */
|
|
196
|
+
|
|
197
|
+
.hero-maptools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
|
|
198
|
+
.hero-seg {
|
|
199
|
+
display: inline-flex;
|
|
200
|
+
max-width: 100%;
|
|
201
|
+
overflow-x: auto;
|
|
202
|
+
border: 1px solid var(--hero-divider);
|
|
203
|
+
white-space: nowrap;
|
|
204
|
+
}
|
|
205
|
+
.hero-seg__opt {
|
|
206
|
+
font: inherit;
|
|
207
|
+
font-size: 12px;
|
|
208
|
+
padding: 7px 12px;
|
|
209
|
+
background: transparent;
|
|
210
|
+
color: inherit;
|
|
211
|
+
border: 0;
|
|
212
|
+
border-left: 1px solid var(--hero-divider);
|
|
213
|
+
cursor: pointer;
|
|
214
|
+
}
|
|
215
|
+
.hero-seg__opt:first-child { border-left: 0; }
|
|
216
|
+
.hero-seg__opt:hover { background: color-mix(in srgb, var(--hero-text) 7%, transparent); }
|
|
217
|
+
.hero-seg__opt[aria-pressed="true"] { background: var(--hero-accent); color: #fff; font-weight: 600; }
|
|
218
|
+
.hero-seg__opt--gap { border-left-width: 2px; }
|
|
219
|
+
.hero-seg__opt--save { font-weight: 600; color: var(--hero-accent); }
|
|
220
|
+
.hero-seg__opt:disabled { opacity: 0.45; cursor: not-allowed; }
|
|
221
|
+
|
|
222
|
+
/* --------------------------------------------------------------- inputs */
|
|
223
|
+
|
|
224
|
+
.hero-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
|
|
225
|
+
.hero-field > label { font-size: 12px; color: color-mix(in srgb, var(--hero-text) 70%, transparent); }
|
|
226
|
+
.hero-input {
|
|
227
|
+
width: 100%;
|
|
228
|
+
min-height: 36px;
|
|
229
|
+
padding: 6px 10px;
|
|
230
|
+
font: inherit;
|
|
231
|
+
font-size: 14px;
|
|
232
|
+
color: var(--hero-text);
|
|
233
|
+
caret-color: var(--hero-accent);
|
|
234
|
+
background: var(--hero-surface);
|
|
235
|
+
border: 1px solid var(--hero-divider);
|
|
236
|
+
box-sizing: border-box;
|
|
237
|
+
}
|
|
238
|
+
.hero-input:hover { border-color: color-mix(in srgb, var(--hero-text) 45%, transparent); }
|
|
239
|
+
.hero-input:focus-visible { border-color: var(--hero-accent); outline-offset: 0; }
|
|
240
|
+
.hero-input::placeholder { color: color-mix(in srgb, var(--hero-text) 50%, transparent); }
|
|
241
|
+
.hero-field__note { font-size: 11px; opacity: 0.6; }
|
|
242
|
+
|
|
243
|
+
/* ---------------------------------------------------------------- cards */
|
|
244
|
+
|
|
245
|
+
.hero-card {
|
|
246
|
+
background: var(--hero-surface);
|
|
247
|
+
padding: 12px;
|
|
248
|
+
display: grid;
|
|
249
|
+
grid-template-columns: 1fr auto;
|
|
250
|
+
gap: 8px;
|
|
251
|
+
box-shadow: var(--hero-shadow-sm);
|
|
252
|
+
}
|
|
253
|
+
.hero-card--click { cursor: pointer; }
|
|
254
|
+
.hero-card--click:hover { background: color-mix(in srgb, var(--hero-text) 4%, var(--hero-surface)); }
|
|
255
|
+
.hero-card__name { font-family: var(--hero-font); font-weight: 800; font-size: 15px; line-height: 1.3; }
|
|
256
|
+
.hero-card__sub { opacity: 0.65; font-size: 12px; }
|
|
257
|
+
.hero-card__row { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
|
|
258
|
+
.hero-card__seen { margin-left: auto; opacity: 0.6; font-size: 11px; white-space: nowrap; }
|
|
259
|
+
.hero-card > .hero-chip { align-self: start; }
|
|
260
|
+
|
|
261
|
+
/* ---------------------------------------------------------------- table */
|
|
262
|
+
|
|
263
|
+
.hero-table .v-table { background: transparent; color: inherit; font-size: 14px; font-family: var(--hero-font); }
|
|
264
|
+
.hero-table--compact .v-table { font-size: 12.5px; }
|
|
265
|
+
.hero-table .v-table > .v-table__wrapper > table > thead > tr > th {
|
|
266
|
+
font-size: 11px;
|
|
267
|
+
font-weight: 700;
|
|
268
|
+
letter-spacing: 0.08em;
|
|
269
|
+
text-transform: uppercase;
|
|
270
|
+
color: rgba(var(--v-theme-on-surface), 0.6);
|
|
271
|
+
height: auto;
|
|
272
|
+
padding: 8px;
|
|
273
|
+
border-bottom: 2px solid var(--hero-divider) !important;
|
|
274
|
+
background: var(--hero-bg);
|
|
275
|
+
white-space: nowrap;
|
|
276
|
+
}
|
|
277
|
+
.hero-table .v-table > .v-table__wrapper > table > tbody > tr > td {
|
|
278
|
+
height: auto;
|
|
279
|
+
padding: 8px;
|
|
280
|
+
border-bottom: 1px solid var(--hero-divider) !important;
|
|
281
|
+
}
|
|
282
|
+
.hero-table .v-table > .v-table__wrapper > table > tbody > tr:not(.v-data-table-rows-loading):not(.v-data-table-rows-no-data):hover > td {
|
|
283
|
+
background: color-mix(in srgb, var(--hero-text) 4%, transparent);
|
|
284
|
+
}
|
|
285
|
+
.hero-table .v-data-table-progress { display: none; }
|
|
286
|
+
.hero-table .v-table > .v-table__wrapper > table > tbody > tr.v-data-table-rows-loading > td,
|
|
287
|
+
.hero-table .v-table > .v-table__wrapper > table > tbody > tr.v-data-table-rows-no-data > td {
|
|
288
|
+
padding: 0;
|
|
289
|
+
border-bottom: 0 !important;
|
|
290
|
+
}
|
|
291
|
+
.hero-table .v-table > .v-table__wrapper > table > * > tr > .hero-table__groupcol { width: 0; padding: 0; }
|
|
292
|
+
.hero-table__name { font-weight: 600; }
|
|
293
|
+
.hero-table__group > td {
|
|
294
|
+
background: var(--hero-surface);
|
|
295
|
+
font-weight: 800;
|
|
296
|
+
font-size: 12px;
|
|
297
|
+
}
|
|
298
|
+
.hero-table__group button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
|
|
299
|
+
.hero-table__foot {
|
|
300
|
+
display: flex;
|
|
301
|
+
align-items: center;
|
|
302
|
+
justify-content: space-between;
|
|
303
|
+
gap: 12px;
|
|
304
|
+
padding-top: 10px;
|
|
305
|
+
font-size: 12px;
|
|
306
|
+
}
|
|
307
|
+
.hero-table__foot > span { opacity: 0.7; font-variant-numeric: tabular-nums; }
|
|
308
|
+
.hero-table__pager { display: flex; gap: 6px; }
|
|
309
|
+
|
|
310
|
+
.hero-skel { display: flex; flex-direction: column; gap: 6px; padding: 6px 0; }
|
|
311
|
+
.hero-skel__row { height: 34px; background: var(--hero-surface); animation: heroSkel 1.4s ease-in-out infinite; }
|
|
312
|
+
|
|
313
|
+
.hero-empty { padding: 28px 12px; text-align: left; }
|
|
314
|
+
.hero-empty__title { font-weight: 800; font-size: 15px; }
|
|
315
|
+
.hero-empty__hint { opacity: 0.65; margin-top: 2px; }
|
|
316
|
+
|
|
317
|
+
/* -------------------------------------------------------- summary strip */
|
|
318
|
+
|
|
319
|
+
.hero-summary {
|
|
320
|
+
display: grid;
|
|
321
|
+
grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
|
|
322
|
+
border-top: 2px solid var(--hero-divider);
|
|
323
|
+
}
|
|
324
|
+
.hero-cell {
|
|
325
|
+
--hero-cell-color: var(--hero-text);
|
|
326
|
+
position: relative;
|
|
327
|
+
overflow: hidden;
|
|
328
|
+
padding: 14px 14px 12px;
|
|
329
|
+
border-right: 1px solid var(--hero-divider);
|
|
330
|
+
border-bottom: 1px solid var(--hero-divider);
|
|
331
|
+
display: flex;
|
|
332
|
+
flex-direction: column;
|
|
333
|
+
gap: 8px;
|
|
334
|
+
animation: heroRise 0.5s ease-out both;
|
|
335
|
+
background: linear-gradient(180deg, color-mix(in srgb, var(--hero-text) 3%, transparent), transparent);
|
|
336
|
+
}
|
|
337
|
+
.hero-cell--alert { --hero-cell-color: var(--hero-accent); }
|
|
338
|
+
.hero-cell__corner { position: absolute; width: 10px; height: 10px; }
|
|
339
|
+
.hero-cell__corner--tl { left: 0; top: 0; border-top: 2px solid var(--hero-accent); border-left: 2px solid var(--hero-accent); }
|
|
340
|
+
.hero-cell__corner--br { right: 0; bottom: 0; border-bottom: 2px solid var(--hero-accent); border-right: 2px solid var(--hero-accent); opacity: 0.5; }
|
|
341
|
+
.hero-cell__label {
|
|
342
|
+
display: flex;
|
|
343
|
+
align-items: center;
|
|
344
|
+
gap: 6px;
|
|
345
|
+
font-size: 10px;
|
|
346
|
+
letter-spacing: 0.1em;
|
|
347
|
+
text-transform: uppercase;
|
|
348
|
+
opacity: 0.7;
|
|
349
|
+
white-space: nowrap;
|
|
350
|
+
}
|
|
351
|
+
.hero-cell__square { width: 5px; height: 5px; flex: none; background: var(--hero-cell-color); }
|
|
352
|
+
.hero-cell--alert .hero-cell__square { animation: heroBlink 1.2s ease-in-out infinite; }
|
|
353
|
+
.hero-cell__value {
|
|
354
|
+
font-family: var(--hero-font);
|
|
355
|
+
font-weight: 800;
|
|
356
|
+
font-size: 34px;
|
|
357
|
+
line-height: 1;
|
|
358
|
+
letter-spacing: -0.02em;
|
|
359
|
+
font-variant-numeric: tabular-nums;
|
|
360
|
+
color: var(--hero-cell-color);
|
|
361
|
+
}
|
|
362
|
+
.hero-cell__ticks { display: grid; grid-template-columns: repeat(20, 1fr); gap: 2px; height: 8px; }
|
|
363
|
+
.hero-cell__tick { background: var(--hero-divider); opacity: 0.35; transition: opacity 0.6s ease; }
|
|
364
|
+
.hero-cell__tick--on { background: var(--hero-cell-color); opacity: 0.15; }
|
|
365
|
+
.hero-cell__tick--shown { opacity: 1; }
|
|
366
|
+
.hero-cell__split { font-size: 11px; opacity: 0.6; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
367
|
+
.hero-cell__shimmer {
|
|
368
|
+
position: absolute;
|
|
369
|
+
top: 0;
|
|
370
|
+
bottom: 0;
|
|
371
|
+
width: 30%;
|
|
372
|
+
background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--hero-text) 5%, transparent), transparent);
|
|
373
|
+
animation: heroSweep 7s linear infinite;
|
|
374
|
+
pointer-events: none;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
/* ----------------------------------------------------------- lift queue */
|
|
378
|
+
|
|
379
|
+
.hero-lift-list { display: flex; flex-direction: column; gap: 1px; background: var(--hero-divider); }
|
|
380
|
+
.hero-lift-row {
|
|
381
|
+
position: relative;
|
|
382
|
+
display: grid;
|
|
383
|
+
grid-template-columns: 28px 1fr auto auto;
|
|
384
|
+
gap: 12px;
|
|
385
|
+
align-items: center;
|
|
386
|
+
padding: 8px 10px;
|
|
387
|
+
background: var(--hero-surface);
|
|
388
|
+
}
|
|
389
|
+
.hero-lift-row__n, .hero-lift-row__wait { opacity: 0.6; font-variant-numeric: tabular-nums; }
|
|
390
|
+
.hero-lift-row__route { opacity: 0.65; }
|
|
391
|
+
.hero-lift-row__stripe { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background-size: 40px 2px; }
|
|
392
|
+
.hero-lift-row__stripe--fast { background-image: linear-gradient(90deg, var(--hero-text) 0 50%, transparent 50%); animation: heroBar 1s linear infinite; }
|
|
393
|
+
.hero-lift-row__stripe--slow { background-image: linear-gradient(90deg, rgb(var(--v-theme-info)) 0 25%, transparent 25%); animation: heroBar 2.4s linear infinite; }
|
|
394
|
+
.hero-lift-row__stripe--solid { background: var(--hero-accent); }
|
|
395
|
+
|
|
396
|
+
/* -------------------------------------------- notices, overlay and toast */
|
|
397
|
+
|
|
398
|
+
.hero-notice { padding: 8px 10px; font-size: 12px; background: var(--hero-surface); border-left: 2px solid var(--hero-divider); }
|
|
399
|
+
.hero-notice--panel { padding: 14px 16px; font-size: 13px; }
|
|
400
|
+
.hero-notice__title { font-weight: 600; }
|
|
401
|
+
.hero-notice__body { opacity: 0.7; font-size: 12px; margin-top: 2px; }
|
|
402
|
+
|
|
403
|
+
.hero-reconnecting {
|
|
404
|
+
position: absolute;
|
|
405
|
+
inset: 0;
|
|
406
|
+
z-index: 2;
|
|
407
|
+
display: grid;
|
|
408
|
+
place-items: center;
|
|
409
|
+
background: color-mix(in srgb, var(--hero-bg) 70%, transparent);
|
|
410
|
+
font-weight: 600;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
.hero-toast {
|
|
414
|
+
position: fixed;
|
|
415
|
+
left: 50%;
|
|
416
|
+
bottom: 24px;
|
|
417
|
+
transform: translateX(-50%);
|
|
418
|
+
z-index: 30;
|
|
419
|
+
padding: 10px 16px;
|
|
420
|
+
background: var(--hero-text);
|
|
421
|
+
color: var(--hero-bg);
|
|
422
|
+
font-size: 13px;
|
|
423
|
+
font-weight: 600;
|
|
424
|
+
box-shadow: var(--hero-shadow-lg);
|
|
425
|
+
display: flex;
|
|
426
|
+
gap: 10px;
|
|
427
|
+
align-items: center;
|
|
428
|
+
}
|
|
429
|
+
.hero-toast__square { width: 8px; height: 8px; flex: none; background: var(--hero-accent); }
|
|
430
|
+
|
|
431
|
+
/* ----------------------------------------------------------- animations */
|
|
432
|
+
|
|
433
|
+
@keyframes heroScan { from { background-position: 0 -60px; } to { background-position: 0 120%; } }
|
|
434
|
+
@keyframes heroPulse {
|
|
435
|
+
0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, rgb(var(--v-theme-accent)) 60%, transparent); }
|
|
436
|
+
70% { box-shadow: 0 0 0 7px transparent; }
|
|
437
|
+
}
|
|
438
|
+
@keyframes heroSkel { 0% { opacity: 0.35; } 50% { opacity: 0.7; } 100% { opacity: 0.35; } }
|
|
439
|
+
@keyframes heroBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0.15; } }
|
|
440
|
+
@keyframes heroPing { 0% { transform: scale(0.6); opacity: 0.9; } 100% { transform: scale(2.6); opacity: 0; } }
|
|
441
|
+
@keyframes heroSpin { to { transform: rotate(360deg); } }
|
|
442
|
+
@keyframes heroOrbit {
|
|
443
|
+
0%, 100% { transform: rotateX(62deg) rotateZ(-30deg) translateZ(var(--shift)); }
|
|
444
|
+
50% { transform: rotateX(60deg) rotateZ(-44deg) translateZ(var(--shift)); }
|
|
445
|
+
}
|
|
446
|
+
@keyframes heroSweep { 0% { left: -20%; } 100% { left: 100%; } }
|
|
447
|
+
@keyframes heroRise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
|
|
448
|
+
@keyframes heroLift { from { top: var(--from); } to { top: var(--to); } }
|
|
449
|
+
@keyframes heroDoors { 0%, 35% { transform: scaleX(1); } 50%, 85% { transform: scaleX(0); } 100% { transform: scaleX(1); } }
|
|
450
|
+
@keyframes heroBar { from { background-position: 0 0; } to { background-position: 40px 0; } }
|
|
451
|
+
@keyframes heroFlow { from { transform: translateY(-100%); } to { transform: translateY(100%); } }
|
|
452
|
+
@keyframes heroDash { to { stroke-dashoffset: -22; } }
|
|
453
|
+
|
|
454
|
+
/* A person who asked for less motion gets none: every animation and
|
|
455
|
+
transition in the scope stops at its end state. The count-up checks the
|
|
456
|
+
same media query and jumps straight to its number. */
|
|
457
|
+
@media (prefers-reduced-motion: reduce) {
|
|
458
|
+
.hero *,
|
|
459
|
+
.hero *::before,
|
|
460
|
+
.hero *::after {
|
|
461
|
+
animation-duration: 0.001ms !important;
|
|
462
|
+
animation-iteration-count: 1 !important;
|
|
463
|
+
transition-duration: 0.001ms !important;
|
|
464
|
+
}
|
|
465
|
+
.hero-cell__shimmer { display: none; }
|
|
466
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<!-- No reading renders nothing - never "0%". -->
|
|
3
|
+
<span v-if="reading" class="hero-battery" role="img" :aria-label="`Battery ${reading.text}`">
|
|
4
|
+
<span class="hero-battery__case" aria-hidden="true">
|
|
5
|
+
<span class="hero-battery__fill d-block" :class="`hero-tone--${reading.tone}`" :style="{ width: `${reading.pct}%` }" />
|
|
6
|
+
</span>
|
|
7
|
+
<span aria-hidden="true">{{ reading.text }}</span>
|
|
8
|
+
</span>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<script setup lang="ts">
|
|
12
|
+
import { computed } from "vue";
|
|
13
|
+
import { batteryReading } from "../../utils/robot-display";
|
|
14
|
+
|
|
15
|
+
/** `batteryPercent` from the robot's state; anything but a number renders nothing. */
|
|
16
|
+
const props = defineProps<{ value?: unknown }>();
|
|
17
|
+
const reading = computed(() => batteryReading(props.value));
|
|
18
|
+
</script>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<span class="hero-tag" :class="badge.variant === 'outline' ? 'hero-tag--outline' : 'hero-tag--neutral'">
|
|
3
|
+
<span :class="{ 'hero-tag--struck': badge.variant === 'struck' }">{{ badge.label }}</span>
|
|
4
|
+
</span>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script setup lang="ts">
|
|
8
|
+
import { computed } from "vue";
|
|
9
|
+
import { capabilityBadge } from "../../utils/robot-display";
|
|
10
|
+
|
|
11
|
+
/** The brand's declared capabilities (`/robots/:id/state` or `/robots/brands`); the badge is their COMMAND level. */
|
|
12
|
+
const props = defineProps<{ capabilities?: Record<string, unknown> | null }>();
|
|
13
|
+
const badge = computed(() => capabilityBadge(props.capabilities));
|
|
14
|
+
</script>
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<!-- The compact robot card (mobile-like lists, Needs attention). -->
|
|
3
|
+
<article
|
|
4
|
+
class="hero-card"
|
|
5
|
+
:class="{ 'hero-card--click': clickable }"
|
|
6
|
+
:tabindex="clickable ? 0 : undefined"
|
|
7
|
+
:role="clickable ? 'button' : undefined"
|
|
8
|
+
@click="clickable && emit('open')"
|
|
9
|
+
@keydown.enter="clickable && emit('open')"
|
|
10
|
+
>
|
|
11
|
+
<div>
|
|
12
|
+
<div class="hero-card__name">{{ name }}</div>
|
|
13
|
+
<div class="hero-card__sub">
|
|
14
|
+
<template v-if="brandName">{{ brandName }} · </template>
|
|
15
|
+
<RobotFloorLabel :floor-no="state?.floorNo" :floor-known="state?.floorKnown" />
|
|
16
|
+
</div>
|
|
17
|
+
</div>
|
|
18
|
+
<RobotStatusChip :mode="state?.mode" :type="type" />
|
|
19
|
+
<div class="hero-card__row">
|
|
20
|
+
<RobotBattery :value="state?.batteryPercent" />
|
|
21
|
+
<RobotCapabilityTag v-if="capabilities !== undefined" :capabilities="capabilities" />
|
|
22
|
+
<RobotFaultBadge v-if="state?.fault" :code="state.fault.code" :message="state.fault.message" compact />
|
|
23
|
+
<span v-if="state?.online === false" class="hero-tag hero-tag--neutral">Offline</span>
|
|
24
|
+
<span v-if="lastSeen" class="hero-card__seen">{{ lastSeen }}</span>
|
|
25
|
+
</div>
|
|
26
|
+
</article>
|
|
27
|
+
</template>
|
|
28
|
+
|
|
29
|
+
<script setup lang="ts">
|
|
30
|
+
import RobotBattery from "./Battery.vue";
|
|
31
|
+
import RobotCapabilityTag from "./CapabilityTag.vue";
|
|
32
|
+
import RobotFaultBadge from "./FaultBadge.vue";
|
|
33
|
+
import RobotFloorLabel from "./FloorLabel.vue";
|
|
34
|
+
import RobotStatusChip from "./StatusChip.vue";
|
|
35
|
+
|
|
36
|
+
defineProps<{
|
|
37
|
+
name: string;
|
|
38
|
+
brandName?: string;
|
|
39
|
+
type?: string;
|
|
40
|
+
/** Brand's declared capabilities (null = none, "No interface"); omit to hide the capability badge. */
|
|
41
|
+
capabilities?: Record<string, unknown> | null;
|
|
42
|
+
/** The robot's live state (`/robots/:id/state`). */
|
|
43
|
+
state?: {
|
|
44
|
+
mode?: unknown;
|
|
45
|
+
online?: boolean;
|
|
46
|
+
batteryPercent?: unknown;
|
|
47
|
+
floorNo?: unknown;
|
|
48
|
+
floorKnown?: boolean;
|
|
49
|
+
fault?: { code?: string; message?: string } | null;
|
|
50
|
+
} | null;
|
|
51
|
+
/** Already formatted, e.g. "2 min ago". */
|
|
52
|
+
lastSeen?: string;
|
|
53
|
+
clickable?: boolean;
|
|
54
|
+
}>();
|
|
55
|
+
const emit = defineEmits<{ open: [] }>();
|
|
56
|
+
</script>
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<!--
|
|
3
|
+
Only brand-declared commands, only for a Manager, only while online.
|
|
4
|
+
Anything else is HIDDEN, never greyed; with nothing to offer there is no bar.
|
|
5
|
+
-->
|
|
6
|
+
<div v-if="commands.length" class="hero-cmds" role="toolbar" aria-label="Robot commands">
|
|
7
|
+
<v-btn
|
|
8
|
+
v-for="c in commands"
|
|
9
|
+
:key="c.kind"
|
|
10
|
+
:variant="c.primary ? 'flat' : 'outlined'"
|
|
11
|
+
:color="c.primary ? 'primary' : undefined"
|
|
12
|
+
:loading="busy === c.kind"
|
|
13
|
+
:disabled="!!busy && busy !== c.kind"
|
|
14
|
+
@click="emit('command', c.kind)"
|
|
15
|
+
>
|
|
16
|
+
{{ c.label }}
|
|
17
|
+
</v-btn>
|
|
18
|
+
</div>
|
|
19
|
+
</template>
|
|
20
|
+
|
|
21
|
+
<script setup lang="ts">
|
|
22
|
+
import { computed } from "vue";
|
|
23
|
+
import { visibleCommands, type TRobotCommandKind } from "../../utils/robot-display";
|
|
24
|
+
|
|
25
|
+
const props = defineProps<{
|
|
26
|
+
/** The brand's declared capabilities (`/robots/brands`). */
|
|
27
|
+
capabilities?: Record<string, unknown> | null;
|
|
28
|
+
/** Manager role - the app's command permission. */
|
|
29
|
+
canCommand?: boolean;
|
|
30
|
+
online?: boolean;
|
|
31
|
+
mode?: unknown;
|
|
32
|
+
type?: string;
|
|
33
|
+
/** The command in flight, if any. */
|
|
34
|
+
busy?: TRobotCommandKind | null;
|
|
35
|
+
}>();
|
|
36
|
+
const emit = defineEmits<{ command: [kind: TRobotCommandKind] }>();
|
|
37
|
+
|
|
38
|
+
const commands = computed(() =>
|
|
39
|
+
visibleCommands({
|
|
40
|
+
capabilities: props.capabilities,
|
|
41
|
+
canCommand: props.canCommand,
|
|
42
|
+
online: props.online,
|
|
43
|
+
mode: props.mode,
|
|
44
|
+
type: props.type,
|
|
45
|
+
}),
|
|
46
|
+
);
|
|
47
|
+
</script>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<!--
|
|
3
|
+
Write-only. The stored value is never sent to the browser, so it is never
|
|
4
|
+
shown: once saved the field only says so. Typing replaces it on save.
|
|
5
|
+
-->
|
|
6
|
+
<div class="hero-field">
|
|
7
|
+
<label :for="id">{{ label }}</label>
|
|
8
|
+
<input
|
|
9
|
+
:id="id"
|
|
10
|
+
class="hero-input"
|
|
11
|
+
type="password"
|
|
12
|
+
autocomplete="new-password"
|
|
13
|
+
spellcheck="false"
|
|
14
|
+
:placeholder="credentialPlaceholder(saved)"
|
|
15
|
+
:value="modelValue"
|
|
16
|
+
@input="emit('update:modelValue', ($event.target as HTMLInputElement).value)"
|
|
17
|
+
/>
|
|
18
|
+
</div>
|
|
19
|
+
</template>
|
|
20
|
+
|
|
21
|
+
<script setup lang="ts">
|
|
22
|
+
import { useId } from "vue";
|
|
23
|
+
import { credentialPlaceholder } from "../../utils/robot-display";
|
|
24
|
+
|
|
25
|
+
withDefaults(
|
|
26
|
+
defineProps<{
|
|
27
|
+
label: string;
|
|
28
|
+
/** True once a value is stored server-side. */
|
|
29
|
+
saved?: boolean;
|
|
30
|
+
/** Only the NEW value being typed - never the stored one. */
|
|
31
|
+
modelValue?: string;
|
|
32
|
+
}>(),
|
|
33
|
+
{ saved: false, modelValue: "" },
|
|
34
|
+
);
|
|
35
|
+
const emit = defineEmits<{ "update:modelValue": [value: string] }>();
|
|
36
|
+
const id = useId();
|
|
37
|
+
</script>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<span v-if="typeof count === 'number' && count > 0" class="hero-fault hero-fault--count">
|
|
3
|
+
{{ count }} {{ count === 1 ? "fault" : "faults" }}
|
|
4
|
+
</span>
|
|
5
|
+
<span
|
|
6
|
+
v-else-if="code || message"
|
|
7
|
+
class="hero-fault"
|
|
8
|
+
:class="{ 'hero-fault--compact': compact }"
|
|
9
|
+
:title="compact ? message : undefined"
|
|
10
|
+
>
|
|
11
|
+
{{ code || message }}
|
|
12
|
+
<span v-if="!compact && code && message" class="hero-fault__msg">{{ message }}</span>
|
|
13
|
+
</span>
|
|
14
|
+
</template>
|
|
15
|
+
|
|
16
|
+
<script setup lang="ts">
|
|
17
|
+
defineProps<{
|
|
18
|
+
/** The robot's fault code, e.g. E-204. */
|
|
19
|
+
code?: string;
|
|
20
|
+
message?: string;
|
|
21
|
+
/** A count instead of one fault ("3 faults"). */
|
|
22
|
+
count?: number;
|
|
23
|
+
/** Code only - for table cells and cards. */
|
|
24
|
+
compact?: boolean;
|
|
25
|
+
}>();
|
|
26
|
+
</script>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<span :class="{ 'hero-floor--unknown': unknown }">{{ label }}</span>
|
|
3
|
+
</template>
|
|
4
|
+
|
|
5
|
+
<script setup lang="ts">
|
|
6
|
+
import { computed } from "vue";
|
|
7
|
+
import { floorLabel } from "../../utils/robot-display";
|
|
8
|
+
|
|
9
|
+
const props = defineProps<{ floorNo?: unknown; floorKnown?: boolean }>();
|
|
10
|
+
const label = computed(() => floorLabel({ floorNo: props.floorNo, floorKnown: props.floorKnown }));
|
|
11
|
+
const unknown = computed(() => label.value === "Floor unknown");
|
|
12
|
+
</script>
|