mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-14 02:06:29 +00:00
submit user name
This commit is contained in:
@@ -65,7 +65,11 @@ export default class ShareButton extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
handleShareWithPublicURLClick (e) {
|
handleShareWithPublicURLClick (e) {
|
||||||
let input = Object.assign({}, this.props.article, {clientKey: clientKey.get()})
|
let { user } = this.props
|
||||||
|
let input = Object.assign({}, this.props.article, {
|
||||||
|
clientKey: clientKey.get(),
|
||||||
|
writerName: user.name
|
||||||
|
})
|
||||||
api.shareWithPublicURL(input)
|
api.shareWithPublicURL(input)
|
||||||
.then(res => {
|
.then(res => {
|
||||||
let url = res.body.url
|
let url = res.body.url
|
||||||
@@ -131,5 +135,8 @@ export default class ShareButton extends React.Component {
|
|||||||
ShareButton.propTypes = {
|
ShareButton.propTypes = {
|
||||||
article: PropTypes.shape({
|
article: PropTypes.shape({
|
||||||
publicURL: PropTypes.string
|
publicURL: PropTypes.string
|
||||||
|
}),
|
||||||
|
user: PropTypes.shape({
|
||||||
|
name: PropTypes.string
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -197,7 +197,7 @@ export default class ArticleDetail extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
renderIdle () {
|
renderIdle () {
|
||||||
let { status, activeArticle, folders } = this.props
|
let { status, activeArticle, folders, user } = this.props
|
||||||
|
|
||||||
let tags = activeArticle.tags != null ? activeArticle.tags.length > 0
|
let tags = activeArticle.tags != null ? activeArticle.tags.length > 0
|
||||||
? activeArticle.tags.map(tag => {
|
? activeArticle.tags.map(tag => {
|
||||||
@@ -240,7 +240,10 @@ export default class ArticleDetail extends React.Component {
|
|||||||
<div className='tags'><i className='fa fa-fw fa-tags'/>{tags}</div>
|
<div className='tags'><i className='fa fa-fw fa-tags'/>{tags}</div>
|
||||||
</div>
|
</div>
|
||||||
<div className='right'>
|
<div className='right'>
|
||||||
<ShareButton article={activeArticle}/>
|
<ShareButton
|
||||||
|
article={activeArticle}
|
||||||
|
user={user}
|
||||||
|
/>
|
||||||
|
|
||||||
<button onClick={e => this.handleClipboardButtonClick(e)} className='editBtn'>
|
<button onClick={e => this.handleClipboardButtonClick(e)} className='editBtn'>
|
||||||
<i className='fa fa-fw fa-clipboard'/><span className='tooltip'>Copy to clipboard</span>
|
<i className='fa fa-fw fa-clipboard'/><span className='tooltip'>Copy to clipboard</span>
|
||||||
|
|||||||
Reference in New Issue
Block a user