mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
refactor: change file name
This commit is contained in:
parent
28d1aec413
commit
f710dcdd49
6 changed files with 15 additions and 15 deletions
|
@ -11,7 +11,7 @@ import { NoEntryIcon, PlusCircleIcon } from "@primer/octicons-react";
|
|||
import { BinaryNotFoundModal } from "../shared-modals/binary-not-found-modal";
|
||||
import * as styles from "./hero-panel.css";
|
||||
import { useDate } from "@renderer/hooks/use-date";
|
||||
import { byteFormat } from "@renderer/utils";
|
||||
import { formatBytes } from "@renderer/utils";
|
||||
|
||||
export interface HeroPanelProps {
|
||||
game: Game | null;
|
||||
|
@ -120,10 +120,10 @@ export function HeroPanel({
|
|||
|
||||
const finalDownloadSize = useMemo(() => {
|
||||
if (!game) return "N/A";
|
||||
if (game.fileSize) return byteFormat(game.fileSize);
|
||||
if (game.fileSize) return formatBytes(game.fileSize);
|
||||
|
||||
if (gameDownloading?.fileSize && isGameDownloading)
|
||||
return byteFormat(gameDownloading.fileSize);
|
||||
return formatBytes(gameDownloading.fileSize);
|
||||
|
||||
return game.repack?.fileSize ?? "N/A";
|
||||
}, [game, isGameDownloading, gameDownloading]);
|
||||
|
@ -170,7 +170,7 @@ export function HeroPanel({
|
|||
</>
|
||||
) : (
|
||||
<p className={styles.downloadDetailsRow}>
|
||||
{byteFormat(gameDownloading?.bytesDownloaded)} /{" "}
|
||||
{formatBytes(gameDownloading?.bytesDownloaded)} /{" "}
|
||||
{finalDownloadSize}
|
||||
<small>
|
||||
{numPeers} peers / {numSeeds} seeds
|
||||
|
@ -190,7 +190,7 @@ export function HeroPanel({
|
|||
})}
|
||||
</p>
|
||||
<p>
|
||||
{byteFormat(game.bytesDownloaded)} / {finalDownloadSize}
|
||||
{formatBytes(game.bytesDownloaded)} / {finalDownloadSize}
|
||||
</p>
|
||||
</>
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue