refactor!: 模块化拆分 src 结构,新增批量同步服务、查询解析器及前端分页/高级检索功能

- src/ 按 clients/services/api 分层,Config 提升至 crate 根
- 新增 batch_sync.rs(双源并行收割)、query_parser.rs(多平台检索式转换)
- build.rs 自动触发前端 npm install & build
- SearchPanel 支持分页/排序/每页条数/高级检索构建器,前端加入搜索缓存
- 新增 SyncPanel 替换 SettingsPanel;新增 live_search 集成测试
This commit is contained in:
fmq
2026-06-09 10:29:24 +08:00
parent 307a1c0cee
commit e13fa2ad40
27 changed files with 4115 additions and 207 deletions
+4 -4
View File
@@ -1,10 +1,10 @@
// dashboard/src/components/layout/Sidebar.tsx
import { Search, BookOpen, GitFork, Library, Settings } from 'lucide-react';
import { Search, BookOpen, GitFork, Library, RefreshCw } from 'lucide-react';
import type { StandardPaper } from '../../types';
interface SidebarProps {
activeTab: 'search' | 'library' | 'reader' | 'citation' | 'settings';
setActiveTab: (tab: 'search' | 'library' | 'reader' | 'citation' | 'settings') => void;
activeTab: 'search' | 'library' | 'reader' | 'citation' | 'sync';
setActiveTab: (tab: 'search' | 'library' | 'reader' | 'citation' | 'sync') => void;
selectedPaper: StandardPaper | null;
loadCitations: (bibcode: string) => void;
}
@@ -29,9 +29,9 @@ export function Sidebar({ activeTab, setActiveTab, selectedPaper, loadCitations
{[
{ id: 'search', label: '统一检索', icon: Search },
{ id: 'library', label: '馆藏管理', icon: Library },
{ id: 'sync', label: '批量同步', icon: RefreshCw },
{ id: 'reader', label: '双语阅读', icon: BookOpen, disabled: !selectedPaper },
{ id: 'citation', label: '引用星系', icon: GitFork, disabled: !selectedPaper },
{ id: 'settings', label: '系统设置', icon: Settings },
].map(tab => {
const Icon = tab.icon;
const isActive = activeTab === tab.id;