diff --git a/crates/librqbit/webui/src/index.tsx b/crates/librqbit/webui/src/index.tsx index 0dd08f0..835bd0e 100644 --- a/crates/librqbit/webui/src/index.tsx +++ b/crates/librqbit/webui/src/index.tsx @@ -1,6 +1,6 @@ import { StrictMode, createContext, memo, useContext, useEffect, useRef, useState } from 'react'; import ReactDOM from 'react-dom/client'; -import { ProgressBar, Button, Container, Row, Col, Alert, Modal, Form, Spinner } from 'react-bootstrap'; +import { ProgressBar, Button, Container, Row, Col, Alert, Modal, Form, Spinner, Table } from 'react-bootstrap'; import 'bootstrap/dist/css/bootstrap.min.css'; import './styles.scss'; @@ -96,35 +96,35 @@ interface TorrentStats { } | null; } -function TorrentRow({ detailsResponse, statsResponse }) { +const TorrentRow: React.FC<{ + detailsResponse: TorrentDetails, statsResponse: TorrentStats +}> = ({ detailsResponse, statsResponse }) => { const totalBytes = statsResponse.snapshot.total_bytes; const downloadedBytes = statsResponse.snapshot.have_bytes; + const finished = totalBytes == downloadedBytes; const downloadPercentage = (downloadedBytes / totalBytes) * 100; return ( -
{label}
-{value}
- -); - -const ColumnWithProgressBar = ({ label, percentage }) => ( -{label}
-| Name | +Size | +Progress | +Download Speed | +ETA | +Peers | +
|---|