mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-03 23:32:58 +00:00
Add Share to Reddit and Copy Share URL to Share Menu
This commit is contained in:
@@ -65,18 +65,6 @@ const MetadataEditor = createClass({
|
||||
});
|
||||
},
|
||||
|
||||
getRedditLink : function(){
|
||||
const meta = this.props.metadata;
|
||||
|
||||
const shareLink = (meta.googleId || '') + meta.shareId;
|
||||
const title = `${meta.title} [${meta.systems.join(' ')}]`;
|
||||
const text = `Hey guys! I've been working on this homebrew. I'd love your feedback. Check it out.
|
||||
|
||||
**[Homebrewery Link](https://homebrewery.naturalcrit.com/share/${shareLink})**`;
|
||||
|
||||
return `https://www.reddit.com/r/UnearthedArcana/submit?title=${encodeURIComponent(title)}&text=${encodeURIComponent(text)}`;
|
||||
},
|
||||
|
||||
renderSystems : function(){
|
||||
return _.map(SYSTEMS, (val)=>{
|
||||
return <label key={val}>
|
||||
@@ -127,21 +115,6 @@ const MetadataEditor = createClass({
|
||||
</div>;
|
||||
},
|
||||
|
||||
renderShareToReddit : function(){
|
||||
if(!this.props.metadata.shareId) return;
|
||||
|
||||
return <div className='field reddit'>
|
||||
<label>reddit</label>
|
||||
<div className='value'>
|
||||
<a href={this.getRedditLink()} target='_blank' rel='noopener noreferrer'>
|
||||
<button className='publish'>
|
||||
<i className='fab fa-reddit-alien' /> share to reddit
|
||||
</button>
|
||||
</a>
|
||||
</div>
|
||||
</div>;
|
||||
},
|
||||
|
||||
renderRenderOptions : function(){
|
||||
if(!global.enable_v3) return;
|
||||
|
||||
@@ -215,8 +188,6 @@ const MetadataEditor = createClass({
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{this.renderShareToReddit()}
|
||||
|
||||
{this.renderDelete()}
|
||||
|
||||
</div>;
|
||||
|
||||
@@ -77,11 +77,6 @@
|
||||
.button(@red);
|
||||
}
|
||||
}
|
||||
.reddit.field .value{
|
||||
button{
|
||||
.button(@purple);
|
||||
}
|
||||
}
|
||||
.authors.field .value{
|
||||
font-size: 0.8em;
|
||||
line-height : 1.5em;
|
||||
|
||||
Reference in New Issue
Block a user