mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-10 10:11:25 +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
74b13ebc2d
commit
47cfb25984
2 changed files with 4 additions and 2 deletions
|
@ -42,8 +42,10 @@ class AccountSwitcher extends React.Component
|
||||||
'account': true
|
'account': true
|
||||||
'active': account is @state.account
|
'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) }>
|
<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"}
|
<RetinaImg name={"ic-settings-account-#{account.provider}.png"}
|
||||||
style={width: 44, height: 44}
|
style={width: 44, height: 44}
|
||||||
fallback="ic-settings-account-imap.png"
|
fallback="ic-settings-account-imap.png"
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
img {
|
img {
|
||||||
-webkit-filter: ~"saturate(0%)";
|
-webkit-filter: ~"saturate(0%)";
|
||||||
}
|
}
|
||||||
img.gravatar {
|
.gravatar {
|
||||||
width: 44px;
|
width: 44px;
|
||||||
height: 44px;
|
height: 44px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|
Loading…
Reference in a new issue