import React from "react"; import { Button } from "@/components/button.tsx"; import { Shield, ExternalLink, Loader2, AlertCircle } from "lucide-react"; import { useTranslation } from "react-i18next"; interface OPKSSHDialogProps { isOpen: boolean; authUrl: string; requestId: string; stage: "chooser" | "waiting" | "authenticating" | "completed" | "error"; error?: string; providers?: Array<{ alias: string; issuer: string }>; onCancel: () => void; onOpenUrl: () => void; onSelectProvider?: (alias: string) => void; backgroundColor?: string; } export function OPKSSHDialog({ isOpen, authUrl, stage, error, providers, onCancel, onOpenUrl, onSelectProvider, backgroundColor, }: OPKSSHDialogProps) { const { t } = useTranslation(); if (!isOpen) return null; return (
{t("terminal.opksshAuthDescription")}
)}{stage === "waiting" ? t("terminal.opksshWaitingForAuth") : t("terminal.opksshAuthenticating")}
{t("common.error")}
{error}