Tweak footer
This commit is contained in:
parent
0c9a5093d0
commit
e8ef1f170d
3 changed files with 16 additions and 12 deletions
|
|
@ -2,19 +2,23 @@ import { formatBytes } from "../helper/formatBytes";
|
|||
import { formatSecondsToTime } from "../helper/formatSecondsToTime";
|
||||
import { useStatsStore } from "../stores/statsStore";
|
||||
|
||||
const FooterPiece: React.FC<{ children: React.ReactNode }> = ({ children }) => {
|
||||
return <div className="p-1">{children}</div>;
|
||||
};
|
||||
|
||||
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-2 gap-x-5 justify-evenly flex-wrap">
|
||||
<div>
|
||||
<div className="sticky bottom-0 bg-white/10 dark:text-gray-200 backdrop-blur text-nowrap text-xs font-medium text-gray-500 flex gap-x-1 lg:gap-x-5 justify-evenly flex-wrap">
|
||||
<FooterPiece>
|
||||
↓ {stats.download_speed.human_readable} (
|
||||
{formatBytes(stats.fetched_bytes)})
|
||||
</div>
|
||||
<div>
|
||||
</FooterPiece>
|
||||
<FooterPiece>
|
||||
↑ {stats.upload_speed.human_readable} (
|
||||
{formatBytes(stats.uploaded_bytes)})
|
||||
</div>
|
||||
<div>up {formatSecondsToTime(stats.uptime_seconds)}</div>
|
||||
</FooterPiece>
|
||||
<FooterPiece>up {formatSecondsToTime(stats.uptime_seconds)}</FooterPiece>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -61,8 +61,8 @@ export const TorrentRow: React.FC<{
|
|||
detailsResponse?.files
|
||||
.map((f, id) => ({ f, id }))
|
||||
.filter(({ f }) => f.included)
|
||||
.map(({ id }) => id) ?? [],
|
||||
),
|
||||
.map(({ id }) => id) ?? []
|
||||
)
|
||||
);
|
||||
}, [detailsResponse]);
|
||||
|
||||
|
|
@ -87,7 +87,7 @@ export const TorrentRow: React.FC<{
|
|||
text: "Error configuring torrent",
|
||||
details: e as ErrorDetails,
|
||||
});
|
||||
},
|
||||
}
|
||||
)
|
||||
.finally(() => setSavingSelectedFiles(false));
|
||||
};
|
||||
|
|
@ -104,7 +104,7 @@ export const TorrentRow: React.FC<{
|
|||
{detailsResponse && (
|
||||
<div className="flex items-center gap-2">
|
||||
<div className="md:hidden">{statusIcon("w-5 h-5")}</div>
|
||||
<div className="text-left text-lg text-gray-900 text-ellipsis break-all dark:text-slate-200">
|
||||
<div className="text-left text-sm lg:text-lg text-gray-900 text-ellipsis break-all dark:text-slate-200">
|
||||
{torrentDisplayName(detailsResponse)}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ const RootWithVersion = () => {
|
|||
API.getVersion().then(
|
||||
(version) => {
|
||||
setVersion(version);
|
||||
const title = `rqbit web UI - v${version}`;
|
||||
const title = `rqbit web - v${version}`;
|
||||
document.title = title;
|
||||
return 10000;
|
||||
},
|
||||
|
|
@ -26,7 +26,7 @@ const RootWithVersion = () => {
|
|||
|
||||
return (
|
||||
<APIContext.Provider value={API}>
|
||||
<RqbitWebUI title="rqbit web UI" version={version} />
|
||||
<RqbitWebUI title="rqbit" version={version} />
|
||||
</APIContext.Provider>
|
||||
);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue