import React from "react" import * as antd from "antd" import { Icons } from "components/Icons" import config from "config" import "./index.less" const connectionsTooltipStrings = { secure: "This connection is secure", insecure: "This connection is insecure, cause it's not using HTTPS protocol and the server cannot be verified on the trusted certificate authority.", warning: "This connection is secure but the server cannot be verified on the trusted certificate authority.", } const Footer = () => { const isDevMode = window.__evite?.env?.NODE_ENV !== "production" return
{config.app?.siteName}
v{window.app.version}
{isDevMode ? : } {isDevMode ? "development" : "production"}
} export default { id: "about", icon: "Info", label: "About", group: "bottom", render: () => { const isProduction = import.meta.env.PROD const [serverManifest, setServerManifest] = React.useState(null) const [serverOrigin, setServerOrigin] = React.useState(null) const [serverHealth, setServerHealth] = React.useState(null) const [secureConnection, setSecureConnection] = React.useState(false) const checkServerVersion = async () => { const serverManifest = await app.cores.api.customRequest() setServerManifest(serverManifest.data) } const checkServerOrigin = async () => { const instance = app.cores.api.instance() if (instance) { setServerOrigin(instance.origin) if (instance.origin.startsWith("https")) { setSecureConnection(true) } } } const featchServerHealth = async () => { const response = await app.cores.api.customRequest({ method: "GET", url: "/server/health", }).catch(() => null) console.log(response.data) if (response) { setServerHealth(response.data) } } React.useEffect(() => { checkServerVersion() checkServerOrigin() featchServerHealth() }, []) return
Logo

{config.app.siteName}

{config.author} Licensed with {config.package?.license ?? "unlicensed"}
v{window.app.version ?? "experimental"} {isProduction ? : } {String(import.meta.env.MODE)}

Server information

Origin

: } > { secureConnection ? " Secure connection" : "Insecure connection" }
{serverOrigin ?? "Unknown"}

Version

{serverManifest?.version ?? "Unknown"}

Instance usage

{ serverManifest?.LINEBRIDGE_SERVER_VERSION &&
Powered by Linebridgeâ„¢
}
} }