mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-11 13:56:16 +00:00
style: update download group layout and styling for improved responsiveness
This commit is contained in:
@@ -216,6 +216,7 @@
|
||||
font-size: 14px;
|
||||
font-weight: 700;
|
||||
color: #ffffff;
|
||||
align-self: flex-end;
|
||||
}
|
||||
|
||||
&__progress-size {
|
||||
@@ -277,7 +278,9 @@
|
||||
|
||||
&__stat-content {
|
||||
display: flex;
|
||||
gap: 2px;
|
||||
justify-content: space-between;
|
||||
gap: calc(globals.$spacing-unit / 2);
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
&__stat-label {
|
||||
|
||||
@@ -4,9 +4,9 @@ import { Badge, Button } from "@renderer/components";
|
||||
import { formatDownloadProgress } from "@renderer/helpers";
|
||||
|
||||
import { Downloader, formatBytes, formatBytesToMbps } from "@shared";
|
||||
import { formatDistance, addMilliseconds } from "date-fns";
|
||||
import { addMilliseconds } from "date-fns";
|
||||
import { DOWNLOADER_NAME } from "@renderer/constants";
|
||||
import { useAppSelector, useDownload, useLibrary } from "@renderer/hooks";
|
||||
import { useAppSelector, useDownload, useLibrary, useDate } from "@renderer/hooks";
|
||||
|
||||
import "./download-group.scss";
|
||||
import { useTranslation } from "react-i18next";
|
||||
@@ -192,20 +192,15 @@ function HeroDownloadView({
|
||||
<div className="download-group__hero-progress">
|
||||
<div className="download-group__progress-row download-group__progress-row--bar">
|
||||
<div className="download-group__progress-wrapper">
|
||||
<div className="download-group__progress-info-row">
|
||||
<span className="download-group__progress-status">
|
||||
{getStatusText(game)}
|
||||
</span>
|
||||
<span className="download-group__progress-percentage">
|
||||
{formatDownloadProgress(currentProgress)}
|
||||
</span>
|
||||
</div>
|
||||
<div className="download-group__progress-info-row">
|
||||
<span className="download-group__progress-size">
|
||||
{isGameDownloading && lastPacket
|
||||
? `${formatBytes(lastPacket.download.bytesDownloaded)} / ${finalDownloadSize}`
|
||||
: `0 B / ${finalDownloadSize}`}
|
||||
</span>
|
||||
<span></span>
|
||||
</div>
|
||||
<div className="download-group__progress-info-row">
|
||||
<span className="download-group__progress-time">
|
||||
{isGameDownloading &&
|
||||
lastPacket?.timeRemaining &&
|
||||
@@ -213,6 +208,9 @@ function HeroDownloadView({
|
||||
? calculateETA()
|
||||
: ""}
|
||||
</span>
|
||||
<span className="download-group__progress-percentage">
|
||||
{formatDownloadProgress(currentProgress)}
|
||||
</span>
|
||||
</div>
|
||||
<div className="download-group__progress-bar">
|
||||
<div
|
||||
@@ -350,6 +348,8 @@ export function DownloadGroup({
|
||||
resumeSeeding,
|
||||
} = useDownload();
|
||||
|
||||
const { formatDistance } = useDate();
|
||||
|
||||
const peakSpeedsRef = useRef<Record<string, number>>({});
|
||||
const speedHistoryRef = useRef<Record<string, number[]>>({});
|
||||
const [dominantColors, setDominantColors] = useState<Record<string, string>>(
|
||||
|
||||
Reference in New Issue
Block a user