Fix turbine computer showing broken

This commit is contained in:
Matt Smith
2017-11-30 02:55:45 +00:00
committed by CitadelStationBot
parent 4b25b45701
commit a0cdca9e7c
2 changed files with 18 additions and 14 deletions
+9 -9
View File
@@ -13,20 +13,20 @@ component.exports = {
<ui-notice>
<ui-section label='Reconnect'>
<div style='float:right'>
<ui-button icon='refresh' action='reconnect' state='{{data.connected}}'>Reconnect</ui-button>
<ui-button icon='refresh' action='reconnect'>Reconnect</ui-button>
</div>
</ui-section>
</ui-notice>
<ui-display title='Turbine Controller'>
<ui-section label='Status'>
{{#if data.working}}
<span class='{{powerState(data.online)}}'>{{data.online && !(data.compressor_broke || data.turbine_broke) ? "Online" : "Offline"}}</span>
{{else}}
{{#if data.broken}}
<span class='bad'>Broken</span>
{{else}}
<span class='{{powerState(data.online)}}'>{{data.online && !(data.compressor_broke || data.turbine_broke) ? "Online" : "Offline"}}</span>
{{/if}}
<div style='float:right'>
<ui-button icon='power-off' action='power' state='{{data.working}}' style='{{data.online ? "selected" : ""}}'>On</ui-button>
<ui-button icon='close' action='power' state='{{data.working}}' style='{{data.online ? "" : "selected"}}'>Off</ui-button>
<ui-button icon='power-off' action='power-on' state='{{data.broken}}' style='{{data.online ? "selected" : ""}}'>On</ui-button>
<ui-button icon='close' action='power-off' state='{{data.broken}}' style='{{data.online ? "" : "selected"}}'>Off</ui-button>
</div>
{{#if data.compressor_broke}}
<br>
@@ -40,12 +40,12 @@ component.exports = {
</ui-display>
<ui-display title='Status'>
<ui-section label='Turbine Speed'>
<span>{{data.working ? data.rpm : "--"}} RPM</span>
<span>{{data.broken ? "--" : data.rpm}} RPM</span>
</ui-section>
<ui-section label='Internal Temp'>
<span>{{data.working ? data.temp : "--"}} K</span>
<span>{{data.broken ? "--" : data.temp}} K</span>
</ui-section>
<ui-section label='Generated Power'>
<span>{{data.working ? data.power : "--"}}</span>
<span>{{data.broken ? "--" : data.power}}</span>
</ui-section>
</ui-display>