From 865d881d4ee13a21ce8b7cf278ceb78c4b1176eb Mon Sep 17 00:00:00 2001 From: roadscape Date: Tue, 29 May 2018 16:10:49 -0500 Subject: [PATCH 1/4] remove unused formId and canEdit from MarkdownViewer --- src/app/components/cards/MarkdownViewer.jsx | 7 ++----- src/app/components/elements/ReplyEditor.jsx | 3 --- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/app/components/cards/MarkdownViewer.jsx b/src/app/components/cards/MarkdownViewer.jsx index 8c6d79c581..1e5d9a0f8e 100644 --- a/src/app/components/cards/MarkdownViewer.jsx +++ b/src/app/components/cards/MarkdownViewer.jsx @@ -31,8 +31,6 @@ class MarkdownViewer extends Component { text: PropTypes.string, className: PropTypes.string, large: PropTypes.bool, - // formId: PropTypes.string, // This is unique for every editor of every post (including reply or edit) - canEdit: PropTypes.bool, jsonMetadata: PropTypes.object, highQualityPost: PropTypes.bool, noImage: PropTypes.bool, @@ -59,8 +57,6 @@ class MarkdownViewer extends Component { return ( np.text !== this.props.text || np.large !== this.props.large || - // np.formId !== this.props.formId || - np.canEdit !== this.props.canEdit || ns.allowNoImage !== this.state.allowNoImage ); } @@ -76,7 +72,8 @@ class MarkdownViewer extends Component { if (!text) text = ''; // text can be empty, still view the link meta data const { large, - /*formId, canEdit, jsonMetadata,*/ highQualityPost, + highQualityPost, + //jsonMetadata, } = this.props; let html = false; diff --git a/src/app/components/elements/ReplyEditor.jsx b/src/app/components/elements/ReplyEditor.jsx index bc05374f71..ef25b5821b 100644 --- a/src/app/components/elements/ReplyEditor.jsx +++ b/src/app/components/elements/ReplyEditor.jsx @@ -310,7 +310,6 @@ class ReplyEditor extends React.Component { reply, username, isStory, - formId, noImage, author, permlink, @@ -647,9 +646,7 @@ class ReplyEditor extends React.Component { )}
{tt('g.preview')}
Date: Tue, 29 May 2018 16:15:24 -0500 Subject: [PATCH 2/4] allow unlimited editing --- src/app/components/cards/Comment.jsx | 20 +++++++++----------- src/app/components/cards/PostFull.jsx | 16 +++++++--------- 2 files changed, 16 insertions(+), 20 deletions(-) diff --git a/src/app/components/cards/Comment.jsx b/src/app/components/cards/Comment.jsx index 97ccd4b8bb..e608a0fcb7 100644 --- a/src/app/components/cards/Comment.jsx +++ b/src/app/components/cards/Comment.jsx @@ -300,11 +300,11 @@ class CommentImpl extends React.Component { // hide images if author is in blacklist const hideImages = ImageUserBlockList.includes(author); - const showDeleteOption = username === author && allowDelete; + const _isPaidout = comment.cashout_time === '1969-12-31T23:59:59'; // TODO: audit after HF19. #1259 const showEditOption = username === author; + const showDeleteOption = + username === author && allowDelete && !_isPaidout; const showReplyOption = comment.depth < 255; - const archived = comment.cashout_time === '1969-12-31T23:59:59'; // TODO: audit after HF19. #1259 - const readonly = archived || $STM_Config.read_only_mode; let body = null; let controls = null; @@ -326,14 +326,12 @@ class CommentImpl extends React.Component { {showReplyOption && ( {tt('g.reply')} )}{' '} - {!readonly && - showEditOption && ( - {tt('g.edit')} - )}{' '} - {!readonly && - showDeleteOption && ( - {tt('g.delete')} - )} + {showEditOption && ( + {tt('g.edit')} + )}{' '} + {showDeleteOption && ( + {tt('g.delete')} + )} ); diff --git a/src/app/components/cards/PostFull.jsx b/src/app/components/cards/PostFull.jsx index f9da504cad..764fa20ac8 100644 --- a/src/app/components/cards/PostFull.jsx +++ b/src/app/components/cards/PostFull.jsx @@ -404,15 +404,15 @@ class PostFull extends React.Component { ); } - const archived = + const _isPaidout = post_content.get('cashout_time') === '1969-12-31T23:59:59'; // TODO: audit after HF19. #1259 - const readonly = archived || $STM_Config.read_only_mode; + const showReblog = !_isPaidout; const showPromote = - username && !archived && post_content.get('depth') == 0; + username && !_isPaidout && post_content.get('depth') == 0; const showReplyOption = post_content.get('depth') < 255; const showEditOption = username === author; const showDeleteOption = - username === author && content.stats.allowDelete; + username === author && content.stats.allowDelete && !_isPaidout; const authorRepLog10 = repLog10(content.author_reputation); const isPreViewCount = @@ -481,20 +481,18 @@ class PostFull extends React.Component {
- {!readonly && ( + {showReblog && ( )} {showReplyOption && ( {tt('g.reply')} )}{' '} - {!readonly && - showEditOption && + {showEditOption && !showEdit && ( {tt('g.edit')} )}{' '} - {!readonly && - showDeleteOption && + {showDeleteOption && !showReply && ( {tt('g.delete')} From 794a68d3b5ecb8c05c1c2c1e82ad3153990e0935 Mon Sep 17 00:00:00 2001 From: roadscape Date: Mon, 22 Oct 2018 10:00:13 -0500 Subject: [PATCH 3/4] Revert formId delete --- src/app/components/elements/ReplyEditor.jsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/app/components/elements/ReplyEditor.jsx b/src/app/components/elements/ReplyEditor.jsx index 52bdb37b5c..32a55f9bbc 100644 --- a/src/app/components/elements/ReplyEditor.jsx +++ b/src/app/components/elements/ReplyEditor.jsx @@ -324,6 +324,7 @@ class ReplyEditor extends React.Component { reply, username, isStory, + formId, noImage, author, permlink, From 4a5f9cd038815a2eaf648e887bb86482a41570e6 Mon Sep 17 00:00:00 2001 From: relativityboy Date: Tue, 23 Oct 2018 20:16:23 -0500 Subject: [PATCH 4/4] Readme clarifications, Bump Ci --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7bf8f36abe..a06d7f7fd0 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ applications. #### Docker -We highly recommend using docker to run condenser. This is how we run the +We highly recommend using docker to run condenser in production. This is how we run the live steemit.com site and it is the most supported (and fastest) method of both building and running condenser. We will always have the latest version of condenser (master branch) available on Docker Hub. Configuration settings @@ -50,6 +50,7 @@ docker run -it -p 8080:8080 myname/condenser:mybranch ``` ## Building from source without docker (the 'traditional' way): +(better if you're planning to do condenser development) #### Clone the repository and make a tmp folder