import { openUrl } from "@tauri-apps/plugin-opener"; import type { UpdateInfo } from "../../lib/types"; import Modal from "../ui/Modal"; import Button from "../ui/Button"; import { formatBytes } from "../../lib/formatBytes"; interface Props { updateInfo: UpdateInfo; currentVersion: string; onDismiss: () => void; onClose: () => void; } export default function UpdateDialog({ updateInfo, currentVersion, onDismiss, onClose, }: Props) { const handleDownload = async (url: string) => { try { await openUrl(url); } catch (e) { console.error("Failed to open URL:", e); } }; return ( } >
{currentVersion} {updateInfo.version}
{updateInfo.body && (

Release notes

{updateInfo.body}
)} {updateInfo.assets.length > 0 && (

Downloads

{updateInfo.assets.map((asset) => ( ))}
)}
); }