{label}
diff --git a/src/components/tables/filetreetable.tsx b/src/components/tables/filetreetable.tsx
index ebe7e54..851adf8 100644
--- a/src/components/tables/filetreetable.tsx
+++ b/src/components/tables/filetreetable.tsx
@@ -21,7 +21,7 @@ import type { Row, ColumnDef, CellContext } from "@tanstack/react-table";
import type { CachedFileTree, FileDirEntry } from "../../cachedfiletree";
import { isDirEntry } from "../../cachedfiletree";
import { ConfigContext, ServerConfigContext } from "../../config";
-import { PriorityColors, PriorityStrings } from "../../rpc/transmission";
+import { Status, PriorityColors, PriorityStrings } from "../../rpc/transmission";
import { bytesToHumanReadableStr, pathMapFromServer } from "../../trutil";
import { ProgressBar } from "../progressbar";
import * as Icon from "react-bootstrap-icons";
@@ -136,7 +136,7 @@ function ByteSizeField(props: TableFieldProps) {
function PercentBarField(props: TableFieldProps) {
const now = props.entry.percent ?? 0;
- return
;
+ return
;
}
function PriorityField(props: TableFieldProps) {
diff --git a/src/components/tables/peerstable.tsx b/src/components/tables/peerstable.tsx
index 1e58f3c..08f7458 100644
--- a/src/components/tables/peerstable.tsx
+++ b/src/components/tables/peerstable.tsx
@@ -19,6 +19,7 @@
import type { AccessorFn, CellContext, ColumnDef } from "@tanstack/react-table";
import React, { useMemo, useCallback } from "react";
import type { Torrent, PeerStats } from "rpc/torrent";
+import { Status } from "../../rpc/transmission";
import { bytesToHumanReadableStr } from "trutil";
import { TrguiTable, useStandardSelect } from "./common";
import { ProgressBar } from "components/progressbar";
@@ -81,7 +82,7 @@ function PercentField(props: TableFieldProps) {
now={now}
className="white-outline"
animate={active}
- status="Downloading" />;
+ status={Status.downloading} />;
}
const Columns = AllFields.map((field): ColumnDef
=> {
diff --git a/src/components/tables/torrenttable.tsx b/src/components/tables/torrenttable.tsx
index 20d0488..f8f32f5 100644
--- a/src/components/tables/torrenttable.tsx
+++ b/src/components/tables/torrenttable.tsx
@@ -301,16 +301,15 @@ function ByteRateField(props: TableFieldProps) {
function PercentBarField(props: TableFieldProps) {
let now: number = props.torrent[props.fieldName] * 100;
let label: string = '';
- const active = props.torrent.rateDownload > 0 || props.torrent.rateUpload > 0;
- let status: string = StatusStrings[props.torrent.status];
- if ((props.torrent.error !== undefined && props.torrent.error > 0) ||
- props.torrent.cachedError !== "") {
- status = "Error";
+ let status: number = props.torrent.status;
+ if ((props.torrent.error !== undefined && props.torrent.error > 0) || props.torrent.cachedError !== "") {
+ status = Status.error;
} else if (props.torrent.status === Status.downloading && props.torrent.pieceCount === 0) {
- status = "Magnetizing";
now = 100;
label = "🧲";
+ status = Status.magnetizing;
}
+ const active = props.torrent.rateDownload > 0 || props.torrent.rateUpload > 0;
return :first-child {
+ background: #0054ae;
+}
+
.progressbar.green>:first-child {
background: #36B24D;
}
-.progressbar.green.dark>:first-child {
+.progressbar.dark-green>:first-child {
background: #1d8931;
}
@@ -45,7 +49,7 @@
background: #FA5352;
}
-.progressbar.red.dark>:first-child {
+.progressbar.dark-red>:first-child {
background: #C92B2A;
}
diff --git a/src/rpc/transmission.ts b/src/rpc/transmission.ts
index 4169d38..23fa5ea 100644
--- a/src/rpc/transmission.ts
+++ b/src/rpc/transmission.ts
@@ -29,6 +29,8 @@ export const Status = {
downloading: 4,
queuedToSeed: 5,
seeding: 6,
+ magnetizing: -1,
+ error: -2,
} as const;
export const StatusStrings = [
@@ -39,6 +41,8 @@ export const StatusStrings = [
"Downloading",
"Waiting",
"Seeding",
+ "Magnetizing",
+ "Error",
] as const;
const PriorityNumbers = [-1, 0, 1] as const;