update:1.新增章节内容批量生成功能

This commit is contained in:
xiamuceer
2025-11-06 12:36:32 +08:00
parent d76c79e733
commit e8396f0cbd
11 changed files with 1381 additions and 28 deletions
@@ -0,0 +1,121 @@
import { Modal, Button, Space } from 'antd';
import { useEffect, useState } from 'react';
interface AnnouncementModalProps {
visible: boolean;
onClose: () => void;
onDoNotShowToday: () => void;
}
export default function AnnouncementModal({ visible, onClose, onDoNotShowToday }: AnnouncementModalProps) {
const [imageError, setImageError] = useState(false);
useEffect(() => {
if (visible) {
setImageError(false);
}
}, [visible]);
const handleDoNotShowToday = () => {
onDoNotShowToday();
onClose();
};
return (
<Modal
title="🎉 欢迎使用 AI小说创作助手"
open={visible}
onCancel={onClose}
footer={
<Space style={{ width: '100%', justifyContent: 'center' }}>
<Button onClick={onClose} size="large">
</Button>
<Button type="primary" onClick={handleDoNotShowToday} size="large">
</Button>
</Space>
}
width={600}
centered
styles={{
body: {
padding: '24px',
},
}}
>
<div style={{ textAlign: 'center' }}>
<div style={{
marginBottom: '16px',
fontSize: '16px',
color: '#666',
lineHeight: '1.6',
}}>
<p>👋 </p>
<p></p>
<ul style={{
textAlign: 'left',
marginLeft: '40px',
marginTop: '12px',
marginBottom: '20px',
}}>
<li>💬 </li>
<li>💡 使</li>
<li>🐛 </li>
<li>📚 </li>
</ul>
<p style={{ fontWeight: 600, color: '#333', marginBottom: '16px' }}>
QQ交流群
</p>
</div>
{!imageError ? (
<div style={{
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
padding: '20px',
background: '#f5f5f5',
borderRadius: '8px',
}}>
<img
src="/qq.jpg"
alt="QQ交流群二维码"
style={{
maxWidth: '100%',
maxHeight: '360px',
borderRadius: '8px',
boxShadow: '0 2px 8px rgba(0, 0, 0, 0.1)',
}}
onError={() => setImageError(true)}
/>
</div>
) : (
<div style={{
padding: '40px',
background: '#f5f5f5',
borderRadius: '8px',
color: '#999',
}}>
<p></p>
<p style={{ fontSize: '12px', marginTop: '8px' }}>
qq.jpg frontend/public/
</p>
</div>
)}
<div style={{
marginTop: '20px',
padding: '12px',
background: '#fff7e6',
borderRadius: '8px',
border: '1px solid #ffd591',
fontSize: '14px',
color: '#ad6800',
}}>
💡 "今天内不再提示"
</div>
</div>
</Modal>
);
}