"use client"; import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert"; import { InfoIcon, ShieldCheck, ShieldOff } 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 { build } from "@server/build"; import { toUnicode } from 'punycode'; type ResourceInfoBoxType = {}; export default function ResourceInfoBox({ }: ResourceInfoBoxType) { const { resource, authInfo } = useResourceContext(); const t = useTranslations(); const fullUrl = `${resource.ssl ? "https" : "http"}://${toUnicode(resource.fullDomain || "")}`; return ( {resource.http ? ( <> {t("authentication")} {authInfo.password || authInfo.pincode || authInfo.sso || authInfo.whitelist ? (
{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")}
); }