From 62635bffe97c0f52f87980ea862d8cd4bc220be2 Mon Sep 17 00:00:00 2001 From: ajnart Date: Sun, 29 May 2022 15:31:04 +0200 Subject: [PATCH] :lipstick: Style DownloadsModule (torrents) --- .../modules/downloads/DownloadsModule.tsx | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/components/modules/downloads/DownloadsModule.tsx b/src/components/modules/downloads/DownloadsModule.tsx index 83390c9a9..b1f46a4d8 100644 --- a/src/components/modules/downloads/DownloadsModule.tsx +++ b/src/components/modules/downloads/DownloadsModule.tsx @@ -1,4 +1,4 @@ -import { Loader, Table, Text, Tooltip, Title, Group, Progress, Center } from '@mantine/core'; +import { Table, Text, Tooltip, Title, Group, Progress, Skeleton } from '@mantine/core'; import { Download } from 'tabler-icons-react'; import { useEffect, useState } from 'react'; import axios from 'axios'; @@ -65,9 +65,13 @@ export default function DownloadComponent() { if (qBittorrentTorrents.length === 0 && delugeTorrents.length === 0) { return ( -
- -
+ <> + + + + + + ); } @@ -85,10 +89,9 @@ export default function DownloadComponent() { torrents.push({ ...delugeTorrent, progress: delugeTorrent.progress / 100 }) ); qBittorrentTorrents.forEach((torrent) => torrents.push(torrent)); - const rows = torrents.map((torrent) => { if (torrent.progress === 1 && hideComplete) { - return null; + return []; } const downloadSpeed = torrent.downloadSpeed / 1024 / 1024; const uploadSpeed = torrent.uploadSpeed / 1024 / 1024; @@ -125,7 +128,6 @@ export default function DownloadComponent() { ); }); - return ( Your torrents