mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-05-10 17:47:50 +02:00
UI: Show hints of BitNode documentation and allow opening it in BitVerse (#2513)
This commit is contained in:
+2
-1
@@ -544,7 +544,8 @@ export function GameRoot(): React.ReactElement {
|
||||
<PromptManager hidden={hidePopups} />
|
||||
<FactionInvitationManager hidden={hidePopups} />
|
||||
<Snackbar hidden={hidePopups} />
|
||||
<DocumentationPopUp hidden={hidePopups} />
|
||||
{/* Allow opening the documentation popup in the BitVerse */}
|
||||
<DocumentationPopUp hidden={hidePopups && pageWithContext.page !== Page.BitVerse} />
|
||||
<Apr1 />
|
||||
</SnackbarProvider>
|
||||
</HistoryProvider>
|
||||
|
||||
@@ -6,6 +6,7 @@ import Button from "@mui/material/Button";
|
||||
|
||||
interface IProps {
|
||||
lines: string[];
|
||||
additionalElement?: React.ReactElement;
|
||||
auto?: boolean;
|
||||
onDone?: () => void;
|
||||
}
|
||||
@@ -29,6 +30,7 @@ export function CinematicText(props: IProps): React.ReactElement {
|
||||
<Typography key={i}>{line}</Typography>
|
||||
))}
|
||||
{props.lines.length > i && <CinematicLine key={i} text={props.lines[i]} onDone={advance} />}
|
||||
{done && props.additionalElement}
|
||||
{!props.auto && props.onDone && done && <Button onClick={props.onDone}>Continue ...</Button>}
|
||||
</>
|
||||
);
|
||||
|
||||
@@ -4,6 +4,7 @@ import { Settings } from "../../Settings/Settings";
|
||||
import { Router } from "../GameRoot";
|
||||
import { Page } from "../Router";
|
||||
import { openDocExternally } from "./Documentation";
|
||||
import { openDocumentationPopUp } from "../../Documentation/root";
|
||||
|
||||
export function DocumentationLink(
|
||||
props: React.PropsWithChildren<
|
||||
@@ -21,6 +22,10 @@ export function DocumentationLink(
|
||||
openDocExternally(props.page);
|
||||
return;
|
||||
}
|
||||
if (Router.page() === Page.BitVerse) {
|
||||
openDocumentationPopUp(props.page);
|
||||
return;
|
||||
}
|
||||
Router.toPage(Page.Documentation, { docPage: props.page });
|
||||
}}
|
||||
{...props}
|
||||
|
||||
Reference in New Issue
Block a user