mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-01-24 14:04:54 +03:00
feat: updating settings general
This commit is contained in:
parent
3a16eb2913
commit
eb3eb88f23
@ -62,13 +62,12 @@ export function Downloads() {
|
|||||||
const getFinalDownloadSize = (game: Game) => {
|
const getFinalDownloadSize = (game: Game) => {
|
||||||
const isGameDownloading = lastPacket?.game.id === game.id;
|
const isGameDownloading = lastPacket?.game.id === game.id;
|
||||||
|
|
||||||
if (!game) return "N/A";
|
|
||||||
if (game.fileSize) return formatBytes(game.fileSize);
|
if (game.fileSize) return formatBytes(game.fileSize);
|
||||||
|
|
||||||
if (lastPacket?.game.fileSize && isGameDownloading)
|
if (lastPacket?.game.fileSize && isGameDownloading)
|
||||||
return formatBytes(lastPacket?.game.fileSize);
|
return formatBytes(lastPacket?.game.fileSize);
|
||||||
|
|
||||||
return game.repack?.fileSize ?? "N/A";
|
return "N/A";
|
||||||
};
|
};
|
||||||
|
|
||||||
const getGameInfo = (game: Game) => {
|
const getGameInfo = (game: Game) => {
|
||||||
|
@ -21,13 +21,12 @@ export function HeroPanel() {
|
|||||||
const { progress, eta, lastPacket, isGameDeleting } = useDownload();
|
const { progress, eta, lastPacket, isGameDeleting } = useDownload();
|
||||||
|
|
||||||
const finalDownloadSize = useMemo(() => {
|
const finalDownloadSize = useMemo(() => {
|
||||||
if (!game) return "N/A";
|
if (game?.fileSize) return formatBytes(game.fileSize);
|
||||||
if (game.fileSize) return formatBytes(game.fileSize);
|
|
||||||
|
|
||||||
if (lastPacket?.game.fileSize && game?.status === "active")
|
if (lastPacket?.game.fileSize && game?.status === "active")
|
||||||
return formatBytes(lastPacket?.game.fileSize);
|
return formatBytes(lastPacket?.game.fileSize);
|
||||||
|
|
||||||
return game.repack?.fileSize ?? "N/A";
|
return "N/A";
|
||||||
}, [game, lastPacket?.game]);
|
}, [game, lastPacket?.game]);
|
||||||
|
|
||||||
const isGameDownloading =
|
const isGameDownloading =
|
||||||
|
Loading…
Reference in New Issue
Block a user