@7365admin1/layer-common 4.163.2 → 4.163.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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @iservice365/layer-common
|
|
2
2
|
|
|
3
|
+
## 4.163.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- c170dac: CCTV Engine: screens say only what is set up is saved (Getting started, Events, Alerts).
|
|
8
|
+
|
|
9
|
+
## 4.163.3
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 2b072df: CCTV Engine: live boxes take the camera's own shape so the picture fills them (no black side bars); Alerts How it works results line matches the notification switch.
|
|
14
|
+
|
|
3
15
|
## 4.163.2
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -3710,11 +3722,11 @@ Monthly report: a month that had patrols opens the list of that month's patrol r
|
|
|
3710
3722
|
`utils/console-tier.ts` + `composables/useConsoleTier.ts` mirror the server's
|
|
3711
3723
|
own rule from two endpoints the console already calls, unprojected:
|
|
3712
3724
|
|
|
3713
|
-
|
|
3714
|
-
|
|
3725
|
+
GET /api/members/user/:user/app/admin the Seven365 staff membership
|
|
3726
|
+
GET /api/roles/id/:role that membership's role document
|
|
3715
3727
|
|
|
3716
|
-
|
|
3717
|
-
|
|
3728
|
+
owner = member.type === "admin" && role.type === "admin" && role.default === true
|
|
3729
|
+
staff = member.type === "admin" && role.type === "admin"
|
|
3718
3730
|
|
|
3719
3731
|
`role.default` is the marker because it is the only property of a platform
|
|
3720
3732
|
staff role no API caller can set - `role.controller.ts` validates create and
|
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
id="alerts"
|
|
10
10
|
:steps="[
|
|
11
11
|
'Turn on Send phone notifications. Leave the roles empty to tell everyone who can see CCTV events at this site, or choose roles to tell only them.',
|
|
12
|
-
'
|
|
12
|
+
'Type the objects that matter (e.g. person, car). Only these are saved in Events and raise alerts. Empty means every object.',
|
|
13
13
|
'Optional: limit to zones or cameras, and set quiet hours. Then press Save alert settings.',
|
|
14
14
|
]"
|
|
15
|
-
results="Alerts appear in Events marked Alert
|
|
15
|
+
results="Alerts appear in Events marked Alert. With Send phone notifications on, people also get a notification with the picture."
|
|
16
16
|
results-section="events"
|
|
17
17
|
:results-query="{ severity: 'alert' }"
|
|
18
18
|
/>
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
<template>
|
|
3
3
|
<div>
|
|
4
4
|
<p class="hero-muted mt-0 mb-2">
|
|
5
|
-
|
|
6
|
-
and the time. Use the boxes to narrow the list, then press Search. Click a row to see the photo and details.
|
|
5
|
+
What you set up to be saved, newest first: matching people and vehicles (see Alerts), watch-list plates, known faces and
|
|
6
|
+
smart detection results, each with a photo and the time. Use the boxes to narrow the list, then press Search. Click a row to see the photo and details.
|
|
7
7
|
</p>
|
|
8
8
|
<v-row dense>
|
|
9
9
|
<v-col cols="6" sm="4" md="3"><v-text-field v-model="f.camera" label="Camera" density="comfortable" hide-details clearable /></v-col>
|
|
@@ -4,9 +4,14 @@
|
|
|
4
4
|
Offline engine / failures are shown on the tile in plain words with a Try again button.
|
|
5
5
|
-->
|
|
6
6
|
<template>
|
|
7
|
-
<div
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
<div
|
|
8
|
+
class="cctv-tile"
|
|
9
|
+
:class="{ 'cctv-tile--big': big, 'cctv-tile--natural': natural }"
|
|
10
|
+
:style="shape && !natural ? { aspectRatio: shape } : undefined"
|
|
11
|
+
data-test="cctv-tile"
|
|
12
|
+
>
|
|
13
|
+
<video v-show="mode === 'live'" ref="video" autoplay muted playsinline class="cctv-tile__media" @loadedmetadata="fit($event)" @resize="fit($event)" />
|
|
14
|
+
<img v-if="mode === 'still' && still" :src="still" :alt="`Latest picture from ${camera}`" class="cctv-tile__media" @load="fit($event)" />
|
|
10
15
|
|
|
11
16
|
<div v-if="mode === 'connecting'" class="cctv-tile__msg" role="status">
|
|
12
17
|
<v-progress-circular indeterminate size="22" /> <span>Connecting to {{ camera }}...</span>
|
|
@@ -47,6 +52,15 @@ const still = ref("");
|
|
|
47
52
|
const failure = ref<unknown>(null);
|
|
48
53
|
const video = ref<HTMLVideoElement | null>(null);
|
|
49
54
|
const notice = computed(() => cctvNotice(failure.value));
|
|
55
|
+
// The box takes the camera's own shape once the first picture arrives (many recorders send 4:3 or 704x480),
|
|
56
|
+
// so the picture fills it instead of sitting between black bars; 16:9 until then.
|
|
57
|
+
const shape = ref<string | null>(null);
|
|
58
|
+
function fit(e: Event) {
|
|
59
|
+
const el = e.target as HTMLVideoElement & HTMLImageElement;
|
|
60
|
+
const w = el.videoWidth || el.naturalWidth;
|
|
61
|
+
const h = el.videoHeight || el.naturalHeight;
|
|
62
|
+
if (w > 0 && h > 0) shape.value = `${w} / ${h}`;
|
|
63
|
+
}
|
|
50
64
|
|
|
51
65
|
let pc: RTCPeerConnection | null = null;
|
|
52
66
|
let timer: ReturnType<typeof setTimeout> | null = null;
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
<template>
|
|
8
8
|
<div>
|
|
9
9
|
<p class="hero-muted mt-0">
|
|
10
|
-
Set up the steps below once.
|
|
11
|
-
|
|
10
|
+
Set up the steps below once. Only what you set up is saved: it appears in <strong>Events</strong> with a photo, and the
|
|
11
|
+
people you choose get a phone notification. Nothing set up = nothing saved.
|
|
12
12
|
</p>
|
|
13
13
|
|
|
14
14
|
<v-progress-linear v-if="loading" indeterminate class="mb-3" />
|
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.163.
|
|
5
|
+
"version": "4.163.4",
|
|
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/cctv-engine.ts
CHANGED
|
@@ -493,7 +493,7 @@ export function setupSteps(input: {
|
|
|
493
493
|
can: (perm: TCctvPermission) => boolean;
|
|
494
494
|
faceEnabled: boolean;
|
|
495
495
|
engines: { status?: string; name?: string }[] | null;
|
|
496
|
-
alertSettings: { notifyRoles?: string[]; notifyGuards?: boolean; labels?: string[] } | null;
|
|
496
|
+
alertSettings: { notifyRoles?: string[]; notifyGuards?: boolean; labels?: string[]; zones?: string[]; cameras?: string[]; createIncident?: boolean } | null;
|
|
497
497
|
classifiers: TClassifier[] | null;
|
|
498
498
|
plates: number | null;
|
|
499
499
|
faces: number | null;
|
|
@@ -525,19 +525,22 @@ export function setupSteps(input: {
|
|
|
525
525
|
const a = input.alertSettings;
|
|
526
526
|
// Server rule (core onAlert / NotificationService.cctvAlert): the `notifyGuards` switch turns phone notifications on;
|
|
527
527
|
// they go to everyone at the site holding cctv-engine:view-events, or only to `notifyRoles` when some are chosen.
|
|
528
|
+
// Server rules (core keepEvent / onAlert): only objects matching what is set up here are saved; `notifyGuards`
|
|
529
|
+
// turns phone notifications on, for everyone with cctv-engine:view-events or only `notifyRoles` when chosen.
|
|
528
530
|
const roles = a?.notifyRoles?.length ?? 0;
|
|
529
531
|
const told = a?.notifyGuards === true;
|
|
530
|
-
const
|
|
531
|
-
const
|
|
532
|
+
const setUp = !!(a && (a.labels?.length || a.zones?.length || a.cameras?.length || told || a.createIncident));
|
|
533
|
+
const what = a?.labels?.length ? a.labels.join(", ") : "every object";
|
|
534
|
+
const who = roles ? `people in ${plural(roles, "role", "roles")}` : "everyone who can see CCTV events";
|
|
532
535
|
steps.push({
|
|
533
536
|
key: "alerts",
|
|
534
|
-
title: "
|
|
535
|
-
what: "Choose who gets a phone notification with the picture
|
|
536
|
-
state: a === null || !
|
|
537
|
+
title: "What to save and who to tell",
|
|
538
|
+
what: "Choose which objects (e.g. person, car) are saved in Events, and who gets a phone notification with the picture.",
|
|
539
|
+
state: a === null || !setUp ? "attention" : told ? "done" : "attention",
|
|
537
540
|
now:
|
|
538
541
|
a === null ? unread
|
|
539
|
-
: !
|
|
540
|
-
:
|
|
542
|
+
: !setUp ? "Nothing set up yet, so no people or vehicles are being saved."
|
|
543
|
+
: `Saving: ${what}. ${told ? `Phone notification to ${who}.` : "Phone notifications are off."}`,
|
|
541
544
|
section: "alerts",
|
|
542
545
|
action: "Set up alerts",
|
|
543
546
|
});
|
|
@@ -601,7 +604,7 @@ export function setupSteps(input: {
|
|
|
601
604
|
|
|
602
605
|
/** Where each kind of result appears. `query` pre-fills the Events filters. */
|
|
603
606
|
export const RESULT_PLACES: { title: string; body: string; section: TCctvSection; query?: Record<string, string>; needs: TCctvPermission }[] = [
|
|
604
|
-
{ title: "Everything
|
|
607
|
+
{ title: "Everything saved", body: "What you set up: matching people and vehicles, watch-list plates, known faces and smart detection results, newest first, each with a photo.", section: "events", needs: CCTV_PERMISSIONS.viewEvents },
|
|
605
608
|
{ title: "Alerts only", body: "The events that raised an alert. With phone notifications on, people were also told on their phones.", section: "events", query: { severity: "alert" }, needs: CCTV_PERMISSIONS.viewEvents },
|
|
606
609
|
{ title: "Smart detection results", body: "What your smart detections saw (e.g. rubbish), with the photo and time.", section: "events", query: { kind: "classification" }, needs: CCTV_PERMISSIONS.viewEvents },
|
|
607
610
|
{ title: "Find a past moment", body: "Describe it in words, e.g. person in orange shirt, and pick the dates.", section: "search", needs: CCTV_PERMISSIONS.viewEvents },
|