Farmbot-Web-App/frontend/apology.tsx

60 lines
1.6 KiB
TypeScript
Raw Permalink Normal View History

2018-04-02 09:49:48 -06:00
import * as React from "react";
import { Session } from "./session";
2020-02-15 11:30:23 -07:00
import { ExternalUrl } from "./external_urls";
2018-04-02 09:49:48 -06:00
2019-12-26 13:20:10 -07:00
const OUTER_STYLE: React.CSSProperties = {
borderRadius: "10px",
background: "repeating-linear-gradient(-45deg," +
"#ffff55, #ffff55 20px," +
"#ff5555 20px, #ff5555 40px)",
fontSize: "100%",
2018-04-02 09:49:48 -06:00
color: "black",
display: "block",
overflow: "auto",
padding: "1rem",
2019-12-26 13:20:10 -07:00
margin: "1rem",
};
const INNER_STYLE: React.CSSProperties = {
borderRadius: "10px",
background: "#ffffffdd",
padding: "1rem",
2018-04-02 09:49:48 -06:00
};
export function Apology(_: {}) {
2019-12-26 13:20:10 -07:00
return <div style={OUTER_STYLE}>
<div style={INNER_STYLE}>
<h1 style={{ fontSize: "175%" }}>Page Error</h1>
<span>
2018-04-02 09:49:48 -06:00
We can't render this part of the page due to an unrecoverable error.
2019-10-25 13:09:25 -06:00
Here are some things you can try:
</span>
2018-04-02 09:49:48 -06:00
<ol>
<li>
Refresh the page.
</li>
<li>
Perform a "hard refresh"
(<strong>CTRL + SHIFT + R</strong> on most machines).
</li>
2018-04-02 09:49:48 -06:00
<li>
<span>
<a onClick={() => Session.clear()}>
Restart the app by clicking here.
</a>
&nbsp;(You will be logged out of your account.)
2018-04-02 09:49:48 -06:00
</span>
</li>
<li>
<span>
Send a report to our developer team via the&nbsp;
2020-02-15 11:30:23 -07:00
<a href={ExternalUrl.softwareForum}>FarmBot software
forum</a>. Including additional information (such as steps leading up
to the error) helps us identify solutions more quickly.
</span>
2018-04-02 09:49:48 -06:00
</li>
</ol>
2018-05-14 16:58:45 -06:00
</div>
2018-04-02 09:49:48 -06:00
</div>;
}