mirror of
https://github.com/aiclientproxy/proxycast.git
synced 2026-09-24 23:10:56 +08:00
将"模型"和"日志"页面迁移到 API Server 页面中作为标签页,使功能更加集中和关联。 主要变更: - 创建 ModelsTab.tsx 和 LogsTab.tsx 组件 - 在 API Server 页面添加"可用模型"和"日志"两个新标签页 - 从导航栏移除独立的"模型"和"日志"入口 - 删除原始的 Models.tsx 和 Logs.tsx 文件 - 更新版本号到 0.5.0 优化: - 导航栏更简洁,减少了两个独立入口 - API Server 页面成为管理代理服务的中心 - 所有功能逻辑保持不变,只是组织结构更合理 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
36 lines
1.0 KiB
TypeScript
36 lines
1.0 KiB
TypeScript
import { cn } from "@/lib/utils";
|
|
import { AppType } from "@/lib/api/switch";
|
|
|
|
interface AppTabsProps {
|
|
activeApp: AppType;
|
|
onAppChange: (app: AppType) => void;
|
|
}
|
|
|
|
const apps: { id: AppType; label: string; description: string }[] = [
|
|
{ id: "claude", label: "Claude Code", description: "Claude CLI 配置" },
|
|
{ id: "codex", label: "Codex", description: "OpenAI Codex CLI" },
|
|
{ id: "gemini", label: "Gemini", description: "Google Gemini CLI" },
|
|
];
|
|
|
|
export function AppTabs({ activeApp, onAppChange }: AppTabsProps) {
|
|
return (
|
|
<div className="flex gap-2 border-b pb-2">
|
|
{apps.map((app) => (
|
|
<button
|
|
key={app.id}
|
|
onClick={() => onAppChange(app.id)}
|
|
className={cn(
|
|
"px-4 py-2 rounded-t-lg text-sm font-medium transition-colors",
|
|
activeApp === app.id
|
|
? "bg-primary text-primary-foreground"
|
|
: "hover:bg-muted text-muted-foreground"
|
|
)}
|
|
title={app.description}
|
|
>
|
|
{app.label}
|
|
</button>
|
|
))}
|
|
</div>
|
|
);
|
|
}
|