"use client"; import { Box, Group, Loader, Paper, Stack, Text, ThemeIcon, Timeline } from "@mantine/core"; import { IconCheck, IconDatabase, IconLoader } from "@tabler/icons-react"; import { useScopedI18n } from "@homarr/translation/client"; import type { MigrationProgress } from "./use-backup-analysis"; interface MigrationProgressPanelProps { progress: MigrationProgress; } export const MigrationProgressPanel = ({ progress }: MigrationProgressPanelProps) => { const t = useScopedI18n("management.page.tool.backup.restore.migration"); return ( {t("title", { current: String(progress.current), total: String(progress.total) })} {Array.from({ length: progress.total }, (_, i) => { const isDone = i < progress.current - 1 || (i === progress.current - 1 && progress.phase === "done"); const isActive = i === progress.current - 1 && progress.phase === "applying"; return ( ) : isActive ? ( ) : ( ) } title={ {i === progress.current - 1 ? progress.tag : t("migrationLabel", { index: String(i + 1) })} } /> ); })} ); };