From b5058e3981fc3130000218545b452b4637567f89 Mon Sep 17 00:00:00 2001 From: lilia Date: Fri, 12 Feb 2016 15:16:57 -0800 Subject: [PATCH] Make network errors & resend button more prominent // FREEBIE --- _locales/en/messages.json | 2 +- background.html | 12 +++++----- stylesheets/_conversation.scss | 41 +++++++++++++++++++++++++++++----- stylesheets/manifest.css | 31 +++++++++++++++++++++---- 4 files changed, 70 insertions(+), 16 deletions(-) diff --git a/_locales/en/messages.json b/_locales/en/messages.json index 8ba623b94..03e783113 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -57,7 +57,7 @@ "message": "Cancel" }, "failedToSend": { - "message": "Failed to send to some recipients." + "message": "Failed to send to some recipients. Check your network connection." }, "error": { "message": "Error" diff --git a/background.html b/background.html index f7252449b..629e1d561 100644 --- a/background.html +++ b/background.html @@ -171,14 +171,14 @@ {{ title }}
+ {{ #hasRetry }} +
+
{{ failedToSend }}
+ +
+ {{ /hasRetry }}
- {{ #hasRetry }} -

- - {{ failedToSend }} -

- {{ /hasRetry }} diff --git a/stylesheets/_conversation.scss b/stylesheets/_conversation.scss index 7a3c2a99d..8d6264ac9 100644 --- a/stylesheets/_conversation.scss +++ b/stylesheets/_conversation.scss @@ -94,6 +94,42 @@ height: calc(100% - (#{$header-height} + 4px)); } + .hasRetry { + background: #F3F3A7; + padding: 10px 20px; + margin: 0 5px; + border-radius: 5px; + + .retryMessage { + font-weight: bold; + } + + button { + margin: 5px; + background: $blue; + outline: none; + border: none; + border-radius: 5px; + color: white; + padding: 0.5em; + font-weight: bold; + + span { + vertical-align: middle; + } + + &:before { + content: ''; + display: inline-block; + vertical-align: middle; + width: 18px; + height: 18px; + background: url('/images/refresh.png') no-repeat center center; + background-size: 100%; + } + } + } + .message-container { background: white; padding: 1em 0; @@ -118,7 +154,6 @@ color: white; padding: 0.5em; font-weight: bold; - background: $blue; span { vertical-align: middle; @@ -144,10 +179,6 @@ h3 { font-size: 1em; padding: 5px; - - button { - float: right; - } } .error-icon { diff --git a/stylesheets/manifest.css b/stylesheets/manifest.css index 8430db272..16ad8909f 100644 --- a/stylesheets/manifest.css +++ b/stylesheets/manifest.css @@ -649,6 +649,32 @@ input.search { .message-detail .container { height: calc(100% - (36px + 4px)); } +.message-detail .hasRetry { + background: #F3F3A7; + padding: 10px 20px; + margin: 0 5px; + border-radius: 5px; } + .message-detail .hasRetry .retryMessage { + font-weight: bold; } + .message-detail .hasRetry button { + margin: 5px; + background: #2090ea; + outline: none; + border: none; + border-radius: 5px; + color: white; + padding: 0.5em; + font-weight: bold; } + .message-detail .hasRetry button span { + vertical-align: middle; } + .message-detail .hasRetry button:before { + content: ''; + display: inline-block; + vertical-align: middle; + width: 18px; + height: 18px; + background: url("/images/refresh.png") no-repeat center center; + background-size: 100%; } .message-detail .message-container { background: white; padding: 1em 0; } @@ -665,8 +691,7 @@ input.search { border-radius: 5px; color: white; padding: 0.5em; - font-weight: bold; - background: #2090ea; } + font-weight: bold; } .message-detail .info button span { vertical-align: middle; } .message-detail .info button:before { @@ -683,8 +708,6 @@ input.search { .message-detail h3 { font-size: 1em; padding: 5px; } - .message-detail h3 button { - float: right; } .message-detail .error-icon { display: inline-block; width: 18px;
{{ sent }}