From b294a44e9b11fddcc5409ee35f3b91c2f6e4340c Mon Sep 17 00:00:00 2001 From: Kolja Lampe Date: Thu, 18 Aug 2016 19:46:52 +0200 Subject: [PATCH] Updated error page to look nicer and read better --- src/browser/index.jsx | 76 ++++++++++++++++++++++++++++++++----------- 1 file changed, 57 insertions(+), 19 deletions(-) diff --git a/src/browser/index.jsx b/src/browser/index.jsx index 16aa67aa..015d22fb 100644 --- a/src/browser/index.jsx +++ b/src/browser/index.jsx @@ -466,29 +466,67 @@ var MattermostView = React.createClass({ }); // ErrorCode: https://code.google.com/p/chromium/codesearch#chromium/src/net/base/net_error_list.h -// FIXME: need better wording in English +const errorPage = { + tableStyle: { + display: 'table', + width: '100%', + height: '100%', + position: 'absolute', + top: '0', + left: '0' + }, + + cellStyle: { + display: 'table-cell', + verticalAlign: 'middle' + }, + + bullets: { + paddingLeft: '15px', + lineHeight: '1.7' + }, + + techInfo: { + fontSize: '12px', + color: '#aaa' + }, +}; + var ErrorView = React.createClass({ render: function() { return ( -

Failed to load the URL

-

- { 'URL: ' } - { this.props.errorInfo.validatedURL } -

-

- { 'Error code: ' } - { this.props.errorInfo.errorCode } -

-

- { this.props.errorInfo.errorDescription } -

-

Please check below. Then, reload this window. (Ctrl+R or Command+R)

- - Is your computer online? - Is the server alive? - Is the URL correct? - +
+
+ + + +

Cannot connect to Mattermost

+
+

We're having trouble connecting to Mattermost. If refreshing this page (Ctrl+R or Command+R) does not work please verify that:

+
+ +
+
+ { this.props.errorInfo.errorDescription } ( + { this.props.errorInfo.errorCode })
+ + +
+
+
); }