Improve ErrorView to match design

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski 2020-04-22 18:25:49 +01:00
parent ac78570b58
commit b05e5be2f7
4 changed files with 611 additions and 355 deletions

View file

@ -17,21 +17,41 @@ limitations under the License.
import * as React from "react";
import * as PropTypes from "prop-types";
import { _t } from "matrix-react-sdk/src/languageHandler";
// directly import the style here as this layer does not support rethemedex at this time so no matrix-react-sdk
// scss variables will be accessible.
import "../../../res/css/structures/ErrorView.scss";
interface IProps {
// both of these should already be internationalised
title: string;
messages?: string[];
}
const ErrorView: React.FC<IProps> = ({title, messages}) => {
return <div className="mx_GenericErrorPage">
<div className="mx_GenericErrorPage_box">
<h1>{title}</h1>
<div>
{messages && messages.map(msg => <p key={msg}>
{ _t(msg) }
</p>)}
return <div className="mx_ErrorView">
<div className="mx_ErrorView_container">
<div className="mx_HomePage_header">
<span className="mx_HomePage_logo">
<img height="42" src={"themes/riot/img/logos/riot-logo.svg"} alt="Riot" />
</span>
<h1>Failed to start</h1>
</div>
<div className="mx_HomePage_col">
<div className="mx_HomePage_row">
<div>
<h2 id="step1_heading">{ title }</h2>
{messages && messages.map(msg => <p key={msg}>
{ msg }
</p>)}
</div>
</div>
</div>
<div className="mx_HomePage_row mx_Center mx_Spacer">
<p className="mx_Spacer">
<a href="https://riot.im" target="_blank" className="mx_FooterLink">
Go to Riot.im
</a>
</p>
</div>
</div>
</div>;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long