diff --git a/app/components/elements/ReplyEditor.jsx b/app/components/elements/ReplyEditor.jsx index 35ede76298d46094a03bbbac9c0c3cfb5eebe068..970fd372cf83203c26f020ac8b64abb7cd52254e 100644 --- a/app/components/elements/ReplyEditor.jsx +++ b/app/components/elements/ReplyEditor.jsx @@ -81,6 +81,7 @@ class ReplyEditor extends React.Component { //redux connect reply: React.PropTypes.func.isRequired, clearMetaData: React.PropTypes.func.isRequired, + showPostingGuide: React.PropTypes.func.isRequired, setMetaData: React.PropTypes.func.isRequired, state: React.PropTypes.object.isRequired, isStory: React.PropTypes.bool.isRequired, @@ -252,13 +253,18 @@ class ReplyEditor extends React.Component { if(payoutType !== '0%') localStorage.setItem('defaultPayoutType', payoutType) } + onShowPostingGuide = (e) => { + e.preventDefault(); + this.props.showPostingGuide(); + } + render() { // NOTE title, category, and body are UI form fields .. const originalPost = { category: this.props.category, body: this.props.body, } - const {onCancel, autoVoteOnChange} = this + const {onShowPostingGuide, onCancel, autoVoteOnChange} = this const {title, category, body, autoVote} = this.props.fields const { reply, username, isStory, formId, noImage, @@ -352,6 +358,8 @@ class ReplyEditor extends React.Component { {isStory && !isEdit && <div className="ReplyEditor__options float-right text-right"> + <a href="#" onClick={onShowPostingGuide}>Steemit Posting Guide</a><br /> + Rewards: <select value={this.state.payoutType} onChange={this.onPayoutTypeChange} style={{color: this.state.payoutType == '0%' ? 'orange' : 'inherit'}}> <option value="100%">Power Up 100%</option> @@ -423,6 +431,9 @@ export default formId => reduxForm( // mapDispatchToProps dispatch => ({ + showPostingGuide: () => { + dispatch({type: 'global/SHOW_DIALOG', payload: {name: 'postingGuide'}}); + }, clearMetaData: (id) => { dispatch(g.actions.clearMeta({id})) }, diff --git a/app/components/modules/Dialogs.jsx b/app/components/modules/Dialogs.jsx index 22b4605fd5db8d27cb1e2519540b3c758fe6862e..cd697c3618d5f27847283a79be33b8a4ca3f2ed8 100644 --- a/app/components/modules/Dialogs.jsx +++ b/app/components/modules/Dialogs.jsx @@ -12,6 +12,7 @@ import SuggestPassword from 'app/components/elements/SuggestPassword' import ChangePassword from 'app/components/elements/ChangePassword' import CheckLoginOwner from 'app/components/elements/CheckLoginOwner' import PromotePost from 'app/components/modules/PromotePost'; +import PostingGuide from 'app/components/modules/PostingGuide'; class Dialogs extends React.Component { static propTypes = { @@ -72,6 +73,12 @@ class Dialogs extends React.Component { <PromotePost onClose={this['hide_' + k]} {...v.get('params').toJS()} /> </Reveal> </span>: + k === 'postingGuide' ? <span key={idx++} > + <Reveal onHide={this['hide_' + k]} show> + <CloseButton onClick={this['hide_' + k]} /> + <PostingGuide onClose={this['hide_' + k]} /> + </Reveal> + </span>: null return cmp ? r.push(cmp) : r }, List()) diff --git a/app/components/modules/PostingGuide.jsx b/app/components/modules/PostingGuide.jsx new file mode 100644 index 0000000000000000000000000000000000000000..7bfba141f74d5ed12ed36a91847e4430a9eb487c --- /dev/null +++ b/app/components/modules/PostingGuide.jsx @@ -0,0 +1,20 @@ +import React from 'react'; + +export default class PostingGuide extends React.Component { + render() { + return ( + <div className="PostingGuide row"> + <div className="column small-12"> + <h3>Posting on Steemit</h3> + <p></p> + <ul> + <li></li> + <li></li> + </ul> + + </div> + </div> + ) + } +} +