118 lines
4.2 KiB
TypeScript
118 lines
4.2 KiB
TypeScript
import { WidgetDefinition } from "@site/src/types";
|
|
import { IconDownload } from "@tabler/icons-react";
|
|
|
|
const columnsList = [
|
|
"name",
|
|
"progress",
|
|
"size",
|
|
"downSpeed",
|
|
"upSpeed",
|
|
"time",
|
|
"state",
|
|
"added",
|
|
"ratio",
|
|
"received",
|
|
"sent",
|
|
"category",
|
|
"integration",
|
|
"index",
|
|
"type",
|
|
];
|
|
const sortColumns = columnsList.filter((c) => !["state", "category", "integration"].includes(c));
|
|
|
|
export const downloadsWidget: WidgetDefinition = {
|
|
icon: IconDownload,
|
|
name: "Download Client",
|
|
description: "Allows you to view and manage your Downloads from both Torrent and Usenet clients.",
|
|
path: "../../widgets/downloads",
|
|
configuration: {
|
|
items: [
|
|
{
|
|
name: "Columns to show",
|
|
description:
|
|
"Select the columns you want to display in the widget. Compact layouts automatically hide/show selected columns based on widget width and height; advanced view keeps the selected columns visible.",
|
|
values: `List of columns: ${columnsList.join(", ")}`,
|
|
defaultValue: ["name", "progress", "downSpeed", "time", "state"].join(", "),
|
|
},
|
|
{
|
|
name: "Default sort column",
|
|
description:
|
|
"The column used for initial sorting when the widget loads. Clicking a column header changes the current view only.",
|
|
defaultValue: "progress",
|
|
values: `List of columns: ${sortColumns.join(", ")}`,
|
|
},
|
|
{
|
|
name: "Invert sorting",
|
|
description: "This sets the initial sorting direction.",
|
|
values: { type: "boolean" },
|
|
defaultValue: "no",
|
|
},
|
|
{
|
|
name: "Show usenet entries marked as completed",
|
|
description: "This will show entries that have been completed in your Usenet client.",
|
|
values: { type: "boolean" },
|
|
defaultValue: "yes",
|
|
},
|
|
{
|
|
name: "Show torrent entries marked as completed",
|
|
description: "This will show entries that have been completed in your Torrent client.",
|
|
values: { type: "boolean" },
|
|
defaultValue: "yes",
|
|
},
|
|
{
|
|
name: "Show Miscellaneous entries marked as completed",
|
|
description: "This will show entries that have been completed in your Miscellaneous client.",
|
|
values: { type: "boolean" },
|
|
defaultValue: "yes",
|
|
},
|
|
{
|
|
name: "Hide completed torrent under this threshold",
|
|
description:
|
|
"This hides completed torrents whose upload speed is below the threshold. The input uses KiB/s with binary units and KB/s with decimal units.",
|
|
values: "Any number above 0, 0 to disable",
|
|
defaultValue: "0",
|
|
},
|
|
{
|
|
name: "Categories/labels to filter",
|
|
description: "You can filter the items by categories or labels. Use a comma to separate multiple values.",
|
|
values: "Comma-separated list of categories or labels",
|
|
defaultValue: "-",
|
|
},
|
|
{
|
|
name: "Filter as a whitelist",
|
|
description:
|
|
"If enabled, only items that match the filter will be shown. If disabled, items that do not match the filter will be hidden.",
|
|
values: { type: "boolean" },
|
|
defaultValue: "no",
|
|
},
|
|
{
|
|
name: "Use category filter for global torrent ratio",
|
|
description:
|
|
"When enabled, the configured category/label filter is applied to the global torrent ratio. Footer client/status filters do not change this ratio.",
|
|
values: { type: "boolean" },
|
|
defaultValue: "yes",
|
|
},
|
|
{
|
|
name: "Limit items per integration",
|
|
description: "This will limit the number of items shown per integration, not globally.",
|
|
values: "Any whole number from 1 upward",
|
|
defaultValue: "50",
|
|
},
|
|
{
|
|
name: "Include archived SABnzbd history",
|
|
description:
|
|
"When enabled, the selected day window applies to finished normal and archived SABnzbd history. Queue and processing jobs remain visible.",
|
|
values: { type: "boolean" },
|
|
defaultValue: "no",
|
|
},
|
|
{
|
|
name: "Archived history window (days)",
|
|
description:
|
|
"At most 10,000 archived records are scanned. The item limit still controls how many rows are shown.",
|
|
values: "Any positive whole number of days",
|
|
defaultValue: "7",
|
|
},
|
|
],
|
|
},
|
|
};
|