Update AppImage

This commit is contained in:
MacRimi
2025-11-19 17:30:01 +01:00
parent b368fde82d
commit 8e8e8161bb
2 changed files with 14 additions and 6 deletions

View File

@@ -206,8 +206,12 @@ export function NetworkMetrics() {
)
}
const trafficInFormatted = formatNetworkTraffic(networkTotals.received * 1024 * 1024 * 1024, networkUnit)
const trafficOutFormatted = formatNetworkTraffic(networkTotals.sent * 1024 * 1024 * 1024, networkUnit)
const trafficInFormatted = networkUnit === "Bits"
? `${(networkTotals.received * 8).toFixed(2)} Gb`
: `${networkTotals.received.toFixed(2)} GB`
const trafficOutFormatted = networkUnit === "Bits"
? `${(networkTotals.sent * 8).toFixed(2)} Gb`
: `${networkTotals.sent.toFixed(2)} GB`
const packetsRecvK = networkData.traffic.packets_recv ? (networkData.traffic.packets_recv / 1000).toFixed(0) : "0"
const totalErrors = (networkData.traffic.errin || 0) + (networkData.traffic.errout || 0)
@@ -883,7 +887,9 @@ export function NetworkMetrics() {
{networkUnit === "Bits" ? "Bits Received" : "Bytes Received"}
</div>
<div className="font-medium text-green-500 text-lg">
{formatNetworkTraffic(interfaceTotals.received * 1024 * 1024 * 1024, networkUnit)}
{networkUnit === "Bits"
? `${(interfaceTotals.received * 8).toFixed(2)} Gb`
: `${interfaceTotals.received.toFixed(2)} GB`}
</div>
</div>
<div>
@@ -891,7 +897,9 @@ export function NetworkMetrics() {
{networkUnit === "Bits" ? "Bits Sent" : "Bytes Sent"}
</div>
<div className="font-medium text-blue-500 text-lg">
{formatNetworkTraffic(interfaceTotals.sent * 1024 * 1024 * 1024, networkUnit)}
{networkUnit === "Bits"
? `${(interfaceTotals.sent * 8).toFixed(2)} Gb`
: `${interfaceTotals.sent.toFixed(2)} GB`}
</div>
</div>
</div>

View File

@@ -674,14 +674,14 @@ export function SystemOverview() {
<div className="flex justify-between items-center">
<span className="text-sm text-muted-foreground">Received:</span>
<span className="text-lg font-semibold text-green-500 flex items-center gap-1">
{formatNetworkTraffic(networkTotals.received, networkUnit)}
{networkData.traffic.bytes_recv.toFixed(2)} {networkUnit === "Bits" ? "Gb" : "GB"}
<span className="text-xs text-muted-foreground">({getTimeframeLabel(networkTimeframe)})</span>
</span>
</div>
<div className="flex justify-between items-center">
<span className="text-sm text-muted-foreground">Sent:</span>
<span className="text-lg font-semibold text-blue-500 flex items-center gap-1">
{formatNetworkTraffic(networkTotals.sent, networkUnit)}
{networkData.traffic.bytes_sent.toFixed(2)} {networkUnit === "Bits" ? "Gb" : "GB"}
<span className="text-xs text-muted-foreground">({getTimeframeLabel(networkTimeframe)})</span>
</span>
</div>