- Channels: the row's full-history, hide and unsubscribe buttons become its "…" at the row end (useChannelActions: open, pin, YouTube, copy name / link, full history or the admin reset, hide with an undo toast, unsubscribe behind its danger confirm); the card layout docks the "…" beside the name (ChannelLayoutGrid moreKey). The admin reset's confirm now names the reset. - Plex playlist page: a title, a show group and a season each open the page's one row menu (a title's is its usePlexCardActions list plus the removal); no X at rest; removals take an undo toast whose Undo puts every row back at its own index in one request (bulk add `positions`); j/k walk the visible rows, Delete removes the walked one; rename and delete in the header's "…". - notify: a toast with an action lives at least 8 s (the owner's call), whatever the toast setting.
31 lines
1.2 KiB
TypeScript
31 lines
1.2 KiB
TypeScript
import { useTranslation } from "react-i18next";
|
|
import { Check } from "lucide-react";
|
|
import type { ManagedChannel } from "../lib/api";
|
|
import { formatNumber } from "../lib/format";
|
|
import Tooltip from "./ui/Tooltip";
|
|
import { isFullySynced } from "./channelSync";
|
|
|
|
// The Channels-manager cells that are components in their own right (they read i18n), split out of
|
|
// channelColumns so that file holds only the column factory and its predicates (Fast Refresh).
|
|
|
|
// The Stored count, with a "fully synced" ✓ charm to the left of the number when recent uploads and
|
|
// full history are both in — folding the retired Sync column's at-a-glance status into the value it
|
|
// describes. Full detail stays in the hover tooltip.
|
|
export function StoredCell({ c }: { c: ManagedChannel }) {
|
|
const { t } = useTranslation();
|
|
return (
|
|
<span className="inline-flex items-center justify-end gap-1 text-muted tabular-nums">
|
|
{isFullySynced(c) && (
|
|
<Tooltip hint={t("channels.row.fullySyncedHint")}>
|
|
<Check
|
|
role="img"
|
|
className="w-3.5 h-3.5 text-accent shrink-0 cursor-help"
|
|
aria-label={t("channels.row.fullySynced")}
|
|
/>
|
|
</Tooltip>
|
|
)}
|
|
{formatNumber(c.stored_videos)}
|
|
</span>
|
|
);
|
|
}
|