Merge pull request #924 from Salandora/systemCommandsDivider

Addded possibility to add dividers to System Command Menu
This commit is contained in:
Gina Häußge 2015-06-05 11:26:42 +02:00
commit 13cda74ebc
2 changed files with 14 additions and 0 deletions

View file

@ -730,6 +730,15 @@ OctoPrint is running is allowed to do this without password entry:
command: sudo shutdown -h now
confirm: You are about to shutdown the system.
You can also add an divider by setting action to divider like this:
.. code-block:: yaml
system:
actions:
- action: divider
.. _sec-configuration-config_yaml-temperature:
Temperature

View file

@ -3,5 +3,10 @@
<b class="caret"></b>
</a>
<ul class="dropdown-menu" data-bind="foreach: systemActions">
<!-- ko ifnot: action.startsWith("divider") -->
<li><a href="#" data-bind="click: $root.triggerAction, text: name"></a></li>
<!-- /ko -->
<!-- ko if: action.startsWith("divider") -->
<li class="divider" />
<!-- /ko -->
</ul>