diff --git a/app/renderer/components/downloadItem.js b/app/renderer/components/downloadItem.js index 9d3e948bca9..38412de6e82 100644 --- a/app/renderer/components/downloadItem.js +++ b/app/renderer/components/downloadItem.js @@ -21,6 +21,8 @@ class DownloadItem extends ImmutableComponent { this.onResumeDownload = this.onDownloadActionPerformed.bind(this, RESUME) this.onCancelDownload = this.onDownloadActionPerformed.bind(this, CANCEL) this.onClearDownload = this.onClearDownload.bind(this) + this.onShowDeleteConfirmation = this.onShowDeleteConfirmation.bind(this) + this.onHideDeleteConfirmation = this.onHideDeleteConfirmation.bind(this) this.onDeleteDownload = this.onDeleteDownload.bind(this) this.onRedownload = this.onRedownload.bind(this) this.onCopyLinkToClipboard = this.onCopyLinkToClipboard.bind(this) @@ -34,6 +36,12 @@ class DownloadItem extends ImmutableComponent { onClearDownload () { appActions.downloadCleared(this.props.downloadId) } + onShowDeleteConfirmation () { + appActions.showDownloadDeleteConfirmationbar() + } + onHideDeleteConfirmation () { + appActions.hideDownloadDeleteConfirmationbar() + } onDeleteDownload () { appActions.downloadDeleted(this.props.downloadId) } @@ -74,10 +82,17 @@ class DownloadItem extends ImmutableComponent { return + { + this.props.downloadDeleteConfirmationVisible + ?
Delete?
+ : null + }
{ downloadUtil.shouldAllowPause(this.props.download) @@ -111,7 +126,7 @@ class DownloadItem extends ImmutableComponent { } { downloadUtil.shouldAllowDelete(this.props.download) - ?