Add global stats to UI (not desktop yet)
This commit is contained in:
parent
ae606fac4a
commit
61b7a643aa
6 changed files with 89 additions and 11 deletions
12
crates/librqbit/webui/src/components/Footer.tsx
Normal file
12
crates/librqbit/webui/src/components/Footer.tsx
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
import { useStatsStore } from "../stores/statsStore";
|
||||
import { Speed } from "./Speed";
|
||||
|
||||
export const Footer: React.FC<{}> = () => {
|
||||
let stats = useStatsStore((stats) => stats.stats);
|
||||
return (
|
||||
<div className="sticky bottom-0 bg-white/10 dark:text-gray-200 backdrop-blur text-nowrap text-xs font-medium text-gray-500 flex p-1 gap-x-3 justify-center">
|
||||
<div>↓ {stats.download_speed.human_readable}</div>
|
||||
<div>↑ {stats.upload_speed.human_readable}</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
|
@ -19,7 +19,9 @@ export const TorrentsList = (props: {
|
|||
<p className="text-center">No existing torrents found.</p>
|
||||
) : (
|
||||
props.torrents.map((t: TorrentId) => (
|
||||
<Torrent id={t.id} key={t.id} torrent={t} />
|
||||
<>
|
||||
<Torrent id={t.id} key={t.id} torrent={t} />
|
||||
</>
|
||||
))
|
||||
)}
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue