mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-26 09:33:49 +01:00
make Popups use variable like Sidebar does
This commit is contained in:
parent
84845ff9a2
commit
2e31dda75e
@ -302,25 +302,30 @@ export function GameRoot({ player, engine, terminal }: IProps): React.ReactEleme
|
|||||||
|
|
||||||
let mainPage = <Typography>Cannot load</Typography>;
|
let mainPage = <Typography>Cannot load</Typography>;
|
||||||
let withSidebar = true;
|
let withSidebar = true;
|
||||||
|
let withPopups = true;
|
||||||
switch (page) {
|
switch (page) {
|
||||||
case Page.Recovery: {
|
case Page.Recovery: {
|
||||||
mainPage = <RecoveryRoot router={Router} />;
|
mainPage = <RecoveryRoot router={Router} />;
|
||||||
withSidebar = false;
|
withSidebar = false;
|
||||||
|
withPopups = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case Page.BitVerse: {
|
case Page.BitVerse: {
|
||||||
mainPage = <BitverseRoot flume={flume} enter={enterBitNode} quick={quick} />;
|
mainPage = <BitverseRoot flume={flume} enter={enterBitNode} quick={quick} />;
|
||||||
withSidebar = false;
|
withSidebar = false;
|
||||||
|
withPopups = false;
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
case Page.Infiltration: {
|
case Page.Infiltration: {
|
||||||
mainPage = <InfiltrationRoot location={location} />;
|
mainPage = <InfiltrationRoot location={location} />;
|
||||||
withSidebar = false;
|
withSidebar = false;
|
||||||
|
withPopups = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case Page.BladeburnerCinematic: {
|
case Page.BladeburnerCinematic: {
|
||||||
mainPage = <BladeburnerCinematic />;
|
mainPage = <BladeburnerCinematic />;
|
||||||
withSidebar = false;
|
withSidebar = false;
|
||||||
|
withPopups = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case Page.Work: {
|
case Page.Work: {
|
||||||
@ -474,7 +479,6 @@ export function GameRoot({ player, engine, terminal }: IProps): React.ReactEleme
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const renderPopups = [Page.Recovery, Page.BitVerse, Page.Infiltration, Page.BladeburnerCinematic].includes(page);
|
|
||||||
return (
|
return (
|
||||||
<Context.Player.Provider value={player}>
|
<Context.Player.Provider value={player}>
|
||||||
<Context.Router.Provider value={Router}>
|
<Context.Router.Provider value={Router}>
|
||||||
@ -495,7 +499,7 @@ export function GameRoot({ player, engine, terminal }: IProps): React.ReactEleme
|
|||||||
</Box>
|
</Box>
|
||||||
) : mainPage }
|
) : mainPage }
|
||||||
<Unclickable />
|
<Unclickable />
|
||||||
{renderPopups && (
|
{withPopups && (
|
||||||
<>
|
<>
|
||||||
<LogBoxManager />
|
<LogBoxManager />
|
||||||
<AlertManager />
|
<AlertManager />
|
||||||
|
Loading…
Reference in New Issue
Block a user