Files
fulpstation/tgui-next/packages/tgui/interfaces/StationAlertConsole.js
skoglol f87db2b114 tgui-next: Tank, spaceheater and some touchups (#47887)
* Tank + spaceheater + touchups

* Mint update
2019-11-21 02:25:40 -08:00

60 lines
1.5 KiB
JavaScript

import { Fragment } from 'inferno';
import { act } from '../byond';
import { Section, Button } from '../components';
export const StationAlertConsole = props => {
const { state } = props;
const { config, data } = state;
const { ref } = config;
const categories = data.alarms || [];
const fire = categories['Fire'] || [];
const atmos = categories['Atmosphere'] || [];
const power = categories['Power'] || [];
return (
<Fragment>
<Section title="Fire Alarms">
<ul>
{fire.length === 0 && (
<li className="color-good">
Systems Nominal
</li>
)}
{fire.map(alert => (
<li key={alert} className="color-average">
{alert}
</li>
))}
</ul>
</Section>
<Section title="Atmospherics Alarms">
<ul>
{atmos.length === 0 && (
<li className="color-good">
Systems Nominal
</li>
)}
{atmos.map(alert => (
<li key={alert} className="color-average">
{alert}
</li>
))}
</ul>
</Section>
<Section title="Power Alarms">
<ul>
{power.length === 0 && (
<li className="color-good">
Systems Nominal
</li>
)}
{power.map(alert => (
<li key={alert} className="color-average">
{alert}
</li>
))}
</ul>
</Section>
</Fragment>
);
};