fix(account-sidebar): fall back on provider icon if fetching user gravatar fails. fixes T3497.

Summary: simple markup & styles fix

Test Plan: tested manually. all tests still green.

Reviewers: bengotow

Maniphest Tasks: T3497

Differential Revision: https://phab.nylas.com/D1993
This commit is contained in:
dillon 2015-09-08 10:48:02 -07:00
parent 433b143005
commit c597a72c28
2 changed files with 4 additions and 2 deletions

View file

@ -42,8 +42,10 @@ class AccountSwitcher extends React.Component
'account': true
'active': account is @state.account
gravatarUrl = "http://www.gravatar.com/avatar/#{hash}?d=blank&s=44"
<div title={account.emailAddress} className={classnames} key={account.id} onClick={ => @_onSwitchAccount(account) }>
<img src="http://www.gravatar.com/avatar/#{hash}?d=blank&s=88" className="gravatar" />
<div style={backgroundImage: "url(#{gravatarUrl})"} className="gravatar"></div>
<RetinaImg name={"ic-settings-account-#{account.provider}.png"}
style={width: 44, height: 44}
fallback="ic-settings-account-imap.png"

View file

@ -14,7 +14,7 @@
img {
-webkit-filter: ~"saturate(0%)";
}
img.gravatar {
.gravatar {
width: 44px;
height: 44px;
position: absolute;