mirror of
https://github.com/LHY0125/PathEditor.git
synced 2026-06-29 01:45:54 +08:00
d28861ff9c
- 新增 Modal 组件,消除 3 个 Dialog 中重复的遮罩层/Escape/stopPropagation 代码 - PathEditDialog/HelpDialog/ImportDialog 改用 Modal 包裹 - handleExport 支持 JSON/CSV 两种格式(CSV 导出代码之前存在但从未接线) - App.tsx 移除冗余的 initDarkMode 后重复设 store 的逻辑 - ErrorBoundary 添加 componentDidCatch 日志和 console.error Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
21 lines
506 B
TypeScript
21 lines
506 B
TypeScript
import { useEffect } from 'react';
|
|
import { useAppStore } from '@/store/app-store';
|
|
import { initDarkMode } from '@/store/theme-store';
|
|
import { AppShell } from '@/components/layout/AppShell';
|
|
import { ErrorBoundary } from '@/components/layout/ErrorBoundary';
|
|
|
|
export default function App() {
|
|
const initialize = useAppStore((s) => s.initialize);
|
|
|
|
useEffect(() => {
|
|
initDarkMode();
|
|
initialize();
|
|
}, [initialize]);
|
|
|
|
return (
|
|
<ErrorBoundary>
|
|
<AppShell />
|
|
</ErrorBoundary>
|
|
);
|
|
}
|