diff --git a/js/component/common.js b/js/component/common.js index 95b8c73c9..343a3634d 100644 --- a/js/component/common.js +++ b/js/component/common.js @@ -161,8 +161,8 @@ var MenuItem = React.createClass({ var icon = (this.props.icon ? : null); return ( - + {this.props.iconPosition == 'left' ? icon : null} {this.props.label} {this.props.iconPosition == 'left' ? null : icon} diff --git a/js/page/my_files.js b/js/page/my_files.js index 7586b8b42..a9ff5c805 100644 --- a/js/page/my_files.js +++ b/js/page/my_files.js @@ -1,10 +1,45 @@ -var removeIconColumnStyle = { - fontSize: '1.3em', +var myFilesRowMoreMenuStyle = { + position: 'absolute', + display: 'block', + top: '26px', + left: '-13px', +}; +var MyFilesRowMoreMenu = React.createClass({ + onDeleteClicked: function() { + var alertText = 'Are you sure you\'d like to remove "' + this.props.title + '?" This will ' + + (this.completed ? ' stop the download and ' : '') + + 'permanently remove the file from your system.'; + + if (confirm(alertText)) { + lbry.deleteFile(this.props.lbryUri); + } + }, + render: function() { + return ( +
+ + + + + +
+ ); + } +}); + +var moreButtonColumnStyle = { height: '120px', display: 'flex', alignItems: 'center', justifyContent: 'center', }, +moreButtonContainerStyle = { + display: 'block', + position: 'relative', +}, +moreButtonStyle = { + fontSize: '1.3em', +}, progressBarStyle = { height: '15px', width: '230px', @@ -18,17 +53,7 @@ myFilesRowImgStyle = { marginLeft: 'auto', marginRight: 'auto', }; - var MyFilesRow = React.createClass({ - onRemoveClicked: function() { - var alertText = 'Are you sure you\'d like to remove "' + this.props.title + '?" This will ' + - (this.completed ? ' stop the download and ' : '') + - 'permanently remove the file from your system.'; - - if (confirm(alertText)) { - lbry.deleteFile(this.props.lbryUri); - } - }, onPauseResumeClicked: function() { if (this.props.stopped) { lbry.startFile(this.props.lbryUri); @@ -71,8 +96,12 @@ var MyFilesRow = React.createClass({
{ pauseLink }
{ watchButton }
-
- { this.onRemoveClicked() } } />
+
+
+ + +
);