From 2983345d1bc3967d257751cbc3596810cc9bdb78 Mon Sep 17 00:00:00 2001 From: SpikeHD Date: Fri, 20 May 2022 19:47:13 -0700 Subject: [PATCH] show only filenames in downloads --- src/ui/components/common/DownloadSection.tsx | 3 ++- src/ui/components/common/ProgressBar.tsx | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ui/components/common/DownloadSection.tsx b/src/ui/components/common/DownloadSection.tsx index eea7e39..373b238 100644 --- a/src/ui/components/common/DownloadSection.tsx +++ b/src/ui/components/common/DownloadSection.tsx @@ -15,7 +15,8 @@ export default class DownloadSection extends React.Component { } getFilenameFromPath() { - return this.props.downloadName.split('/').pop() + const name = this.props.downloadName.replace(/\\/g, '/') + return name.split('/').pop() } render() { diff --git a/src/ui/components/common/ProgressBar.tsx b/src/ui/components/common/ProgressBar.tsx index c838a61..6194f04 100644 --- a/src/ui/components/common/ProgressBar.tsx +++ b/src/ui/components/common/ProgressBar.tsx @@ -80,7 +80,6 @@ export default class ProgressBar extends React.Component { -
{capitalize(this.state.status) || 'Waiting'}