diff --git a/client/homebrew/editor/metadataEditor/metadataEditor.jsx b/client/homebrew/editor/metadataEditor/metadataEditor.jsx index c7dea871b..b84a30080 100644 --- a/client/homebrew/editor/metadataEditor/metadataEditor.jsx +++ b/client/homebrew/editor/metadataEditor/metadataEditor.jsx @@ -7,6 +7,8 @@ const request = require('superagent'); const SYSTEMS = ['5e', '4e', '3.5e', 'Pathfinder']; +const homebreweryThumbnail = require('../../thumbnail.png'); + const MetadataEditor = createClass({ getDefaultProps : function() { return { @@ -18,12 +20,19 @@ const MetadataEditor = createClass({ published : false, authors : [], systems : [], - renderer : 'legacy' + renderer : 'legacy', + thumbnail : '' }, onChange : ()=>{} }; }, + getInitialState : function(){ + return { + showThumbnail : true + }; + }, + handleFieldChange : function(name, e){ this.props.onChange(_.merge({}, this.props.metadata, { [name] : e.target.value @@ -65,6 +74,17 @@ const MetadataEditor = createClass({ }); }, + toggleThumbnailDisplay : function(){ + this.setState({ + showThumbnail : !this.state.showThumbnail + }); + }, + + renderThumbnail : function(){ + if(!this.state.showThumbnail) return; + return ; + }, + renderSystems : function(){ return _.map(SYSTEMS, (val)=>{ return