From a11e93ef5454f97228a8bf31b4fe4c261e3c4d66 Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Tue, 15 Mar 2022 18:47:46 +1300 Subject: [PATCH] Initial pass at social metadata tags --- .../editor/metadataEditor/metadataEditor.jsx | 31 ++++++++++++++++++ .../editor/metadataEditor/metadataEditor.less | 27 +++++++++++++++ client/homebrew/thumbnail.png | Bin 0 -> 6010 bytes client/template.js | 9 +++++ server/googleActions.js | 10 ++++-- server/homebrew.model.js | 1 + 6 files changed, 75 insertions(+), 3 deletions(-) create mode 100644 client/homebrew/thumbnail.png diff --git a/client/homebrew/editor/metadataEditor/metadataEditor.jsx b/client/homebrew/editor/metadataEditor/metadataEditor.jsx index 8f5ad7083..4c294a51e 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({ displayName : 'MetadataEditor', getDefaultProps : function() { @@ -25,6 +27,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 @@ -162,6 +181,18 @@ const MetadataEditor = createClass({