Update AppImage

This commit is contained in:
MacRimi
2025-11-19 18:43:08 +01:00
parent e1a42189a6
commit 6e78fa0b1f

View File

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