Skip to content

Commit

Permalink
Merge branch 'develop' into merge-master-develop
Browse files Browse the repository at this point in the history
  • Loading branch information
valzav committed Nov 9, 2016
2 parents ba8ed0a + 14a568d commit 751ca9f
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 4 deletions.
3 changes: 3 additions & 0 deletions app/components/cards/Comment.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
}

.Comment__Userpic {
float: left;
position: relative;
top: 0.4rem;
padding-right: 0.6rem;
Expand All @@ -15,6 +16,8 @@
.Comment__Userpic-small {
@include hide-for(medium);
.Userpic {
float: left;
position: relative;
padding-right: 0.2rem;
img {
width: 16px;
Expand Down
5 changes: 5 additions & 0 deletions app/components/elements/Userpic.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ class Userpic extends Component {

render() {
const {account, width, height} = this.props
const hideIfDefault = this.props.hideIfDefault || false

let url = null;

// try to extract image url from users metaData
Expand All @@ -20,6 +22,9 @@ class Userpic extends Component {
if (url && /(https?:)\/\//.test(url)) {
url = $STM_Config.img_proxy_prefix + '48x48/' + url;
} else {
if(hideIfDefault) {
return null;
}
url = require('app/assets/images/user.png');
}

Expand Down
3 changes: 1 addition & 2 deletions app/components/elements/Userpic.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
.Userpic {
float: left;
position: relative;
display: inline-block;
> img {
width: 48px;
height: 48px;
Expand Down
7 changes: 6 additions & 1 deletion app/components/pages/UserProfile.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import NotifiCounter from 'app/components/elements/NotifiCounter';
import DateJoinWrapper from 'app/components/elements/DateJoinWrapper';
import { translate } from 'app/Translator';
import WalletSubMenu from 'app/components/elements/WalletSubMenu';
import Userpic from 'app/components/elements/Userpic';

export default class UserProfile extends React.Component {
constructor() {
Expand Down Expand Up @@ -319,7 +320,11 @@ export default class UserProfile extends React.Component {
<Follow follower={username} following={accountname} what="blog" />
</div>
</div>
<h2>{account.name} <Tooltip t={translate('this_is_users_reputations_score_it_is_based_on_history_of_votes', {name})}><span style={{fontSize: "80%"}}>({rep})</span></Tooltip></h2>
<h2>
<Userpic account={account.name} hideIfDefault />
{account.name}{' '}
<Tooltip t={translate('this_is_users_reputations_score_it_is_based_on_history_of_votes', {name})}><span style={{fontSize: "80%"}}>({rep})</span></Tooltip>
</h2>

<div>
<div className="UserProfile__stats">
Expand Down
3 changes: 3 additions & 0 deletions app/components/pages/UserProfile.scss
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@
}
h2 {
padding-top: 20px;
.Userpic {
padding-right: 1rem;
}
}

.UserProfile__buttons {
Expand Down
2 changes: 1 addition & 1 deletion app/locales/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ const en = {
welcome_to_the_blockchain: 'Welcome to the Blockchain!',
your_voice_is_worth_something: 'Your voice is worth something',
learn_more: 'Learn More',
get_VESTING_TOKEN_when_sign_up: 'Get ${signupBonus} of ' + VESTING_TOKEN + ' when you sign up today.',
get_sp_when_sign_up: 'Get {signupBonus} of ' + VESTING_TOKEN + ' when you sign up today.',
all_accounts_refunded: 'All Recovered Accounts have been fully Refunded',
APP_URL_is_now_open_source: APP_URL + ' is now Open Source',
// this is mainly from ReplyEditor
Expand Down

0 comments on commit 751ca9f

Please sign in to comment.