Skip to content

Commit 5b6619a

Browse files
committed
[grid] Adding a new Help page (UI)
1 parent 71e6751 commit 5b6619a

File tree

4 files changed

+110
-73
lines changed

4 files changed

+110
-73
lines changed

javascript/grid-ui/src/App.tsx

+4-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import {Box, Link, makeStyles} from "@material-ui/core";
1010
import Container from "@material-ui/core/Container";
1111
import Typography from "@material-ui/core/Typography";
1212
import Sessions from "./screens/Sessions/Sessions";
13+
import Help from "./screens/Help/Help";
1314

1415
export const client = new ApolloClient({
1516
cache: new InMemoryCache(),
@@ -30,7 +31,7 @@ function Copyright() {
3031
return (
3132
<Typography variant="body2" color="textSecondary" align="center">
3233
{'All rights reserved - '}
33-
<Link color="inherit" href="https://sfconservancy.org/" target={"_blank"}>
34+
<Link href="https://sfconservancy.org/" target={"_blank"}>
3435
Software Freedom Conservancy
3536
</Link>{' '}
3637
{new Date().getFullYear()}
@@ -70,7 +71,9 @@ function App() {
7071
<Container maxWidth={false} className={classes.container}>
7172
<Switch>
7273
<Route exact path={"/sessions"} component={Sessions}/>
74+
<Route exact path={"/help"} component={Help}/>
7375
<Route exact path={"/"} component={Overview}/>
76+
<Route component={Help}/>
7477
</Switch>
7578
</Container>
7679
<Box pt={4}>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
import * as React from 'react';
2+
import {Box, Container, Link, Typography} from "@material-ui/core";
3+
import {makeStyles} from "@material-ui/core/styles";
4+
import {useLocation} from "react-router-dom";
5+
6+
const useStyles = makeStyles((theme) => ({
7+
root: {
8+
backgroundColor: theme.palette.secondary.main,
9+
height: '100%',
10+
paddingBottom: theme.spacing(3),
11+
paddingTop: theme.spacing(3),
12+
width: '100%',
13+
justifyContent: "center",
14+
},
15+
image: {
16+
marginTop: 50,
17+
display: 'inline-block',
18+
maxWidth: '100%',
19+
width: 560
20+
},
21+
}));
22+
23+
export default function Help() {
24+
const classes = useStyles();
25+
const location = useLocation();
26+
27+
// noinspection HtmlUnknownAnchorTarget
28+
return (
29+
<div className={classes.root}>
30+
<Box
31+
display="flex"
32+
flexDirection="column"
33+
height="100%"
34+
justifyContent="center"
35+
>
36+
<Container maxWidth="md">
37+
{!["/sessions", "/help", "/"].includes(location.pathname) && (
38+
<Box mt={2}>
39+
<Typography
40+
align="center"
41+
color="textPrimary"
42+
variant="h2"
43+
>
44+
Whoops! The URL specified routes to this help page.
45+
</Typography>
46+
</Box>
47+
)}
48+
<Box mt={6}>
49+
<Typography
50+
align="center"
51+
color="textPrimary"
52+
variant="h3"
53+
>
54+
More information about Selenium Grid can be found at the{' '}
55+
<Link href="https://www.selenium.dev/documentation/en/grid/" target={"_blank"}>
56+
documentation
57+
</Link>.
58+
</Typography>
59+
</Box>
60+
<Box mt={6}>
61+
<Typography
62+
align="center"
63+
color="textPrimary"
64+
variant="h3"
65+
>
66+
Please report bugs and issues to the Selenium{' '}
67+
<Link href="https://github.com/SeleniumHQ/selenium/issues/new/choose" target={"_blank"}>
68+
issue tracker
69+
</Link>.
70+
</Typography>
71+
</Box>
72+
<Box mt={6}>
73+
<Typography
74+
align="center"
75+
color="textPrimary"
76+
variant="h3"
77+
>
78+
For questions and help, check the different support channels on our{' '}
79+
<Link href="https://www.selenium.dev/support/" target={"_blank"}>
80+
website
81+
</Link>.
82+
</Typography>
83+
</Box>
84+
<Box m={10}>
85+
<Typography
86+
align="center"
87+
color="textPrimary"
88+
variant="h4"
89+
>
90+
Selenium is made possible through the efforts of our open source
91+
community, contributions from these{' '}
92+
<Link href="https://www.selenium.dev/documentation/en/front_matter/copyright_and_attributions/"
93+
target={"_blank"}>
94+
people
95+
</Link>
96+
, and our{' '}
97+
<Link href="https://www.selenium.dev/sponsors/" target={"_blank"}>
98+
sponsors
99+
</Link>.
100+
</Typography>
101+
</Box>
102+
</Container>
103+
</Box>
104+
</div>
105+
);
106+
}

javascript/grid-ui/src/screens/HelpPage/Help.module.css

-17
This file was deleted.

javascript/grid-ui/src/screens/HelpPage/HelpPage.tsx

-55
This file was deleted.

0 commit comments

Comments
 (0)