import { filter, sortBy } from 'common/collections'; import { Fragment } from 'inferno'; import { formatTime } from '../format'; import { useBackend, useLocalState } from '../backend'; import { Box, Button, LabeledList, Section, Tabs, AnimatedNumber, Stack } from '../components'; import { ComplexModal, modalRegisterBodyOverride } from '../interfaces/common/ComplexModal'; import { Window } from '../layouts'; import { flow } from 'common/fp'; const viewCrateContents = (modal, context) => { const { act, data } = useBackend(context); const { supply_points } = data; const { name, cost, manifest, ref, random } = modal.args; return (
supply_points} onClick={() => act('request_crate', { ref: ref })} /> }>
{manifest.map((m) => ( {m} ))}
); }; export const SupplyConsole = (props, context) => { const { act, data } = useBackend(context); modalRegisterBodyOverride('view_crate', viewCrateContents); return (
); }; const SupplyConsoleShuttleStatus = (props, context) => { const { act, data } = useBackend(context); const { supply_points, shuttle, shuttle_auth } = data; let shuttle_buttons = null; let showShuttleForce = false; if (shuttle_auth) { if (shuttle.launch === 1 && shuttle.mode === 0) { shuttle_buttons = (