From fe2c70a59b9a59ac64bdbad45eccef7da28ce1c6 Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Thu, 16 Dec 2021 08:44:23 -0600 Subject: display inert buttons for uploads, don't react to clicks --- src/web/src/components/Transfers/TransferList.js | 27 +++++++++++++----------- 1 file changed, 15 insertions(+), 12 deletions(-) (limited to 'src/web') diff --git a/src/web/src/components/Transfers/TransferList.js b/src/web/src/components/Transfers/TransferList.js index 741dc907..f1538570 100644 --- a/src/web/src/components/Transfers/TransferList.js +++ b/src/web/src/components/Transfers/TransferList.js @@ -31,19 +31,21 @@ const getColor = (state) => { } } -const isRetryable = (state) => getColor(state).color === 'red'; +const isRetryableState = (state) => getColor(state).color === 'red'; class TransferList extends Component { handleClick = (file) => { - const { state } = file; - - if (isRetryable(state)) { - return this.props.onRetryRequested(file); - } + const { state, direction } = file; - if (state === 'Queued') { - return this.props.onPlaceInQueueRequested(file); - } + if (direction === 'Download') { + if (isRetryableState(state)) { + return this.props.onRetryRequested(file); + } + + if (state === 'Queued') { + return this.props.onPlaceInQueueRequested(file); + } + } } render = () => { @@ -95,12 +97,13 @@ class TransferList extends Component { } -- cgit v1.2.3