diff --git a/src/tribler/ui/src/components/ui/simple-table.tsx b/src/tribler/ui/src/components/ui/simple-table.tsx index 826e388a1f..8589526119 100644 --- a/src/tribler/ui/src/components/ui/simple-table.tsx +++ b/src/tribler/ui/src/components/ui/simple-table.tsx @@ -113,9 +113,9 @@ function SimpleTable({ <>
- + {table.getHeaderGroups().map((headerGroup) => ( - + {headerGroup.headers.map((header, index) => { return ( diff --git a/src/tribler/ui/src/pages/Debug/Asyncio/index.tsx b/src/tribler/ui/src/pages/Debug/Asyncio/index.tsx index 6335332fbc..7d61867d74 100644 --- a/src/tribler/ui/src/pages/Debug/Asyncio/index.tsx +++ b/src/tribler/ui/src/pages/Debug/Asyncio/index.tsx @@ -7,7 +7,7 @@ import SlowTasks from "./SlowTasks"; export default function IPv8() { return ( - + Tasks Slow tasks Health diff --git a/src/tribler/ui/src/pages/Debug/DHT/index.tsx b/src/tribler/ui/src/pages/Debug/DHT/index.tsx index cb2f3ff548..c4285541b6 100644 --- a/src/tribler/ui/src/pages/Debug/DHT/index.tsx +++ b/src/tribler/ui/src/pages/Debug/DHT/index.tsx @@ -11,7 +11,7 @@ import Statistics from "./Statistics" export default function DHT() { return ( - + Statistics Buckets diff --git a/src/tribler/ui/src/pages/Debug/IPv8/Overlays.tsx b/src/tribler/ui/src/pages/Debug/IPv8/Overlays.tsx index 1b85992cec..86df29eb8b 100644 --- a/src/tribler/ui/src/pages/Debug/IPv8/Overlays.tsx +++ b/src/tribler/ui/src/pages/Debug/IPv8/Overlays.tsx @@ -126,7 +126,7 @@ export default function Overlays() { maxHeight={Math.max((parentRect?.height ?? 50) - 0, 50)} /> - + - + Overlays Details diff --git a/src/tribler/ui/src/pages/Debug/Libtorrent/index.tsx b/src/tribler/ui/src/pages/Debug/Libtorrent/index.tsx index 4fedf847e7..fff29a719c 100644 --- a/src/tribler/ui/src/pages/Debug/Libtorrent/index.tsx +++ b/src/tribler/ui/src/pages/Debug/Libtorrent/index.tsx @@ -50,7 +50,7 @@ export default function Libtorrent() { return ( - + Settings Session
diff --git a/src/tribler/ui/src/pages/Debug/Tunnels/index.tsx b/src/tribler/ui/src/pages/Debug/Tunnels/index.tsx index b28ed37dd6..d0d2b0f84b 100644 --- a/src/tribler/ui/src/pages/Debug/Tunnels/index.tsx +++ b/src/tribler/ui/src/pages/Debug/Tunnels/index.tsx @@ -9,7 +9,7 @@ import Peers from "./Peers" export default function Tunnels() { return ( - + Circuits Relays Exit sockets diff --git a/src/tribler/ui/src/pages/Downloads/Details.tsx b/src/tribler/ui/src/pages/Downloads/Details.tsx index 7f4c156262..fc3778a54e 100644 --- a/src/tribler/ui/src/pages/Downloads/Details.tsx +++ b/src/tribler/ui/src/pages/Downloads/Details.tsx @@ -11,12 +11,14 @@ import Trackers from "./Trackers"; import { ScrollArea } from "@/components/ui/scroll-area"; import { Download } from "@/models/download.model"; import Pieces from "./Pieces"; -import { useEffect, useState } from "react"; +import { useEffect, useLayoutEffect, useRef, useState } from "react"; import { useTranslation } from "react-i18next"; export default function DownloadDetails({ selectedDownloads }: { selectedDownloads: Download[] }) { const [download, setDownload] = useState(); + const tabsRef = useRef(null); + const [contentStyle, setContentStyle] = useState<{ height?: string }>({}); useEffect(() => { setDownload((selectedDownloads.length == 1) ? selectedDownloads[0] : undefined); @@ -24,20 +26,31 @@ export default function DownloadDetails({ selectedDownloads }: { selectedDownloa const { t } = useTranslation(); + + useLayoutEffect(() => { + if (tabsRef.current && contentStyle?.height !== (tabsRef.current.offsetHeight - 40 + "px")) { + setContentStyle({ + // The 40px (CSS class h-10) is to compensate for the height of the TabsList + height: tabsRef.current.offsetHeight - 40 + "px", + }) + } + }); + if (!download) return null; return ( - - - - {t('Details')} - {t('Files')} - {t('Trackers')} - {t('Peers')} - - -
+ + + {t('Details')} + {t('Files')} + {t('Trackers')} + {t('Peers')} + + + + +
{t('Progress')}
@@ -80,17 +93,23 @@ export default function DownloadDetails({ selectedDownloads }: { selectedDownloa
{download?.availability}
-
- + + + + - - + + + + - - + + + + - -
- + + + ) }