From 1c6918e6fd137c0c657d47b3810694f3042c20ea Mon Sep 17 00:00:00 2001 From: Song367 <601337784@qq.com> Date: Thu, 12 Mar 2026 18:03:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E7=A4=BA=E6=A1=86UI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.tsx | 61 +++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 57 insertions(+), 4 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index dc192a8..bf761c5 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -387,6 +387,8 @@ export default function App() { // Conversion Settings States const [showSettingsModal, setShowSettingsModal] = useState(false); + const [showCreationGuardModal, setShowCreationGuardModal] = useState(false); + const [creationGuardMessage, setCreationGuardMessage] = useState(''); const [conversionWorldview, setConversionWorldview] = useState(() => localStorage.getItem('scriptflow_conversion_worldview') || ''); const [conversionOutline, setConversionOutline] = useState(() => localStorage.getItem('scriptflow_conversion_outline') || ''); const [conversionCharacterProfiles, setConversionCharacterProfiles] = useState(() => localStorage.getItem('scriptflow_conversion_characterProfiles') || ''); @@ -1015,8 +1017,7 @@ ${script}`; // Validation: Require Story Outline and Worldview Settings if (!creationOutline.trim() || !creationWorldview.trim()) { - alert('\u8bf7\u5148\u5728\u201c\u5267\u60c5\u80cc\u666f\u201d\u4e2d\u586b\u5199\u201c\u6545\u4e8b\u5927\u7eb2\u201d\u548c\u201c\u4e16\u754c\u89c2\u8bbe\u5b9a\u201d\u540e\u518d\u6267\u884c\u751f\u6210\u3002'); - setShowSettingsModal(true); + showCreationBackgroundGuard('\u8bf7\u5148\u5728\u300c\u5267\u60c5\u80cc\u666f\u300d\u4e2d\u586b\u5199\u300c\u6545\u4e8b\u5927\u7eb2\u300d\u548c\u300c\u4e16\u754c\u89c2\u8bbe\u5b9a\u300d\uff0c\u518d\u5f00\u59cb\u751f\u6210\u5267\u672c\u3002'); return; } @@ -1071,8 +1072,7 @@ ${script}`; const handleGenerateAll = async () => { // Validation: Require Story Outline and Worldview Settings if (!creationOutline.trim() || !creationWorldview.trim()) { - alert('\u8bf7\u5148\u5728\u201c\u5267\u60c5\u80cc\u666f\u201d\u4e2d\u586b\u5199\u201c\u6545\u4e8b\u5927\u7eb2\u201d\u548c\u201c\u4e16\u754c\u89c2\u8bbe\u5b9a\u201d\u540e\u518d\u6267\u884c\u6279\u91cf\u751f\u6210\u3002'); - setShowSettingsModal(true); + showCreationBackgroundGuard('\u8bf7\u5148\u5728\u300c\u5267\u60c5\u80cc\u666f\u300d\u4e2d\u586b\u5199\u300c\u6545\u4e8b\u5927\u7eb2\u300d\u548c\u300c\u4e16\u754c\u89c2\u8bbe\u5b9a\u300d\uff0c\u518d\u6267\u884c\u6279\u91cf\u751f\u6210\u3002'); return; } @@ -1161,6 +1161,11 @@ ${script}`; setIsCreationCharacterProfilesEditing(value); }; + const showCreationBackgroundGuard = (message: string) => { + setCreationGuardMessage(message); + setShowCreationGuardModal(true); + }; + const handleShowFinalizedCreation = () => { const finalizedPages = creationPages.filter(p => p.selectedScriptIndex !== null); @@ -2545,6 +2550,54 @@ ${script}`; )} + {/* Creation Guard Modal */} + + {showCreationGuardModal && ( +
+ +
+
+
+
+ +
+
+

Creation Notice

+

{'\u4fe1\u606f\u4e0d\u5b8c\u6574'}

+

{creationGuardMessage}

+
+
+ +
+ + +
+
+ +
+ )} + + {/* Creation Settings Modal */} {showSettingsModal && (