UI: Show hints of BitNode documentation and allow opening it in BitVerse (#2513)

This commit is contained in:
catloversg
2026-02-19 01:08:53 +07:00
committed by GitHub
parent f7483243fd
commit 8f77dc2df0
6 changed files with 111 additions and 67 deletions
+2 -1
View File
@@ -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>
+2
View File
@@ -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>}
</>
);
+5
View File
@@ -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}