mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-04 07:10:06 +08:00
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:
parent
433b143005
commit
c597a72c28
2 changed files with 4 additions and 2 deletions
|
@ -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"
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
img {
|
||||
-webkit-filter: ~"saturate(0%)";
|
||||
}
|
||||
img.gravatar {
|
||||
.gravatar {
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
position: absolute;
|
||||
|
|
Loading…
Reference in a new issue