import { useTranslation } from "react-i18next"; import { openUrl } from "@tauri-apps/plugin-opener"; import { Download } from "lucide-react"; import { purchaseUrl } from "../../shared/purchaseUrl"; import { logError } from "../../services/logService"; const DEFAULT_LAYOUT = "inline-flex items-center justify-center gap-2 text-sm"; const COLOURS = "text-[var(--primary)] hover:underline"; interface DownloadLatestButtonProps { /** Replaces the default layout classes; colours stay fixed. */ className?: string; } /** * "Download the latest version", shown in the free edition where automatic updates * are locked (issue #346). It opens the product page, which serves the latest * installers directly (la-compagnie-maximus#153). No update check runs here: the * free edition makes no network call for updates. A failure to open the browser * is logged, like PurchaseButton's. */ export default function DownloadLatestButton({ className = DEFAULT_LAYOUT, }: DownloadLatestButtonProps) { const { t, i18n } = useTranslation(); return ( ); }