mirror of
https://github.com/fulpstation/fulpstation.git
synced 2025-12-10 18:11:47 +00:00
60 lines
1.5 KiB
JavaScript
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>
|
|
);
|
|
};
|