From d1c623f4c3d72c859f9ad9cb985be127d6a3eb62 Mon Sep 17 00:00:00 2001 From: André Oliveira <37463445+SpecialAro@users.noreply.github.com> Date: Sat, 2 Sep 2023 16:28:04 +0100 Subject: feat: Add Download Manager (pause, stop, delete) (#1339) --- src/components/layout/Sidebar.tsx | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) (limited to 'src/components/layout') diff --git a/src/components/layout/Sidebar.tsx b/src/components/layout/Sidebar.tsx index 6fd911a24..7904d7653 100644 --- a/src/components/layout/Sidebar.tsx +++ b/src/components/layout/Sidebar.tsx @@ -14,11 +14,12 @@ import { mdiPlusBox, mdiViewGrid, mdiViewSplitVertical, + mdiDownload, } from '@mdi/js'; - import Tabbar from '../services/tabs/Tabbar'; import { addNewServiceShortcutKey, + downloadsShortcutKey, lockFerdiumShortcutKey, muteFerdiumShortcutKey, settingsShortcutKey, @@ -91,6 +92,7 @@ interface IProps extends WrappedComponentProps { toggleCollapseMenu: () => void; toggleWorkspaceDrawer: () => void; openSettings: (args: { path: string }) => void; + openDownloads: (args: { path: string }) => void; // eslint-disable-next-line react/no-unused-prop-types closeSettings: () => void; setActive: (args: { serviceId: string }) => void; @@ -141,6 +143,7 @@ class Sidebar extends Component { render() { const { openSettings, + openDownloads, toggleMuteApp, toggleCollapseMenu, isAppMuted, @@ -156,6 +159,7 @@ class Sidebar extends Component { hideWorkspacesButton, hideNotificationsButton, hideSettingsButton, + hideDownloadButton, hideSplitModeButton, useHorizontalStyle, splitMode, @@ -180,6 +184,8 @@ class Sidebar extends Component { const { isMenuCollapsed } = stores!.settings.all.app; + const { isDownloading, justFinishedDownloading } = stores!.app; + return (
{ style={{ height: 'auto', overflowY: 'unset' }} /> )} + + {!hideDownloadButton && !isMenuCollapsed ? ( + + ) : null} + {!hideSettingsButton && !isMenuCollapsed ? (