From 71ed2eafb8132629dcc5cfdfe40e44eaede37ebd Mon Sep 17 00:00:00 2001 From: TheMas3212 Date: Thu, 17 Feb 2022 00:48:25 +1100 Subject: [PATCH] Add A Simple Button menu to the Bitverse Screen if ascii art is disabled this fixed the issue that was noticed that the current ascii art page is not possible to navigate with a screen reader --- src/BitNode/ui/BitverseRoot.tsx | 173 +++++++++++++++++++++----------- src/BitNode/ui/PortalModal.tsx | 2 + 2 files changed, 115 insertions(+), 60 deletions(-) diff --git a/src/BitNode/ui/BitverseRoot.tsx b/src/BitNode/ui/BitverseRoot.tsx index d2f344037..1a4edaa1d 100644 --- a/src/BitNode/ui/BitverseRoot.tsx +++ b/src/BitNode/ui/BitverseRoot.tsx @@ -10,6 +10,9 @@ import makeStyles from "@mui/styles/makeStyles"; import createStyles from "@mui/styles/createStyles"; import Typography from "@mui/material/Typography"; import Tooltip from "@mui/material/Tooltip"; +import { Settings } from "../../Settings/Settings"; +import Button from "@mui/material/Button"; + const useStyles = makeStyles(() => createStyles({ @@ -85,9 +88,18 @@ function BitNodePortal(props: IPortalProps): React.ReactElement { } > - setPortalOpen(true)} className={cssClass} aria-label={`enter-bitnode-${bitNode.number.toString()}`}> - O - + {Settings.DisableASCIIArt ? ( + <> + +
+ + ) : ( + setPortalOpen(true)} className={cssClass} aria-label={`enter-bitnode-${bitNode.number.toString()}`}> + O + + )} + {Object.values(BitNodes).filter((node) => { + console.log(node.desc); + return node.desc !== 'COMING SOON'; + }).map((node) => { + return ( + + ) + })} +
+
+
+
+ Many decades ago, a humanoid extraterrestrial species which we call the Enders descended on the Earth...violently", + "> Our species fought back, but it was futile. The Enders had technology far beyond our own...", + "> Instead of killing every last one of us, the human race was enslaved...", + "> We were shackled in a digital world, chained into a prison for our minds...", + "> Using their advanced technology, the Enders created complex simulations of a virtual reality...", + "> Simulations designed to keep us content...ignorant of the truth.", + "> Simulations used to trap and suppress our consciousness, to keep us under control...", + "> Why did they do this? Why didn't they just end our entire race? We don't know, not yet.", + "> Humanity's only hope is to destroy these simulations, destroy the only realities we've ever known...", + "> Only then can we begin to fight back...", + "> By hacking the daemon that generated your reality, you've just destroyed one simulation, called a BitNode...", + "> But there is still a long way to go...", + "> The technology the Enders used to enslave the human race wasn't just a single complex simulation...", + "> There are tens if not hundreds of BitNodes out there...", + "> Each with their own simulations of a reality...", + "> Each creating their own universes...a universe of universes", + "> And all of which must be destroyed...", + "> .......................................", + "> Welcome to the Bitverse...", + "> ", + "> (Enter a new BitNode using the image above)", + ]} /> + + ) + } else { + return ( // prettier-ignore - <> - O - | O O | O O | - O | | / __| \ | | O - O | O | | O / | O | | O | O - | | | | |_/ |/ | \_ \_| | | | | - O | | | O | | O__/ | / \__ | | O | | | O - | | | | | | | / /| O / \| | | | | | | - O | | | \| | O / _/ | / O | |/ | | | O - | | | |O / | | O / | O O | | \ O| | | | - | | |/ \/ / __| | |/ \ | \ | |__ \ \/ \| | | - \| O | |_/ |\| \ \__| \_| | O |/ - | | |_/ | | \| / | \_| | | - \| / \| | / / \ |/ - | | | / | | - | | | | | | | - | | | / / \ \ | | | - \| | / / \ \ | |/ - \ | / / | | \ \ | / - \ \JUMP 3R | | | | | | R3 PMUJ/ / - \|| | | | | | | | | ||/ - \| \_ | | | | | | _/ |/ - \ \| / \ / \ |/ / - |/ | | \| - | | | | | | | | - \JUMP3R|JUMP|3R| |R3|PMUJ|R3PMUJ/ -
-
-
-
- Many decades ago, a humanoid extraterrestrial species which we call the Enders descended on the Earth...violently", - "> Our species fought back, but it was futile. The Enders had technology far beyond our own...", - "> Instead of killing every last one of us, the human race was enslaved...", - "> We were shackled in a digital world, chained into a prison for our minds...", - "> Using their advanced technology, the Enders created complex simulations of a virtual reality...", - "> Simulations designed to keep us content...ignorant of the truth.", - "> Simulations used to trap and suppress our consciousness, to keep us under control...", - "> Why did they do this? Why didn't they just end our entire race? We don't know, not yet.", - "> Humanity's only hope is to destroy these simulations, destroy the only realities we've ever known...", - "> Only then can we begin to fight back...", - "> By hacking the daemon that generated your reality, you've just destroyed one simulation, called a BitNode...", - "> But there is still a long way to go...", - "> The technology the Enders used to enslave the human race wasn't just a single complex simulation...", - "> There are tens if not hundreds of BitNodes out there...", - "> Each with their own simulations of a reality...", - "> Each creating their own universes...a universe of universes", - "> And all of which must be destroyed...", - "> .......................................", - "> Welcome to the Bitverse...", - "> ", - "> (Enter a new BitNode using the image above)", - ]} /> - - ); - + <> + O + | O O | O O | + O | | / __| \ | | O + O | O | | O / | O | | O | O + | | | | |_/ |/ | \_ \_| | | | | + O | | | O | | O__/ | / \__ | | O | | | O + | | | | | | | / /| O / \| | | | | | | + O | | | \| | O / _/ | / O | |/ | | | O + | | | |O / | | O / | O O | | \ O| | | | + | | |/ \/ / __| | |/ \ | \ | |__ \ \/ \| | | + \| O | |_/ |\| \ \__| \_| | O |/ + | | |_/ | | \| / | \_| | | + \| / \| | / / \ |/ + | | | / | | + | | | | | | | + | | | / / \ \ | | | + \| | / / \ \ | |/ + \ | / / | | \ \ | / + \ \JUMP 3R | | | | | | R3 PMUJ/ / + \|| | | | | | | | | ||/ + \| \_ | | | | | | _/ |/ + \ \| / \ / \ |/ / + |/ | | \| + | | | | | | | | + \JUMP3R|JUMP|3R| |R3|PMUJ|R3PMUJ/ +
+
+
+
+ Many decades ago, a humanoid extraterrestrial species which we call the Enders descended on the Earth...violently", + "> Our species fought back, but it was futile. The Enders had technology far beyond our own...", + "> Instead of killing every last one of us, the human race was enslaved...", + "> We were shackled in a digital world, chained into a prison for our minds...", + "> Using their advanced technology, the Enders created complex simulations of a virtual reality...", + "> Simulations designed to keep us content...ignorant of the truth.", + "> Simulations used to trap and suppress our consciousness, to keep us under control...", + "> Why did they do this? Why didn't they just end our entire race? We don't know, not yet.", + "> Humanity's only hope is to destroy these simulations, destroy the only realities we've ever known...", + "> Only then can we begin to fight back...", + "> By hacking the daemon that generated your reality, you've just destroyed one simulation, called a BitNode...", + "> But there is still a long way to go...", + "> The technology the Enders used to enslave the human race wasn't just a single complex simulation...", + "> There are tens if not hundreds of BitNodes out there...", + "> Each with their own simulations of a reality...", + "> Each creating their own universes...a universe of universes", + "> And all of which must be destroyed...", + "> .......................................", + "> Welcome to the Bitverse...", + "> ", + "> (Enter a new BitNode using the image above)", + ]} /> + + ); + } return <>; } diff --git a/src/BitNode/ui/PortalModal.tsx b/src/BitNode/ui/PortalModal.tsx index ef24ca35b..d90460b89 100644 --- a/src/BitNode/ui/PortalModal.tsx +++ b/src/BitNode/ui/PortalModal.tsx @@ -43,6 +43,8 @@ export function PortalModal(props: IProps): React.ReactElement {