mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-10 23:45:48 +01:00
Removed new Features on Mobile (Temporary)
This commit is contained in:
@@ -18,6 +18,7 @@ import { IModule } from '../modules';
|
|||||||
import { useConfig } from '../../../tools/state';
|
import { useConfig } from '../../../tools/state';
|
||||||
import { AddItemShelfButton } from '../../AppShelf/AddAppShelfItem';
|
import { AddItemShelfButton } from '../../AppShelf/AddAppShelfItem';
|
||||||
import { useSetSafeInterval } from '../../../tools/hooks/useSetSafeInterval';
|
import { useSetSafeInterval } from '../../../tools/hooks/useSetSafeInterval';
|
||||||
|
import { useViewportSize } from '@mantine/hooks';
|
||||||
|
|
||||||
export const DownloadsModule: IModule = {
|
export const DownloadsModule: IModule = {
|
||||||
title: 'Torrent',
|
title: 'Torrent',
|
||||||
@@ -34,6 +35,7 @@ export const DownloadsModule: IModule = {
|
|||||||
|
|
||||||
export default function DownloadComponent() {
|
export default function DownloadComponent() {
|
||||||
const { config } = useConfig();
|
const { config } = useConfig();
|
||||||
|
const { height, width } = useViewportSize();
|
||||||
const downloadServices =
|
const downloadServices =
|
||||||
config.services.filter(
|
config.services.filter(
|
||||||
(service) =>
|
(service) =>
|
||||||
@@ -85,10 +87,10 @@ export default function DownloadComponent() {
|
|||||||
const ths = (
|
const ths = (
|
||||||
<tr>
|
<tr>
|
||||||
<th>Name</th>
|
<th>Name</th>
|
||||||
<th>Size</th>
|
{width > 576 ? <th>Size</th> : ``}
|
||||||
<th>Download</th>
|
<th>Down</th>
|
||||||
<th>Upload</th>
|
<th>Up</th>
|
||||||
<th>ETA</th>
|
{width > 576 ? <th>ETA</th> : ``}
|
||||||
<th>Progress</th>
|
<th>Progress</th>
|
||||||
</tr>
|
</tr>
|
||||||
);
|
);
|
||||||
@@ -137,18 +139,22 @@ export default function DownloadComponent() {
|
|||||||
</Text>
|
</Text>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
</td>
|
</td>
|
||||||
|
{width > 576 ?
|
||||||
<td>
|
<td>
|
||||||
<Text size="xs">{size > 0 ? (size > 999 ? `${(size / 1024).toFixed(1)} GB` : `${size.toFixed(1)} MB`) : '-' }</Text>
|
<Text size="xs">{size > 0 ? (size > 999 ? `${(size / 1024).toFixed(1)} GB` : `${size.toFixed(1)} MB`) : '-' }</Text>
|
||||||
</td>
|
</td> :
|
||||||
|
``}
|
||||||
<td>
|
<td>
|
||||||
<Text size="xs">{downloadSpeed > 0 ? `${downloadSpeed.toFixed(1)} Mb/s` : '-'}</Text>
|
<Text size="xs">{downloadSpeed > 0 ? `${downloadSpeed.toFixed(1)} Mb/s` : '-'}</Text>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<Text size="xs">{uploadSpeed > 0 ? `${uploadSpeed.toFixed(1)} Mb/s` : '-'}</Text>
|
<Text size="xs">{uploadSpeed > 0 ? `${uploadSpeed.toFixed(1)} Mb/s` : '-'}</Text>
|
||||||
</td>
|
</td>
|
||||||
|
{width > 576 ?
|
||||||
<td>
|
<td>
|
||||||
<Text size="xs">{torrent.eta <= 0 ? '∞' : calculateETA(torrent.eta)}</Text>
|
<Text size="xs">{torrent.eta <= 0 ? '∞' : calculateETA(torrent.eta)}</Text>
|
||||||
</td>
|
</td> :
|
||||||
|
``}
|
||||||
<td>
|
<td>
|
||||||
<Text>{(torrent.progress * 100).toFixed(1)}%</Text>
|
<Text>{(torrent.progress * 100).toFixed(1)}%</Text>
|
||||||
<Progress
|
<Progress
|
||||||
|
|||||||
Reference in New Issue
Block a user