import { type ReactNode } from "react"; import { useTranslation } from "react-i18next"; import { Browser } from "@wailsio/runtime"; import { DownloadIcon, NotepadText } from "lucide-react"; import { Button } from "@/components/buttons/Button"; import { useClientVersion } from "@/contexts/ClientVersionContext"; import { cn } from "@/lib/cn"; const GITHUB_RELEASES = "https://github.com/netbirdio/netbird/releases/latest"; function openUrl(url: string) { Browser.OpenURL(url).catch(() => { window.open(url, "_blank"); }); } export function UpdateVersionCard() { const { t } = useTranslation(); const { updateVersion, enforced, triggerUpdate } = useClientVersion(); if (updateVersion) { const titleKey = enforced ? "update.card.versionAvailableInstall" : "update.card.versionAvailableDownload"; return (
{t(titleKey, { version: updateVersion })} {t("update.card.whatsNew")}
{enforced ? ( ) : ( )}
); } return (
{t("update.card.onLatestVersion")}

{t("update.card.autoCheckInterval")}

); } function Card({ children, className }: Readonly<{ children: ReactNode; className?: string }>) { return (
{children}
); } function Title({ children }: Readonly<{ children: ReactNode }>) { return

{children}

; } function Link({ url, children }: Readonly<{ url: string; children: ReactNode }>) { return ( ); }