feat: 完善官网配置、预约管理与文章编辑

This commit is contained in:
zhanjunhao
2026-10-31 19:02:58 +08:00
parent 7b80c3bbb3
commit 1bf13bc226
54 changed files with 4898 additions and 203 deletions
+88
View File
@@ -0,0 +1,88 @@
/*
Copyright (C) 2025 QuantumNous
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com
*/
import React from 'react';
import { Card, Input, Tag, Typography } from '@douyinfe/semi-ui';
import { CalendarDays, Globe } from 'lucide-react';
import { useTranslation } from 'react-i18next';
export default function AdminMenuPreview({ type }) {
const { t } = useTranslation();
const isWebsite = type === 'website';
const Icon = isWebsite ? Globe : CalendarDays;
const title = isWebsite ? t('官网设置') : t('预约演示');
return (
<div className='mt-[60px] px-2 pb-6 md:px-4'>
<div className='mb-6 flex flex-wrap items-center gap-3'>
<Icon size={28} className='text-blue-500' />
<Typography.Title heading={3} style={{ margin: 0 }}>
{title}
</Typography.Title>
<Tag color='blue'>{t('功能预览')}</Tag>
</div>
<Typography.Paragraph type='tertiary'>
{t('当前为示例内容,仅用于预览页面,暂未接入数据保存。')}
</Typography.Paragraph>
{isWebsite ? (
<Card title={t('官网基础信息')}>
<div className='grid max-w-3xl gap-5 md:grid-cols-2'>
{[
[t('网站名称'), t('Monkey AI 官网')],
[t('官网地址'), 'https://www.example.com'],
[t('首页标题'), t('让 AI 为业务创造更多价值')],
[t('联系邮箱'), 'contact@example.com'],
].map(([label, value]) => (
<label key={label} className='flex flex-col gap-2'>
<span>{label}</span>
<Input value={value} readOnly />
</label>
))}
</div>
</Card>
) : (
<Card title={t('预约演示列表')}>
<div className='overflow-x-auto'>
<table className='w-full min-w-[560px] text-left text-sm'>
<thead>
<tr className='border-b border-[var(--semi-color-border)]'>
{['联系人', '企业名称', '演示需求', '状态'].map((label) => (
<th key={label} className='px-3 py-3 font-medium'>
{t(label)}
</th>
))}
</tr>
</thead>
<tbody>
<tr>
<td className='px-3 py-4'>{t('示例联系人')}</td>
<td className='px-3 py-4'>{t('示例科技有限公司')}</td>
<td className='px-3 py-4'>{t('企业 AI 应用演示')}</td>
<td className='px-3 py-4'>
<Tag color='orange'>{t('待联系')}</Tag>
</td>
</tr>
</tbody>
</table>
</div>
</Card>
)}
</div>
);
}