Seed Support #56

Closed
ocnios wants to merge 173 commits from master into build
Showing only changes of commit e42252507b - Show all commits

View file

@ -98,9 +98,9 @@ let WunderBar = React.createClass({
} }
// this._input.value = ""; //trigger placeholder // this._input.value = ""; //trigger placeholder
this._focusPending = true; this._focusPending = true;
if (!this.state.address.match(/^lbry:\/\//)) //onFocus, if they are not on an exact URL, clear the bar if (!this.state.address.startsWith('lbry://')) //onFocus, if they are not on an exact URL, clear the bar
{ {
newState.address = ""; newState.address = '';
} }
this.setState(newState); this.setState(newState);
}, },
@ -119,16 +119,18 @@ let WunderBar = React.createClass({
this._input = ref; this._input = ref;
}, },
render: function() { render: function() {
return <div className={"wunderbar" + (this.state.isActive ? " wunderbar--active" : "")}> return (
{this.state.icon ? <Icon fixed icon={this.state.icon} /> : '' } <div className={'wunderbar' + (this.state.isActive ? ' wunderbar--active' : '')}>
<input className="wunderbar__input" type="search" placeholder="Type a LBRY address or search term" {this.state.icon ? <Icon fixed icon={this.state.icon} /> : '' }
ref={this.onReceiveRef} <input className="wunderbar__input" type="search" placeholder="Type a LBRY address or search term"
onFocus={this.onFocus} ref={this.onReceiveRef}
onBlur={this.onBlur} onFocus={this.onFocus}
onChange={this.onChange} onBlur={this.onBlur}
value={ this.state.address } onChange={this.onChange}
placeholder="Find movies, music, games, and more" /> value={this.state.address}
placeholder="Find movies, music, games, and more" />
</div> </div>
);
} }
}) })