@7365admin1/layer-common 4.21.0 → 4.21.3

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,52 @@
1
1
  # @iservice365/layer-common
2
2
 
3
+ ## 4.21.3
4
+
5
+ ### Patch Changes
6
+
7
+ - b57dfdc: CCTV wall: the grid now uses only the columns it has tiles for. One camera on a four- or nine-tile wall filled half (or a third) of the width and left the rest black; the layout button means "up to this many tiles", so the wall no longer keeps empty columns.
8
+
9
+ ## 4.21.2
10
+
11
+ ### Patch Changes
12
+
13
+ - 38b3421: HID Intercom: add a contact the way the reader documents it
14
+
15
+ The Add Contact dialog asked for a "SIP Number / Address" with the same
16
+ `7100 or user@example.com` hint on every reader. The Amico user guide (6.3
17
+ Intercom contacts) gives a contact two fields, Name and Address, and the
18
+ address means different things by operating mode: an extension number for
19
+ SIP Client, the contact's local IP address for Peer-to-Peer. The dialog now
20
+ labels the field Address, and its placeholder, hint and validation follow the
21
+ operating mode of the reader picked in the dialog. A Peer-to-Peer reader gets
22
+ an IPv4 check (optional port); a SIP Client reader keeps the extension / SIP
23
+ address check.
24
+
25
+ The API guide's `create_objects` answers `{ ids: [...] }`. The dialog now reads
26
+ it: when no id comes back the list is refreshed and a warning says the reader
27
+ did not confirm the contact, instead of reporting it saved. Request shape is
28
+ unchanged: `object: "contacts"`, `values: [{ name, number }]`.
29
+
30
+ Edit and Delete read the reader's answer the same way. `modify_objects` and
31
+ `destroy_objects` return `{ changes: n }`; zero now refreshes the list and
32
+ says the reader no longer has the contact, rather than reporting success. A
33
+ row without a reader id is refused with a message: before, Edit on such a row
34
+ fell through to a create (a duplicate on the reader) and Delete returned
35
+ silently.
36
+
37
+ The row menu on both tabs uses the layer's standard `screen-menu`, so View,
38
+ Edit and Delete carry their icons; three intercom icon names (SIP check, Dial
39
+ Code, Web call) gained Material Symbols entries instead of relying on Iconify's
40
+ runtime fetch. The contact row's reader status is the shared status chip, so
41
+ Connected is green. Dialog action bars no longer show Vuetify's 8px seam under
42
+ the buttons, and the view dialog's rows use the table-cell size.
43
+
44
+ ## 4.21.1
45
+
46
+ ### Patch Changes
47
+
48
+ - 5f54311: CCTV wall: full screen now gives the wall the whole screen (the capabilities panel is not drawn while it is on, so the picture is no longer squeezed into 68% of the height), and a player that reports its first frame and then goes quiet is shown as "Not confirmed" instead of "The picture stopped arriving" — the relay reports only the first decoded frame, so the old rule called every working camera dead after 12 seconds.
49
+
3
50
  ## 4.21.0
4
51
 
5
52
  ### Minor Changes
@@ -1205,11 +1252,11 @@
1205
1252
  `utils/console-tier.ts` + `composables/useConsoleTier.ts` mirror the server's
1206
1253
  own rule from two endpoints the console already calls, unprojected:
1207
1254
 
1208
- GET /api/members/user/:user/app/admin the Seven365 staff membership
1209
- GET /api/roles/id/:role that membership's role document
1255
+ GET /api/members/user/:user/app/admin the Seven365 staff membership
1256
+ GET /api/roles/id/:role that membership's role document
1210
1257
 
1211
- owner = member.type === "admin" && role.type === "admin" && role.default === true
1212
- staff = member.type === "admin" && role.type === "admin"
1258
+ owner = member.type === "admin" && role.type === "admin" && role.default === true
1259
+ staff = member.type === "admin" && role.type === "admin"
1213
1260
 
1214
1261
  `role.default` is the marker because it is the only property of a platform
1215
1262
  staff role no API caller can set - `role.controller.ts` validates create and
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div ref="root" class="vms">
2
+ <div ref="root" class="vms" :class="{ 'vms--full': isFullscreen }">
3
3
  <!-- ------------------------------------------------------------ toolbar -->
4
4
  <div class="vms__bar">
5
5
  <button
@@ -43,10 +43,10 @@
43
43
  <button
44
44
  type="button"
45
45
  class="vms__tool"
46
- title="Fill the screen with the wall"
46
+ :title="isFullscreen ? 'Leave full screen' : 'Fill the screen with the wall — the panel below is hidden while it is on'"
47
47
  @click="toggleFullscreen"
48
48
  >
49
- Full screen
49
+ {{ isFullscreen ? "Leave full screen" : "Full screen" }}
50
50
  </button>
51
51
  </div>
52
52
 
@@ -516,7 +516,6 @@ const layout = computed(() => wallLayout(layoutKey.value));
516
516
  * `camera-wall.ts` (see `wallColumns`) so they stay testable there.
517
517
  */
518
518
  const { smAndDown } = useDisplay();
519
- const columns = computed(() => wallColumns(layoutKey.value, smAndDown.value));
520
519
  const dense = computed(() => isDenseLayout(layoutKey.value, smAndDown.value));
521
520
 
522
521
  const selectedIds = ref<string[]>([]);
@@ -531,6 +530,9 @@ const tiles = computed(() =>
531
530
  wallTiles(cameras.value, selectedIds.value, layoutKey.value, page.value)
532
531
  );
533
532
 
533
+ /** Declared after `tiles`: the columns follow how many tiles are actually shown. */
534
+ const columns = computed(() => wallColumns(layoutKey.value, smAndDown.value, tiles.value.length));
535
+
534
536
  /**
535
537
  * THE GRID PACKS TO WHAT IS ON IT.
536
538
  *
@@ -780,17 +782,38 @@ onMounted(() => {
780
782
  setOnline();
781
783
  window.addEventListener("online", setOnline);
782
784
  window.addEventListener("offline", setOnline);
785
+ document.addEventListener("fullscreenchange", onFullscreenChange);
786
+ // Safari fires its own event name.
787
+ document.addEventListener("webkitfullscreenchange", onFullscreenChange);
783
788
  });
784
789
 
785
790
  onBeforeUnmount(() => {
786
791
  window.removeEventListener("online", setOnline);
787
792
  window.removeEventListener("offline", setOnline);
793
+ document.removeEventListener("fullscreenchange", onFullscreenChange);
794
+ document.removeEventListener("webkitfullscreenchange", onFullscreenChange);
788
795
  });
789
796
 
790
797
  /* ------------------------------------------------------------- fullscreen */
791
798
 
792
799
  const root = ref<HTMLElement | null>(null);
793
800
 
801
+ /**
802
+ * In full screen the wall takes the whole screen.
803
+ *
804
+ * It did not: `.vms__body` is 68vh whatever the window is, so the picture kept
805
+ * two thirds of the screen and the capabilities panel below took the rest —
806
+ * the owner's "it squeezes the CCTV view". While full screen is on, the body
807
+ * takes the space that is left and the panel is not drawn; the toolbar and the
808
+ * pager stay, so the layout and the page can still be changed.
809
+ */
810
+ const isFullscreen = ref(false);
811
+
812
+ function onFullscreenChange() {
813
+ const el = document.fullscreenElement;
814
+ isFullscreen.value = Boolean(el && root.value && (el === root.value || root.value.contains(el)));
815
+ }
816
+
794
817
  async function toggleFullscreen() {
795
818
  const el = root.value;
796
819
  if (!el) return;
@@ -913,6 +936,22 @@ async function toggleFullscreen() {
913
936
  height: 68vh;
914
937
  }
915
938
 
939
+ /* Full screen: the wall gets the screen, the capabilities panel stands down. */
940
+ .vms--full {
941
+ display: flex;
942
+ flex-direction: column;
943
+ height: 100vh;
944
+ }
945
+
946
+ .vms--full .vms__body {
947
+ flex: 1 1 auto;
948
+ height: auto;
949
+ }
950
+
951
+ .vms--full .vms__caps {
952
+ display: none;
953
+ }
954
+
916
955
  .vms__picker {
917
956
  width: 220px;
918
957
  flex: none;
@@ -157,6 +157,7 @@ import {
157
157
  liveSource,
158
158
  LIVE_CONNECT_TIMEOUT_MS,
159
159
  LIVE_FRAME_TIMEOUT_MS,
160
+ stateAfterFrameSilence,
160
161
  playerOrigin,
161
162
  playerSignal,
162
163
  tileView,
@@ -218,6 +219,8 @@ const frameEl = ref<HTMLIFrameElement | null>(null);
218
219
  const player = ref<TPlayerState>("loading");
219
220
  let timer: ReturnType<typeof setTimeout> | null = null;
220
221
  let frameTimer: ReturnType<typeof setTimeout> | null = null;
222
+ /** How many frame reports this address has produced — see `stateAfterFrameSilence`. */
223
+ let frameReports = 0;
221
224
 
222
225
  const view = computed(() =>
223
226
  tileView(props.camera, { online: props.online, player: player.value })
@@ -407,6 +410,7 @@ function onPlayerMessage(event: MessageEvent) {
407
410
 
408
411
  clearTimer();
409
412
  if (signal === "playing") {
413
+ frameReports += 1;
410
414
  player.value = "playing";
411
415
  // A picture that arrived once and stopped must not stay green. This is the
412
416
  // mobile app's "Live over a nine-second-old still" defect, and the clock is
@@ -435,7 +439,7 @@ function clearFrameTimer() {
435
439
  function restartFrameClock() {
436
440
  clearFrameTimer();
437
441
  frameTimer = setTimeout(() => {
438
- if (player.value === "playing") player.value = "stalled";
442
+ if (player.value === "playing") player.value = stateAfterFrameSilence(frameReports);
439
443
  }, LIVE_FRAME_TIMEOUT_MS);
440
444
  }
441
445
 
@@ -454,6 +458,7 @@ watch(
454
458
  (host) => {
455
459
  clearTimer();
456
460
  clearFrameTimer();
461
+ frameReports = 0;
457
462
  player.value = "loading";
458
463
  if (!host) return;
459
464
  timer = setTimeout(() => {
@@ -132,15 +132,18 @@
132
132
  </template>
133
133
 
134
134
  <template #[`item.contactStatus`]="{ item }">
135
- <v-btn
136
- size="small"
137
- variant="outlined"
138
- class="text-none"
139
- :loading="testingContactReaderId === item.readerId"
140
- @click="testContactSipStatus(item)"
141
- >
142
- {{ getContactReaderStatus(item) }}
143
- </v-btn>
135
+ <span class="contact-status-cell">
136
+ <StatusChip :status="getContactReaderStatus(item)" />
137
+ <v-btn
138
+ icon="mdi-refresh"
139
+ size="x-small"
140
+ variant="text"
141
+ class="contact-status-refresh"
142
+ aria-label="Check reader SIP status"
143
+ :loading="testingContactReaderId === item.readerId"
144
+ @click="testContactSipStatus(item)"
145
+ />
146
+ </span>
144
147
  </template>
145
148
 
146
149
  <template #[`item.action-table`]="{ item }">
@@ -148,24 +151,26 @@
148
151
  <template #activator="{ props: menuProps }">
149
152
  <AppButton v-bind="menuProps" variant="row" icon="mdi-dots-vertical" />
150
153
  </template>
151
- <v-list v-if="activeTab === 'intercom'" density="compact" class="row-menu">
152
- <v-list-item title="View" @click="openViewDialog(item)" />
154
+ <v-list v-if="activeTab === 'intercom'" density="compact" class="screen-menu">
155
+ <v-list-item class="screen-menu__item" title="View" prepend-icon="mdi-eye" @click="openViewDialog(item)" />
153
156
  <v-list-item
157
+ class="screen-menu__item"
154
158
  title="Test Connection with SIP"
159
+ prepend-icon="mdi-lan-check"
155
160
  :disabled="testingSipReaderId === item.reader._id"
156
161
  @click="testSipConnection(item)"
157
162
  />
158
- <v-list-item title="Call Settings" @click="openCallDialog(item)" />
159
- <v-list-item title="Dial Code" @click="openDialCodeDialog(item)" />
160
- <v-list-item title="Make a call" @click="openMakeCallDialog(item)" />
161
- <v-list-item title="Web call" @click="openWebPhoneDialog(item)" />
163
+ <v-list-item class="screen-menu__item" title="Call Settings" prepend-icon="mdi-cog" @click="openCallDialog(item)" />
164
+ <v-list-item class="screen-menu__item" title="Dial Code" prepend-icon="mdi-dialpad" @click="openDialCodeDialog(item)" />
165
+ <v-list-item class="screen-menu__item" title="Make a call" prepend-icon="mdi-phone" @click="openMakeCallDialog(item)" />
166
+ <v-list-item class="screen-menu__item" title="Web call" prepend-icon="mdi-headset" @click="openWebPhoneDialog(item)" />
162
167
  </v-list>
163
- <v-list v-else density="compact" class="row-menu">
164
- <v-list-item title="Call" prepend-icon="mdi-phone" @click="openContactCall(item)" />
165
- <v-list-item title="Check reader SIP status" prepend-icon="mdi-lan-check" @click="testContactSipStatus(item)" />
166
- <v-list-item title="View" @click="openContactView(item)" />
167
- <v-list-item title="Edit" @click="openContactDialog(item)" />
168
- <v-list-item title="Delete" @click="openDeleteContact(item)" />
168
+ <v-list v-else density="compact" class="screen-menu">
169
+ <v-list-item class="screen-menu__item" title="Call" prepend-icon="mdi-phone" @click="openContactCall(item)" />
170
+ <v-list-item class="screen-menu__item" title="Check reader SIP status" prepend-icon="mdi-lan-check" @click="testContactSipStatus(item)" />
171
+ <v-list-item class="screen-menu__item" title="View" prepend-icon="mdi-eye" @click="openContactView(item)" />
172
+ <v-list-item class="screen-menu__item" title="Edit" prepend-icon="mdi-pencil" @click="openContactDialog(item)" />
173
+ <v-list-item class="screen-menu__item screen-menu__item--danger" title="Delete" prepend-icon="mdi-delete-outline" @click="openDeleteContact(item)" />
169
174
  </v-list>
170
175
  </v-menu>
171
176
  </template>
@@ -574,7 +579,7 @@
574
579
  </v-dialog>
575
580
 
576
581
  <v-dialog v-model="contactDialog" max-width="360" persistent>
577
- <v-card class="form-dialog" rounded="lg">
582
+ <v-card class="form-dialog contact-dialog" rounded="lg">
578
583
  <v-card-title class="dialog-title">{{ contactForm.id ? 'Edit Contact' : 'Add Contact' }}</v-card-title>
579
584
  <v-card-text class="dialog-body">
580
585
  <FieldLabel text="HID Reader" required />
@@ -584,9 +589,10 @@
584
589
  :disabled="Boolean(contactForm.id)"
585
590
  />
586
591
  <FieldLabel text="Name" required />
587
- <AppField v-model="contactForm.name" placeholder="Enter name" />
588
- <FieldLabel text="SIP Number / Address" required />
589
- <AppField v-model="contactForm.serverAddress" placeholder="7100 or user@example.com" />
592
+ <AppField v-model="contactForm.name" placeholder="Name shown on calls" class="my-3" />
593
+ <FieldLabel text="Address" required />
594
+ <AppField v-model="contactForm.serverAddress" :placeholder="contactAddressPlaceholder" />
595
+ <p class="field-hint">{{ contactAddressHint }}</p>
590
596
  </v-card-text>
591
597
  <v-card-actions class="dialog-actions pa-0">
592
598
  <v-btn class="text-none action-cancel" variant="flat" height="44" @click="contactDialog = false">Cancel</v-btn>
@@ -958,6 +964,26 @@ const webPhoneButtonClass = computed(() => ({
958
964
  "has-incoming-call": webPhone.callState.value === "incoming",
959
965
  }));
960
966
  const isPeerToPeerMode = computed(() => sipForm.operatingMode === "peer-to-peer");
967
+
968
+ /**
969
+ * The user guide (6.3 Intercom contacts) gives a contact ONE address field
970
+ * whose meaning follows the reader's operating mode: an extension number in
971
+ * SIP Client mode, a local IP address in Peer-to-Peer mode. The reader chosen
972
+ * in the contact dialog decides which one the field asks for.
973
+ */
974
+ const contactReaderRow = computed(() =>
975
+ intercomRows.value.find((row) => row.reader._id === contactForm.readerId)
976
+ );
977
+ const isContactReaderPeerToPeer = computed(() => contactReaderRow.value?.operatingMode === "Peer-to-Peer");
978
+ const contactAddressPlaceholder = computed(() => (isContactReaderPeerToPeer.value ? "192.168.0.129" : "7100"));
979
+ const contactAddressHint = computed(() => {
980
+ if (!contactReaderRow.value) {
981
+ return "Extension number (SIP Client) or local IP address (Peer-to-Peer), depending on the reader's operating mode.";
982
+ }
983
+ return isContactReaderPeerToPeer.value
984
+ ? "Peer-to-Peer mode: enter the contact's local IP address."
985
+ : "SIP Client mode: enter the contact's extension number.";
986
+ });
961
987
  const areSipCredentialFieldsDisabled = computed(() => !sipForm.enabled || isPeerToPeerMode.value);
962
988
  const intercomDetailSections = computed(() => {
963
989
  const row = selectedRow.value;
@@ -1466,7 +1492,14 @@ function toggleWebMute() {
1466
1492
  }
1467
1493
  }
1468
1494
 
1495
+ function hasReaderContactId(contact: ContactRow) {
1496
+ if (contact.id !== undefined) return true;
1497
+ showMessage("This contact has no identifier on the HID reader. Refresh the list and try again.", "error");
1498
+ return false;
1499
+ }
1500
+
1469
1501
  function openContactDialog(contact?: ContactRow) {
1502
+ if (contact && !hasReaderContactId(contact)) return;
1470
1503
  selectedContact.value = contact || null;
1471
1504
  contactForm.id = contact?.id;
1472
1505
  contactForm.readerId = contact?.readerId || selectedReaderId.value || readers.value[0]?._id || "";
@@ -1516,10 +1549,20 @@ function openContactCall(contact: ContactRow) {
1516
1549
  }
1517
1550
 
1518
1551
  function openDeleteContact(contact: ContactRow) {
1552
+ if (!hasReaderContactId(contact)) return;
1519
1553
  selectedContact.value = contact;
1520
1554
  deleteContactDialog.value = true;
1521
1555
  }
1522
1556
 
1557
+ /**
1558
+ * modify_objects and destroy_objects answer { changes: n } (API guide, Modify
1559
+ * Objects / Delete Objects). Zero means the where clause matched nothing on the
1560
+ * reader - typically a contact already removed from the touchscreen.
1561
+ */
1562
+ function readChanges(response: unknown) {
1563
+ return toNumber(toRecord(toRecord(response).data ?? response).changes, Number.NaN);
1564
+ }
1565
+
1523
1566
  async function saveSipSettings() {
1524
1567
  if (!selectedRow.value) return;
1525
1568
  const isPeerToPeer = sipForm.operatingMode === "peer-to-peer";
@@ -1620,6 +1663,17 @@ function isSipCallTarget(value = "") {
1620
1663
  return /^(?:sip:)?[A-Za-z0-9_.+-]+(?:@[A-Za-z0-9.-]+(?::\d{1,5})?)?$/.test(value.trim());
1621
1664
  }
1622
1665
 
1666
+ function isIpv4Address(value = "") {
1667
+ const [host, port, ...rest] = value.trim().split(":");
1668
+ if (rest.length || (port !== undefined && !/^\d{1,5}$/.test(port))) return false;
1669
+ const octets = host.split(".");
1670
+ return octets.length === 4 && octets.every((octet) => /^\d{1,3}$/.test(octet) && Number(octet) <= 255);
1671
+ }
1672
+
1673
+ function isContactAddress(value: string, peerToPeer: boolean) {
1674
+ return peerToPeer ? isIpv4Address(value) : isSipCallTarget(value);
1675
+ }
1676
+
1623
1677
  async function runHangupCall() {
1624
1678
  if (!selectedRow.value) return;
1625
1679
  hangingUp.value = true;
@@ -1708,15 +1762,20 @@ async function saveContact() {
1708
1762
  return;
1709
1763
  }
1710
1764
 
1711
- if (!isSipCallTarget(contactForm.serverAddress)) {
1712
- showMessage("Enter a valid extension, SIP address, or IPv4 address.", "warning");
1765
+ if (!isContactAddress(contactForm.serverAddress, isContactReaderPeerToPeer.value)) {
1766
+ showMessage(
1767
+ isContactReaderPeerToPeer.value
1768
+ ? "Enter the contact's local IPv4 address for a Peer-to-Peer reader."
1769
+ : "Enter a valid extension number or SIP address.",
1770
+ "warning",
1771
+ );
1713
1772
  return;
1714
1773
  }
1715
1774
 
1716
1775
  contactsSaving.value = true;
1717
1776
  try {
1718
- if (contactForm.id) {
1719
- await runObjectOperation(contactForm.readerId, {
1777
+ if (contactForm.id !== undefined) {
1778
+ const response = await runObjectOperation(contactForm.readerId, {
1720
1779
  operation: "modify",
1721
1780
  object: "contacts",
1722
1781
  values: {
@@ -1725,8 +1784,14 @@ async function saveContact() {
1725
1784
  },
1726
1785
  where: { contacts: { id: contactForm.id } },
1727
1786
  });
1787
+ if (readChanges(response) === 0) {
1788
+ contactDialog.value = false;
1789
+ await loadContacts();
1790
+ showMessage("The HID reader no longer has this contact. The list has been refreshed.", "warning");
1791
+ return;
1792
+ }
1728
1793
  } else {
1729
- await runObjectOperation(contactForm.readerId, {
1794
+ const response = await runObjectOperation(contactForm.readerId, {
1730
1795
  operation: "create",
1731
1796
  object: "contacts",
1732
1797
  values: [{
@@ -1734,6 +1799,15 @@ async function saveContact() {
1734
1799
  number: contactForm.serverAddress.trim(),
1735
1800
  }],
1736
1801
  });
1802
+ // create_objects answers { ids: [...] } with the id of each created
1803
+ // object. No id means the reader accepted the request but created nothing.
1804
+ const created = toRecord(response?.data ?? response).ids;
1805
+ if (!Array.isArray(created) || created.length === 0) {
1806
+ contactDialog.value = false;
1807
+ await loadContacts();
1808
+ showMessage("The HID reader did not confirm the new contact. Check the contact list.", "warning");
1809
+ return;
1810
+ }
1737
1811
  }
1738
1812
  contactDialog.value = false;
1739
1813
  await loadContacts();
@@ -1746,16 +1820,21 @@ async function saveContact() {
1746
1820
  }
1747
1821
 
1748
1822
  async function deleteContact() {
1749
- if (!selectedContact.value?.id) return;
1823
+ const contact = selectedContact.value;
1824
+ if (!contact || !hasReaderContactId(contact)) return;
1750
1825
  contactsSaving.value = true;
1751
1826
  try {
1752
- await runObjectOperation(selectedContact.value.readerId, {
1827
+ const response = await runObjectOperation(contact.readerId, {
1753
1828
  operation: "destroy",
1754
1829
  object: "contacts",
1755
- where: { contacts: { id: selectedContact.value.id } },
1830
+ where: { contacts: { id: contact.id } },
1756
1831
  });
1757
1832
  deleteContactDialog.value = false;
1758
1833
  await loadContacts();
1834
+ if (readChanges(response) === 0) {
1835
+ showMessage("The HID reader had already removed this contact. The list has been refreshed.", "warning");
1836
+ return;
1837
+ }
1759
1838
  showMessage("Intercom contact deleted.", "success");
1760
1839
  } catch (error: unknown) {
1761
1840
  showMessage(getErrorMessage(error), "error");
@@ -1943,9 +2022,14 @@ export default {
1943
2022
 
1944
2023
 
1945
2024
 
1946
- .row-menu {
1947
- min-width: 160px;
1948
- border-radius: 6px;
2025
+ .contact-status-cell {
2026
+ display: inline-flex;
2027
+ align-items: center;
2028
+ gap: 4px;
2029
+ }
2030
+
2031
+ .contact-status-refresh {
2032
+ color: var(--text2);
1949
2033
  }
1950
2034
 
1951
2035
  .link-text {
@@ -2005,10 +2089,27 @@ export default {
2005
2089
  color: var(--err);
2006
2090
  }
2007
2091
 
2092
+ .field-hint {
2093
+ margin: 6px 0 0;
2094
+ color: var(--text2);
2095
+ font-size: 11px;
2096
+ line-height: 1.4;
2097
+ }
2098
+
2008
2099
  .sip-settings-dialog .field-label {
2009
2100
  margin-top: 14px;
2010
2101
  }
2011
2102
 
2103
+ /* Room between the contact dialog's three inputs; the first label sits
2104
+ against the body padding. */
2105
+ .contact-dialog .field-label {
2106
+ margin-top: 18px;
2107
+ }
2108
+
2109
+ .contact-dialog .field-label:first-child {
2110
+ margin-top: 0;
2111
+ }
2112
+
2012
2113
  .sip-label {
2013
2114
  margin: 12px 0 6px;
2014
2115
  color: var(--text);
@@ -2706,14 +2807,18 @@ export default {
2706
2807
  margin-top: 0;
2707
2808
  }
2708
2809
 
2810
+ .detail-dialog .dialog-title {
2811
+ font-size: var(--fs-card-title);
2812
+ }
2813
+
2709
2814
  .detail-row {
2710
2815
  display: flex;
2711
2816
  align-items: center;
2712
2817
  justify-content: space-between;
2713
2818
  gap: 16px;
2714
- min-height: 26px;
2819
+ min-height: 32px;
2715
2820
  color: var(--muted);
2716
- font-size: 11px;
2821
+ font-size: var(--fs-cell);
2717
2822
  }
2718
2823
 
2719
2824
  .detail-row strong {
@@ -2725,13 +2830,11 @@ export default {
2725
2830
  .dialog-actions {
2726
2831
  display: grid;
2727
2832
  grid-template-columns: 1fr 1fr;
2833
+ gap: 0;
2834
+ min-height: 0;
2728
2835
  border-top: 1px solid var(--border);
2729
2836
  }
2730
2837
 
2731
- .sip-settings-dialog .dialog-actions {
2732
- min-height: 46px;
2733
- }
2734
-
2735
2838
  /* The split footer bar, as panels 2, 4 and 5 keep it: the SHAPE is the
2736
2839
  screen's own (the handoff draws no such bar); only the colours change. The
2737
2840
  navy was a fixed hex that sat on the dark card unchanged. */
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.21.0",
5
+ "version": "4.21.3",
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.",
@@ -126,8 +126,20 @@ export function wallLayout(key: string | undefined) {
126
126
  * are untouched — `isPhone` is the caller's own `smAndDown` (or equivalent),
127
127
  * this file has no notion of viewport width itself.
128
128
  */
129
- export function wallColumns(key: string | undefined, isPhone = false): number {
130
- return isPhone ? 1 : wallLayout(key).columns;
129
+ export function wallColumns(
130
+ key: string | undefined,
131
+ isPhone = false,
132
+ /** How many tiles are actually on screen. Fewer tiles than the layout holds means fewer columns. */
133
+ count?: number
134
+ ): number {
135
+ const base = isPhone ? 1 : wallLayout(key).columns;
136
+ if (!Number.isFinite(count as number)) return base;
137
+ const shown = Math.max(0, Math.floor(count as number));
138
+ // One camera on a four-tile wall used to keep two columns, so the picture
139
+ // took half the width and the rest of the screen was black. The layout
140
+ // button is a MAXIMUM ("up to this many tiles"), not a promise to leave
141
+ // empty cells: the grid never draws more columns than it has tiles to fill.
142
+ return shown > 0 ? Math.min(base, shown) : base;
131
143
  }
132
144
 
133
145
  /**
@@ -340,8 +352,8 @@ export function wallRows(
340
352
  isPhone = false
341
353
  ): number {
342
354
  const { tiles } = wallLayout(layoutKey);
343
- const columns = wallColumns(layoutKey, isPhone);
344
355
  const capped = Math.min(Math.max(0, Math.floor(count)), tiles);
356
+ const columns = wallColumns(layoutKey, isPhone, capped);
345
357
  return Math.min(Math.ceil(tiles / columns), Math.max(1, Math.ceil(capped / columns)));
346
358
  }
347
359
 
@@ -613,6 +625,26 @@ export const LIVE_CONNECT_TIMEOUT_MS = 15_000;
613
625
  */
614
626
  export const LIVE_FRAME_TIMEOUT_MS = 12_000;
615
627
 
628
+ /**
629
+ * What silence after a frame report MEANS — and it depends on how many reports
630
+ * there have ever been.
631
+ *
632
+ * The relay reports the FIRST decoded frame and nothing after it (measured
633
+ * 2026-09-21 against the live relay: one `{event:"frame",state:"live"}` in 25
634
+ * seconds while the websocket carried 410 video frames). Treating that silence
635
+ * as a stall put "The picture stopped arriving" over four tiles that were
636
+ * playing perfectly — the same lie as a green badge over a frozen picture,
637
+ * pointed the other way.
638
+ *
639
+ * So: two or more reports mean the service does report frames, and silence
640
+ * after that is a real stall. A single report proves the picture STARTED and
641
+ * proves nothing about now, which is "Not confirmed" — the tile keeps showing
642
+ * the stream and says plainly that it cannot vouch for it.
643
+ */
644
+ export function stateAfterFrameSilence(frameReports: number): "stalled" | "page-up" {
645
+ return frameReports >= 2 ? "stalled" : "page-up";
646
+ }
647
+
616
648
  export type TTileState =
617
649
  | "live"
618
650
  | "unverified"
@@ -242,6 +242,9 @@ export const MDI_TO_SYMBOL: Record<string, string> = {
242
242
  "mdi-link-variant": "link",
243
243
  "mdi-lan-connect": "lan",
244
244
  "mdi-lan-disconnect": "link_off", // NEAREST: no disconnected-LAN glyph
245
+ "mdi-lan-check": "network_check",
246
+ "mdi-dialpad": "dialpad",
247
+ "mdi-headset": "headset_mic",
245
248
  "mdi-bluetooth": "bluetooth",
246
249
  "mdi-nfc": "nfc",
247
250