Rename the download module

This commit is contained in:
ajnart
2022-05-26 19:45:18 +02:00
parent 6bc16a51f1
commit ee2e36bdfa

View File

@@ -1,4 +1,4 @@
import { Loader, Table, Text, Tooltip, Title, Group, Progress } from '@mantine/core'; import { Loader, Table, Text, Tooltip, Title, Group, Progress, Center } from '@mantine/core';
import { Download } from 'tabler-icons-react'; import { Download } from 'tabler-icons-react';
import { useEffect, useState } from 'react'; import { useEffect, useState } from 'react';
import axios from 'axios'; import axios from 'axios';
@@ -8,7 +8,7 @@ import { useConfig } from '../../../tools/state';
import { AddItemShelfButton } from '../../AppShelf/AddAppShelfItem'; import { AddItemShelfButton } from '../../AppShelf/AddAppShelfItem';
export const DownloadsModule: IModule = { export const DownloadsModule: IModule = {
title: 'Download speeds', title: 'Torrent',
description: 'Show the current download speed of supported services', description: 'Show the current download speed of supported services',
icon: Download, icon: Download,
component: DownloadComponent, component: DownloadComponent,
@@ -41,7 +41,7 @@ export default function DownloadComponent() {
}); });
}, 3000); }, 3000);
} }
}, []); }, [config.modules]);
if (!qBittorrentService) { if (!qBittorrentService) {
return ( return (
@@ -56,7 +56,11 @@ export default function DownloadComponent() {
} }
if (torrents.length === 0) { if (torrents.length === 0) {
return <Loader />; return (
<Center>
<Loader />
</Center>
);
} }
const ths = ( const ths = (
@@ -110,7 +114,7 @@ export default function DownloadComponent() {
return ( return (
<Group noWrap direction="column"> <Group noWrap direction="column">
<Title order={4}>Your downloads</Title> <Title order={4}>Your torrents</Title>
<Table highlightOnHover> <Table highlightOnHover>
<thead>{ths}</thead> <thead>{ths}</thead>
<tbody>{rows}</tbody> <tbody>{rows}</tbody>