Addded possibility to add dividers to System Command Menu

This commit is contained in:
Marc 2015-06-05 01:26:45 +02:00
parent a1568c43d3
commit 9753a74db4
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>