diff --git a/js/component/file-actions.js b/js/component/file-actions.js index 0eab19dea..583d094d1 100644 --- a/js/component/file-actions.js +++ b/js/component/file-actions.js @@ -252,9 +252,11 @@ export let FileActions = React.createClass({ }); }, onFileInfoUpdate: function(fileInfo) { - this.setState({ - fileInfo: fileInfo, - }); + if (this.isMounted) { + this.setState({ + fileInfo: fileInfo, + }); + } }, componentDidMount: function() { this._isMounted = true; diff --git a/js/component/menu.js b/js/component/menu.js index 2e4321e6d..c35952426 100644 --- a/js/component/menu.js +++ b/js/component/menu.js @@ -42,7 +42,7 @@ export let DropDownMenu = React.createClass({ window.removeEventListener('click', this.handleWindowClick, false); } }, - onMenuIconClick: function(e) { + handleMenuIconClick: function(e) { this.setState({ menuOpen: !this.state.menuOpen, }); @@ -53,6 +53,12 @@ export let DropDownMenu = React.createClass({ } return false; }, + handleMenuClick: function(e) { + // Event bubbles up to the menu after a link is clicked + this.setState({ + menuOpen: false, + }); + }, handleWindowClick: function(e) { if (this.state.menuOpen && (!this._menuDiv || !this._menuDiv.contains(e.target))) { @@ -68,9 +74,9 @@ export let DropDownMenu = React.createClass({ } return (
- this._menuButton = span} button="text" icon="icon-ellipsis-v" onClick={this.onMenuIconClick} /> + this._menuButton = span} button="text" icon="icon-ellipsis-v" onClick={this.handleMenuIconClick} /> {this.state.menuOpen - ?
this._menuDiv = div} className="menu"> + ?
this._menuDiv = div} className="menu" onClick={this.handleMenuClick}> {this.props.children}
: null} diff --git a/js/page/file-list.js b/js/page/file-list.js index e16a41ffc..9420ff5f0 100644 --- a/js/page/file-list.js +++ b/js/page/file-list.js @@ -75,6 +75,12 @@ export let FileListPublished = React.createClass({ document.title = "Published Files"; lbry.getMyClaims((claimInfos) => { + if (claimInfos.length == 0) { + this.setState({ + fileInfos: [], + }); + } + /** * Build newFileInfos as a sparse array and drop elements in at the same position they * occur in claimInfos, so the order is preserved even if the API calls inside this loop @@ -116,7 +122,7 @@ export let FileListPublished = React.createClass({ else if (!this.state.fileInfos.length) { return (
- You haven't published anything to LBRY yet. Try ! + You haven't published anything to LBRY yet. Try !
); } diff --git a/js/page/help.js b/js/page/help.js index fafec293f..93a550be5 100644 --- a/js/page/help.js +++ b/js/page/help.js @@ -67,7 +67,7 @@ var HelpPage = React.createClass({

Report a Bug

Did you find something wrong?

-

+

Thanks! LBRY is made by its users.
{!ver ? null : diff --git a/js/page/show.js b/js/page/show.js index ae9ea3c33..d469e426d 100644 --- a/js/page/show.js +++ b/js/page/show.js @@ -152,7 +152,7 @@ var DetailPage = React.createClass({ ) : (

No content

- There is no content available at the name lbry://{this.props.name}. If you reached this page from a link within the LBRY interface, please . Thanks! + There is no content available at the name lbry://{this.props.name}. If you reached this page from a link within the LBRY interface, please . Thanks!
)} diff --git a/scss/component/_menu.scss b/scss/component/_menu.scss index ab871fc2e..e3b0566c4 100644 --- a/scss/component/_menu.scss +++ b/scss/component/_menu.scss @@ -12,14 +12,13 @@ $border-radius-menu: 2px; background-color: white; box-shadow: $default-box-shadow; border-radius: $border-radius-menu; - padding-top: $spacing-vertical / 2; - padding-bottom: $spacing-vertical / 2; + padding-top: ($spacing-vertical / 5) 0px; z-index: 1; } .menu__menu-item { display: block; - padding: $spacing-vertical / 4 $spacing-vertical / 2; + padding: ($spacing-vertical / 4) ($spacing-vertical / 2); &:hover { background: $color-bg-alt; }