Skip to content

Commit

Permalink
Merge pull request #31 from OdysseusLarp/hangar-bay-fighters
Browse files Browse the repository at this point in the history
Show fighter status and re-enable (de)pressurize admin overrides for Hangar Bay
  • Loading branch information
vyznev authored Jul 9, 2024
2 parents 70e667e + 62631fb commit a72d784
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions src/components/AirlockControl.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@
/>
</li>
<li>Countdown: <countdown :target="box.countdown_to" /></li>
<li>
Fighters:
<span v-if="box.fighters === 'active'"><b>active</b> (cannot open or pressurize from control panel)</span>
<span v-else-if="box.fighters === 'launching'"><b>launching</b> (launched from EE, depressurizing soon)</span>
<span v-else-if="(box.fighters || 'docked') !== 'docked'"><b>${box.fighters}</b> (unrecognized status!)</span>
<span v-else-if="(box.config?.fighter_pads || []).length > 0"><b>all docked</b></span>
<span v-else>none</span>
</li>
<li>
<label for="accessDenied">Access denied: &nbsp;</label>
<input type="checkbox" id="accessDenied" :checked="box.access_denied" @change="toggleAccess()">
Expand All @@ -31,7 +39,7 @@
<div class="button-group">
<b-button variant="warning" @click="forceStatus('open')">Unlocked</b-button>
<b-button variant="warning" @click="forceStatus('closed')">Locked</b-button>
<b-button variant="warning" @click="forceStatus('vacuum')" v-if="box.config.allow_depressurize">Vacuum</b-button>
<b-button variant="warning" @click="forceStatus('vacuum')" v-if="canDepressurize">Vacuum</b-button>
</div>

Actions:
Expand All @@ -41,13 +49,13 @@
<b-button variant="outline-warning" @click="sendCommand('stop')">Stop Transition</b-button>
</div>

<div class="button-group" v-if="box.config.allow_depressurize">
<div class="button-group" v-if="canDepressurize">
<b-button variant="success" @click="sendCommand('pressurize')">Pressurize</b-button>
<b-button variant="success" @click="sendCommand('depressurize')">Depressurize</b-button>
<b-button variant="success" @click="sendCommand('evacuate')">Emergency Depressurize</b-button>
<b-button variant="success" @click="sendCommand('evacuate')" v-if="box.config?.allow_depressurize">Emergency Depressurize</b-button>
</div>

<div v-if="box.config.allow_depressurize">
<div v-if="box.config?.allow_depressurize">
For Tristan Fukui (non-interruptible 10 min depressurization):
<div class="button-group">
<b-button variant="warning" @click="sendCommand('forceDepressurize')">Force Depressurize</b-button>
Expand Down Expand Up @@ -114,6 +122,10 @@ export default {
if (!timestamp) return "never";
return "at " + new Date(timestamp).toISOString();
},
canDepressurize() {
const config = this.box.config || {};
return config.allow_depressurize || (config.fighter_pads || []).length > 0
},
},
};
</script>
Expand Down

0 comments on commit a72d784

Please sign in to comment.