From 8edf644493a116bfacae7ee3d3a375941c1e09cf Mon Sep 17 00:00:00 2001 From: bitcoiner <thebitcoiner@users.noreply.github.com> Date: Mon, 10 Oct 2016 14:43:43 -0700 Subject: [PATCH] Show Resteemed on Blog (#426) --- app/components/cards/PostSummary.jsx | 7 +++++++ app/components/cards/PostsList.jsx | 3 ++- app/components/pages/UserProfile.jsx | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/app/components/cards/PostSummary.jsx b/app/components/cards/PostSummary.jsx index a167a453d..dacd9edd5 100644 --- a/app/components/cards/PostSummary.jsx +++ b/app/components/cards/PostSummary.jsx @@ -52,6 +52,7 @@ export default class PostSummary extends React.Component { render() { const {currentCategory, thumbSize, ignore, onClick} = this.props; const {post, content, pending_payout, total_payout} = this.props; + const {account} = this.props; if (!content) return null; const archived = content.get('mode') === 'archived' @@ -63,6 +64,12 @@ export default class PostSummary extends React.Component { </div> } + if(account && account != content.get('author')) { + reblogged_by = <div className="PostSummary__reblogged_by"> + <Icon name="reblog" /> Resteemed + </div> + } + const {gray, pictures, authorRepLog10, hasFlag} = content.get('stats', Map()).toJS() const p = extractContent(immutableAccessor, content); let desc = p.desc diff --git a/app/components/cards/PostsList.jsx b/app/components/cards/PostsList.jsx index 43768df20..70d96ce8e 100644 --- a/app/components/cards/PostsList.jsx +++ b/app/components/cards/PostsList.jsx @@ -154,12 +154,13 @@ class PostsList extends React.Component { render() { const {posts, loading, category, emptyText} = this.props; const {comments} = this.props + const {account} = this.props const {thumbSize, showPost} = this.state if (!loading && !posts.length && emptyText) { return <Callout body={emptyText} type="success" />; } const renderSummary = items => items.map(({item, ignore, netVoteSign, authorRepLog10}) => <li key={item}> - <PostSummary post={item} currentCategory={category} thumbSize={thumbSize} + <PostSummary account={account} post={item} currentCategory={category} thumbSize={thumbSize} ignore={ignore} netVoteSign={netVoteSign} authorRepLog10={authorRepLog10} onClick={this.onPostClick} /> </li>) return ( diff --git a/app/components/pages/UserProfile.jsx b/app/components/pages/UserProfile.jsx index f2344b1aa..4d4879971 100644 --- a/app/components/pages/UserProfile.jsx +++ b/app/components/pages/UserProfile.jsx @@ -163,6 +163,7 @@ export default class UserProfile extends React.Component { if (account.blog) { tab_content = <PostsList emptyText={`Looks like ${account.name} hasn't started blogging yet!`} + account={account.name} posts={account.blog} loading={fetching} category="blog" -- GitLab