Skip to content

Commit 2caacf7

Browse files
committed
Hide additional config sections in non-admin mode
1 parent 2bc0145 commit 2caacf7

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

motioneye/static/js/main.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1456,6 +1456,9 @@ function updateConfigUI() {
14561456
if (!isAdmin()) {
14571457
$('#generalSectionDiv').each(markHideLogic);
14581458
$('#generalSectionDiv').next().each(markHideLogic);
1459+
1460+
$('div.settings-section-title.additional-section').each(markHideLogic);
1461+
$('div.settings-section-title.additional-section').next().each(markHideLogic);
14591462
}
14601463

14611464
var query = splitUrl().params;

motioneye/templates/main.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@
222222
<!-- Additional Main Sections -->
223223
{% for section in main_sections.values() %}
224224
{% if section.get('label') and section.get('configs') %}
225-
<div class="settings-section-title">
225+
<div class="settings-section-title additional-section">
226226
{% if section.get('onoff') %}<input type="checkbox" class="styled section additional-section {{section['name']}} main-config" id="{{section['name']}}Switch">{% endif %}
227227
{% if section.get('description') %}<span class="help-mark" title="{{section['description']}}">?</span>{% endif %}
228228
<a class="settings-section-title">{{section['label']}}</a>

0 commit comments

Comments
 (0)