parent
01b76983a7
commit
337e781a57
@ -0,0 +1 @@
|
||||
export const GithubRepoRoot = "https://github.com/morpheus65535/bazarr";
|
@ -0,0 +1,31 @@
|
||||
import { faExclamationTriangle } from "@fortawesome/free-solid-svg-icons";
|
||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||
import React, { FunctionComponent } from "react";
|
||||
import { Alert, Button, Container } from "react-bootstrap";
|
||||
import { Reload } from "../utilites";
|
||||
|
||||
interface Props {
|
||||
children: string;
|
||||
}
|
||||
|
||||
const LaunchError: FunctionComponent<Props> = ({ children }) => (
|
||||
<Container className="my-3">
|
||||
<Alert
|
||||
className="d-flex flex-nowrap justify-content-between align-items-center"
|
||||
variant="danger"
|
||||
>
|
||||
<div>
|
||||
<FontAwesomeIcon
|
||||
className="mr-2"
|
||||
icon={faExclamationTriangle}
|
||||
></FontAwesomeIcon>
|
||||
<span>{children}</span>
|
||||
</div>
|
||||
<Button variant="outline-danger" onClick={Reload}>
|
||||
Reload
|
||||
</Button>
|
||||
</Alert>
|
||||
</Container>
|
||||
);
|
||||
|
||||
export default LaunchError;
|
@ -0,0 +1,35 @@
|
||||
import { faSadCry as fasSadCry } from "@fortawesome/free-regular-svg-icons";
|
||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||
import React, { FunctionComponent } from "react";
|
||||
import { Button, Container } from "react-bootstrap";
|
||||
import { GithubRepoRoot } from "../constants";
|
||||
import { Reload } from "../utilites";
|
||||
|
||||
interface Props {
|
||||
error: Error;
|
||||
}
|
||||
|
||||
const UIError: FunctionComponent<Props> = ({ error }) => (
|
||||
<Container className="d-flex flex-column align-items-center my-5">
|
||||
<h1>
|
||||
<FontAwesomeIcon className="mr-2" icon={fasSadCry}></FontAwesomeIcon>
|
||||
Ouch! UI is crashed!
|
||||
</h1>
|
||||
<p>{error.message}</p>
|
||||
<div className="d-flex flex-row">
|
||||
<Button
|
||||
className="mx-1"
|
||||
href={`${GithubRepoRoot}/issues/new/choose`}
|
||||
target="_blank"
|
||||
variant="warning"
|
||||
>
|
||||
Report Issue
|
||||
</Button>
|
||||
<Button className="mx-1" onClick={Reload} variant="light">
|
||||
Reload Page
|
||||
</Button>
|
||||
</div>
|
||||
</Container>
|
||||
);
|
||||
|
||||
export default UIError;
|
Loading…
Reference in new issue