"use client"; import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert"; import { ShieldCheck, ShieldOff, Eye, EyeOff } from "lucide-react"; import { useResourceContext } from "@app/hooks/useResourceContext"; import CopyToClipboard from "@app/components/CopyToClipboard"; import { InfoSection, InfoSectionContent, InfoSections, InfoSectionTitle } from "@app/components/InfoSection"; import { useTranslations } from "next-intl"; import CertificateStatus from "@app/components/private/CertificateStatus"; import { toUnicode } from "punycode"; import { useEnvContext } from "@app/hooks/useEnvContext"; type ResourceInfoBoxType = {}; export default function ResourceInfoBox({}: ResourceInfoBoxType) { const { resource, authInfo, updateResource } = useResourceContext(); const { env } = useEnvContext(); const t = useTranslations(); const fullUrl = `${resource.ssl ? "https" : "http"}://${toUnicode(resource.fullDomain || "")}`; return ( {/* 4 cols because of the certs */} {t("identifier")} {resource.niceId} {resource.http ? ( <> {t("authentication")} {authInfo.password || authInfo.pincode || authInfo.sso || authInfo.whitelist || authInfo.headerAuth ? (
{t("protected")}
) : (
{t("notProtected")}
)}
URL {/* {isEnabled && ( Socket {isAvailable ? (
Online
) : (
Offline
)}
)} */} ) : ( <> {t("protocol")} {resource.protocol.toUpperCase()} {t("port")} {/* {build == "oss" && ( {t("externalProxyEnabled")} {resource.enableProxy ? t("enabled") : t("disabled")} )} */} )} {/* */} {/* {t('visibility')} */} {/* */} {/* */} {/* {resource.enabled ? t('enabled') : t('disabled')} */} {/* */} {/* */} {/* */} {/* Certificate Status Column */} {resource.http && resource.domainId && resource.fullDomain && env.flags.usePangolinDns && ( {t("certificateStatus", { defaultValue: "Certificate" })} )} {t("visibility")} {resource.enabled ? (
{t("enabled")}
) : (
{t("disabled")}
)}
); }