feat: 移除不再使用的配置文件和更新组件,提升代码整洁性

- 删除 .claude/settings.local.json 配置文件,清理不必要的代码。
- 更新多个组件以引入音频资源,增强用户互动体验。
- 调整引导对话文本,确保信息准确性和一致性。
- 更新图像资源,提升视觉内容的准确性和一致性。
This commit is contained in:
zhongyidian committed 2026-01-20 18:06:55 +08:00
1 parent cf64e7ec50
commit 8ba36a4a1a
132 files changed
+546 -454

No files matched your search

+29 -12
View File
@@ -1,7 +1,13 @@
import { getBackgroundImage, getStaticImage } from "@/lib/utils";
import { getBackgroundImage, getPublicPath, getStaticImage } from "@/lib/utils";
import { useState, useEffect } from "react";
import { useNavigate, useParams } from "react-router-dom";
import { Image, GuideSteps, GuideStepsItem, EndingOverlay } from "@/components";
import {
Image,
GuideSteps,
GuideStepsItem,
StudyGuideModal,
EndingOverlay,
} from "@/components";
import { SingleChoiceQuizPanel } from "@/components/layout/quiz";
import SuccessAlert from "@/components/layout/alert/success-alert";
@@ -33,15 +39,14 @@ const LuxunReflectionScene3 = () => {
const [completedQuiz3, setCompletedQuiz3] = useState(false); // 题目3是否完成
const [showSummary, setShowSummary] = useState(false); // 是否显示总结
const [completionGuideVisible, setCompletionGuideVisible] = useState(false); // 通关提示对话是否显示
const [_completionGuideFinished, setCompletionGuideFinished] =
useState(false); // 通关提示对话是否已完成
const [showGuideModal, setShowGuideModal] = useState(true);
// 成功提示相关状态
const [showSuccessAlert, setShowSuccessAlert] = useState(false);
const [successMessage, setSuccessMessage] = useState("");
// 结束语覆盖层是否显示
const [showEndingOverlay, setShowEndingOverlay] = useState(false);
// 结束语覆盖层是否已关闭
const [endingOverlayFinished, setEndingOverlayFinished] = useState(false);
const [showEndingOverlay, setShowEndingOverlay] = useState(false);
const allCompleted = completedQuiz1 && completedQuiz2 && completedQuiz3;
const progress =
@@ -55,7 +60,7 @@ const LuxunReflectionScene3 = () => {
if (showSummary) {
const timer = setTimeout(() => {
setCompletionGuideVisible(true);
}, 800);
}, 500);
return () => clearTimeout(timer);
}
}, [showSummary]);
@@ -287,7 +292,7 @@ const LuxunReflectionScene3 = () => {
<div className="absolute top-[calc(2.4rem+204px)] left-0 w-[995px] h-[525px] pt-16 px-10">
<div className="flex items-center justify-between">
{/* 提示图标 - 鲁迅1左侧 */}
{hintPosition === "luxun1" && (
{hintPosition === "luxun1" && !showGuanzhu && (
<div className="absolute left-80 top-60 flex items-center z-10 pointer-events-none">
<img
className="animate-finger-bounce scale-x-[-1]"
@@ -438,8 +443,6 @@ const LuxunReflectionScene3 = () => {
onVisibleChange={(visible) => {
if (!visible) {
setCompletionGuideVisible(false);
setCompletionGuideFinished(true); // 对话关闭后标记为已完成
// 显示结束语覆盖层
setShowEndingOverlay(true);
}
}}
@@ -447,12 +450,14 @@ const LuxunReflectionScene3 = () => {
highlightSelectors={[]}
zIndex={10000}
>
<GuideStepsItem speaker="guide">
<GuideStepsItem
speaker="guide"
audioSrc={getPublicPath("audio/luxun/mp3_luxun_33_02.mp3")}
>
恭喜你读懂了鲁迅的文字与初心,愿这份精神能伴你前行!
</GuideStepsItem>
</GuideSteps>
{/* 结束语覆盖层 */}
<EndingOverlay
visible={showEndingOverlay}
text="愿你走过我的文学足迹,读懂文字的力量,心怀热望,直面生活!"
@@ -461,7 +466,19 @@ const LuxunReflectionScene3 = () => {
setShowEndingOverlay(false);
setEndingOverlayFinished(true);
}}
audioSrc={getPublicPath("audio/luxun/mp3_luxun_34.mp3")}
/>
<StudyGuideModal
visible={showGuideModal}
onContinue={() => {
setShowGuideModal(false);
}}
verticalAlign="center"
audioSrc={getPublicPath("audio/luxun/mp3_luxun_33.mp3")}
>
先生的每一步足迹、每一篇文字,都藏着不变的精神底色——拼出这份精神脉络,读懂先生的初心!
</StudyGuideModal>
</div>
);
};