Commit Graph

12675 Commits (master)

Author SHA1 Message Date
IgorA100 0998e9d766
When executing monitorChangeStreamChannel(), always write the new channel to the cookie and to monitorStream.currentChannelStream (watch.js).
This will allow "monitorStream.start()" to be executed correctly if the stream was stopped when the channel was switched.
2026-03-22 13:35:08 +03:00
Isaac Connor fd8adee68c
Merge pull request #4713 from IgorA100/patch-792734
Fix: Read from 'zmWatchMuted' cookies instead of 'zmWatchMute' on Watch page
2026-03-21 06:43:07 -04:00
Isaac Connor 16760f44b0
Merge pull request #4716 from IgorA100/patch-89150
Change the "Mute" icon in the volume slider based on the volume level, not just when the "muted" attribute changes (MonitorStream.js)
2026-03-21 06:42:25 -04:00
IgorA100 a685759885
Don't use "scrollTo" because it doesn't work properly. (console.js) 2026-03-21 11:58:00 +03:00
IgorA100 ac6dbe4ed6
Silent refresh bootstrapTable on Console page (console.js)
- The table refresh message will not appear briefly. The table will not "flicker."
Scrolling will attempt to return to the position it was in before the refresh.
2026-03-20 23:35:59 +03:00
Anton Vinogradov b703a6be91 wip 2026-03-19 19:29:04 +03:00
Anton Vinogradov 30d48f2ec7 wip 2026-03-19 19:26:59 +03:00
IgorA100 f04a9075cc
When starting a stream on the Watch page, don't execute controlMute() (watch.js)
When starting a stream on the Watch page, don't execute controlMute(), as this will cause the icon to be displayed before the stream actually starts playing.
We'll just set the "muted" property for the stream.
We'll manage the icon later.
2026-03-19 10:39:29 +03:00
IgorA100 1fc68a3e84
If the system volume was set to 0, change the state of the "Mute" icon in the volume slider (MonitorStream.js) 2026-03-18 13:32:01 +03:00
IgorA100 4a518c5708
Read from 'zmWatchMuted' cookies instead of 'zmWatchMute' (watch.js)
Because we store 'zmWatchMuted' in cookies, not 'zmWatchMute'

We can pass 'on' or 'off' to the "controlMute" function, but we store a Boolean value in cookies, so we need to convert it.
Also, if there's no cookie, getCookie will return "null," but for us, that doesn't equal "false."
2026-03-17 16:20:23 +03:00
Isaac Connor 5561829450 fix: include username in auth relay and fix stale auth in stream restart
- Add user= parameter to get_auth_relay() so zms can use the indexed
  Username column instead of iterating all users to validate the hash
- Apply the same fix to Event.php getStreamSrc() and getThumbnailSrc()
- Tighten Monitor.php from isset() to !empty() for consistency
- In MonitorStream.js start(), check if the auth hash in the img src
  matches the current auth_hash before resuming via CMD_PLAY. If stale,
  fall through to rebuild the URL with fresh auth_relay. This prevents
  long-running montage pages from spawning zms with expired credentials.
- Downgrade zms auth failure from Error to Warning

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16 10:01:47 -04:00
Isaac Connor dcb12e6f2a Merge branch 'master' of github.com:ZoneMinder/zoneminder 2026-03-15 17:25:17 -04:00
Isaac Connor 2ac16e835f Add br after USE ONVIF events 2026-03-15 17:25:08 -04:00
Isaac Connor a52c9edf95
Merge pull request #4709 from IgorA100/patch-513027
Feat: When loading, pausing, or stopping a stream, display a corresponding caption in the center of the stream player.
2026-03-14 12:32:24 -04:00
IgorA100 f536252a85
Set "pointer-events: none" for "imgInfoBlock" and "infoBlock" to disable pointer events for them (MonitorStream.js) 2026-03-14 17:16:39 +03:00
IgorA100 94b1ead0f4
When stopping a stream, execute writeTextInfoBlock after checking the existence of the stream (MonitorStream.js) 2026-03-14 16:07:50 +03:00
IgorA100 d43dd30155
Normalizing text before assigning it to a DOM element
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-03-14 15:45:01 +03:00
Isaac Connor 7ec5edc2e2 feat: add ZM_WEB_SHOW_SERVER_STATS config to toggle navbar stats
Add a boolean web config option to control whether server statistics
(load, CPU, DB connections, storage, RAM) are rendered in the navbar.
When disabled, the HTML is not output at all, saving the polling overhead.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 16:19:27 -04:00
IgorA100 040f461b86
Instead of "setTextSizeOnInfoBlock," we now use the new "setTextSizeOnInfoBlocks" function, which sets the text size for all blocks. (skin.js)
"setTextSizeOnInfoBlock" sets the text size for a specific block and is now used in MonitorStream.js.
2026-03-13 11:48:12 +03:00
IgorA100 dcd3ef06ad
Instead of explicitly specifying the text size, we use a call to the new function "setTextSizeOnInfoBlock" (MonitorStream.js)
This will allow us to correctly specify the class for the block.
2026-03-13 11:43:42 +03:00
Isaac Connor dca0f76468 feat: add ZM_WEB_SHOW_NAV_BUTTONS config to hide Back/Refresh buttons
Add a boolean web config option to control visibility of the Back and
Refresh navigation buttons shown at the top of most views. Uses a body
class and CSS rule so no individual view files need changes.

Also remove the ZM_WEB_BUTTON_STYLE INSERT from the migration SQL since
zmupdate.pl handles Config table inserts from ConfigData.pm.in.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 18:56:14 -04:00
Isaac Connor 217c415551 feat: add ZM_WEB_BUTTON_STYLE config for icons+text, icons, or text buttons
Add a web config option to control toolbar button display:
- icons+text (default): show both icon and label
- icons: show only the icon, hide text labels
- text: show only the label, hide icons on buttons that have labels

Body class (btn-icons-only / btn-text-only) is set in getBodyTopHTML() and
CSS rules in skin.css toggle visibility of .text spans and icon elements.
Add title tooltips to console.php buttons so they remain usable in icon-only
mode. Migration appended to zm_update-1.39.4.sql.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 18:04:14 -04:00
IgorA100 33783300bd
Fix: Eslint (MonitorStream.js) 2026-03-12 23:58:27 +03:00
IgorA100 fc2022c651
Remove extra space (skin.js) 2026-03-12 23:51:36 +03:00
IgorA100 d00f56d036
When a stream is loaded, paused, or stopped, display a corresponding caption in the center of the stream player. (MonitorStream.js)
Additionally, when loading or stopping a stream using Go2RTC, RTSP2Web, or Janus, display a static image generated at that moment.
2026-03-12 23:41:32 +03:00
Isaac Connor 8044c80f9d feat: make Remember Me a tri-state option (None/Yes/No)
Change ZM_OPT_USE_REMEMBER_ME from a boolean to a tri-state string:
- None: checkbox hidden, sessions persist for ZM_COOKIE_LIFETIME (old disabled)
- Yes: checkbox shown and pre-checked by default
- No: checkbox shown and unchecked by default (old enabled behavior)

Update ConfigData.pm.in with new type definition, login.php to honor the
checked state, and session/action handlers to recognize the new values.
Migration in zm_update-1.39.4.sql maps old '1' to 'No' and '0' to 'None'.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 16:35:41 -04:00
IgorA100 b319d2a2b3
Added styles for 3D text (skin.css) 2026-03-12 23:32:38 +03:00
IgorA100 2fd36161d0
Added calculation of the text size displayed in the information block (skin.js) 2026-03-12 23:21:26 +03:00
Isaac Connor 8f29a06ca7 fix: strip <br/> from bootstrap-table column picker labels
Column headers like "Alarm<br/>Frames" and "Avg.<br/>Score" show the literal
<br/> text in the column selection dropdown. Add data-switchable-label attributes
with the <br/> replaced by a space so the column picker shows clean labels while
the table headers still render the line break. Fix applied to events.php and
watch.php.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 16:16:46 -04:00
Isaac Connor 939c2c4a9e fix: compact montage header layout and move Show Zones to settings row
Switch filter labels from stacked (above dropdown) to inline (beside dropdown)
to reduce vertical space. Make sizeControl form use flex-wrap for proper flow.
Move Show Zones and Control links from floating headerButtons div into the
sizeControl form so they flow with the layout buttons. Fix chosen.js Ratio
dropdown being too narrow by setting min-width with !important to override
inline styles set by chosen on dynamically-populated selects.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 15:56:45 -04:00
Isaac Connor c0029fe8d1 Don't add postLoginQuery to url if it is empty 2026-03-12 15:03:45 -04:00
Isaac Connor 286feece4c Move tag related commands to canView(Events) instead of canEdit(Events) 2026-03-12 15:03:29 -04:00
Isaac Connor 18ef01bd8d Increase potential config line size. HTML snippets can easily be larger than 256 2026-03-12 09:28:37 -04:00
Isaac Connor 6aa39892f6 Merge branch 'master' of github.com:ZoneMinder/zoneminder 2026-03-11 17:22:26 -04:00
Isaac Connor afcf4ecfd5 Remove pointless view_ variable 2026-03-11 17:22:23 -04:00
Isaac Connor 39ab3b225e Fix width=>Width 2026-03-11 16:25:54 -04:00
Isaac Connor 15807eb419 Handle event having no width or height 2026-03-11 16:25:49 -04:00
Isaac Connor d67f23b279 Remove General header 2026-03-11 16:25:01 -04:00
Isaac Connor 4878d9cd3c Fixup, more footer to bottom of sidebar 2026-03-11 16:25:01 -04:00
Isaac Connor d5795774d6 fix: add missing global declaration for menu icon override in Options
getOptionsHTML() was missing the global $menuIconOverride declaration,
so custom image icons set for the Options menu item were ignored in
the left sidebar, always falling back to the default material icon.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 16:21:42 -04:00
Isaac Connor 2874751c72 fix: correct stats percentage calculations for percentage-space zone area
The stats display was dividing pixel counts by the zone Area value
directly, but Area is stored in percentage coordinate space (0-10000
for full frame). Convert Area to actual pixel area using the monitor
dimensions before calculating percentages.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 16:04:43 -04:00
Isaac Connor 2d7fd1ee6b
Merge pull request #4700 from IgorA100/patch-609482
We use manageEventListener to set and remove listeners for the stream's "play" & 'volumechange' event.
2026-03-11 15:17:47 -04:00
IgorA100 7d833bd8bb
Fix Eslint (MonitorStream.js) 2026-03-11 18:57:16 +03:00
IgorA100 1478594780
Code optimization (MonitorStream.js)
- getAudioStream has been renamed to getAVStream
- Clear this.handlerEventListener['volumechange'] when the stream is stopped
- Check volumeSlider.noUiSlider after assigning the listener
- This.handlerEventListenerStream does not require an argument (stream), but if we have already received a stream, we will pass it as an argument to avoid searching for the stream again.
2026-03-11 18:53:05 +03:00
IgorA100 efa1b6e99b
Code formatting improvements (video-stream.js) 2026-03-11 18:41:09 +03:00
IgorA100 23fd92ef3a
Update web/js/MonitorStream.js
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-03-11 18:08:59 +03:00
Isaac Connor cd33af3ad9 fix: use text input for menu item image icon path instead of file upload
Replace the file upload input with a text input for image icon type,
accepting a URL path relative to the web root. Remove multipart form
encoding, file upload handling, and uploaded file cleanup on reset.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 17:15:46 -04:00
Isaac Connor 06054f5733 fix: use flex layout for zone edit and fix SVG point index error
Switch zone edit page from float-based to flexbox layout. The settings
panel is fixed at 480px and the stream scales to fill remaining space.
The points table columns collapse to a single column on narrow widths
using a container query.

Add bounds check in updateActivePoint to prevent SVG point index error
when ResizeObserver triggers drawZonePoints during a drag operation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 16:21:04 -04:00
Isaac Connor c2b2de4a86 feat: show both percentage and pixel values in zone edit UI
Remove the Units selector and always store/display thresholds as
percentages. Add editable pixel inputs alongside each percentage field
with bidirectional sync. Zone area is now displayed as plain text
instead of readonly inputs. Pixel inputs are disabled/enabled in sync
with their percentage counterparts based on zone type and check method.

Server-side enforcement ensures values > 100 are converted from pixel
counts to percentages before storage and clamped to 0-100.

Add aspect-ratio to imageFeed container to prevent layout flash on load.
Hide number input spinners in zone settings panel.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 15:14:53 -04:00
Isaac Connor 381a5d0222 fix: add icons to Save and Reset buttons on options menu tab
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 11:35:05 -04:00