"use client" import { Clock } from "lucide-react" import { useTranslations } from "next-intl" import { useTaskContext } from "@/contexts/task-context" import { Skeleton } from "@/components/ui/skeleton" import { Popover, PopoverContent, PopoverTrigger, } from "@/components/ui/popover" function Spinner({ className }: { className?: string }) { return (
) } export function StatusBarTasks() { const t = useTranslations("Folder.statusBar.tasks") const { tasks } = useTaskContext() if (tasks.length === 0) return null const runningTask = tasks.find( (t) => t.status === "running" || t.status === "pending" ) return (
{runningTask && (
{runningTask.label || runningTask.description}
)}
{t("title")}
{tasks.map((task) => (
{task.status === "running" ? ( ) : ( )} {task.label}
{task.status === "running" && task.progress != null && (
)}
))}
) }