feat: 添加全局键盘快捷键和更新故居数据,提升用户体验
- 在 main.tsx 中添加全局键盘快捷键功能,允许用户通过 Ctrl+Shift+R 重置所有缓存。 - 更新多个故居的拼图数据,增加黄炎培和鲁迅的相关信息,丰富学习内容。 - 调整 ResidenceLayout 组件以支持新的故居,确保数据一致性。 - 清理不再使用的拼图布局配置文件,提升代码整洁性。
This commit is contained in:
1 parent
8ba36a4a1a
commit
a365964f54
155 files changed
+1387
-348
No files matched your search
@@ -12,6 +12,7 @@ import { getBackgroundImage, getPublicPath, getStaticImage } from "@/lib/utils";
|
||||
import { useState } from "react";
|
||||
import SuccessAlert from "@/components/layout/alert/success-alert";
|
||||
import { useCursorController } from "@/hooks/useCursorController";
|
||||
import { usePuzzleAnimation } from "@/contexts/PuzzleAnimationContext";
|
||||
|
||||
// starName 固定为 luxun
|
||||
const starName = "luxun";
|
||||
@@ -48,6 +49,9 @@ const LuxunPlace3 = () => {
|
||||
moduleName: string;
|
||||
}>();
|
||||
|
||||
//碎片动画触发方法
|
||||
const { triggerPuzzleAnimation } = usePuzzleAnimation();
|
||||
|
||||
const [activeExhibitId, setActiveExhibitId] = useState<
|
||||
1 | 2 | 3 | 4 | 5 | null
|
||||
>(null);
|
||||
@@ -210,6 +214,23 @@ const LuxunPlace3 = () => {
|
||||
<ExhibitOverlay
|
||||
visible={activeExhibitId !== null}
|
||||
src={activeExhibitId ? exhibitSrcMap[activeExhibitId] : ""}
|
||||
onOpen={()=>{
|
||||
if( activeExhibitId === 1){
|
||||
triggerPuzzleAnimation(6);
|
||||
}
|
||||
if( activeExhibitId === 2){
|
||||
triggerPuzzleAnimation(7);
|
||||
}
|
||||
if( activeExhibitId === 3){
|
||||
triggerPuzzleAnimation(8);
|
||||
}
|
||||
if( activeExhibitId === 4){
|
||||
triggerPuzzleAnimation(9);
|
||||
}
|
||||
if( activeExhibitId === 5){
|
||||
triggerPuzzleAnimation(10);
|
||||
}
|
||||
}}
|
||||
description={
|
||||
activeExhibitId === 5
|
||||
? "为了妥善出版亡友遗著,鲁迅亲自选稿、校对、设计封面。为了躲避反动派的审查,他还特意用“诸夏怀霜社”的名义出版,“怀霜”就是为了纪念瞿秋白。1936年《海上述林》上卷出版时,鲁迅的身体已经极度虚弱,但他仍一遍遍翻看样书,说“这是我对秋白最好的纪念”。"
|
||||
|
||||
Reference in new issue
Block a user