update:1.小说项目创建支持双模式生成,大纲-章节(一对一&一对多) 2.新增章节管理-编辑章节规划功能 3.修复灵感模式可重复点击选项问题,刷新对话内容丢失问题

This commit is contained in:
xiamuceer
2025-11-27 17:29:23 +08:00
parent 8121c04af9
commit deb6cc37a4
27 changed files with 1797 additions and 216 deletions
+122 -38
View File
@@ -5,14 +5,17 @@ interface AnnouncementModalProps {
visible: boolean;
onClose: () => void;
onDoNotShowToday: () => void;
onNeverShow: () => void;
}
export default function AnnouncementModal({ visible, onClose, onDoNotShowToday }: AnnouncementModalProps) {
const [imageError, setImageError] = useState(false);
export default function AnnouncementModal({ visible, onClose, onDoNotShowToday, onNeverShow }: AnnouncementModalProps) {
const [qqImageError, setQqImageError] = useState(false);
const [wxImageError, setWxImageError] = useState(false);
useEffect(() => {
if (visible) {
setImageError(false);
setQqImageError(false);
setWxImageError(false);
}
}, [visible]);
@@ -21,6 +24,11 @@ export default function AnnouncementModal({ visible, onClose, onDoNotShowToday }
onClose();
};
const handleNeverShow = () => {
onNeverShow();
onClose();
};
return (
<Modal
title="🎉 欢迎使用 AI小说创作助手"
@@ -28,15 +36,15 @@ export default function AnnouncementModal({ visible, onClose, onDoNotShowToday }
onCancel={onClose}
footer={
<Space style={{ width: '100%', justifyContent: 'center' }}>
<Button onClick={onClose} size="large">
<Button onClick={handleDoNotShowToday} size="large">
</Button>
<Button type="primary" onClick={handleDoNotShowToday} size="large">
<Button type="primary" onClick={handleNeverShow} size="large">
</Button>
</Space>
}
width={600}
width={800}
centered
styles={{
body: {
@@ -65,44 +73,120 @@ export default function AnnouncementModal({ visible, onClose, onDoNotShowToday }
<li>📚 </li>
</ul>
<p style={{ fontWeight: 600, color: '#333', marginBottom: '16px' }}>
QQ交流群
</p>
</div>
{!imageError ? (
<div style={{
display: 'flex',
justifyContent: 'center',
alignItems: 'flex-start',
gap: '24px',
padding: '20px',
background: '#f5f5f5',
borderRadius: '8px',
flexWrap: 'wrap',
}}>
{/* QQ 二维码 */}
<div style={{
display: 'flex',
justifyContent: 'center',
flexDirection: 'column',
alignItems: 'center',
padding: '20px',
background: '#f5f5f5',
borderRadius: '8px',
minWidth: '280px',
}}>
<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 style={{ fontWeight: 600, color: '#333', marginBottom: '12px', fontSize: '15px' }}>
QQ交流群
</p>
{!qqImageError ? (
<div style={{
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
background: '#fff',
borderRadius: '8px',
padding: '8px',
boxShadow: '0 2px 8px rgba(0, 0, 0, 0.1)',
}}>
<img
src="/qq.jpg"
alt="QQ交流群二维码"
style={{
maxWidth: '280px',
maxHeight: '280px',
width: 'auto',
height: 'auto',
display: 'block',
objectFit: 'contain',
}}
onError={() => setQqImageError(true)}
/>
</div>
) : (
<div style={{
width: '280px',
height: '280px',
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
background: '#fff',
borderRadius: '8px',
color: '#999',
}}>
<p></p>
</div>
)}
</div>
)}
{/* 微信二维码 */}
<div style={{
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
minWidth: '280px',
}}>
<p style={{ fontWeight: 600, color: '#333', marginBottom: '12px', fontSize: '15px' }}>
</p>
{!wxImageError ? (
<div style={{
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
background: '#fff',
borderRadius: '8px',
padding: '8px',
boxShadow: '0 2px 8px rgba(0, 0, 0, 0.1)',
}}>
<img
src="/WX.png"
alt="微信交流群二维码"
style={{
maxWidth: '280px',
maxHeight: '280px',
width: 'auto',
height: 'auto',
display: 'block',
objectFit: 'contain',
}}
onError={() => setWxImageError(true)}
/>
</div>
) : (
<div style={{
width: '280px',
height: '280px',
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
background: '#fff',
borderRadius: '8px',
color: '#999',
}}>
<p></p>
</div>
)}
</div>
</div>
<div style={{
marginTop: '20px',
@@ -113,7 +197,7 @@ export default function AnnouncementModal({ visible, onClose, onDoNotShowToday }
fontSize: '14px',
color: '#ad6800',
}}>
💡 "今内不再示"
💡 "今内不再示""永不再展示"
</div>
</div>
</Modal>