feat: 优化导航栏布局,改进股票搜索结果展示为响应式网格,并更新Gemini模型选项。

This commit is contained in:
xucheng 2026-01-05 12:14:06 +08:00
parent cba066c155
commit bb61028007
4 changed files with 27 additions and 25 deletions

View File

@ -73,8 +73,8 @@ export default function ConfigPage() {
> >
<option value="gemini-2.0-flash">Gemini 2.0 Flash</option> <option value="gemini-2.0-flash">Gemini 2.0 Flash</option>
<option value="gemini-2.5-flash">Gemini 2.5 Flash</option> <option value="gemini-2.5-flash">Gemini 2.5 Flash</option>
<option value="gemini-3-flash">Gemini 3 Flash</option> <option value="gemini-3-flash-preview">Gemini 3 Flash Preview</option>
<option value="gemini-3-pro">Gemini 3 Pro</option> <option value="gemini-3-pro-preview">Gemini 3 Pro Preview</option>
<option value="custom">...</option> <option value="custom">...</option>
</select> </select>
<Button onClick={() => handleSave("AI_MODEL", config["AI_MODEL"])}></Button> <Button onClick={() => handleSave("AI_MODEL", config["AI_MODEL"])}></Button>

View File

@ -7,7 +7,7 @@ export default function Home() {
<div className="flex flex-col gap-4"> <div className="flex flex-col gap-4">
<h1 className="text-3xl font-bold tracking-tight"></h1> <h1 className="text-3xl font-bold tracking-tight"></h1>
<p className="text-muted-foreground"> <p className="text-muted-foreground">
AI驱动的分析 AI驱动的分析
</p> </p>
</div> </div>

View File

@ -5,19 +5,21 @@ import { MonitorPlay } from "lucide-react"
export function NavHeader() { export function NavHeader() {
return ( return (
<header className="flex h-14 items-center gap-4 border-b bg-muted/40 px-6 lg:h-[60px]"> <header className="border-b bg-muted/40">
<Link className="flex items-center gap-2 font-semibold" href="/"> <div className="flex h-14 items-center gap-4 px-6 lg:h-[60px] max-w-7xl mx-auto">
<MonitorPlay className="h-6 w-6" /> <Link className="flex items-center gap-2 font-semibold" href="/">
<span className=""> AI</span> <MonitorPlay className="h-6 w-6" />
</Link> <span className=""> AI</span>
<nav className="ml-auto flex items-center gap-4 sm:gap-6">
<Link className="text-sm font-medium hover:underline underline-offset-4" href="/">
</Link> </Link>
<Link className="text-sm font-medium hover:underline underline-offset-4" href="/config"> <nav className="ml-auto flex items-center gap-4 sm:gap-6">
<Link className="text-sm font-medium hover:underline underline-offset-4" href="/">
</Link>
</nav> </Link>
<Link className="text-sm font-medium hover:underline underline-offset-4" href="/config">
</Link>
</nav>
</div>
</header> </header>
) )
} }

View File

@ -68,19 +68,19 @@ export function SearchStock() {
{results.length > 1 && ( {results.length > 1 && (
<div className="text-sm text-muted-foreground"> {results.length} </div> <div className="text-sm text-muted-foreground"> {results.length} </div>
)} )}
{results.map((result, index) => ( <div className="grid grid-cols-1 md:grid-cols-2 gap-3">
<div key={index} className="bg-muted p-4 rounded-md space-y-2 border hover:border-primary transition-colors"> {results.map((result, index) => (
<div className="font-medium text-lg">{result.company_name}</div> <div key={index} className="bg-muted p-3 rounded-md space-y-2 border hover:border-primary transition-colors">
<div className="text-sm text-muted-foreground"> <div className="font-medium">{result.company_name}</div>
: {result.market} | : {result.symbol} <div className="text-xs text-muted-foreground">
</div> {result.market} | {result.symbol}
<div className="pt-2"> </div>
<Button onClick={() => handleAnalyze(result)} disabled={loading} className="w-full"> <Button onClick={() => handleAnalyze(result)} disabled={loading} className="w-full" size="sm">
{loading ? "正在启动分析..." : "运行分析"} {loading ? "正在启动分析..." : "运行分析"}
</Button> </Button>
</div> </div>
</div> ))}
))} </div>
</div> </div>
)} )}
</CardContent> </CardContent>