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 (
);
}
const ServerCard = ({ serverConfig }: { serverConfig?: ServerConfig }) => {
if (!serverConfig) return null;
return (
Server
Domain
{serverConfig.host}
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}
Sender
{mailerConfig.sender}
);
};
export function ServerServiceConfig() {
const { serverConfig, mailerConfig, databaseConfig } =
useServerServiceConfigs();
return (
);
}
export { ConfigPage as Component };