import { Card, CardContent, CardHeader, CardTitle, } from '@affine/admin/components/ui/card'; import { ScrollArea } from '@affine/admin/components/ui/scroll-area'; import { Separator } from '@affine/admin/components/ui/separator'; import { AboutAFFiNE } from './about'; import type { DatabaseConfig, MailerConfig, ServerConfig, } from './use-server-service-configs'; import { useServerServiceConfigs } from './use-server-service-configs'; export function ConfigPage() { return (
Config
); } const ServerCard = ({ serverConfig }: { serverConfig?: ServerConfig }) => { if (!serverConfig) return null; return ( Server
Domain
{serverConfig.host}
Port
{serverConfig.port}
HTTPS Prefix
{serverConfig.https.toString()}
External Url
{serverConfig.externalUrl}
); }; const DatabaseCard = ({ databaseConfig, }: { databaseConfig?: DatabaseConfig; }) => { if (!databaseConfig) return null; return ( Database
Domain
{databaseConfig.host}
Port
{databaseConfig.port}
User
{databaseConfig.user}
Database
{databaseConfig.database}
); }; const MailerCard = ({ mailerConfig }: { mailerConfig?: MailerConfig }) => { if (!mailerConfig) return null; return ( Email
Provider Domain
{mailerConfig.host}
Port
{mailerConfig.port}
Sender
{mailerConfig.sender}
); }; export function ServerServiceConfig() { const { serverConfig, mailerConfig, databaseConfig } = useServerServiceConfigs(); return (
Server Config
These settings are controlled by Docker environment variables. Refer to the Selfhost documentation.
); } export { ConfigPage as Component };