feat(system):优化后端

1.新增后端测试
2.增加了后端的加密
3.增加了i18n(国际化)
This commit is contained in:
2026-05-31 15:39:34 +00:00
parent affe460180
commit 99520c69d7
118 changed files with 8174 additions and 1491 deletions
+9
View File
@@ -1,4 +1,5 @@
import { useEffect } from 'react';
import i18n from './i18n';
import { TopBar } from './components/Layout/TopBar';
import { CollapsibleSidebar } from './components/Layout/CollapsibleSidebar';
import { SettingsLayout } from './components/Settings/SettingsLayout';
@@ -22,6 +23,7 @@ function App() {
workTab,
agentTab,
applyTheme,
locale,
} = useAppStore();
const { loadSessions } = useChatStore();
@@ -35,6 +37,13 @@ function App() {
return () => mediaQuery.removeEventListener('change', handler);
}, [applyTheme]);
// Sync persisted locale to i18next on mount
useEffect(() => {
if (locale && i18n.language !== locale) {
i18n.changeLanguage(locale);
}
}, [locale]);
// Check auth and load sessions
useEffect(() => {
const token = localStorage.getItem('token');