fix: 修复开发/测试包模拟进度被易班同步覆盖的问题
进度模拟面板写入 puzzleStore 后,App 启动时易班同步会将其覆盖; 现在在同步完成后按 sessionStorage 中保存的模式重放模拟进度, 确保测试包的"到达某故居/全流程完成"调试入口生效。 同时纳入近期未提交的页面、组件、资源与环境变量改动。 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
6d40e19346
commit
49ecabbf3a
155 files changed
+1956
-724
No files matched your search
@@ -2,7 +2,6 @@ import { StrictMode } from 'react'
|
||||
import { createRoot } from 'react-dom/client'
|
||||
import './index.css'
|
||||
import App from './App'
|
||||
import { useChenyunStore, useHuangyanpeiStore, usePuzzleStore, useSunzhongshanStore } from './store'
|
||||
|
||||
if (import.meta.env.VITE_DEBUG_ENTRY === 'true' && typeof window !== 'undefined') {
|
||||
import('@/debug/progressionDebug').then(({ setupProgressionDebug }) => {
|
||||
@@ -29,43 +28,6 @@ if (import.meta.env.DEV && typeof window !== 'undefined') {
|
||||
}
|
||||
}
|
||||
|
||||
// 全局键盘快捷键:Ctrl+Shift+R 重置所有缓存
|
||||
const setupGlobalKeyboardShortcuts = () => {
|
||||
if (typeof window !== 'undefined') {
|
||||
document.addEventListener('keydown', (event) => {
|
||||
// Ctrl+Shift+R: 重置所有缓存
|
||||
if (event.ctrlKey && event.shiftKey && event.key === 'R') {
|
||||
event.preventDefault() // 阻止默认的页面刷新行为
|
||||
|
||||
// 显示确认对话框
|
||||
const confirmed = window.confirm(
|
||||
'确定要重置所有缓存吗?这将清除所有已收集的拼图碎片、已完成的展品和线索。'
|
||||
)
|
||||
|
||||
if (confirmed) {
|
||||
try {
|
||||
// 重置所有store
|
||||
useChenyunStore.getState().resetAll()
|
||||
useHuangyanpeiStore.getState().resetAll()
|
||||
usePuzzleStore.getState().resetAll()
|
||||
useSunzhongshanStore.getState().resetAll()
|
||||
|
||||
// 显示成功消息
|
||||
alert('所有缓存已重置!页面将刷新。')
|
||||
window.location.reload()
|
||||
} catch (error) {
|
||||
console.error('重置缓存时出错:', error)
|
||||
alert('重置缓存失败,请查看控制台错误信息。')
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// 设置全局键盘快捷键
|
||||
setupGlobalKeyboardShortcuts()
|
||||
|
||||
const rootElement = document.getElementById('root')
|
||||
if (!rootElement) {
|
||||
throw new Error('Root element not found')
|
||||
|
||||
Reference in new issue
Block a user