{stateIcon}
{/* A phone's narrow tray keeps the news and drops the name (the region names it). */}
{t("tray.title")} ·
{summary}
toggleFold("folded")}
>
);
}
/** What a tray row says under its title: how far it is, that it waits, why it failed, or that it is
* done — with the one thing to do about it in reach. */
function RowState({
job,
onShowError,
onRetry,
onOpen,
}: {
job: QueueJob;
onShowError: () => void;
onRetry: () => void;
onOpen: () => void;
}) {
const { t } = useTranslation();
if (job.status === "running") return ;
if (job.status === "error")
return (
{t(failCopyKeys(job, "short"))}
}
onClick={onRetry}
className="text-xs"
>
{t("downloads.actions.retry")}
);
if (job.status === "done")
return (
{t("tray.done.label")}
);
return {t(`downloads.status.${job.status}`)};
}