@sentinel-nvr/web 0.2.1 → 0.3.0

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/dist/ui/ui.css CHANGED
@@ -163,7 +163,8 @@
163
163
  /* ---- Vertical timeline (Sentinel class names, scoped) --------------------- */
164
164
  .nvr-vtl { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; }
165
165
  .nvr-vtl .vtl-zoom { position: absolute; right: 8px; bottom: 10px; display: flex; flex-direction: column; gap: 4px; z-index: 3; }
166
- .nvr-vtl .tool { width: 28px; height: 28px; border-radius: 8px; background: var(--bg-card); border: 1px solid var(--border); color: var(--text-dim); font-size: 1rem; box-shadow: var(--shadow-card); cursor: pointer; }
166
+ .nvr-vtl .tool { width: 28px; height: 28px; padding: 0; border-radius: 8px; background: var(--bg-card); border: 1px solid var(--border); color: var(--text-dim); font-size: 1rem; box-shadow: var(--shadow-card); cursor: pointer; display: grid; place-items: center; }
167
+ .nvr-vtl .tool:hover { color: var(--text); }
167
168
  .nvr-vtl .vtl-scroll { flex: 1; overflow-y: auto; position: relative; scrollbar-width: none; overscroll-behavior: contain; }
168
169
  .nvr-vtl .vtl-scroll::-webkit-scrollbar { display: none; }
169
170
  .nvr-vtl .vtl-content { position: relative; }
@@ -182,7 +183,7 @@
182
183
  .nvr-vtl .vlive-chip { position: absolute; left: 66px; transform: translateY(-50%); border: 0; background: var(--danger); color: var(--on-accent); font-size: 0.6rem; font-weight: 700; letter-spacing: 0.08em; padding: 2px 6px; border-radius: 6px; z-index: 2; cursor: pointer; }
183
184
  .nvr-vtl .vcenter { position: absolute; left: 0; right: 0; top: 35%; height: 2px; background: var(--accent); pointer-events: none; box-shadow: 0 0 10px var(--accent-soft); }
184
185
  .nvr-vtl .vcenter-t { position: absolute; right: 8px; top: -14px; background: var(--bg-card); border: 1px solid var(--accent); border-radius: 8px; padding: 2px 8px; font-size: 0.74rem; color: var(--text); white-space: nowrap; }
185
- .nvr-vtl .livejump { position: absolute; bottom: 52px; left: 10px; background: var(--bg-card); border: 1px solid var(--border); color: var(--danger); font-weight: 700; font-size: 0.74rem; letter-spacing: 0.04em; padding: 6px 14px; border-radius: var(--radius-pill); box-shadow: var(--shadow-elevated); z-index: 4; cursor: pointer; }
186
+ .nvr-vtl .livejump { position: absolute; bottom: 52px; left: 10px; display: inline-flex; align-items: center; gap: 4px; line-height: 1; background: var(--bg-card); border: 1px solid var(--border); color: var(--danger); font-weight: 700; font-size: 0.74rem; letter-spacing: 0.04em; padding: 6px 14px; border-radius: var(--radius-pill); box-shadow: var(--shadow-elevated); z-index: 4; cursor: pointer; }
186
187
  .nvr-vtl .vtick { position: absolute; right: calc(100% - 73px); width: 3px; height: 1px; background: color-mix(in srgb, var(--text-faint) 70%, transparent); pointer-events: none; }
187
188
  .nvr-vtl .vtick--m { width: 5px; background: color-mix(in srgb, var(--text-faint) 85%, transparent); }
188
189
  .nvr-vtl .vtick--l { width: 8px; background: var(--text-dim); }
@@ -220,3 +221,90 @@
220
221
  .nvr-dt__time { flex: 1; min-height: 40px; padding: 0.375rem 0.625rem; }
221
222
  .nvr-dt__foot .nvr-btn { min-height: 40px; padding: 0.5rem 0.875rem; }
222
223
 
224
+
225
+
226
+ /* ---- Camera page (stage + info bar + tabs/filters + date chip) ------------
227
+ ONE implementation for every host (CameraPage). Metrics from HAPulse. ---- */
228
+ .nvr-cam { display: flex; flex-direction: column; gap: 1rem; }
229
+ .nvr-cam__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
230
+ .nvr-cam__title { display: flex; align-items: center; gap: 0.5rem; min-width: 0; }
231
+ .nvr-cam__h1 { margin: 0; font-family: var(--font-display); font-size: clamp(1.25rem, 3vw, 1.75rem); font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
232
+ .nvr-cam__actions { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }
233
+ /* ghost icon button (HAPulse IconButton variant=ghost, 36 px) */
234
+ .nvr-iconbtn { width: 36px; height: 36px; min-width: 36px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: var(--radius-control); background: transparent; color: var(--text-faint); cursor: pointer; flex-shrink: 0; transition: background 180ms ease-out, transform 180ms ease-out; }
235
+ .nvr-iconbtn:hover { background: var(--accent-soft); color: var(--accent); }
236
+ .nvr-iconbtn:active { transform: scale(0.96); }
237
+ .nvr-iconbtn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
238
+ .nvr-cam__body { display: grid; grid-template-columns: minmax(0, 1fr) 328px; gap: 1rem; align-items: stretch; }
239
+ .nvr-cam__left { min-width: 0; display: flex; flex-direction: column; align-self: start; }
240
+ .nvr-stage-card { overflow: hidden; display: flex; flex-direction: column; padding: 0; gap: 0; height: auto; }
241
+ .nvr-stage-wrap { position: relative; display: block; }
242
+ /* the picture's own aspect (set by the player as --stage-ar); max-height transfers to the width via aspect-ratio → no bars, ever */
243
+ .nvr-stage { position: relative; width: auto; max-width: 100%; margin: 0 auto; aspect-ratio: var(--stage-ar, 16 / 9); max-height: calc(100dvh - 240px); background: color-mix(in srgb, var(--text) 92%, var(--bg)); overflow: hidden; }
244
+ .nvr-stage:fullscreen, .nvr-stage:-webkit-full-screen { aspect-ratio: auto; width: 100%; height: 100%; }
245
+ .nvr-stage__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }
246
+ .nvr-stage__freeze { pointer-events: none; }
247
+ .nvr-stage .hidden { display: none !important; }
248
+ .nvr-mute { position: absolute; right: 16px; bottom: 16px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border); background: var(--bg-card); color: var(--text-dim); display: grid; place-items: center; box-shadow: var(--shadow-elevated); cursor: pointer; z-index: 3; }
249
+ .nvr-mute[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); border-color: transparent; }
250
+ .nvr-pill-ctl {
251
+ position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); display: flex; gap: 2px; padding: 4px; border-radius: var(--radius-pill);
252
+ background: var(--nvr-overlay); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); opacity: 0; transition: opacity 0.2s; z-index: 3;
253
+ }
254
+ .nvr-stage:hover .nvr-pill-ctl, .nvr-stage:focus-within .nvr-pill-ctl { opacity: 1; }
255
+ @media (hover: none) { .nvr-pill-ctl { opacity: 1; } .nvr-pill-ctl--live { opacity: 0.85; } }
256
+ .nvr-pb { width: 40px; height: 36px; padding: 0; border-radius: 18px; border: 0; background: transparent; display: grid; place-items: center; color: var(--nvr-on-overlay); cursor: pointer; }
257
+ .nvr-pb:hover:not(:disabled) { background: color-mix(in srgb, var(--nvr-on-overlay) 14%, transparent); }
258
+ .nvr-pb:disabled { opacity: 0.35; cursor: default; }
259
+ .nvr-pb--speed { font-size: 0.78rem; font-weight: 700; }
260
+ .nvr-stage-bar { flex: none; display: flex; align-items: center; gap: 0.7rem; padding: 0.7rem 0.9rem; border-top: 1px solid var(--line); }
261
+ .nvr-statusdot { width: 12px; height: 12px; border-radius: 50%; background: var(--text-faint); flex: none; }
262
+ .nvr-statusdot--live { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
263
+ .nvr-stage-title { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
264
+ .nvr-stage-title b { font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
265
+ .nvr-stage-title small { color: var(--text-dim); font-size: 0.75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
266
+ .nvr-stage-actions { margin-left: auto; display: flex; gap: 0.25rem; }
267
+ /* height: 0 + min-height: 100% → the row is sized by the stage card, the timeline card stretches to it and scrolls inside */
268
+ .nvr-cam__right { display: flex; flex-direction: column; height: 0; min-height: 100%; position: relative; overflow: hidden; padding: 0; gap: 0; }
269
+ .nvr-tabs { display: grid; grid-template-columns: 1fr 1fr; flex: none; }
270
+ .nvr-tabs button { padding: 0.8rem; border: 0; background: none; cursor: pointer; font: inherit; font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 700; color: var(--text-dim); border-bottom: 2px solid transparent; }
271
+ .nvr-tabs button.nvr-tabs__tab--active { color: var(--text); border-bottom-color: var(--accent); }
272
+ .nvr-filters { flex: none; display: flex; flex-wrap: wrap; gap: 0.3rem; padding: 0.35rem 0.5rem; border-bottom: 1px solid var(--line); min-height: 34px; }
273
+ .nvr-fchip { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.15rem 0.45rem 0.15rem 0.2rem; border: 0; border-radius: var(--radius-pill); background: var(--bg-subtle); font: inherit; font-size: 0.72rem; color: var(--text-dim); cursor: pointer; }
274
+ .nvr-fchip--off { opacity: 0.4; }
275
+ /* date chip: floats bottom-left over the timeline like Scrypted's date button */
276
+ .nvr-datechip {
277
+ position: absolute; left: 10px; bottom: 10px; z-index: 4; display: flex; align-items: center; gap: 0.15rem;
278
+ background: var(--bg-card); border: 1px solid var(--border); box-shadow: var(--shadow-elevated); border-radius: var(--radius-pill); padding: 0.15rem 0.2rem; font-size: 0.78rem;
279
+ }
280
+ .nvr-datechip > button { width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%; background: none; display: grid; place-items: center; color: var(--text-dim); cursor: pointer; }
281
+ .nvr-datechip > button:hover:not(:disabled) { background: var(--bg-subtle); color: var(--text); }
282
+ .nvr-datechip > button:disabled { opacity: 0.3; cursor: default; }
283
+ .nvr-datechip .nvr-datechip__lbl { width: auto; display: inline-flex; align-items: center; gap: 0.3rem; padding: 0 0.4rem; border-radius: var(--radius-pill); font: inherit; font-family: var(--font-data); font-size: 0.76rem; white-space: nowrap; color: var(--text); }
284
+ .nvr-datechip--rec { background: var(--accent); border-color: transparent; }
285
+ .nvr-datechip--rec > button, .nvr-datechip--rec .nvr-datechip__lbl { color: var(--on-accent); }
286
+ /* events list (tab "Events") */
287
+ .nvr-evlist { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 0.35rem; padding: 0.5rem; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
288
+ .nvr-evlist__empty { padding: 2rem 1rem; justify-content: center; }
289
+ .nvr-evlist__day { position: sticky; top: 0; z-index: 1; padding: 0.3rem 0.4rem; font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-dim); background: var(--bg-card); border-bottom: 1px solid var(--line); }
290
+ .nvr-evrow { display: grid; grid-template-columns: 84px 1fr; gap: 0.7rem; align-items: center; padding: 0.35rem; border: 0; border-radius: 12px; background: none; text-align: left; cursor: pointer; font: inherit; color: inherit; }
291
+ .nvr-evrow:hover { background: var(--bg-subtle); }
292
+ .nvr-evrow__img { width: 84px; height: 56px; object-fit: cover; border-radius: 8px; background: var(--bg-subtle); display: block; }
293
+ .nvr-evrow__text { min-width: 0; }
294
+ .nvr-evrow__cls { display: flex; align-items: center; gap: 0.3rem; font-weight: 600; font-size: 0.85rem; color: var(--text); }
295
+ .nvr-evrow__t { display: block; font-size: 0.72rem; color: var(--text-faint); }
296
+ @media (max-width: 899px) {
297
+ .nvr-cam { gap: 0.5rem; }
298
+ .nvr-cam__body { display: flex; flex-direction: column; gap: 0.5rem; height: calc(100dvh - 64px - env(safe-area-inset-bottom, 0px) - 120px); min-height: 520px; }
299
+ .nvr-cam__left { align-self: stretch; flex: none; }
300
+ .nvr-stage-card { flex: none; }
301
+ .nvr-stage { max-height: 46vh; }
302
+ .nvr-stage-bar { padding: 0.4rem 0.6rem; gap: 0.5rem; }
303
+ .nvr-stage-title b { font-size: 0.88rem; }
304
+ .nvr-mute { width: 36px; height: 36px; right: 10px; bottom: 10px; }
305
+ .nvr-pill-ctl { bottom: 10px; }
306
+ .nvr-pb { width: 36px; height: 32px; }
307
+ .nvr-cam__right { flex: 1; height: auto; min-height: 220px; }
308
+ .nvr-tabs button { padding: 0.5rem; font-size: 0.68rem; }
309
+ .nvr-filters { padding: 0.3rem 0.4rem; min-height: 30px; }
310
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentinel-nvr/web",
3
- "version": "0.2.1",
3
+ "version": "0.3.0",
4
4
  "description": "Shared browser code for the Sentinel NVR plugin for Scrypted: API model + client (/api), player (/player) and React UI with i18n + themes (/ui). Consumed by the plugin's own web UI and the HAPulse dashboard.",
5
5
  "license": "MIT",
6
6
  "author": "Muggedadscher",
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes