@7365admin1/layer-common 4.13.1 → 4.13.2-staging.322
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/components/CameraWall.vue +161 -2
- package/components/DocumentForm.vue +407 -112
- package/components/DocumentManagement.vue +213 -12
- package/components/EntryPass/QrTemplatePreview.vue +21 -25
- package/components/EntryPassInformation.vue +119 -24
- package/components/Facility/BookingSetup.vue +63 -0
- package/components/HidIntercomManagement.vue +193 -43
- package/components/HidProfileQrCode.vue +323 -0
- package/components/HidReaderUserRoster.vue +32 -2
- package/components/HidUserEnrollment.vue +771 -212
- package/components/InvitationClientForm.vue +19 -1
- package/components/Layout/Header.vue +26 -0
- package/components/NotificationBell.vue +321 -0
- package/components/VehicleAddSelection.vue +7 -2
- package/components/VehicleBulkAddForm.vue +1392 -0
- package/components/VehicleManagement.vue +31 -3
- package/components/VisitorManagement.vue +267 -5
- package/composables/useAccessManagement.ts +5 -0
- package/composables/useDocument.ts +7 -0
- package/composables/useFacility.ts +11 -0
- package/composables/useHidAmico.ts +97 -0
- package/composables/useHidNavigation.ts +25 -1
- package/composables/useNotification.ts +78 -0
- package/composables/usePeople.ts +19 -0
- package/composables/usePropertyPermission.ts +4 -0
- package/composables/useSecurityPermission.ts +4 -0
- package/composables/useSiteSettings.ts +19 -0
- package/composables/useVehicle.ts +35 -0
- package/composables/useWebUsb.ts +14 -11
- package/constants/permissions.ts +1 -1
- package/package.json +1 -1
- package/pages/[org]/[site]/access-mgmt/hid-qr-code/index.vue +23 -0
- package/types/document.d.ts +14 -0
- package/types/facility.d.ts +4 -0
- package/types/people.d.ts +4 -1
- package/utils/camera-wall.ts +47 -1
- package/utils/materialSymbols.ts +3 -0
- package/utils/vehicle-bulk-rows.ts +534 -0
- package/utils/vehicle-bulk-sheet.ts +361 -0
|
@@ -300,7 +300,10 @@
|
|
|
300
300
|
v-for="c in WALL_CAPABILITY_CONTROLS"
|
|
301
301
|
:key="c.key"
|
|
302
302
|
class="vms__cap"
|
|
303
|
-
:class="{
|
|
303
|
+
:class="{
|
|
304
|
+
'vms__cap--off': !capability(c.key).available,
|
|
305
|
+
'vms__cap--wide': c.key === 'playback' && capability(c.key).available,
|
|
306
|
+
}"
|
|
304
307
|
>
|
|
305
308
|
<p class="vms__cap-title">
|
|
306
309
|
{{ c.title }}
|
|
@@ -318,6 +321,50 @@
|
|
|
318
321
|
its title and its tag.
|
|
319
322
|
-->
|
|
320
323
|
<p v-if="capabilityText(c)" class="vms__cap-detail">{{ capabilityText(c) }}</p>
|
|
324
|
+
<!--
|
|
325
|
+
RECORDED FOOTAGE. Only when the server says this camera can serve it;
|
|
326
|
+
who may watch is the server's decision (site reach + the recordings
|
|
327
|
+
permission), and its refusal is shown here in plain words.
|
|
328
|
+
-->
|
|
329
|
+
<div v-if="c.key === 'playback' && capability(c.key).available" class="vms__playback">
|
|
330
|
+
<div class="vms__playback-form">
|
|
331
|
+
<label class="vms__playback-field">
|
|
332
|
+
Start
|
|
333
|
+
<input v-model="playbackStart" type="datetime-local" data-test="playback-start" />
|
|
334
|
+
</label>
|
|
335
|
+
<label class="vms__playback-field">
|
|
336
|
+
Length
|
|
337
|
+
<select v-model.number="playbackMinutes" data-test="playback-length">
|
|
338
|
+
<option v-for="m in PLAYBACK_MINUTES" :key="m" :value="m">{{ m }} minutes</option>
|
|
339
|
+
</select>
|
|
340
|
+
</label>
|
|
341
|
+
<button
|
|
342
|
+
type="button"
|
|
343
|
+
class="vms__playback-btn"
|
|
344
|
+
:disabled="playbackLoading"
|
|
345
|
+
data-test="playback-play"
|
|
346
|
+
@click="playRecording"
|
|
347
|
+
>
|
|
348
|
+
{{ playbackLoading ? "Opening…" : "Play" }}
|
|
349
|
+
</button>
|
|
350
|
+
<button
|
|
351
|
+
v-if="playbackUrl"
|
|
352
|
+
type="button"
|
|
353
|
+
class="vms__playback-btn vms__playback-btn--quiet"
|
|
354
|
+
@click="stopRecording"
|
|
355
|
+
>
|
|
356
|
+
Close
|
|
357
|
+
</button>
|
|
358
|
+
</div>
|
|
359
|
+
<p v-if="playbackError" class="vms__playback-error" role="alert">{{ playbackError }}</p>
|
|
360
|
+
<iframe
|
|
361
|
+
v-if="playbackUrl"
|
|
362
|
+
:src="playbackUrl"
|
|
363
|
+
class="vms__playback-player"
|
|
364
|
+
title="Recorded footage"
|
|
365
|
+
allow="autoplay; fullscreen"
|
|
366
|
+
/>
|
|
367
|
+
</div>
|
|
321
368
|
<!--
|
|
322
369
|
RULE 5. The line the server cannot write, because it does not know
|
|
323
370
|
who the reader can go and ask. Somebody read "Not set up yet" on this
|
|
@@ -358,6 +405,9 @@ import {
|
|
|
358
405
|
UNVERIFIED_DETAIL,
|
|
359
406
|
WALL_CAPABILITY_CONTROLS,
|
|
360
407
|
WALL_LAYOUTS,
|
|
408
|
+
PLAYBACK_MINUTES,
|
|
409
|
+
playbackErrorMessage,
|
|
410
|
+
playbackWindow,
|
|
361
411
|
type TWallCamera,
|
|
362
412
|
type TWallCameraHealth,
|
|
363
413
|
type TWallLayoutKey,
|
|
@@ -401,7 +451,7 @@ const props = defineProps<{ site: string }>();
|
|
|
401
451
|
|
|
402
452
|
/* ---------------------------------------------------------------- the data */
|
|
403
453
|
|
|
404
|
-
const { getSiteWall, getSiteHealth } = useSiteSettings();
|
|
454
|
+
const { getSiteWall, getSiteHealth, getCameraPlayback } = useSiteSettings();
|
|
405
455
|
|
|
406
456
|
const cameras = ref<TWallCamera[]>([]);
|
|
407
457
|
const loading = ref(true);
|
|
@@ -578,6 +628,43 @@ function togglePick(id: string) {
|
|
|
578
628
|
*/
|
|
579
629
|
const focusedId = ref("");
|
|
580
630
|
const focused = computed(() => focusedCamera(tiles.value, focusedId.value));
|
|
631
|
+
// A recording belongs to the camera it was opened for.
|
|
632
|
+
watch(() => focused.value?._id, stopRecording);
|
|
633
|
+
|
|
634
|
+
/* -------------------------------------------------------- recorded footage */
|
|
635
|
+
|
|
636
|
+
const playbackStart = ref("");
|
|
637
|
+
const playbackMinutes = ref<number>(10);
|
|
638
|
+
const playbackUrl = ref("");
|
|
639
|
+
const playbackError = ref("");
|
|
640
|
+
const playbackLoading = ref(false);
|
|
641
|
+
|
|
642
|
+
function stopRecording() {
|
|
643
|
+
playbackUrl.value = "";
|
|
644
|
+
playbackError.value = "";
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
async function playRecording() {
|
|
648
|
+
const camera = focused.value;
|
|
649
|
+
if (!camera) return;
|
|
650
|
+
const span = playbackWindow(playbackStart.value, playbackMinutes.value);
|
|
651
|
+
playbackUrl.value = "";
|
|
652
|
+
if ("error" in span) {
|
|
653
|
+
playbackError.value = span.error;
|
|
654
|
+
return;
|
|
655
|
+
}
|
|
656
|
+
playbackError.value = "";
|
|
657
|
+
playbackLoading.value = true;
|
|
658
|
+
try {
|
|
659
|
+
const link = await getCameraPlayback(camera._id, span.start, span.end);
|
|
660
|
+
// Still the same camera: a click elsewhere while this was loading wins.
|
|
661
|
+
if (focused.value?._id === camera._id) playbackUrl.value = link.playerUrl;
|
|
662
|
+
} catch (error) {
|
|
663
|
+
playbackError.value = playbackErrorMessage(error);
|
|
664
|
+
} finally {
|
|
665
|
+
playbackLoading.value = false;
|
|
666
|
+
}
|
|
667
|
+
}
|
|
581
668
|
|
|
582
669
|
function capability(key: string) {
|
|
583
670
|
return capabilityView(focused.value, key);
|
|
@@ -1156,6 +1243,78 @@ async function toggleFullscreen() {
|
|
|
1156
1243
|
than filled, which is what says "not switched on"; the fade was saying it a
|
|
1157
1244
|
second time at the cost of the words.
|
|
1158
1245
|
*/
|
|
1246
|
+
.vms__cap--wide {
|
|
1247
|
+
grid-column: 1 / -1;
|
|
1248
|
+
}
|
|
1249
|
+
|
|
1250
|
+
.vms__playback {
|
|
1251
|
+
margin-top: 8px;
|
|
1252
|
+
}
|
|
1253
|
+
|
|
1254
|
+
.vms__playback-form {
|
|
1255
|
+
display: flex;
|
|
1256
|
+
flex-wrap: wrap;
|
|
1257
|
+
align-items: flex-end;
|
|
1258
|
+
gap: 8px;
|
|
1259
|
+
}
|
|
1260
|
+
|
|
1261
|
+
.vms__playback-field {
|
|
1262
|
+
display: flex;
|
|
1263
|
+
flex-direction: column;
|
|
1264
|
+
gap: 2px;
|
|
1265
|
+
font-size: 12px;
|
|
1266
|
+
color: var(--vms-text-dim);
|
|
1267
|
+
}
|
|
1268
|
+
|
|
1269
|
+
.vms__playback-field input,
|
|
1270
|
+
.vms__playback-field select {
|
|
1271
|
+
min-height: 32px;
|
|
1272
|
+
padding: 4px 8px;
|
|
1273
|
+
border: 1px solid var(--vms-line);
|
|
1274
|
+
border-radius: var(--vms-radius);
|
|
1275
|
+
background: var(--vms-chrome);
|
|
1276
|
+
color: var(--vms-text);
|
|
1277
|
+
color-scheme: dark;
|
|
1278
|
+
font: inherit;
|
|
1279
|
+
}
|
|
1280
|
+
|
|
1281
|
+
.vms__playback-btn {
|
|
1282
|
+
min-height: 32px;
|
|
1283
|
+
padding: 4px 14px;
|
|
1284
|
+
border: 1px solid var(--vms-accent);
|
|
1285
|
+
border-radius: var(--vms-radius);
|
|
1286
|
+
background: var(--vms-accent);
|
|
1287
|
+
color: #07090c;
|
|
1288
|
+
font-weight: 600;
|
|
1289
|
+
cursor: pointer;
|
|
1290
|
+
}
|
|
1291
|
+
|
|
1292
|
+
.vms__playback-btn:disabled {
|
|
1293
|
+
opacity: 0.7;
|
|
1294
|
+
cursor: progress;
|
|
1295
|
+
}
|
|
1296
|
+
|
|
1297
|
+
.vms__playback-btn--quiet {
|
|
1298
|
+
background: transparent;
|
|
1299
|
+
color: var(--vms-text);
|
|
1300
|
+
}
|
|
1301
|
+
|
|
1302
|
+
.vms__playback-error {
|
|
1303
|
+
margin: 6px 0 0;
|
|
1304
|
+
font-size: 12px;
|
|
1305
|
+
color: #f2b8b5;
|
|
1306
|
+
}
|
|
1307
|
+
|
|
1308
|
+
.vms__playback-player {
|
|
1309
|
+
display: block;
|
|
1310
|
+
width: 100%;
|
|
1311
|
+
max-width: 960px;
|
|
1312
|
+
aspect-ratio: 16 / 9;
|
|
1313
|
+
margin-top: 8px;
|
|
1314
|
+
border: 0;
|
|
1315
|
+
background: #000;
|
|
1316
|
+
}
|
|
1317
|
+
|
|
1159
1318
|
.vms__cap-detail {
|
|
1160
1319
|
margin: 0;
|
|
1161
1320
|
font-size: 12px;
|