Skip to content

Commit bc53262

Browse files
fix: mobile layout for monitor and watch views
Fix monitor config view labels being pushed off-screen to the left on mobile. The CSS specificity of the mobile override selector (ul.form > li > label) was lower than the base rule (ul.form > li > label:first-child), so margin-left: -300px was never overridden on small screens. Match the :first-child pseudo-class in the media query to fix. Also add mobile responsive overrides for the watch view (which had none), and change flex-nowrap to flex-md-nowrap so sidebar/PTZ stack vertically on phones. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 90cc5fe commit bc53262

File tree

3 files changed

+39
-2
lines changed

3 files changed

+39
-2
lines changed

web/skins/classic/css/base/views/monitor.css

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,22 @@ ul.form > li > label:first-child {
112112
padding-left: 0;
113113
margin: 5px 0;
114114
}
115-
ul.form > li > label {
115+
ul.form > li > label:first-child {
116116
width: 100%;
117117
margin-left: 0;
118118
text-align: left;
119119
}
120+
#page tr td:first-child {
121+
min-width: unset;
122+
}
123+
.tab-pane td:first-child {
124+
text-align: left;
125+
}
126+
textarea,
127+
input[name="newMonitor[ONVIF_URL]"],
128+
input[name="newMonitor[ONVIF_Username]"],
129+
input[name="newMonitor[ONVIF_Password]"],
130+
input[name="newMonitor[LabelFormat]"] {
131+
min-width: unset;
132+
}
120133
}

web/skins/classic/css/base/views/watch.css

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,30 @@ button.btn.btn-view-watch, button.btn.btn-fullscreen, .ratioControl {
209209
line-height: 36px;
210210
}
211211

212+
@media screen and (max-width: 767px) {
213+
#sidebar {
214+
width: 100%;
215+
min-width: unset;
216+
}
217+
218+
#sidebar .nav {
219+
flex-wrap: wrap;
220+
flex-direction: row;
221+
}
222+
223+
#wrapperMonitor {
224+
overflow-x: hidden;
225+
}
226+
227+
#ptzControls {
228+
width: 100%;
229+
}
230+
231+
.d-flex.flex-row.justify-content-between {
232+
flex-wrap: wrap;
233+
}
234+
}
235+
212236
/* +++ Support for old ZoomPan algorithm */
213237
.form-check.control-use-old-zoom-pan {
214238
display: inline-block;

web/skins/classic/views/watch.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@
335335
</div><!--header-->
336336
<div id="content">
337337
<div class="container-fluid">
338-
<div class="row flex-nowrap" >
338+
<div class="row flex-md-nowrap" >
339339
<?php if (count($monitors)) { ?>
340340
<nav id="sidebar" <?php echo $showCycle?'':' style="display:none;"'?>>
341341
<div id="cycleButtons" class="buttons">

0 commit comments

Comments
 (0)