#21 Add PowerOFF when print is finished

This commit is contained in:
David Zingg
2020-06-28 14:56:17 +02:00
parent 96280e4a4b
commit cc1254f7f9
3 changed files with 12 additions and 12 deletions

View File

@ -50,7 +50,7 @@ $(function() {
self.onAutomaticPowerOffEnabledChanged = function(){
var cmd = "disablePowerOffAfterFinish";
if (self.automaticShutdownEnabled()) {
if (self.automaticPowerOffEnabled()) {
var cmd = "enablePowerOffAfterFinish";
}
$.ajax({

View File

@ -3,12 +3,12 @@
<label class="control-label" id="mystromswitchEnergyValue">Energy 0.0Wh</label>
<button class="btn btn-primary" data-bind="click: onToggleRelayEvent, visible : onOffButtonEnabled">{{ _('Toggle Relais') }}</button>
<label class="checkbox">
<input type="checkbox" data-bind="enable: loginState.isUser(), change: automaticShutdownEnabled, visible :showShutdownOctopiOption">
<input type="checkbox" data-bind="enable: loginState.isUser(), checked: automaticShutdownEnabled, visible :showShutdownOctopiOption">
{{ _('Shutdown Octoprint after print finishes') }}
</label>
<label class="checkbox">
<input type="checkbox" data-bind="enable: loginState.isUser(), change: automaticPowerOffEnabled, visible: showPowerOffPrintFinishOption">
<input type="checkbox" data-bind="enable: loginState.isUser(), checked: automaticPowerOffEnabled, visible: showPowerOffPrintFinishOption">
{{ _('Power Off Relais after print finishes') }}
</label>
</div>