import { FC } from 'hono/jsx'; import { TopbarNav } from '../components/TopbarNav.js'; import type { UiSettings } from '../../config.js'; interface Props { settings?: UiSettings; error?: string; success?: string; } export const AnnouncementPage: FC = (props) => { const settings = props.settings || { enabled: false, announcementMarkdown: '' }; const menuItems = [ { href: '/admin/models', label: '模型' }, { href: '/admin/users', label: '用户' }, { href: '/admin/api-keys', label: 'API Keys' }, { href: '/admin/model-groups', label: '模型组' }, { href: '/admin/stats', label: '统计' }, { href: '/admin/announcement', label: '公告管理' }, { href: '/admin/password', label: '密码设置' }, { href: '/admin/privacy', label: '隐私保护' }, ]; return ( 公告管理 - LLM Gateway

公告管理

编辑将在前台首页顶部显示的公告内容(支持 Markdown 格式)

{props.error &&
{props.error}
} {props.success &&
{props.success}
}
{(settings.announcementMarkdown && settings.enabled) ? (

预览

) : null}
{settings.announcementMarkdown ? (