+
+
+ IEEE 高级配置
+
+
+ 配置 IEEE API 配额和可选的 API Key 覆盖
+
+
+
+ {/* 每日配额 */}
+
+
+
+ handleQuotaChange(parseInt(e.target.value) || 0)}
+ disabled={readOnly}
+ className="block w-32 rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-100 sm:text-sm disabled:opacity-50"
+ />
+
+ 次/天
+
+
+ (免费 API 上限:50 次/天)
+
+
+
+ handleQuotaChange(parseInt(e.target.value))}
+ disabled={readOnly}
+ className="w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 disabled:opacity-50"
+ />
+
+
+
+ {/* API Key 覆盖 */}
+
+
+
+ handleApiKeyChange(e.target.value)}
+ disabled={readOnly}
+ placeholder="留空则使用全局配置"
+ className="block w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-100 sm:text-sm disabled:opacity-50"
+ />
+
+
+
+ 留空则使用 .env 中的全局 IEEE_API_KEY 配置
+
+
+
+ {/* 配额使用说明 */}
+
+
+ 💡 配额使用说明
+
+
+ - • 每次 IEEE 搜索会计入 1 次配额
+ - • 配额按天计算,UTC 时间 00:00 重置
+ - • 配额用尽后自动跳过 IEEE 渠道
+ - • 建议设置 10-20 次/天用于测试
+
+
+
+ {/* 警告提示 */}
+ {quota > 20 && (
+
+
+
+
+
+ 注意:设置较高的配额({quota} 次/天)可能会快速消耗 IEEE 免费 API 限额。
+ 建议根据实际需求调整。
+
+
+
+
+ )}
+
+ );
+};
+
+export default IeeeQuotaConfig;
diff --git a/frontend/src/components/topics/TopicChannelSelector.tsx b/frontend/src/components/topics/TopicChannelSelector.tsx
new file mode 100644
index 0000000..827153f
--- /dev/null
+++ b/frontend/src/components/topics/TopicChannelSelector.tsx
@@ -0,0 +1,224 @@
+import React, { useState } from 'react';
+import { useChannels } from '@/contexts/ChannelContext';
+import { ChevronDown, Check, Globe, Cpu, BookOpen, DollarSign, FlaskConical } from 'lucide-react';
+
+interface TopicChannelSelectorProps {
+ selectedChannels?: string[];
+ onChange?: (channels: string[]) => void;
+ readOnly?: boolean;
+}
+
+const CATEGORY_CONFIG = [
+ { id: 'general', name: '通用搜索', icon: Globe },
+ { id: 'cs', name: 'AI / CS 增强', icon: Cpu },
+ { id: 'preprint', name: '预印本', icon: FlaskConical },
+ { id: 'paid', name: '付费渠道', icon: DollarSign },
+];
+
+export const TopicChannelSelector: React.FC