From 72da1737ac6dd6da6fd8dff1310703cb0f122f19 Mon Sep 17 00:00:00 2001 From: itsmeow Date: Thu, 28 Sep 2023 13:51:59 -0500 Subject: [PATCH] Cleanup Crew Manifest UI (#9915) --- tgui/packages/tgui/components/index.js | 1 + .../packages/tgui/interfaces/CrewManifest.tsx | 40 +++++++++++-------- .../tgui/styles/interfaces/CrewManifest.scss | 8 +--- 3 files changed, 26 insertions(+), 23 deletions(-) diff --git a/tgui/packages/tgui/components/index.js b/tgui/packages/tgui/components/index.js index b71ee4d04359f..01cb99b5bd2fb 100644 --- a/tgui/packages/tgui/components/index.js +++ b/tgui/packages/tgui/components/index.js @@ -13,6 +13,7 @@ export { Button } from './Button'; export { ByondUi } from './ByondUi'; export { Chart } from './Chart'; export { Collapsible } from './Collapsible'; +export { CollapsibleSection } from './CollapsibleSection'; export { ColorBox } from './ColorBox'; export { Dimmer } from './Dimmer'; export { Divider } from './Divider'; diff --git a/tgui/packages/tgui/interfaces/CrewManifest.tsx b/tgui/packages/tgui/interfaces/CrewManifest.tsx index cba75cc027584..fd7e63f0982fa 100644 --- a/tgui/packages/tgui/interfaces/CrewManifest.tsx +++ b/tgui/packages/tgui/interfaces/CrewManifest.tsx @@ -1,7 +1,7 @@ import { sortBy } from '../../common/collections'; -import { BooleanLike, classes } from 'common/react'; +import { classes } from 'common/react'; import { useBackend } from '../backend'; -import { Box, Icon, Section, Table, Tooltip } from '../components'; +import { Box, Icon, CollapsibleSection, Table, Tooltip, Flex } from '../components'; import { Window } from '../layouts'; type DepartmentCrew = { [department: string]: ManifestEntry[] }; @@ -47,21 +47,36 @@ export const CrewManifest = (_props, context) => { } = useBackend(context); return ( - + {Object.entries(manifest).map(([dept, crew]) => { const sorted_jobs = dept === command.dept ? sortSpecific(crew, command.order) : sortSpecific(crew, order); return ( -
+ {Object.entries(sorted_jobs).map(([crewIndex, crewMember]) => { const is_command = command.huds.includes(crewMember.hud) || command.jobs.includes(crewMember.rank); return ( - + - {crewMember.name} + + + + + {crewMember.name} + - + {is_command && ( { /> )} - - - {crewMember.rank} ); })}
-
+ ); })}
diff --git a/tgui/packages/tgui/styles/interfaces/CrewManifest.scss b/tgui/packages/tgui/styles/interfaces/CrewManifest.scss index af1b8fb0a8f29..af8106ee32a22 100644 --- a/tgui/packages/tgui/styles/interfaces/CrewManifest.scss +++ b/tgui/packages/tgui/styles/interfaces/CrewManifest.scss @@ -20,15 +20,11 @@ &--Rank { color: colors.$label; + text-align: right; } } - &__Icons { - text-align: right; - } - &__Icon { - color: colors.$label; position: relative; &:not(:last-child) { @@ -36,7 +32,7 @@ } &--Chevron { - padding-right: 2px; + margin-right: 4px; } &--Command {