import React, { useContext } from 'react'; import { Table, Typography, Input } from 'antd'; import { isEmptyObject } from '../utils/format'; import KeyValueTable from "./components/key-value-table"; import { ServerStatusContext } from '../utils/server-status-context'; import adminStyles from '../styles/styles.module.scss'; const { Title } = Typography; const { TextArea } = Input; function SocialHandles({ config }) { if (!config) { return null; } const columns = [ { title: "Platform", dataIndex: "platform", key: "platform", }, { title: "URL", dataIndex: "url", key: "url", render: (url) => {url} }, ]; if (!config.instanceDetails?.socialHandles) { return null; } return (
Social Handles ); } function InstanceDetails({ config }) { if (!config || isEmptyObject(config)) { return null; } const { instanceDetails = {}, yp, streamKey, ffmpegPath, webServerPort } = config; const data = [ { name: "Server name", value: instanceDetails.name, }, { name: "Title", value: instanceDetails.title, }, { name: "Summary", value: instanceDetails.summary, }, { name: "Logo", value: instanceDetails.logo, }, { name: "Tags", value: instanceDetails.tags?.join(", "), }, { name: "NSFW", value: instanceDetails.nsfw?.toString(), }, { name: "Shows in Owncast directory", value: yp.enabled.toString(), }, ]; const configData = [ { name: "Stream key", value: streamKey, }, { name: "ffmpeg path", value: ffmpegPath, }, { name: "Web server port", value: webServerPort, }, ]; return ( <>
); } function PageContent({ config }) { if (!config?.instanceDetails?.extraPageContent) { return null; } return (
Page content