diff --git a/client/homebrew/editor/metadataEditor/metadataEditor.jsx b/client/homebrew/editor/metadataEditor/metadataEditor.jsx index 87fda16f9..161223fc9 100644 --- a/client/homebrew/editor/metadataEditor/metadataEditor.jsx +++ b/client/homebrew/editor/metadataEditor/metadataEditor.jsx @@ -11,6 +11,8 @@ const Themes = require('themes/themes.json'); const SYSTEMS = ['5e', '4e', '3.5e', 'Pathfinder']; +const homebreweryThumbnail = require('../../thumbnail.png'); + const MetadataEditor = createClass({ displayName : 'MetadataEditor', getDefaultProps : function() { @@ -30,6 +32,23 @@ const MetadataEditor = createClass({ }; }, + getInitialState : function(){ + return { + showThumbnail : true + }; + }, + + toggleThumbnailDisplay : function(){ + this.setState({ + showThumbnail : !this.state.showThumbnail + }); + }, + + renderThumbnail : function(){ + if(!this.state.showThumbnail) return; + return ; + }, + handleFieldChange : function(name, e){ this.props.onChange(_.merge({}, this.props.metadata, { [name] : e.target.value @@ -72,7 +91,7 @@ const MetadataEditor = createClass({ if(!confirm('Are you REALLY sure? You will lose editor access to this document.')) return; } - request.delete(`/api/${this.props.metadata.googleId}${this.props.metadata.editId}`) + request.delete(`/api/${this.props.metadata.googleId ?? ''}${this.props.metadata.editId}`) .send() .end(function(err, res){ window.location.href = '/'; @@ -213,6 +232,18 @@ const MetadataEditor = createClass({