mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-05-05 07:07:50 +02:00
FEATURE: Add "Recent Errors" tab and improved error modal (#2169)
This commit is contained in:
committed by
GitHub
parent
cf72937faf
commit
18f84396e2
@@ -88,7 +88,7 @@ export function SidebarAccordion({
|
||||
key_={key_}
|
||||
icon={icon}
|
||||
count={count}
|
||||
active={active ?? page === key_}
|
||||
active={active ?? (page === key_ || x.alternateKeys?.includes(page))}
|
||||
clickFn={getClickFn(clickPage, key_)}
|
||||
flash={flash === key_}
|
||||
classes={classes}
|
||||
|
||||
@@ -13,6 +13,7 @@ export interface ICreateProps {
|
||||
icon: React.ReactElement["type"];
|
||||
count?: number;
|
||||
active?: boolean;
|
||||
alternateKeys?: Page[];
|
||||
}
|
||||
|
||||
export interface SidebarItemProps extends ICreateProps {
|
||||
|
||||
@@ -68,6 +68,7 @@ import {
|
||||
CurrentKeyBindings,
|
||||
} from "../../utils/KeyBindingUtils";
|
||||
import { throwIfReachable } from "../../utils/helpers/throwIfReachable";
|
||||
import { ErrorState } from "../../ErrorHandling/ErrorState";
|
||||
|
||||
const RotatedDoubleArrowIcon = React.forwardRef(function RotatedDoubleArrowIcon(
|
||||
props: { color: "primary" | "secondary" | "error" },
|
||||
@@ -148,6 +149,7 @@ export function SidebarRoot(props: { page: Page }): React.ReactElement {
|
||||
const augmentationCount = Player.queuedAugmentations.length;
|
||||
const invitationsCount = Player.factionInvitations.filter((f) => !InvitationsSeen.has(f)).length;
|
||||
const programCount = getAvailableCreatePrograms().length - ProgramsSeen.size;
|
||||
const errorCount = ErrorState.UnreadErrors;
|
||||
|
||||
const canOpenFactions =
|
||||
Player.factionInvitations.length > 0 ||
|
||||
@@ -339,7 +341,12 @@ export function SidebarRoot(props: { page: Page }): React.ReactElement {
|
||||
items={[
|
||||
{ key_: Page.Terminal, icon: LastPageIcon },
|
||||
{ key_: Page.ScriptEditor, icon: CreateIcon },
|
||||
{ key_: Page.ActiveScripts, icon: StorageIcon },
|
||||
{
|
||||
key_: Page.ActiveScripts,
|
||||
icon: StorageIcon,
|
||||
count: errorCount,
|
||||
alternateKeys: [Page.RecentErrors, Page.RecentlyKilledScripts],
|
||||
},
|
||||
{ key_: Page.CreateProgram, icon: BugReportIcon, count: programCount },
|
||||
canStaneksGift && { key_: Page.StaneksGift, icon: DeveloperBoardIcon },
|
||||
]}
|
||||
|
||||
Reference in New Issue
Block a user