Skip to content
Snippets Groups Projects
Commit 4263f131 authored by Tim's avatar Tim
Browse files

posting guide dialog stub #153

parent 74a3838d
No related branches found
No related tags found
No related merge requests found
......@@ -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:&nbsp;
<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}))
},
......
......@@ -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())
......
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>
)
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment