feat: add insight inbox

This commit is contained in:
Jason
2026-05-05 13:54:50 +08:00
parent 65247a01d3
commit 416b62fdf1
14 changed files with 1623 additions and 106 deletions

View File

@@ -28,6 +28,7 @@ import ChatHistoryPage from './pages/ChatHistoryPage'
import NotificationWindow from './pages/NotificationWindow'
import AccountManagementPage from './pages/AccountManagementPage'
import BackupPage from './pages/BackupPage'
import InsightInboxPage from './pages/InsightInboxPage'
import { useAppStore } from './stores/appStore'
import { themes, useThemeStore, type ThemeId, type ThemeMode } from './stores/themeStore'
@@ -319,6 +320,19 @@ function App() {
}
}, [navigate, isNotificationWindow])
useEffect(() => {
if (isNotificationWindow) return
const removeListener = window.electronAPI?.notification?.onNavigateToRoute?.((route: string) => {
if (!route || !route.startsWith('/')) return
navigate(route, { replace: true })
})
return () => {
removeListener?.()
}
}, [navigate, isNotificationWindow])
// 解锁后显示暂存的更新弹窗
useEffect(() => {
if (!isLocked && updateInfo?.hasUpdate && !showUpdateDialog && !isDownloading) {
@@ -703,6 +717,7 @@ function App() {
<Route path="/export" element={<div className="export-route-anchor" aria-hidden="true" />} />
<Route path="/sns" element={<SnsPage />} />
<Route path="/insight-inbox" element={<InsightInboxPage />} />
<Route path="/biz" element={<BizPage />} />
<Route path="/contacts" element={<ContactsPage />} />
<Route path="/resources" element={<ResourcesPage />} />