-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ff09484
commit c5a5a58
Showing
1 changed file
with
68 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,23 @@ | ||
import { GitHub } from "@mui/icons-material"; | ||
import { TabContext, TabList } from "@mui/lab"; | ||
import { | ||
Avatar, | ||
Box, | ||
List, | ||
ListItem, | ||
ListItemAvatar, | ||
ListItemButton, | ||
ListItemIcon, | ||
ListItemText, | ||
Tab, | ||
Typography as Type, | ||
Typography, | ||
} from "@mui/material"; | ||
import { Scroll } from "components/generic/Scrollbars"; | ||
import { Flex } from "components/generic/Flex"; | ||
import { Scroll } from "components/generic/Scrollbars"; | ||
import { useViewTreeContext } from "components/inspector/ViewTree"; | ||
import { Page } from "pages/Page"; | ||
import { head } from "lodash"; | ||
import { ReactNode, useState } from "react"; | ||
import { useSettings } from "slices/settings"; | ||
import { Page } from "pages/Page"; | ||
import logo from "public/logo512.png"; | ||
import { ReactNode } from "react"; | ||
|
||
const version = "0.1.2"; | ||
const version = "1.0.4"; | ||
|
||
const contacts = [ | ||
{ name: "Dr Daniel Harabor", email: "[email protected]" }, | ||
|
@@ -35,13 +30,8 @@ const contacts = [ | |
{ name: "Rory Tobin-Underwood", email: "[email protected]" }, | ||
]; | ||
|
||
const formatLabel = (v: number) => `${v}x`; | ||
|
||
export function AboutPage() { | ||
const { controls, onChange, state } = useViewTreeContext(); | ||
const [{ playbackRate = 1, acrylic, theme = "light" }, setSettings] = | ||
useSettings(); | ||
const [tab, setTab] = useState("general"); | ||
function renderSection(label: ReactNode, content: ReactNode) { | ||
return ( | ||
<Box sx={{ pt: 2 }}> | ||
|
@@ -53,71 +43,70 @@ export function AboutPage() { | |
); | ||
} | ||
return ( | ||
<TabContext value={tab}> | ||
<Page onChange={onChange} stack={state}> | ||
<Page.Content> | ||
<Flex> | ||
{" "} | ||
<Scroll y> | ||
<Box sx={{ p: 2 }}> | ||
<Box sx={{ pt: 6, pb: 2 }}> | ||
<img src={logo} height="64" /> | ||
</Box> | ||
<Type variant="h6">Waypoint {version}</Type> | ||
{renderSection( | ||
"About this App", | ||
<> | ||
Waypoint is a visualising debugging tool for pathfinding | ||
search. It can be used to visualise progression of search | ||
and debug pathfinding algorithms. It can handle range of | ||
different types of algorithms (demos are provided in the | ||
home page). This tool is highly customizable and provide | ||
flexibility to visualise any algorithm trace that you can | ||
augment using our docs. | ||
</> | ||
)} | ||
{renderSection( | ||
"Team", | ||
<> | ||
Our team is made up of present/past Monash students and | ||
Professors Dr Daniel Harabor: | ||
<List sx={{ mx: -2 }}> | ||
{contacts.map(({ name, email }) => ( | ||
<ListItemButton href={`mailto:${email}`}> | ||
<ListItemAvatar> | ||
<Avatar>{head(name)}</Avatar> | ||
</ListItemAvatar> | ||
<ListItemText primary={name} secondary={email} /> | ||
</ListItemButton> | ||
))} | ||
</List> | ||
</> | ||
)} | ||
{renderSection( | ||
"Resources", | ||
<> | ||
<List sx={{ mx: -2 }}> | ||
<ListItemButton | ||
target="_blank" | ||
href="https://github.com/path-visualiser" | ||
> | ||
<ListItemIcon> | ||
<GitHub /> | ||
</ListItemIcon> | ||
<ListItemText | ||
primary="Repository" | ||
secondary="https://github.com/path-visualiser" | ||
/> | ||
</ListItemButton> | ||
</List> | ||
</> | ||
)} | ||
<Page onChange={onChange} stack={state}> | ||
<Page.Content> | ||
<Flex> | ||
{" "} | ||
<Scroll y> | ||
<Box sx={{ p: 2 }}> | ||
<Box sx={{ pt: 6, pb: 2 }}> | ||
<img src={logo} height="64" /> | ||
</Box> | ||
</Scroll> | ||
</Flex> | ||
</Page.Content> | ||
<Page.Extras>{controls}</Page.Extras> | ||
</Page> | ||
</TabContext> | ||
<Type variant="h6">Waypoint {version}</Type> | ||
{renderSection("Build Info", <>{version}; late September 2023</>)} | ||
{renderSection( | ||
"About this App", | ||
<> | ||
Waypoint is a visualising debugging tool for pathfinding | ||
search. It can be used to visualise progression of search and | ||
debug pathfinding algorithms. It can handle range of different | ||
types of algorithms (demos are provided in the home page). | ||
This tool is highly customizable and provide flexibility to | ||
visualise any algorithm trace that you can augment using our | ||
docs. | ||
</> | ||
)} | ||
{renderSection( | ||
"Team", | ||
<> | ||
Our team is made up of present/past Monash students and | ||
Professors Dr Daniel Harabor: | ||
<List sx={{ mx: -2 }}> | ||
{contacts.map(({ name, email }) => ( | ||
<ListItemButton href={`mailto:${email}`}> | ||
<ListItemAvatar> | ||
<Avatar>{head(name)}</Avatar> | ||
</ListItemAvatar> | ||
<ListItemText primary={name} secondary={email} /> | ||
</ListItemButton> | ||
))} | ||
</List> | ||
</> | ||
)} | ||
{renderSection( | ||
"Resources", | ||
<> | ||
<List sx={{ mx: -2 }}> | ||
<ListItemButton | ||
target="_blank" | ||
href="https://github.com/path-visualiser" | ||
> | ||
<ListItemIcon> | ||
<GitHub /> | ||
</ListItemIcon> | ||
<ListItemText | ||
primary="Repository" | ||
secondary="https://github.com/path-visualiser" | ||
/> | ||
</ListItemButton> | ||
</List> | ||
</> | ||
)} | ||
</Box> | ||
</Scroll> | ||
</Flex> | ||
</Page.Content> | ||
<Page.Extras>{controls}</Page.Extras> | ||
</Page> | ||
); | ||
} |