Commit Graph

25 Commits

Author SHA1 Message Date
git_admin f263d84a8d player: extract branded .pjs player into shared static/player.{js,css}
One source of truth for the branded player on desktop (archive) and
mobile. The ArchivePlayer class moves out of app.js into player.js
(name kept; app.js still does `new ArchivePlayer`); the .pjs styles
move out of style.css into player.css. Both archive.html and mobile.html
load the shared module before their own script.

The shared player gains two additive, backward-compatible options:
- live: timeline hidden, only pause/play + fullscreen (mobile Live).
- autohide:false: control bar always visible (touch); desktop keeps
  autohide (default true), so desktop archive behaves exactly as before.
Fullscreen is now self-contained (no global toggleFullscreen dep) so it
works on mobile too, with an iOS <video> fallback.

mobile.js drops its duplicated Player class and uses ArchivePlayer.

Verified on .79: /archive 200 loads player.{js,css}; app.js has no
class def; mobile (Host :8443) loads the shared module.

VERSION 0.0.154 -> 0.0.155

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-02 00:28:04 +05:00
git_admin 157893b516 fix: pin archive layout to row; fit sidebar version into the 72px rail
Layout review found archive-main relied on the default flex-direction while
the base `main` rule forces column, so the sidebar/content split was fragile —
now set explicitly to row. The sidebar app-version pill is shrunk and centred
so it fits the 72px icon rail instead of being clipped. HTML tag balance, CSS
brace balance and all table column counts (cameras 9, storages 9, users 4)
checked out clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-01 23:19:55 +05:00
git_admin 4a8eddf1d8 settings: group transcode params into 3 boxes (codec / bitrate / preset)
The flat transcode parameter row is reorganised into three bordered group
cards: «Кодек» (codec, H.264 profile, preset, keyframe interval), «Битрейт»
(rate control, bitrate, QP) and «Готовый профиль» (the SOFT/MEDIUM/HARD
preset). All data-f controls and the .qpreset select keep their attributes,
so the existing load/save and sync logic is unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-01 22:59:56 +05:00
git_admin c2b698e1f4 ui: hide control footer in fullscreen; toggle fullscreen with the F key
The grid/archive control bar is hidden while its frame is fullscreen, so the
video fills the screen cleanly. A global F-key handler toggles fullscreen of
the active frame (live-main or arch-content) — entered and exited with F, and
exited with Esc as well. Uses e.code (KeyF) so it works on non-Latin layouts
and ignores typing in inputs and Ctrl/Cmd/Alt combos.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-01 22:35:37 +05:00
git_admin ffddaaa50f archive: add 32px content footer; date section as a bottom card; hide cam scrollbar
The archive content frame gets a 32px footer (reusing the live grid-bar look)
with a fullscreen button that expands the player + timeline. The sidebar date
section is now a bottom-anchored card (panel-2, bordered, rounded) holding the
date input above the inline calendar; the camera list fills the space above it
and its scrollbar is hidden (still scrollable). Calendar colours tweaked to sit
on the card.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-01 22:27:56 +05:00
git_admin dcc4cc046f archive: replace toolbar with a 220px split sidebar (camera list + calendar)
The player-frame toolbar (camera <select> + date input) is removed. Archive
main is now a row: a 220px sidebar split in half by height — the top half is
a scrollable clickable camera list, the bottom half holds the date input plus
a new inline month calendar (prev/next month, today + selected highlight,
Monday-first). Picking a camera or a day loads that day's recordings. The
player and DVR timeline move into an .arch-content column on the right.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-01 22:14:59 +05:00
git_admin ab817e0d31 ui: restore a 50px top header with centered brand; rename to CoRE.Vizion+
Re-add the top header as a 50px bar injected by ensureHeader() on every
layout page (skipped on login), with the brand centered. The layout height
now subtracts both header and footer. Rebrand the project CoRE.Vision →
CoRE.Vizion+ everywhere: header + footer brand, all page <title>s, the login
card, and the FastAPI OpenAPI title (applies on next backend restart).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-01 22:03:04 +05:00
git_admin 02efe2ab4b ui: drop the Live view submenu; turn nav into a 64x64 icon rail
All grid/play/fullscreen submenu items are removed from every sidebar
(index, archive, settings, layout) — those controls now live in the live
grid footer. The sidebar becomes a narrow 72px rail and Live/Archive/Settings
render as 64x64 icon tiles (icon + small caption, active = inset red ring).
The layout.html gear (only link to /layout) is dropped with its submenu, so
the layout editor is now reachable by URL only.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-01 21:57:08 +05:00
git_admin 5b8f11dbb6 live: group paging next to play/stop; add grid-split menu before fullscreen
The grid control footer is regrouped: ⏮ play/stop ⏭ now sit together in the
centre (left section empty). On the right, before fullscreen, a new ▦ split
button opens an upward popup menu with the layouts 4/9/16/25/36/49/64 that
calls setDim; the menu respects maxDim (16+ mode), highlights the active
layout, and closes on outside click.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-01 21:49:56 +05:00
git_admin c6cdcf55b2 live: add a control footer under the grid (paging + play/stop + fullscreen)
The live-view <main> now hosts its own 32px footer bar beneath the grid:
prev page on the left, play/stop in the centre, next page + fullscreen on the
right — all icon buttons. Pagination is new: cameras are split into pages of
dim² cells, prev/next walk the pages (page 0 still honours a saved manual
layout), and the arrows disable at the bounds. Fullscreen now targets <main>
so the control bar stays visible in fullscreen (the global stats footer is
outside <main> and hides as before). The sidebar play/fullscreen items now
target <main> too.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-01 21:36:52 +05:00
git_admin b29b808c6d ui: restore ⟳/✕ actions in edit mode only; shrink toggles; uniform 22px rows
The camera table actions column is back as the 9th column but stays empty in
the normal view — restart (⟳) and delete (✕) buttons render only on existing
cameras while bulk-editing. Restart in bulk mode no longer reloads the table
(keeps pending edits); delete reloads as before.

Row height is now truly uniform: cams-fixed cells use line-height:1 with
vertically-centred controls, the Вкл/Запись toggles shrink to 30×16, and
selects/inputs/action buttons cap at 20px so filled rows match empty slots.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-01 21:25:33 +05:00
git_admin a519b78eb2 ui: remove per-row Лог/⟳/✕ buttons from camera table, fix row height to 22px
The camera table actions column (log/restart/delete buttons) is removed:
the table drops to 8 columns across thead, filled rows, empty slots and the
bulk-edit rows. The now-orphaned log subrow and openLogs tracking are gone.
Camera rows get a hard fixed height of 22px via a new table.cams.cams-fixed
rule (zero vertical padding, 22px line-height) so rows never inflate.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-01 21:15:39 +05:00
git_admin e2e03054ac ui: remove top header, move CPU/RAM/disk + clock into the footer
Header bar dropped from all pages; brand, system stats (#sys-stats) and clock
(#clock) now live in the 22px footer next to the version. .layout fills the
full height minus the footer. ensureFooter runs before startClock/refreshStats
so the moved elements exist when populated.

VERSION 0.0.136.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-01 20:56:59 +05:00
git_admin b07bf2d874 ui: add a 22px bottom footer (brand + version)
Footer is a third layout block; .layout height now subtracts --footer-h (22px)
so it never overlaps the full-height video grid. Injected via JS only on pages
with the main layout (skips login); shows CoRE.Vision brand + version.

VERSION 0.0.135.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-01 20:50:17 +05:00
git_admin 20dfed0bae ui: pick Hikvision channel (1-32) instead of typing full stream paths
Cameras (esp. an NVR at one IP with many channels) are configured by a channel
number now: channel N → main /Streaming/Channels/{N*100+1}, sub {N*100+2}
(101/102 = ch1, 1101/1102 = ch11, 3201/3202 = ch32). The add/edit form and the
bulk-edit row use a 1-32 dropdown; the camera list shows "канал N". Frontend
derives main_path/sub_path from the channel, so the backend is unchanged.

VERSION 0.0.132.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-01 20:29:40 +05:00
git_admin abc726b5a7 ui: bulk-edit edits cells in place instead of a stacked per-row form
"Изменить" previously replaced each camera row with a vertical .cam-edit-grid
form inside one colspan cell — effectively a different table. Now bulk edit
keeps the same columns and turns the cells into compact inline inputs:
Камера→name, IP→ip, Потоки→main/sub, Вкл/Запись toggles, Хранилище select,
and the Статус column becomes Логин/Пароль (header swaps via data-bulk-label).
Live per-row onchange is suppressed while bulk is active (changes collected
until Сохранить). Inputs are compact (22px) so row height stays dense.

VERSION 0.0.131.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-01 20:01:50 +05:00
git_admin 421f873160 ui: keep camera table dense — compact inline storage select
The per-row "Хранилище" <select> inherited the base select padding (6px 8px,
~32px tall) and inflated every camera row. Scope a compact rule to .stor-sel
(22px height, matching the toggles) so row height stays dense. Edit/bulk-form
selects are unaffected.

VERSION 0.0.130.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-01 19:53:12 +05:00
git_admin a64749ccc8 storage: multi-storage management with per-storage quota
Replace the single fixed /records path with a list of storages and an
active selection (where new recordings go). Quota is now per-storage.

- config: StorageItem(id,name,type,path,quota_gb,nas-meta) + Storage keeps
  global retention_days/segment_seconds; active + items. Migration from the
  old single {path,quota_gb} schema → one local item.
- recorder: write to the active storage; restart_all() repoints on switch;
  NAS-not-mounted guard (never write into the container overlay).
- indexer: scan ALL storage roots so recordings survive an active switch.
- retention: enforce quota PER storage via db.total_size_under /
  oldest_recordings_under (path-prefix LIKE).
- api/storages: GET/POST/PUT/DELETE + activate + policy. NAS uses host-mount
  (backend stores SMB params, generates the mount/fstab command, reports
  ismount status). Retire old POST /api/storage.
- frontend: new "Хранилища" settings tab — table with inline per-row quota,
  add form (local folder / NAS SMB), global policy (segment + retention).
- compose: add shared ./storages:/storages root for extra local folders and
  host-mounted NAS shares.

VERSION 0.0.127.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-01 19:31:15 +05:00
git_admin 81a5b58eb9 settings: lay transcode params out in an even grid
The params row was a ragged flex-wrap and "Готовый профиль" was floated
with margin-left:auto, so controls didn't line up and the preset menu
dangled at an odd height. Split the row into a left grid (auto-fit
columns, controls bottom-aligned, full-width) and a separate right-side
"Готовый профиль" zone. Reorder fields logically: codec, H.264 profile,
preset, rate control, bitrate, QP, keyframe interval. Drop the now-dead
SOFT/MEDIUM/HARD button CSS.

VERSION -> 0.0.123.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-01 17:44:49 +05:00
git_admin 90e216e30b settings: restore color-coding for quality presets, pin them right
The SOFT/MEDIUM/HARD selector lost its color coding when it became a
dropdown. Re-apply colors (SOFT red, MEDIUM yellow, HARD white) to the
options and to the select's shown value, and right-align the "Готовый
профиль" label (margin-left:auto) so it clearly sits on the right.

VERSION -> 0.0.122.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-01 17:36:21 +05:00
git_admin 650a531f21 live: double-click solos a cell to full screen (fullscreen mode)
Double-clicking a grid cell now maximizes that camera ("solo") via a CSS
class on the grid instead of putting the tile into the browser Fullscreen
API. In fullscreen the soloed camera fills the screen; double-clicking
again returns to the grid (staying fullscreen). From windowed mode the
gesture also enters fullscreen so the camera fills the screen. ESC exits
fullscreen natively; on exit the solo state is cleared.

VERSION -> 0.0.121.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-01 17:32:36 +05:00
git_admin 44f5aa920f settings: unify transcode param styling and controls
- Style QP <input type=number> like the <select>s (it rendered with the
  default white background -> stood out); add a disabled (greyed) style.
- QP vs bitrate are now mutually DISABLED instead of hidden: QP mode
  greys the bitrate field, VBR/CBR greys the QP field. Hiding never
  worked because .tr-row label{display:flex} overrode [hidden].
- Replace SOFT/MEDIUM/HARD preset buttons with a "Готовый профиль"
  dropdown, placed last (rightmost) in the params row.

VERSION -> 0.0.120.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-01 17:21:28 +05:00
git_admin fcddc0c470 settings: move Player/transcode and Account into their own tabs
The "Система" tab was a catch-all (Recording, Player & transcoding,
Storage, System info, Account). Split out two dedicated tabs:

- "Плеер": per-browser playback/transcode profiles. Kept at operator+
  (the transcode option spawns server-side ffmpeg, i.e. CPU load).
- "Учётная запись": current user + logout. Ungated, so any signed-in
  user (incl. viewers) can log out -- previously it was buried inside
  the operator-only "Система" tab.

.tabs gets flex-wrap so the now-7 tabs wrap instead of overflowing.
VERSION -> 0.0.117.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-01 16:14:59 +05:00
git_admin 21b26d73bd v113 2026-05-30 00:19:40 +05:00
git_admin d3afd698b6 init 2026-05-30 00:08:59 +05:00