diff --git a/dist/index.html b/dist/index.html index c11fd96b7..c0e47898d 100644 --- a/dist/index.html +++ b/dist/index.html @@ -5,6 +5,7 @@ LBRY + @@ -33,6 +34,7 @@ + diff --git a/js/app.js b/js/app.js index 94fdaf22c..04f0b875a 100644 --- a/js/app.js +++ b/js/app.js @@ -4,7 +4,7 @@ var App = React.createClass({ var match, param, val; [match, param, val] = window.location.search.match(/\??([^=]*)(?:=(.*))?/); - if (['settings', 'help', 'start', 'watch', 'report', 'files', 'claim', 'show', 'wallet'].indexOf(param) != -1) { + if (['settings', 'help', 'start', 'watch', 'report', 'files', 'claim', 'show', 'wallet', 'publish'].indexOf(param) != -1) { var viewingPage = param; } else { var viewingPage = 'home'; @@ -69,6 +69,8 @@ var App = React.createClass({ return ; } else if (this.state.viewingPage == 'wallet') { return ; + } else if (this.state.viewingPage == 'publish') { + return ; } } }); diff --git a/js/component/common.js b/js/component/common.js index a942b5ada..467899508 100644 --- a/js/component/common.js +++ b/js/component/common.js @@ -169,6 +169,81 @@ var WatchLink = React.createClass({ } }); +var requiredFieldWarningStyle = { + color: '#cc0000', + transition: 'opacity 400ms ease-in', +}; +var FormField = React.createClass({ + _type: null, + _element: null, + + propTypes: { + type: React.PropTypes.string.isRequired, + hidden: React.PropTypes.bool, + }, + getInitialState: function() { + return { + warningState: 'hidden', + } + }, + componentWillMount: function() { + if (['text', 'radio', 'checkbox', 'file'].indexOf(this.props.type) != -1) { + this._element = 'input'; + this._type = this.props.type; + } else { + // Non field, e.g.