Initial densification of Augments list

This commit is contained in:
nickofolas 2022-05-21 19:40:27 -05:00
parent 5f9fb117b0
commit ea2f412ef1

@ -42,11 +42,13 @@ const PreReqs = (props: IPreReqsProps): React.ReactElement => {
}
>
<Typography
variant="body2"
sx={{
ml: 1,
fontSize: "0.9rem",
display: "flex",
alignItems: "center",
color: hasPreReqs ? Settings.theme.successlight : Settings.theme.error,
gridArea: "prereqs",
}}
>
{hasPreReqs ? (
@ -100,7 +102,10 @@ const Exclusive = (props: IExclusiveProps): React.ReactElement => {
</>
}
>
<NewReleases sx={{ ml: 1, color: Settings.theme.money, transform: "rotate(180deg)" }} />
<NewReleases
fontSize="small"
sx={{ ml: 1, color: Settings.theme.money, transform: "rotate(180deg)", gridArea: "exclusive" }}
/>
</Tooltip>
);
};
@ -176,11 +181,12 @@ export function PurchasableAugmentation(props: IPurchasableAugProps): React.Reac
return (
<Paper
sx={{
p: 1,
p: 0.5,
display: "grid",
gridTemplateColumns: "minmax(0, 4fr) 1fr",
gridTemplateColumns: "minmax(0, 4fr) 1.4fr",
gap: 1,
opacity: props.owned ? 0.75 : 1,
minWidth: "1100px",
}}
>
<>
@ -192,13 +198,13 @@ export function PurchasableAugmentation(props: IPurchasableAugProps): React.Reac
})
}
disabled={!props.parent.canPurchase(props.parent.player, aug) || props.owned}
sx={{ width: "48px", height: "48px", float: "left", clear: "none", mr: 1 }}
sx={{ width: "48px", height: "36px", float: "left", clear: "none", mr: 1 }}
>
{props.owned ? "Owned" : "Buy"}
</Button>
<Box sx={{ maxWidth: props.owned ? "100%" : "85%" }}>
<Box sx={{ display: "flex", alignItems: "center" }}>
<Box sx={{ display: "grid", alignItems: "center", gridTemplateAreas: `"title exclusive prereqs"` }}>
<Tooltip
title={
<>
@ -212,8 +218,8 @@ export function PurchasableAugmentation(props: IPurchasableAugProps): React.Reac
}
>
<Typography
variant="h6"
sx={{
gridArea: "title",
textOverflow: "ellipsis",
whiteSpace: "nowrap",
overflow: "hidden",
@ -227,17 +233,17 @@ export function PurchasableAugmentation(props: IPurchasableAugProps): React.Reac
{aug.name === AugmentationNames.NeuroFluxGovernor && ` - Level ${aug.getLevel(props.parent.player)}`}
</Typography>
</Tooltip>
{aug.factions.length === 1 && !props.parent.sleeveAugs && (
<Exclusive player={props.parent.player} aug={aug} />
)}
</Box>
{aug.prereqs.length > 0 && !props.parent.sleeveAugs && <PreReqs player={props.parent.player} aug={aug} />}
</Box>
</Box>
</Box>
{props.owned || (
<Box sx={{ display: "grid", alignItems: "center", justifyItems: "left" }}>
<Box sx={{ display: "grid", alignItems: "center", gridTemplateColumns: "1fr 1fr" }}>
<Requirement
fulfilled={cost === 0 || props.parent.player.money > cost}
value={numeralWrapper.formatMoney(cost)}