🚸 Improve documentation of use of Default Webcam

Make clear it's only used on the webcam compat layer on the settings API

Also fix some HTML semantics.

Closes #4778
This commit is contained in:
Gina Häußge committed 2023-04-11 14:19:45 +02:00
1 parent a6de25e864
commit 0f922283f8
2 files changed
+28 -17

No files matched your search

@@ -1,5 +1,5 @@
<div class="control-group" title="">
<label class="control-label" for="settings-defaultWebcam">{{ _('Default Webcam') }}</label>
<div class="control-group" title="{{ _('Default Stream Webcam')|edq }}">
<label class="control-label" for="settings-defaultWebcam">{{ _('Default Stream Webcam') }}</label>
<div class="controls">
<select id="settings-defaultWebcam" data-bind="options: webcam_webcams,
optionsText: function(key) { return key.displayName },
@@ -10,22 +10,33 @@
<!-- ko foreach: webcam_webcams -->
<!-- ko if: name == $parent.webcam_defaultWebcam() -->
<span class="help-inline" style="padding-top: 10px; padding-bottom: 10px;">
<span><b>{{ _('MJPEG stream')}}&nbsp;</b></span>
<div class="help-block">
<span><strong>{{ _('MJPEG stream')}}&nbsp;</strong></span>
<!-- ko if: compat != null && compat.stream -->
<span data-bind="text: compat.stream"></span>&nbsp;
<a data-bind="attr: { href: compat.stream }" target="_blank"><i class="fa-solid fa-up-right-from-square"></i></a>
<a data-bind="attr: { href: compat.stream }, text: compat.stream" rel="noreferer noopener" target="_blank"></a>
<!-- /ko -->
<!-- ko ifnot: compat != null && compat.stream -->
<span>{{ _('Not supported')}}</span>
{{ _('Not supported') }}
<!-- /ko -->
</span>
</div>
<!-- /ko -->
<!-- /ko -->
<span class="help-inline">{{ _('Selects the default webcam. If this webcam provides a MJPEG video stream, it will be available for old clients that do not make use of the webcam plugin system introduced with OctoPrint 1.9.0') }}</span>
<span class="help-inline" style="padding-top: 10px;">{{ _('You can make changes to this webcam in the plugin\'s settings.') }}</span>
<div class="help-block" style="padding-top: 10px;">{% trans %}
<p>
Selects the webcam to use to populate the stream URL on the settings
API used by old clients that do not yet utilize the webcam plugin
system introduced in OctoPrint 1.9.0. If the selected webcam does not
provide a stream URL, no stream will be available on the settings API.
</p>
<p>
Note that this does not affect the webcam stream options available
in OctoPrint's core UI, it is exclusively relevant for the compatibility
layer provided on the settings API.
</p>
<p>
You can make changes to this webcam in the plugin's settings.
</p>
{% endtrans %}</div>
</div>
</div>
@@ -1,4 +1,4 @@
<div class="control-group" title="">
<div class="control-group" title="{{ _('Snapshot Webcam')|edq }}">
<label class="control-label" for="settings-snapshotWebcam">{{ _('Snapshot Webcam') }}</label>
<div class="controls">
<select id="settings-snapshotWebcam" data-bind="options: webcam_webcams,
@@ -9,8 +9,8 @@
<!-- ko foreach: webcam_webcams -->
<!-- ko if: name == $parent.webcam_snapshotWebcam() -->
<span class="help-inline" style="padding-top: 10px;">
<span><b>{{ _('Snapshot stream')}}&nbsp;</b></span>
<div class="help-block">
<span><strong>{{ _('Snapshot stream')}}&nbsp;</strong></span>
<!-- ko if: canSnapshot -->
<!-- ko if: snapshotDisplay -->
<span data-bind="text: snapshotDisplay"></span>&nbsp;
@@ -23,11 +23,11 @@
<!-- ko ifnot: canSnapshot -->
<span>{{ _('Not supported')}}</span>
<!-- /ko -->
</span>
</div>
<!-- /ko -->
<!-- /ko -->
<span class="help-inline" style="padding-top: 10px;">{{ _('You can make changes to this webcam in the plugin\'s settings.') }}</span>
<div class="help-block" style="padding-top: 10px;">{{ _('You can make changes to this webcam in the plugin\'s settings.') }}</div>
</div>
</div>