From b8592d448bfa47214319531a6aaf6e78ac773459 Mon Sep 17 00:00:00 2001 From: Sean Li Date: Fri, 12 Jun 2015 16:46:27 -0700 Subject: [PATCH] More graceful error screen. --- src/components/ContainerHome.react.js | 10 +++++----- src/components/NewContainerSearch.react.js | 2 +- styles/right-panel.less | 17 +++++++++++++++++ 3 files changed, 23 insertions(+), 6 deletions(-) diff --git a/src/components/ContainerHome.react.js b/src/components/ContainerHome.react.js index e6fec53db0..198730eeb1 100644 --- a/src/components/ContainerHome.react.js +++ b/src/components/ContainerHome.react.js @@ -52,11 +52,11 @@ var ContainerHome = React.createClass({ let body; if (this.props.container.Error) { body = ( -
-

An error occurred:

-

{this.props.container.Error}

-

If you feel that this error is invalid, please file a ticket on our GitHub repo.

- +
+

We're sorry. There seem to be an error:

+

{this.props.container.Error}

+

If this error is invalid, please file a ticket on our Github repo.

+ File Ticket
); } else if (this.props.container && this.props.container.State.Downloading) { diff --git a/src/components/NewContainerSearch.react.js b/src/components/NewContainerSearch.react.js index d5ce1ab14a..7465a5ff70 100644 --- a/src/components/NewContainerSearch.react.js +++ b/src/components/NewContainerSearch.react.js @@ -126,7 +126,7 @@ module.exports = React.createClass({

Please verify your Docker Hub account email address

- {spinner} + {spinner}
diff --git a/styles/right-panel.less b/styles/right-panel.less index 71d5ea0dd3..95135eda25 100644 --- a/styles/right-panel.less +++ b/styles/right-panel.less @@ -184,6 +184,23 @@ margin-bottom: 20px; text-align: center; } + &.error { + p { + color: @gray-darker; + &.error-message { + span { + display: block; + margin-bottom: 0.5rem; + } + text-align: center; + color: @brand-negative; + background-color: lighten(@brand-negative, 32%); + padding: 1rem; + border-radius: @border-radius; + -webkit-user-select: text; + } + } + } } .details-panel { flex: 1 auto;