mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-28 08:57:32 +01:00
re-add badges
This commit is contained in:
parent
757b38327f
commit
8e764a5524
@ -140,6 +140,8 @@ export function SidebarRoot(props: IProps): React.ReactElement {
|
||||
|
||||
const flashTutorial = ITutorial.currStep === iTutorialSteps.WorldDescription;
|
||||
|
||||
const augmentationCount = props.player.queuedAugmentations.length;
|
||||
const invitationsCount = props.player.factionInvitations.length;
|
||||
const programCount = getAvailableCreatePrograms(props.player).length;
|
||||
const canCreateProgram =
|
||||
programCount > 0 ||
|
||||
@ -435,7 +437,7 @@ export function SidebarRoot(props: IProps): React.ReactElement {
|
||||
onClick={clickCreateProgram}
|
||||
>
|
||||
<ListItemIcon>
|
||||
<Badge badgeContent={4} color="primary">
|
||||
<Badge badgeContent={programCount > 0 ? programCount : undefined} color="error">
|
||||
<BugReportIcon color={activeTab !== "CreateProgram" ? "secondary" : "primary"} />
|
||||
</Badge>
|
||||
</ListItemIcon>
|
||||
@ -485,7 +487,9 @@ export function SidebarRoot(props: IProps): React.ReactElement {
|
||||
onClick={clickFactions}
|
||||
>
|
||||
<ListItemIcon>
|
||||
<ContactsIcon color={activeTab !== "Factions" ? "secondary" : "primary"} />
|
||||
<Badge badgeContent={invitationsCount !== 0 ? invitationsCount : undefined} color="error">
|
||||
<ContactsIcon color={activeTab !== "Factions" ? "secondary" : "primary"} />
|
||||
</Badge>
|
||||
</ListItemIcon>
|
||||
<ListItemText>
|
||||
<Typography color={activeTab !== "Factions" ? "secondary" : "primary"}>Factions</Typography>
|
||||
@ -502,10 +506,12 @@ export function SidebarRoot(props: IProps): React.ReactElement {
|
||||
onClick={clickAugmentations}
|
||||
>
|
||||
<ListItemIcon>
|
||||
<DoubleArrowIcon
|
||||
style={{ transform: "rotate(-90deg)" }}
|
||||
color={activeTab !== "Augmentations" ? "secondary" : "primary"}
|
||||
/>
|
||||
<Badge badgeContent={augmentationCount !== 0 ? augmentationCount : undefined} color="error">
|
||||
<DoubleArrowIcon
|
||||
style={{ transform: "rotate(-90deg)" }}
|
||||
color={activeTab !== "Augmentations" ? "secondary" : "primary"}
|
||||
/>
|
||||
</Badge>
|
||||
</ListItemIcon>
|
||||
<ListItemText>
|
||||
<Typography color={activeTab !== "Augmentations" ? "secondary" : "primary"}>Augmentations</Typography>
|
||||
|
@ -60,15 +60,23 @@ export function TerminalRoot({ terminal, engine, player }: IProps): React.ReactE
|
||||
return () => clearInterval(id);
|
||||
}, []);
|
||||
|
||||
const hook = scrollHook.current;
|
||||
if (hook !== null) {
|
||||
setTimeout(() => hook.scrollIntoView(true), 50);
|
||||
function doScroll(): void {
|
||||
const hook = scrollHook.current;
|
||||
if (hook !== null) {
|
||||
setTimeout(() => hook.scrollIntoView(true), 50);
|
||||
}
|
||||
}
|
||||
|
||||
doScroll();
|
||||
|
||||
useEffect(() => {
|
||||
setTimeout(doScroll, 50);
|
||||
}, []);
|
||||
|
||||
const classes = useStyles();
|
||||
return (
|
||||
<>
|
||||
<Box width="100%" minHeight="100vh" px={1} justifyContent={"flex-end"}>
|
||||
<Box width="100%" minHeight="100vh" px={1} display={"flex"} alignItems={"flex-end"}>
|
||||
<List classes={{ root: classes.list }}>
|
||||
{terminal.outputHistory.map((item, i) => {
|
||||
if (item instanceof Output)
|
||||
|
Loading…
Reference in New Issue
Block a user